{% set class = 'btn tooltip-link js-link-row-action' %}

{% if attributes.class is defined %}
  {% set class = class ~ ' ' ~ attributes.class %}
{% endif %}

{% set route_params = { (action.options.route_param_name) : (record[action.options.route_param_field]) } %}

{% for name, field in action.options.extra_route_params %}
  {% set route_params = route_params|merge({ (name) : (record[field] ?? field) }) %}
{% endfor %}

<a class="{{ class }}"
   href="{{ gls_poland_legacy_link(action.options.route, route_params) }}"
   data-confirm-message="{{ action.options.confirm_message }}"
    {% if attributes.tooltip_name %}
      data-toggle="pstooltip"
      data-placement="top"
      data-original-title="{{ action.name }}"
    {% endif %}
   data-clickable-row="{{ action.options.clickable_row|default(false) }}"
>
  {% if action.icon is not empty %}
    <i class="material-icons">{{ action.icon }}</i>
  {% endif %}
  {% if not attributes.tooltip_name %}
    {{ action.name }}
  {% endif %}
</a>