{% extends "base_status.html" %}

{% load i18n %}

{% block title %}Business Process{% endblock %}
{% block smallheader %}view{% endblock %}
{% block largeheader %}Business Process{% endblock %}

{% block nav1 %}{{ block.super }}{% endblock %}
{% block nav2 %}<a href="{% url "bi.views.index" %}">{% trans "Business Process" %}</a>{% endblock %}

{% load adagiostags %}

{% block content %}
    {% blocktrans with l=processes|length%}Found {{ l }} processes.{% endblocktrans %}
    <table class="table table-condensed well">
    <tr>
        <th>{% trans "Process Name" %}</th>
        <th>{% trans "Alias" %}</th>
        <th>{% trans "Sub Processes" %}</th>
        <th>{% trans "Actions" %}</th>
    </tr>
        {% for i in processes %}
            <tr>
                <td>
                    <div title="State is '{{ i.get_status }}'" class="circle state_{{ i.get_status }}"></div>

                    <a href="{% url "bi.views.edit" i.name %} ">{{ i.name }}</a>
                </td>
                <td>{{ i.display_name }}</td>
                <td>{{ i.processes|length }}</td>

                <td>
                    <a class="btn btn-mini btn-primary" href="{% url "bi.views.edit" i.name %} "> <i class="icon-pencil icon-white" title="edit"></i> {% trans "edit" %} </a>
                    <a class="btn btn-mini btn-primary" href="{% url "bi.views.view" i.name %} "><i class="glyph-eye-open glyph-white" title="view"> </i> {% trans "view" %}</a>
                    <a class="btn btn-mini btn-danger" href="{% url "bi.views.delete" i.name %} "><i class="glyph-bin glyph-white" title="delete"></i> {% trans "delete" %}</a>
                </td>
            </tr>
        {% endfor %}
    </table>

{% endblock %}



{% block view_buttons %}{% endblock %}
{% block action_buttons %}

{% endblock %}
{% block toolbar %}
    <div>

        <a class="btn" id="open_public_view" href="{% url "bi.views.add" %}">
            <i class="glyph-circle-plus " title="Add new ..."> </i> {% trans "Create new Business Process" %}
        </a>

    </div>
{% endblock %}

