Переглянути джерело

Merge pull request #662 from pulse00/master

Minor twig improvements
Thomas 13 роки тому
батько
коміт
582f814576

+ 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 %}

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

@@ -85,6 +85,7 @@ file that was distributed with this source code.
                             {% endblock %}
                             {% if app.user %}
                                 <ul class="nav">
+                                    {% block top_bar_before_nav %} {% endblock %}
                                     {% for group in admin_pool.dashboardgroups %}
                                         <li class="dropdown">
                                             <a href="#" class="dropdown-toggle">{{ group.label|trans({}, 'SonataAdminBundle') }}</a>
@@ -97,6 +98,7 @@ file that was distributed with this source code.
                                             </ul>
                                         </li>
                                     {% endfor %}
+                                    {% block top_bar_after_nav %} {% endblock %}
                                 </ul>
                             {% endif %}