{% extends "projector/project/detail.html" %}

{% load markup %}
{% load i18n %}
{% load guardian_tags %}

{% block col-single-title %}{{ project.name }}{% endblock %}

{% block col-single-extra %}
{% get_obj_perms request.user for project as "project_perms" %}
<div class="richtemplates-panel">    
    <h5>{% trans "Workflow schema" %}</h5>
    <div class="richtemplates-panel-content">
        {% block workflow-menu %}
        <ul class="nav-inline">
            <li class="richbuttonset">
                <a class="button-link"href="{{ project.get_workflow_url }}">{% trans "Workflow" %}</a>
                {% if "change_project" in project_perms %}
                <a class="button-link"href="{{ project.get_workflow_add_status_url }}">{% trans "Add status" %}</a>
                {% endif %}
            </li>
            <li>
                {% if "change_project" in project_perms and workflow %}
                <a class="button-link richbutton-wrench"href="{{ project.get_workflow_edit_url }}">{% trans "Edit" %}</a>
                {% endif %}
            </li>
        </ul>
        {% endblock %}

        <div class="richblock">
            <ul>
                {% for status in project.status_set.all %}
                <li><span class="bolded">{{ status }}</span>
                    <ul>
                        {% for destination in status.destinations.all %}
                        <li>{{ status }} &rarr; {{ destination }}</li>
                        {% endfor %}
                    </ul>
                </li>
                {% endfor %}
            </ul>
        </div>

    </div>
</div>
{% endblock col-single-extra %}

