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.2KB

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