{% load horizon %}

{% if row_actions|length > 1 %}
<div class="btn-group">
    {% for action in row_actions %}
        {% if forloop.first %}
          {% include "horizon/common/_data_table_row_action.html" %}
          <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
            <span class="caret"></span>
          </a>
          <ul class="dropdown-menu row_actions clearfix">
        {% else %}
          <li class="clearfix">
              {% include "horizon/common/_data_table_row_action.html" %}
          </li>
        {% endif %}
        {% if forloop.last %}
          </ul>
        {% endif %}
    {% endfor %}
</div>
{% endif %}
{% if row_actions|length == 1%}
  {% for action in row_actions %}
    {% include "horizon/common/_data_table_row_action.html" %}
  {% endfor %}
{% endif %}
