Explorar el Código

added after_nav twig block in standard_layout to ease extending of the user navigation

added "list" check for update_and_list button
Robert Gruendler hace 13 años
padre
commit
9d55d0d04f

+ 3 - 1
Resources/views/CRUD/base_edit.html.twig

@@ -89,7 +89,9 @@ file that was distributed with this source code.
                 {% else %}
                     {% if admin.id(object) %}
                         <input type="submit" class="btn primary" name="btn_update_and_edit" value="{% trans from 'SonataAdminBundle' %}btn_update_and_edit_again{% endtrans %}"/>
-                        <input type="submit" class="btn" name="btn_update_and_list" value="{% trans from 'SonataAdminBundle' %}btn_update_and_return_to_list{% endtrans %}"/>
+						{% if admin.hasroute('list') and admin.isGranted('LIST') %}
+                            <input type="submit" class="btn" name="btn_update_and_list" value="{% trans from 'SonataAdminBundle' %}btn_update_and_return_to_list{% endtrans %}"/>
+						{% endif %}
 
                         {% if admin.hasroute('delete') and admin.isGranted('DELETE', object) %}
                             {% trans from 'SonataAdminBundle' %}delete_or{% endtrans %}

+ 1 - 0
Resources/views/standard_layout.html.twig

@@ -97,6 +97,7 @@ file that was distributed with this source code.
                                             </ul>
                                         </li>
                                     {% endfor %}
+									{% block after_nav %} {% endblock %}
                                 </ul>
                             {% endif %}