Explorar el Código

added check to pager template to not show last-page button if its the same as next-page

Sjoerd Peters hace 12 años
padre
commit
03d8d8fa01
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Resources/views/CRUD/base_list.html.twig

+ 1 - 1
Resources/views/CRUD/base_list.html.twig

@@ -160,7 +160,7 @@ file that was distributed with this source code.
                                             <li><a href="{{ admin.generateUrl('list', admin.modelmanager.paginationparameters(admin.datagrid, admin.datagrid.pager.nextpage)) }}" title="{{ 'link_next_pager'|trans({}, 'SonataAdminBundle') }}">&rsaquo;</a></li>
                                         {% endif %}
 
-                                        {% if admin.datagrid.pager.page != admin.datagrid.pager.lastpage  %}
+                                        {% if admin.datagrid.pager.page != admin.datagrid.pager.lastpage and admin.datagrid.pager.lastpage != admin.datagrid.pager.nextpage %}
                                             <li><a href="{{ admin.generateUrl('list', admin.modelmanager.paginationparameters(admin.datagrid, admin.datagrid.pager.lastpage)) }}" title="{{ 'link_last_pager'|trans({}, 'SonataAdminBundle') }}">&raquo;</a></li>
                                         {% endif %}
                                     </ul>