{% 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" %}
{% if cl.opts.model_name != "tag" %}
{% include "admin/action_tags.html" with tags_field=field action_choices=action_form.action.field.choices %}
{% endif %}
{% elif field.name == "folder_destination" %}
{% if enhanced_actions >= 11 and not snapshot_action_choices %}{% endif %}
{% elif field.name == "action" %}
{% if enhanced_actions < 11 or snapshot_action_choices %}{{ field }}{% elif field.label %}{% else %}{{ field }}{% endif %}
{% else %}
{% if field.label %}{% else %}{{ field }}{% endif %}
{% endif %}
{% endfor %}
{% endblock %}
{% block actions-submit %}
{% if enhanced_actions < 11 or snapshot_action_choices %}{% endif %}
{% if enhanced_actions < 11 or snapshot_action_choices %}{% endif %}
{% if enhanced_actions < 11 or snapshot_action_choices %}
{% if snapshot_action_choices %}
{% if tag_action_choices %}Tags {% include "admin/snapshot_action_buttons.html" with action_choices=tag_action_choices %}{% endif %}
Snapshots{% if snapshot_has_tag_actions %} {% include "admin/action_tags.html" with tags_field=action_form.tags action_choices=snapshot_action_choices %}{% endif %} {% include "admin/snapshot_action_buttons.html" with action_choices=snapshot_action_choices %}
{% else %}
{% include "admin/snapshot_action_buttons.html" with action_choices=action_form.action.field.choices %}
{% endif %}