{% load i18n core_tags %}
{% with enhanced_actions=action_form.action.field.choices|length %}
{% block actions %}
{% block actions-form %}
{% for field in action_form %}
{% if field.name == "tags" %}
{{ field }}
{% if enhanced_actions < 11 %}
{% for value, label in action_form.action.field.choices %}
{% if value == 'add_tags' or value == 'remove_tags' %}
{% endif %}
{% endfor %}
{% endif %}
{% elif field.name == "folder_destination" %}
{% if enhanced_actions >= 11 %}{% endif %}
{% elif field.name == "action" and enhanced_actions < 11 %}
{{ field }}
{% else %}
{% if field.label %}{% else %}{{ field }}{% endif %}
{% endif %}
{% endfor %}
{% endblock %}
{% block actions-submit %}
{% if enhanced_actions < 11 %}{% endif %}
{% if enhanced_actions < 11 %}{% endif %}
{% if enhanced_actions < 11 %}
{% for value, label in action_form.action.field.choices %}
{% if value == 'resnapshot_snapshot' or value == 'update_snapshots' or value == 'overwrite_snapshots' %}
{% ifchanged 'rearchive' %}
{% include "admin/action_icon.html" with action="rearchive" %}Re-Archive ▾
{% endifchanged %}
{% elif value == 'set_crawl_permissions' or value == 'set_snapshot_permissions' %}
{% include "admin/action_icon.html" with action=value %}{{ label }}
{% elif value == 'move_to_folder' %}
{% include "admin/action_icon.html" with action=value %}Move to folder ▾
{% elif value and value != 'add_tags' and value != 'remove_tags' %}
{% endif %}
{% endfor %}