{% load i18n material_form %}
<div class="card actions-card">
    <div class="card-content">
        <span class="card-title black-text" style="margin-bottom:20px">{% trans 'Action' %}</span>
        <div class="actions">
            {% form form=action_form %}
                {% part form.action label %}{% endpart %}
            {% endform %}

            {% if actions_selection_counter %}
            <script type="text/javascript">var _actions_icnt="{{ cl.result_list|length|default:"0" }}";</script>
            
            <span class="action-counter">{{ selection_note }}</span>
            {% if cl.result_count != cl.result_list|length %}
            <span class="all" style="display:none">{{ selection_note_all }}</span>
            <span class="question" style="display:none">
                <a href="javascript:;" title="{% trans "Click here to select the objects across all pages" %}">{% blocktrans with cl.result_count as total_count %}Select all {{ total_count }} {{ module_name }}{% endblocktrans %}</a>
            </span>
            <span class="clear"  style="display:none"><a href="javascript:;">{% trans "Clear selection" %}</a></span>
            {% endif %}
            {% endif %}
        </div>
    </div>
    <div class="card-action">
        <div class="right-align">
            <button type="submit" class="btn btn-primary" title="{% trans "Run the selected action" %}" name="index" value="{{ action_index|default:0 }}">
                {% trans "Go" %}
            </button>
        </div>
    </div>
</div>
