- Location: Integrate within 'Page Text' navbar option on the dashboard.
- Functionality: Allow staff to update Hero Image (1 image) and About Us Images (1 or 2 images).
-
Model Usage:
- Use
PageText
model. - Attachments:
has_one_attached :hero_image
andhas_many_attached :about_us_images
.
- Use
-
Form Updates:
- Add input for Hero Image (single attachment).
- Add input for About Us images (up to two attachments).
- Inputs must be clearly labelled.
-
Validations:
- Ensure uploaded files are images and of acceptable size.
-
Controller Actions:
- Add to
PageTextsController
for attaching images. - Include functionality to upload and purge images.
- Add to
-
UI Components:
- Reuse partials for upload input and image display table.
-
Permissions:
- Update policy as necessary to accommodate new features.
-
Frontend Display:
- On org's root/home page, display Hero Image and About Us images if available.
- Default image for the second About Us image if only one is uploaded.
-
Testing:
- Include tests for new functionality.