Skip to content
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

Enable thumbnail rendering in the Resources ModelAdmin listing #6070

Merged
merged 2 commits into from
Oct 8, 2020

Conversation

Scotchester
Copy link
Contributor

@Scotchester Scotchester commented Oct 8, 2020

This ModelAdmin thumbnail mixin either wasn't available in Wagtail when Resources was set up, or I just overlooked it.

Additions

  • Added ThumbnailMixin to ResourceModelAdmin to enable actual rendering of the thumbnails for things like our placemats
  • Adds a tiny bit of new global admin CSS through our first use of the global_admin_css hook in order to ensure that the column width fits the entire thumbnail

How to test this PR

  1. Pull branch
  2. Load up http://localhost:8000/admin/v1/resource/ and scroll down

Screenshots

Before

image filename output

After

image thumbnail output

Checklist

  • PR has an informative and human-readable title
    • PR titles are used to generate the change log in releases; good ones make that easier to scan.
    • Consider prefixing, e.g., "Mega Menu: fix layout bug", or "Docs: Update Docker installation instructions".
  • Changes are limited to a single goal (no scope creep)
  • Code follows the standards laid out in the CFPB development guidelines

Scott Cranfill added 2 commits October 8, 2020 13:44
This ModelAdmin thumbnail mixin either wasn't available in Wagtail when 
Resources was set up, or I just overlooked it.
@Scotchester Scotchester requested a review from a team October 8, 2020 18:15
@Scotchester Scotchester merged commit cd1507e into main Oct 8, 2020
@Scotchester Scotchester deleted the resource-admin-thumbnails branch October 8, 2020 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants