瀏覽代碼

Enclose dropdown definitions in the sonata_top_bar_nav block.

Romain Geissler 13 年之前
父節點
當前提交
962481e3b4
共有 1 個文件被更改,包括 14 次插入12 次删除
  1. 14 12
      Resources/views/standard_layout.html.twig

+ 14 - 12
Resources/views/standard_layout.html.twig

@@ -84,18 +84,20 @@ file that was distributed with this source code.
                                 </a>
                             {% endblock %}
                             <ul class="nav">
-                                {% for group in admin_pool.dashboardgroups %}
-                                    <li class="dropdown">
-                                        <a href="#" class="dropdown-toggle">{{ group.label|trans({}, group.label_catalogue) }}</a>
-                                        <ul class="dropdown-menu">
-                                            {% for admin in group.items %}
-                                                {% if admin.hasroute('create') and admin.isGranted('CREATE') or admin.hasroute('list') and admin.isGranted('LIST') %}
-                                                    <li><a href="{{ admin.generateUrl('list')}}">{{ admin.label|trans({}, admin.translationdomain) }}</a></li>
-                                                {% endif %}
-                                            {% endfor %}
-                                        </ul>
-                                    </li>
-                                {% endfor %}
+                                {% block sonata_top_bar_nav %}
+                                    {% for group in admin_pool.dashboardgroups %}
+                                        <li class="dropdown">
+                                            <a href="#" class="dropdown-toggle">{{ group.label|trans({}, group.label_catalogue) }}</a>
+                                            <ul class="dropdown-menu">
+                                                {% for admin in group.items %}
+                                                    {% if admin.hasroute('create') and admin.isGranted('CREATE') or admin.hasroute('list') and admin.isGranted('LIST') %}
+                                                        <li><a href="{{ admin.generateUrl('list')}}">{{ admin.label|trans({}, admin.translationdomain) }}</a></li>
+                                                    {% endif %}
+                                                {% endfor %}
+                                            </ul>
+                                        </li>
+                                    {% endfor %}
+                                {% endblock %}
                             </ul>
 
                             <p class="pull-right">{% include admin_pool.getTemplate('user_block') %}</p>