{% load horizon %}
{% minifyspace %}
  {% if action.method != "GET" %}
    <button {{ action.attr_string_nc|safe }}
      class="data-table-action
        {% if is_small %}btn-sm{% endif %}
        {% for class in action.get_default_classes %}
          {{ class }}
        {% endfor %}
        {% if action.action_type %}
          btn-{{ action.action_type }}
        {% endif %} btn"
      name="action"
      {% if action.help_text %}
        help_text="{{ action.help_text }}"
      {% endif %}
      type="submit"
      {% if is_table_action %}
        value="{{ action.get_param_name }}">
        {% if action.icon != None %}
          <span class="fa fa-{{ action.icon }}"></span>
        {% endif %}
        {% if action.handles_multiple %}
          {{ action.verbose_name_plural }}
        {% else %}
          {{ action.verbose_name }}
        {% endif %}
      {% else %}
        value="{{ action.table.name }}__{{ action.name }}__{{ row_id }}">
        {{ action.verbose_name }}
      {% endif %}
    </button>
  {% else %}
    <a {{ action.attr_string_nc|safe }}
      class="btn data-table-action
             {% if is_single %}btn-default{% endif %}
             {% if is_small %}btn-sm{% endif %}
             {% if action.action_type == "danger" %}btn-danger{% endif %}
             {{ action.get_final_css|safe }}"
      {% if is_table_action %}
        href="{{ action.get_link_url }}"
        title="{{ action.verbose_name }}">
        {% if action.icon != None %}
          <span class="fa fa-{{ action.icon }}"></span>
        {% endif %}
      {% else %}
        href="{{ action.bound_url }}">
      {% endif %}
      {{ action.verbose_name }}
    </a>
  {% endif %}
{% endminifyspace %}
