Skip to content
Snippets Groups Projects
Commit 47cbf947 authored by Eniko Tot's avatar Eniko Tot
Browse files

[FEATURE] Convert jobs pagination with bootstrap 5, fix setup

parent 8f2e89ed
No related branches found
No related tags found
1 merge request!50Bootstrap 5 Support
......@@ -54,5 +54,6 @@ config.recordLinks {
}
[{$plugin.tx_project_theme.config.bootstrapVersion} == 5]
plugin.tx_sgjobs.view.partialRootPaths.0 = EXT:sg_jobs/Resources/Private/Partials/Bootstrap5/
plugin.tx_sgjobs.view.templateRootPaths.10 = EXT:sg_jobs/Resources/Private/Templates/Bootstrap5/
plugin.tx_sgjobs.view.partialRootPaths.10 = EXT:sg_jobs/Resources/Private/Partials/Bootstrap5/
[end]
{namespace sg=SGalinski\SgJobs\ViewHelpers}
<f:layout name="PageBrowser" />
<f:section name="main">
<f:if condition="{numberOfPages} > 1">
<nav aria-label="Jobs pagination">
<ul class="pagination">
<li class="page-item {f:if(condition: '!{prevPageExist}', then: 'disabled')}">
<f:variable name="prevPage" value="{currentPage - 1}" />
<f:link.action addQueryString="1" class="page-link"
additionalParams="{tx_sgjobs_pagebrowser: {currentPage: prevPage}}"
additionalAttributes="{aria-label: 'Previous'}">
&laquo;
</f:link.action>
</li>
<f:if condition="{enableLessPages} && {showLessPages}">
<li class="page-item">
<f:variable name="lessPage" value="{currentPage - 2}" />
<f:link.action addQueryString="1" class="page-link"
additionalParams="{tx_sgjobs_pagebrowser: {currentPage: lessPage}}">
...
</f:link.action>
</li>
</f:if>
<f:for each="{pageLinks}" as="pageLink">
<li class="page-item {f:if(condition: '{pageLink.isCurrentPage}', then: 'active')}">
<f:link.action addQueryString="1" class="page-link"
additionalParams="{tx_sgjobs_pagebrowser: {currentPage: pageLink.page}}">
{pageLink.number}
</f:link.action>
</li>
</f:for>
<f:if condition="{enableMorePages} && {showNextPages}">
<li class="page-item">
<f:variable name="morePage" value="{currentPage + 2}" />
<f:link.action addQueryString="1" class="page"
additionalParams="{tx_sgjobs_pagebrowser: {currentPage: morePage}}">
...
</f:link.action>
</li>
</f:if>
<li class="page-item {f:if(condition: '!{nextPageExist}', then: 'disabled')}">
<f:variable name="nextPage" value="{currentPage + 1}" />
<f:link.action addQueryString="1" class="page-link"
additionalParams="{tx_sgjobs_pagebrowser: {currentPage: nextPage}}"
additionalAttributes="{aria-label: 'Next'}">
&raquo;
</f:link.action>
</li>
</ul>
</nav>
</f:if>
</f:section>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment