Adds a new link_queue field to the Rich Text widget that allows web authors to upload spreadsheets that queue links to display by date.
Preserves the Rich Text functionality as a fallback if link queue isn't used or no links are available for the current date.
Adds unit tests
Bumps Ubuntu version in Vagrant
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:
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.
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).
Fixes #619
Changes in this request
link_queue
field to the Rich Text widget that allows web authors to upload spreadsheets that queue links to display by date.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: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:
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/