Explorar o código

Merge pull request #2184 from NoScopie/patch-4

Hide actions if _actions is empty
Thomas %!s(int64=10) %!d(string=hai) anos
pai
achega
c489a3d9e0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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>