{% extends "base_layout.html" %} 
{% load static i18n  flow_tags %} 
{% block content %}



    <div class="container">
    <div class="row">
        <div class="col-lg-12">
 <h5>{{ activity.flow_case.flow_definition }} - {% if activity.activity_definition.display_name %}
                {{ activity.activity_definition.display_name }}
            {% elif activity.activity_definition.activity_id %}
                {{ activity.activity_definition.activity_id}}
            {% else %}
                {{ activity.activity_definition.id}}
            {% endif %}</h5>
    </div>
    </div>
        <div class="row">
            <div class="col-lg-3">
                {% include 'workspace_view/_left.html' %}
            </div>
            <div class="col-lg-9">
                <div class="row">
                    <ul class="nav nav-tabs">
                        <li class="active"><a data-toggle="tab" href="#generalTab"> {% trans 'antares.apps.flow.templates.dashboard.tabs.general' %}</a></li>
                        <li><a data-toggle="tab" href="#propertiesTab">{% trans 'antares.apps.flow.templates.dashboard.tabs.properties' %}</a></li>
                        <li><a data-toggle="tab" href="#documentsTab"> {% trans 'antares.apps.flow.templates.dashboard.tabs.documents' %}</a></li>
                        <li><a data-toggle="tab" href="#notesTab"> {% trans 'antares.apps.flow.templates.dashboard.left.notes' %}</a></li>
                        <li><a data-toggle="tab" href="#historyTab">{% trans 'antares.apps.flow.templates.dashboard.tabs.history' %}</a></li>
                        <li><a data-toggle="tab" href="#historyTab">{% trans 'antares.apps.flow.templates.dashboard.tabs.flowchart' %}</a></li>
                        {% extra_tabs_index %}
                    </ul>
                    <div class="tab-content">
                        <div id="generalTab" class="tab-pane fade in active">
                            {% include 'workspace_view/_general_tab.html' %}
                        </div>
                        <div id="propertiesTab" class="tab-pane fade">
                            {% include 'workspace_view/_properties_tab.html' %}
                        </div>
                        <div id="documentsTab" class="tab-pane fade">
                            {% include 'workspace_view/_documents_tab.html' %}
                        </div>
                        <div id="notesTab" class="tab-pane fade">
                            {% include 'workspace_view/_notes_tab.html' %}
                        </div>
                        <div id="historyTab" class="tab-pane fade">
                            {% include 'workspace_view/_history_tab.html' %}
                        </div>
                        <div id="flowchartTab" class="tab-pane fade">
                            {% include 'workspace_view/_flowchart_tab.html' %}
                        </div>
                        {% extra_tabs_content %}
                    </div>
                </div>


            </div>
<script type="text/javascript">
    var antaresFlowLinks = { 
        update_property_call: "{% url "antares.apps.flow:api_case_update_property" %}", 
        case_history_call: "{% url "antares.apps.flow:api_case_history" %}", 
        case_properties_call: "{% url "antares.apps.flow:api_case_properties" %}", 
        case_document_call: "{% url "antares.apps.flow:api_case_document"  %}", 
        case_notes_call: "{% url "antares.apps.flow:api_case_note_list"  %}",
        case_update_note_call: "{% url "antares.apps.flow:api_case_update_note"  %}",
        case_document_view_call: "{% url 'antares.apps.document:view_view' document_id='5911F917-A61B-478B-B7F2-89C754D1FAF6' %}?is_inner=yes", 
        case_document_edit_call: "{% url 'antares.apps.document:edit_view' document_id='5911F917-A61B-478B-B7F2-89C754D1FAF6' %}?is_inner=yes", 
        case_forward_case_call: "{% url "antares.apps.flow:api_forward_case" %}", 
        case_set_tracking_option_call: "{% url "antares.apps.flow:api_case_set_tracking_option" %}",
        inbox_view: "{% url "antares.apps.flow:inbox_view" %}", 
    };
    var priority_type_choices = {{ priority_type_choices|safe }};
    var activity_id = "{{activity_id}}";
    var case_id = "{{activity.flow_case.id}}";
    
    $(document).ready(function() { 
        display_workflow_panel('{{activity.id}}');
         $('#flow_options_track_flow').change(function() {
        if (antaresFlowLinks.case_set_tracking_option_call) {
        $.ajax({
            'url': antaresFlowLinks.case_set_tracking_option_call,
            'data': {
                'case_id': case_id,
                'value': $(this).prop('checked'),
                'csrfmiddlewaretoken': $.cookie('csrftoken'),
            },
            'method': 'POST',
            'type': 'json',
            'success': function(data) {
            },
        });
        }

        });
    });
</script>
{% endblock %} 
{% block javascript %} 
    <script type="text/javascript" src="{% static "jquery-ui/jquery-ui.js" %}"></script>
	<script type="text/javascript" src="{% static "datatables.net/js/jquery.dataTables.js" %}"></script>
	<script type="text/javascript" src="{% static "datatables.net-bs/js/dataTables.bootstrap.js" %}"></script>
	<script type="text/javascript" src="{% static "datatables.net-colreorder/js/dataTables.colReorder.js" %}"></script>
	<script type="text/javascript" src="{% static "datatables.net-fixedcolumns/js/dataTables.fixedColumns.js" %}"></script>
	<script type="text/javascript" src="{% static "datatables.net-keytable/js/dataTables.keyTable.js" %}"></script>
	<script type="text/javascript" src="{% static "datatables.net-responsive/js/dataTables.responsive.js" %}"></script>
	<script type="text/javascript" src="{% static "datatables.net-responsive-bs/js/responsive.bootstrap.js" %}"></script>
	<script type="text/javascript" src="{% static "datatables.net-scroller/js/dataTables.scroller.js" %}"></script>
	<script type="text/javascript" src="{% static "datatables.net-select/js/dataTables.select.js" %}"></script>
	<script type="text/javascript" src="{% static "datatables.net-bs/js/dataTables.bootstrap.js" %}"></script>
    <script type="text/javascript" src="{% static "x-editable/dist/bootstrap3-editable/js/bootstrap-editable.js" %}"></script>
    <script type="text/javascript" src="{% static "ckeditor/ckeditor.js" %}"></script>
	<script type="text/javascript" src="{% static "ckeditor/skins/kama/skin.js" %}"></script>
	<script type="text/javascript" src="{% static "js/flow.js" %}"></script>
{% endblock javascript %} 
{% block stylesheets %} 
    <link rel="stylesheet" href="{% static "jquery-ui/themes/base/jquery-ui.css" %}">
    <link rel="stylesheet" href="{% static "jquery-ui/themes/base/theme.css" %}">
    <link rel="stylesheet" href="{% static "datatables.net-bs/css/dataTables.bootstrap.css" %}">
    <link rel="stylesheet" href="{% static "datatables.net-colreorder-bs/css/colReorder.bootstrap.css" %}">
    <link rel="stylesheet" href="{% static "datatables.net-fixedcolumns-bs/css/fixedColumns.bootstrap.css" %}">
    <link rel="stylesheet" href="{% static "datatables.net-keytable-bs/css/keyTable.bootstrap.css" %}">
    <link rel="stylesheet" href="{% static "datatables.net-responsive-bs/css/responsive.bootstrap.css" %}">
    <link rel="stylesheet" href="{% static "datatables.net-scroller-bs/css/scroller.bootstrap.css" %}">
    <link rel="stylesheet" href="{% static "datatables.net-select-bs/css/select.bootstrap.css" %}">
    <link rel="stylesheet" href="{% static "datatables.net-bs/css/dataTables.bootstrap.css" %}">
    <link rel="stylesheet" href="{% static "x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css" %}">
    <link rel="stylesheet" href="{% static "ckeditor/skins/kama/editor.css" %}">
{% endblock stylesheets %}
{% block ng_app_name %}{% endblock ng_app_name %}