Procházet zdrojové kódy

Merge pull request #2184 from NoScopie/patch-4

Hide actions if _actions is empty
Thomas před 10 roky
rodič
revize
c489a3d9e0
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      Resources/views/standard_layout.html.twig

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

@@ -251,7 +251,7 @@ file that was distributed with this source code.
                                                     {% endif %}
                                                 </div>
 
-                                                {% if _actions is not empty %}
+                                                {% if _actions|replace({ '<li>': '', '</li>': '' })|trim is not empty %}
                                                     <ul class="nav navbar-nav navbar-right">
                                                         <li class="dropdown sonata-actions">
                                                             <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ 'link_actions'|trans({}, 'SonataAdminBundle') }} <b class="caret"></b></a>