{% extends "manage/manage_base.html" %}
{% load i18n %}

{% block left_slot %}
    <div class="navigation-left-title">
        {% trans "Actions" %}
    </div>
    <div class="navigation-left action-groups">
        {% for group in groups %}
            {% if group.actions.all %}
                <div class="action-group">{{ group.name }}</div>
                {% for action in group.actions.all %}
                    <div class="action">
                        <a href="{% url lfs_manage_action action.id %}"
                           class="selectable {% ifequal action.id current_id %}selected{% endifequal %}">
                            {{ action.title }}
                        </a>
                    </div>
                {% endfor %}
            {% endif %}
        {% endfor %}
    </div>
{% endblock %}

{% block content %}

    <div class="site-actions">
        <span class="label">{{ action.title }}</span>
        
        <a class="add" 
           href="{% url lfs_add_action %}">{% trans 'Add action' %}</a>
        
        <a class="delete confirmation-link"
           data="{% trans 'Delete?' %}"
           href="{% url lfs_delete_action action.id %}">{% trans 'Delete action' %}</a>
    </div>

    <div id="manage-tabs">
        
        <ul>
            <li class="ui-tabs-nav-item"><a href="#data">{% trans 'Action' %}</a></li>            
        </ul>

        <div id="data">
            <h2>{% trans 'Action' %}</h2>
            <form action="{% url lfs_manage_action action.id %}"
                  method="post"
                  enctype="multipart/form-data">
                {% include "manage/lfs_form.html" %}
                <input type="submit"
                       value="{% trans 'Save action' %}">
            </form>
        </div>
    </div>    
{% endblock %}