Explorar o código

Merge pull request #885 from benlumley/fix-download-text

Fix download label/prompt showing when no export formats are configured
Thomas %!s(int64=13) %!d(string=hai) anos
pai
achega
1fe4218a3c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Resources/views/CRUD/base_list.html.twig

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

@@ -73,7 +73,7 @@ file that was distributed with this source code.
                     <tr>
                         <th colspan="{{ admin.list.elements|length - 1 }}">
                             {{ admin.datagrid.pager.page }} / {{ admin.datagrid.pager.lastpage }}
-                            {% if admin.isGranted("EXPORT") %}
+                            {% if admin.isGranted("EXPORT") and admin.getExportFormats()|length %}
                                 -
                                 {{ "label_export_download"|trans({}, "SonataAdminBundle") }}
                                 {% for format in admin.getExportFormats() %}