Feature: The job list can be paginated
Description
The Jobs List content element rendered every job of its job type on one page. It now has a Pagination tab with two fields:
- Enable pagination, off by default. Off, the list renders every job, as before.
- Results per page, 10 by default.
With the pagination enabled, the list shows one page of jobs and a navigation
to the other pages below it. When georgringer/ is
installed, the navigation links at most
plugin. page numbers
around the current one, 5 by default, and marks the pages it leaves out with an
ellipsis. Without it, the core pagination links every page. The number is a
site setting of the set fgtclb/ and a constant of the static
template, see Pagination of the job list.
- A page link carries the page as
tx_and nothing else. The job type and the switch for hidden jobs come from the content element, so every page keeps them.academicjobs_ list [current Page] - A page beyond the last one shows the last page. A page below one, or a value that is no number, shows the first.
- A list that fits on one page renders no navigation.
Impact
- Nothing changes until an editor enables the pagination on a content element. The existing fields of the content element stay on its first tab, so their stored values keep working.
- The template
Templates/renders one page of jobs and the new partialJob/ List. html Job/. The variablesPagination. html {paginator}and{pagination}are assigned only while the pagination is enabled, and{jobs}is still every job of the list. A project that overridesTemplates/renders every job and no navigation, even with the pagination enabled, until it takes over the change.Job/ List. html - A listener of
\FGTCLB\that replacesAcademic Base\ Event\ Modify Plugin View Event {jobs}changes what the list renders only while the pagination is off. With it enabled, the list renders the page of the paginator, which is built from the jobs before the event. - A project that paginates the list itself, with a FlexForm field of its own or a copy of the list template, should remove it with this update. Editors would otherwise see two pagination switches, and the values stored in the project's own field are not taken over: enable the pagination again on each content element that used it.