Skip to content
Snippets Groups Projects
Verified Commit 83ccd0b8 authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[BUGFIX] Fix sg_jobs pagination so it does not display /0/ as page

parent 62c8b8aa
No related branches found
No related tags found
No related merge requests found
...@@ -10,11 +10,21 @@ ...@@ -10,11 +10,21 @@
<f:then> <f:then>
<li class="tx-pagebrowse-prev"> <li class="tx-pagebrowse-prev">
<f:variable name="prevPage" value="{currentPage - 1}"/> <f:variable name="prevPage" value="{currentPage - 1}"/>
<f:link.action addQueryString="1" <f:if condition="{prevPage} == 0">
additionalParams="{tx_sgjobs_pagebrowser: {currentPage: prevPage}}" <f:then>
additionalAttributes="{aria-label: 'Previous'}"> <f:link.action addQueryString="1"
&laquo; additionalAttributes="{aria-label: 'Previous'}">
</f:link.action> &laquo;
</f:link.action>
</f:then>
<f:else>
<f:link.action addQueryString="1"
additionalParams="{tx_sgjobs_pagebrowser: {currentPage: prevPage}}"
additionalAttributes="{aria-label: 'Previous'}">
&laquo;
</f:link.action>
</f:else>
</f:if>
</li> </li>
</f:then> </f:then>
<f:else> <f:else>
...@@ -31,10 +41,19 @@ ...@@ -31,10 +41,19 @@
<f:if condition="{enableLessPages} && {showLessPages}"> <f:if condition="{enableLessPages} && {showLessPages}">
<li> <li>
<f:variable name="lessPage" value="{currentPage - 2}"/> <f:variable name="lessPage" value="{currentPage - 2}"/>
<f:link.action addQueryString="1" <f:if condition="{lessPage} == 0">
additionalParams="{tx_sgjobs_pagebrowser: {currentPage: lessPage}}"> <f:then>
... <f:link.action addQueryString="1">
</f:link.action> ...
</f:link.action>
</f:then>
<f:else>
<f:link.action addQueryString="1"
additionalParams="{tx_sgjobs_pagebrowser: {currentPage: lessPage}}">
...
</f:link.action>
</f:else>
</f:if>
</li> </li>
</f:if> </f:if>
...@@ -52,10 +71,19 @@ ...@@ -52,10 +71,19 @@
</f:then> </f:then>
<f:else> <f:else>
<li class="tx-pagebrowse-page"> <li class="tx-pagebrowse-page">
<f:link.action addQueryString="1" <f:if condition="{pageLink.page} == 0">
additionalParams="{tx_sgjobs_pagebrowser: {currentPage: pageLink.page}}"> <f:then>
{pageLink.number} <f:link.action addQueryString="1">
</f:link.action> {pageLink.number}
</f:link.action>
</f:then>
<f:else>
<f:link.action addQueryString="1"
additionalParams="{tx_sgjobs_pagebrowser: {currentPage: pageLink.page}}">
{pageLink.number}
</f:link.action>
</f:else>
</f:if>
</li> </li>
</f:else> </f:else>
</f:if> </f:if>
......
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