You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

action.html.twig 1.1KB

4 years ago
4 years ago
12345678910111213141516171819
  1. {% if is_dropdown %}
  2. <a class="btn dropdown-item {{ action.css_class|default('btn-default') }}"
  3. href="{{ action_href }}{{ action.hub is defined ? '&hub='~action.hub : '' }}" target="{{ action.target }}">
  4. {%- if action.icon %}<i class="fa fa-fw fa-{{ action.icon }}"></i> {% endif -%}
  5. {{ action.label|trans(arguments = trans_parameters|merge({ '%entity_id%': item_id }), domain = translation_domain) }}
  6. </a>
  7. {% else %}
  8. {% if action.hub is defined %}
  9. {% set trad = action.label~action.hub|uc_first %}
  10. {% else %}
  11. {% set trad = action.label %}
  12. {% endif %}
  13. <a class="btn {{ is_dropdown|default(false) ? 'dropdown-item' }} {{ action.css_class|default('btn-default') }}"
  14. data-toggle="tooltip"
  15. title="{{ action.label|trans(arguments = trans_parameters|merge({ '%entity_id%': item_id }), domain = translation_domain) }}"
  16. href="{{ action_href }}{{ action.hub is defined ? '&hub='~action.hub : '' }}" target="{{ action.target }}">
  17. {%- if action.icon %}<i class="fa fa-fw fa-{{ action.icon }}"></i> {% endif -%}
  18. </a>
  19. {% endif %}