templates/manager_dissertations_detail_updates.html
{% extends "layout.html" %}
{% load static %}
{% load i18n %}
{% comment "License" %}
* OSIS stands for Open Student Information System. It's an application
* designed to manage the core business of higher education institutions,
* such as universities, faculties, institutes and professional schools.
* The core business involves the administration of students, teachers,
* courses, programs and so on.
*
* Copyright (C) 2015-2019 Université catholique de Louvain (http://www.uclouvain.be)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* A copy of this license - GNU General Public License - is available
* at the root of the source code of this program. If not,
* see http://www.gnu.org/licenses/.
{% endcomment %}
{% load tz %}
{% block breadcrumb %}
<li><a href="{% url 'studies' %}" id="lnk_studies">{% trans "Students' path" %}</a></li>
<li id="lnk_cohorts_management"><a href="{% url 'cohorts_management' %}">{% trans "Cohorts management" %}</a></li>
<li><a href="{% url 'dissertations' %}" id="lnk_dissertations">{% trans 'Dissertations' %}</a></li>
<li><a href="{% url 'manager_dissertations_list' %}" id="lnk_propositions">{% trans 'Dissertations' %}</a></li>
<li class="active">{{ dissertation.title|truncatechars:24 }}</li>
{% endblock %}
{% block content %}
<div class="page-header">
<h2>{{ dissertation.title }}</h2>
</div>
<ul class="nav nav-tabs">
<li><a href="{% url 'manager_dissertations_detail' pk=dissertation.pk %}">{% trans 'main' %}</a></li>
<li class="active"><a href="#">{% trans 'Dissertation updates' %}</a></li>
</ul>
<div class="panel panel-default">
<div class="panel-body">
<h3>{% trans 'Current status' %}</h3>
<p>
{% if dissertation.status == 'DRAFT' %}
<span class="label label-default">
{% elif dissertation.status == 'DIR_SUBMIT' %}
<span class="label label-primary">
{% elif dissertation.status == 'DIR_OK' %}
<span class="label label-success">
{% elif dissertation.status == 'DIR_KO' %}
<span class="label label-danger">
{% elif dissertation.status == 'COM_SUBMIT' %}
<span class="label label-primary">
{% elif dissertation.status == 'COM_OK' %}
<span class="label label-default">
{% elif dissertation.status == 'COM_KO' %}
<span class="label label-danger">
{% elif dissertation.status == 'EVA_SUBMIT' %}
<span class="label label-primary">
{% elif dissertation.status == 'EVA_OK' %}
<span class="label label-default">
{% elif dissertation.status == 'EVA_KO' %}
<span class="label label-danger">
{% elif dissertation.status == 'TO_RECEIVE' %}
<span class="label label-default">
{% elif dissertation.status == 'TO_DEFEND' %}
<span class="label label-default">
{% elif dissertation.status == 'DEFENDED' %}
<span class="label label-default">
{% elif dissertation.status == 'ENDED' %}
<span class="label label-default">
{% elif dissertation.status == 'ENDED_WIN' %}
<span class="label label-default">
{% elif dissertation.status == 'ENDED_LOS' %}
<span class="label label-danger">
{% else %}
<span class="label label-default">
{% endif %}
{{ dissertation.get_status_display }}
</span>
</p>
</div>
<table class="table table-hover">
<tr>
<th>{% trans 'Change'%}</th>
<th>{% trans 'Person'%}</th>
<th>{% trans 'Update date'%}</th>
<th>{% trans 'Add justification'%}</th>
</tr>
{% for dissertation_update in dissertation_updates %}
<tr>
<td>
{% if dissertation_update.status_from != dissertation_update.status_to %}
{% if dissertation_update.status_from == 'DRAFT' %}
<span class="label label-default">
{% elif dissertation_update.status_from == 'DIR_SUBMIT' %}
<span class="label label-primary">
{% elif dissertation_update.status_from == 'DIR_OK' %}
<span class="label label-success">
{% elif dissertation_update.status_from == 'DIR_KO' %}
<span class="label label-danger">
{% elif dissertation_update.status_from == 'COM_SUBMIT' %}
<span class="label label-primary">
{% elif dissertation_update.status_from == 'COM_OK' %}
<span class="label label-default">
{% elif dissertation_update.status_from == 'COM_KO' %}
<span class="label label-danger">
{% elif dissertation_update.status_from == 'EVA_SUBMIT' %}
<span class="label label-primary">
{% elif dissertation_update.status_from == 'EVA_OK' %}
<span class="label label-default">
{% elif dissertation_update.status_from == 'EVA_KO' %}
<span class="label label-danger">
{% elif dissertation_update.status_from == 'TO_RECEIVE' %}
<span class="label label-default">
{% elif dissertation_update.status_from == 'TO_DEFEND' %}
<span class="label label-default">
{% elif dissertation_update.status_from == 'DEFENDED' %}
<span class="label label-default">
{% elif dissertation_update.status_from == 'ENDED' %}
<span class="label label-default">
{% elif dissertation_update.status_from == 'ENDED_WIN' %}
<span class="label label-default">
{% elif dissertation_update.status_from == 'ENDED_LOS' %}
<span class="label label-danger">
{% else %}
<span class="label label-default">
{% endif %}
{{ dissertation_update.get_status_from_display }}
</span><br>
<span class="glyphicon glyphicon-arrow-down" aria-hidden="true"></span><br>
{% if dissertation_update.status_to == 'DRAFT' %}
<span class="label label-default">
{% elif dissertation_update.status_to == 'DIR_SUBMIT' %}
<span class="label label-primary">
{% elif dissertation_update.status_to == 'DIR_OK' %}
<span class="label label-success">
{% elif dissertation_update.status_to == 'DIR_KO' %}
<span class="label label-danger">
{% elif dissertation_update.status_to == 'COM_SUBMIT' %}
<span class="label label-primary">
{% elif dissertation_update.status_to == 'COM_OK' %}
<span class="label label-default">
{% elif dissertation_update.status_to == 'COM_KO' %}
<span class="label label-danger">
{% elif dissertation_update.status_to == 'EVA_SUBMIT' %}
<span class="label label-primary">
{% elif dissertation_update.status_to == 'EVA_OK' %}
<span class="label label-default">
{% elif dissertation_update.status_to == 'EVA_KO' %}
<span class="label label-danger">
{% elif dissertation_update.status_to == 'TO_RECEIVE' %}
<span class="label label-default">
{% elif dissertation_update.status_to == 'TO_DEFEND' %}
<span class="label label-default">
{% elif dissertation_update.status_to == 'DEFENDED' %}
<span class="label label-default">
{% elif dissertation_update.status_to == 'ENDED' %}
<span class="label label-default">
{% elif dissertation_update.status_to == 'ENDED_WIN' %}
<span class="label label-default">
{% elif dissertation_update.status_to == 'ENDED_LOS' %}
<span class="label label-danger">
{% else %}
<span class="label label-default">
{% endif %}
{{ dissertation_update.get_status_to_display }}
</span>
{% endif %}
</td>
<td>{{ dissertation_update.person }}</td>
<td>{{ dissertation_update.created|localtime }}</td>
<td style="text-align: justify;">{{ dissertation_update.justification|linebreaks }}</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}