{% extends "base.html" %}

{% block title %}{{ _('Action Type') }} #{{ action_type.id }}: {{ action_type.translation.name }} — {{ service_name }}{% endblock %}

{% block content %}
  <h1><a href="{{ url_for('.action_type', type_id=action_type.id) }}" title="{{ action_type.translation.name }}">{{ action_type.translation.name }}</a></h1>

  <dl>
    <dt>{{ _('Description') }}</dt><dd>{{ action_type.translation.description or ('&mdash;' | safe) }}</dd>
    <dt>{{ _('Object Name (Singular)') }}</dt><dd>{{ action_type.translation.object_name }}</dd>
    <dt>{{ _('Object Name (Plural)') }}</dt><dd>{{ action_type.translation.object_name_plural }}</dd>
    <dt>{{ _('View Text') }}</dt><dd>{{ action_type.translation.view_text }}</dd>
    <dt>{{ _('Perform Text') }}</dt><dd>{{ action_type.translation.perform_text }}</dd>
    <dt>{{ _('Only for Administrators') }}</dt><dd>{% if action_type.admin_only %}<i class="fa fa-check" aria-hidden="true"></i> {{ _('Yes, only administrators can create actions of this type') }}{% else %}<i class="fa fa-times" aria-hidden="true"></i> {{ _('No, all users can create actions of this type') }}{% endif %}</dd>
    <dt>{{ _('Show on Frontpage') }}</dt><dd>{% if action_type.show_on_frontpage %}<i class="fa fa-check" aria-hidden="true"></i> {{ _('Yes, this action type should be shown on the frontpage') }}{% else %}<i class="fa fa-times" aria-hidden="true"></i> {{ _('No, this action type should not be shown on the frontpage') }}{% endif %}</dd>
    <dt>{{ _('Show on Navbar') }}</dt><dd>{% if action_type.show_in_navbar %}<i class="fa fa-check" aria-hidden="true"></i> {{ _('Yes, actions of this type should be shown in the navbar') }}{% else %}<i class="fa fa-times" aria-hidden="true"></i> {{ _('No, actions of this type should not be shown in the navbar') }}{% endif %}</dd>
    <dt>{{ _('Enable Labels') }}</dt><dd>{% if action_type.enable_labels %}<i class="fa fa-check" aria-hidden="true"></i> {{ _('Yes, labels are enabled for objects created with actions of this type') }}{% else %}<i class="fa fa-times" aria-hidden="true"></i> {{ _('No, labels are disabled for objects created with actions of this type') }}{% endif %}</dd>
    <dt>{{ _('Enable Files') }}</dt><dd>{% if action_type.enable_files %}<i class="fa fa-check" aria-hidden="true"></i> {{ _('Yes, files are enabled for objects created with actions of this type') }}{% else %}<i class="fa fa-times" aria-hidden="true"></i> {{ _('No, files are disabled for objects created with actions of this type') }}{% endif %}</dd>
    <dt>{{ _('Enable Locations and Responsible Users') }}</dt><dd>{% if action_type.enable_locations %}<i class="fa fa-check" aria-hidden="true"></i> {{ _('Yes, locations and responsible users are enabled for objects created with actions of this type') }}{% else %}<i class="fa fa-times" aria-hidden="true"></i> {{ _('No, locations and responsible users are disabled for objects created with actions of this type') }}{% endif %}</dd>
    <dt>{{ _('Enable Publications') }}</dt><dd>{% if action_type.enable_publications %}<i class="fa fa-check" aria-hidden="true"></i> {{ _('Yes, publications are enabled for objects created with actions of this type') }}{% else %}<i class="fa fa-times" aria-hidden="true"></i> {{ _('No, publications are disabled for objects created with actions of this type') }}{% endif %}</dd>
    <dt>{{ _('Enable Comments') }}</dt><dd>{% if action_type.enable_comments %}<i class="fa fa-check" aria-hidden="true"></i> {{ _('Yes, comments are enabled for objects created with actions of this type') }}{% else %}<i class="fa fa-times" aria-hidden="true"></i> {{ _('No, comments are disabled for objects created with actions of this type') }}{% endif %}</dd>
    <dt>{{ _('Enable Activity Log') }}</dt><dd>{% if action_type.enable_activity_log %}<i class="fa fa-check" aria-hidden="true"></i> {{ _('Yes, the activity log is enabled for objects created with actions of this type') }}{% else %}<i class="fa fa-times" aria-hidden="true"></i> {{ _('No, the activity log is disabled for objects created with actions of this type') }}{% endif %}</dd>
    <dt>{{ _('Enable Related Objects') }}</dt><dd>{% if action_type.enable_related_objects %}<i class="fa fa-check" aria-hidden="true"></i> {{ _('Yes, show related objects for objects created with actions of this type') }}{% else %}<i class="fa fa-times" aria-hidden="true"></i> {{ _('No, do not show related objects for objects created with actions of this type') }}{% endif %}</dd>
  </dl>
  <a href="{{ url_for('.actions', t=action_type.id) }}" class="btn btn-default">{{ _('View Actions') }}</a>
  {% if current_user.is_admin and not current_user.is_readonly %}
    <a href="{{ url_for('.action_type', type_id=action_type.id, mode='edit') }}" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="{{ _('Modify the settings for this action type.') }}">{{ _('Edit Action Type') }}</a>
  {% endif %}
{% endblock %}