Commits

Benoît Allard committed af99e69

web: Correct pagination

  • Participants
  • Parent commits 6ca6de4

Comments (0)

Files changed (1)

web/templates/macros.j2

 <div class="pagination pagination-centered">
   <ul>
     <li class="{{ 'disabled' if not pagination.has_prev }}">
-      <a href="{{ url_for_other_page(pagination.page - 1) }}">
+      <a {% if pagination.has_prev %}href="{{ url_for_other_page(pagination.page - 1) }}"{% endif %}>
 	&laquo;
       </a>
     </li>
     {% endif %}
     {%- endfor %}
     <li class="{{ 'disabled' if not pagination.has_next }}">
-      <a href="{{ url_for_other_page(pagination.page - 1) }}">
+      <a {% if pagination.has_next %}href="{{ url_for_other_page(pagination.page + 1) }}"{% endif %}>
 	&raquo;
       </a>
     </li>