diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index 299e63352b..f77d5b61c5 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -526,214 +526,7 @@
- - - - - - -
- - - -
-
- - {% set actions = {} %} - {% if app['acl'].get(app['authentication'].getUser()).has_right('modifyrecord') %} - {% set label %} - {{ 'action : editer' | trans }} - {% endset %} - {% set actions = actions|merge( { 'edit' : {'icon': "/skins/prod/000000/images/ppen_history.png", 'class':'TOOL_ppen_btn', 'label' : label} }) %} - {% endif %} - {% if app['acl'].get(app['authentication'].getUser()).has_right('changestatus') %} - {% set label %} - {{ 'action : status' | trans }} - {% endset %} - {% set actions = actions|merge( { 'status' : {'icon': "/skins/prod/000000/images/chgstatus_history.png", 'class':'TOOL_chgstatus_btn', 'label' : label} }) %} - {% endif %} - {% if app['acl'].get(app['authentication'].getUser()).has_right('deleterecord') and app['acl'].get(app['authentication'].getUser()).has_right('addrecord') %} - {% set label %} - {{ 'action : collection' | trans }} - {% endset %} - {% set actions = actions|merge( { 'move' : {'icon': "/skins/prod/000000/images/chgcoll_history.png", 'class':'TOOL_chgcoll_btn', 'label' : label} }) %} - {% endif %} - - {% set n_actions = actions|length %} - {% if n_actions > 1 %} - -
- {% for action in actions %} - {% if loop.first %} - - {% endif %} - {% endfor %} - - -
-
- {% elseif n_actions == 1 %} - -
- {% for action in actions %} - - {% endfor %} -
-
- {% endif %} - - {% if app['acl'].get(app['authentication'].getUser()).has_right('push') and app['acl'].get(app['authentication'].getUser()).has_right('bas_chupub') %} - - - - {% elseif app['acl'].get(app['authentication'].getUser()).has_right('push') %} - -
- - - -
-
- {% elseif app['acl'].get(app['authentication'].getUser()).has_right('bas_chupub') %} - -
- - - -
-
- {% endif %} - - {% if app['acl'].get(app['authentication'].getUser()).has_right('doctools') %} - -
- -
-
- {% endif %} - {% if app['acl'].get(app['authentication'].getUser()).has_right('deleterecord') %} - -
- -
-
- {% endif %} + {% include "prod/toolbar.html.twig" with {acl: app['acl'].get(app['authentication'].getUser())} %} {{ 'Preferences' | trans }}
@@ -1236,4 +1029,4 @@ {% endif %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/templates/web/prod/toolbar.html.twig b/templates/web/prod/toolbar.html.twig index caabd3c267..b1056782a3 100644 --- a/templates/web/prod/toolbar.html.twig +++ b/templates/web/prod/toolbar.html.twig @@ -1,10 +1,9 @@ {% block toolbar %}
- - + +