uchicago-library / library_website

The University of Chicago Library Website
5 stars 5 forks source link

New Widget for "Explore Research Guides" #691

Closed bbusenius closed 1 year ago

bbusenius commented 1 year ago

Fixes #619

Changes in this request

In order to test this, you will need a couple of spreadsheets, filled out with the following headers: "Start Date", "End Date", "Link Text", and "URL". The file should be saved as an .xlsx. If your spreadsheet is saved as a different file format or lacks these headers, it will show as a validation error when you try to save the page. A spreadsheet might look like this:

image

Links will only display if the current date falls between the date listed in "Start Date" and "End Date". Links in the past and future will not display. Links are formed out the "Link Text" and "URL" columns. These are case insensitive.

Spreadsheets are added in the "Link queue" StreamField which is now part of the Rich Text widget on StandardPages:

image

When you upload a spreadsheet through the document chooser dialog that is launched, you are allowed to give the spreadsheet a title in Wagtail. This is the title that will be used for this section of links that display in a widget. Each spreadsheet represents one section.

Linting differences Since linting differences in base.py are large, look at lines 1012, 1547, 1953, and 2130 to see the non-linting related changes (load diff to get those links to work).

Documentation https://loop.lib.uchicago.edu/departments/digital-strategy-services/digital-library-development-center/documentation/link-queue-functionality-for-featured-guides-section/