uclouvain/osis-dissertation

View on GitHub
templates/manager_dissertations_wait_recep_list.html

Summary

Maintainability
Test Coverage
{% 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 %}

{% 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 class="active">{% trans 'Dissertations' %}</li>
{% endblock %}
{% block content %}
  <div class="page-header">
    <h2>{% trans 'Dissertations' %}</h2>
  </div>
  <ul class="nav nav-tabs">

    <li><a href="{% url 'manager_dissertations_list' %}">{% trans 'All dissertations' %}</a></li>
    <li><a href="manager_dissertations_wait_list">{% trans 'Waiting promotor' %}</a></li>
    {% if show_validation_commission %}
      <li><a href="{% url 'manager_dissertations_wait_comm_list' %}">{% trans 'Waiting commission' %}</a></li>
    {% endif %}
    {% if show_evaluation_first_year == True %}
      <li><a href="{% url 'manager_dissertations_wait_eval_list' %}">{% trans 'Waiting 1st year evaluation' %}</a></li>
    {% endif %}
    <li class="active"><a href="{% url 'manager_dissertations_wait_recep_list' %}">{% trans 'Waiting reception' %}</a></li>
  </ul>
  <div class="panel panel-default">
    {% if dissertations|length == 0 %}
      <br>
      <label class="alert alert-info" style="margin-left:10%;width:80%;text-align:center;">{% trans 'No result' %}</label>
    {% else %}
      <br>
      <table class="table table-hover" id="tb_memoire">
        <thead>
          <th>{% trans 'Title' context 'dissertation' %}</th>
          <th>{% trans 'Author'%}</th>
          <th>{% trans 'Status' context 'dissertation' %}</th>
          <th>{% trans 'Program'%}</th>
          <th>{% trans 'year beginning'%}</th>
          <th>{% trans 'Dissertation subject'%}</th>
          <th>{% trans 'Action'%}</th>
        </thead>
        {% for dissertation in dissertations %}
          <tr>
            <td><a href="{% url 'manager_dissertations_detail' pk=dissertation.pk %}">{{ dissertation.title }}</a></td>
            <td>{{ dissertation.author }}</td>
            <td>
                {% 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-default">
                {% 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-default">
                {% 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-default">
                {% endif %}
                    {{ dissertation.get_status_display }}
                </span>
            </td>
            <td>{{ dissertation.education_group_year.acronym }}</td>
            <td>{{ dissertation.education_group_year.academic_year }}</td>
            <td>{{ dissertation.proposition_dissertation }}</td>
            <td><a href="{% url 'manager_dissertations_to_dir_submit_list' pk=dissertation.pk %}"
               id="manager_dissertations_to_dir_submit_list" class="btn btn-default"
               role="button" title="{% trans 'Dissertation reception'%}"><span
                    class="glyphicon glyphicon-ok-circle"
                    aria-hidden="true"></span> {% trans 'Dissertation reception'%}</a></td>
          </tr>
        {% endfor %}
      </table>
    {% endif %}
  </div>
{% endblock %}
{% block script %}
<script type="text/javascript" src="{% static 'js/jquery.dataTables.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/dataTables.bootstrap.min.js' %}"></script>
<script>
    $(document).ready(function()
    {
        $('#tb_memoire').DataTable(
            {
                "paging" : true,
                "ordering" : true,
                "info"  : false,
                "searching" : true,
                "language":
                {

                "sProcessing":     "{% trans 'Processing...'%}",
                "sSearch":         "{% trans 'Search:'%}",
                "sLengthMenu":     "{% trans 'Show _MENU_ entries'%}",
                "sInfo":           "{% trans 'Showing _START_ to _END_ of _TOTAL_ entries'%}",
                "sInfoEmpty":      "{% trans 'Showing 0 to 0 of 0 entries'%}",
                "sInfoFiltered":   "{% trans '(filtered from _MAX_ total entries)'%}",
                "sInfoPostFix":    "{% trans 'datatable_infopostfix'%}",
                "sLoadingRecords": "{% trans 'Loading...'%}",
                "sZeroRecords":    "{% trans 'No matching records found'%}",
                "sEmptyTable":     "{% trans 'No data available in table'%}",
                "oPaginate": {
                    "sFirst":      "{% trans 'First'%}",
                    "sPrevious":   "{% trans 'Previous'%}",
                    "sNext":       "{% trans 'Next'%}",
                    "sLast":       "{% trans 'Last'%}"
                            },
            "oAria": {
                "sSortAscending":  "{% trans ': activate to sort column ascending'%}",
                "sSortDescending": "{% trans ': activate to sort column descending'%}",
                    }
                }
            })
    ;});
</script>
{% endblock %}