-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single Image Block #50
Conversation
app/models/wagtail/blocks.py
Outdated
icon = "fa fa-picture-o" | ||
|
||
image = ImageChooserBlock(required=True) | ||
caption = blocks.CharBlock(required=False) | ||
credit = blocks.CharBlock(required=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have an attribution
property on the image model. It seems fitting to use the database-level credits, rather than have to re-input credit each time an image is used. The editor may not know, and in any case will have to enter credits when they upload the image.
So delete this line, and then use value.image.attribution
in the template below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. I didn't know that. Thanks.
@conatus I think we should fix the attribution thing, then merge this in and revisit the comments later. |
Fixed. Merge if you check and all good. |
Add a simple single image block, as found in the Figma designs.
Description
Implements a block with a single image and a caption. As seen on the Disasters and Climate Resilence Impact Area page.
How Can It Be Tested?
Screenshots (if appropriate):
Types of changes
Checklist: