{% extends 'enseignant/base_profile.html' %}
{% load static %}
{% load widget_tweaks %}
{% load unicorn %}
{% load custom_tag %}
{% unicorn_scripts %}
{% block page_title %}{{page_title}}{% endblock page_title %}
{% block content %}
<section class="content">
    <div class="container-fluid">
        <!-- Small boxes (Stat box)-->
        <div class="container">
            <div class="card">
                <div class="card-header text-white" style="background: #21618C"><h3 class="card-title">MENU</h3></div>
                <div class="card-body">
                    <div class="row">
                        {% if syllabus %}
                        <div class="col-md-3">
                            <a href="{% url 'EspaceEnseignant:syllabus_ecue_edit' syllabus.id ecue.id %}" class="btn btn-primary"><i class="fa fa-pen"></i>&nbsp; Editer le Syllabus</a>
                        </div>
                        {% else %}
                        <div class="col-md-3">
                            <a href="{% url 'EspaceEnseignant:syllabus_ecue_add' ecue.id %}" class="btn btn-primary"><i class="fa fa-plus"></i>&nbsp; Editer le Syllabus</a>
                        </div>
                        {% endif %}
                        {% if ecue.id|check_syllabus == True %}
                        <div class="col-md-3">
                            <a href="{% url 'EspaceEnseignant:syllabus_ecue_pdf' ecue.id %}" target="_blank" class="btn btn-secondary"><i class="fa fa-print"></i>&nbsp; Syllabus PDF</a>
                        </div>
                        {% else %}
                            <button class="btn btn-secondary" disabled><i class="fa fa-print"></i>&nbsp; Syllabus PDF</button>
                        {% endif %}
                    </div>
                </div>
            </div>
              <!-- DONUT CHART -->
              <div class="card card-secondary">
                <div class="card-header" style="background: #21618C">
                  <h3 class="card-title" >SYLLABUS ECUE {{ecue.code}}: {{ecue.libelle}}</h3> &nbsp;&nbsp;
                  <div class="card-tools">
                    <button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas fa-minus"></i>
                    </button>
                  </div>
                </div>
                <div class="card-body">
                    <table class="table table-bordered">
                        <tbody>
                            <tr>
                                <td style="width:200px;font-weight:bold;">Titre de l'ECUE</td>
                                <td>{{ecue.libelle}}</td>
                            </tr>
                            <tr>
                                <td style="font-weight:bold;">Code</td>
                                <td>{{ecue.code}}</td>
                            </tr>
                            <tr>
                                <td style="font-weight:bold;">Parcours</td>
                                <td></td>
                            </tr>
                            <tr>
                                <td style="font-weight:bold;">Crédit(s) ECTS</td>
                                <td>{{syllabus.credit}}</td>
                            </tr>
                            <tr>
                                <td style="font-weight:bold;">Durée (en heures, jours ou semaines)</td>
                                <td>{{syllabus.duree}}</td>
                            </tr>
                             <tr>
                                <td style="font-weight:bold;">Pré-requis</td>
                                <td>{{syllabus.prerequis|linebreaks}}</td>
                            </tr>
                            <tr>
                                <td style="font-weight:bold;">Objectifs Généraux</td>
                                <td>{{syllabus.objectif|linebreaks}}</td>
                            </tr>
                            <tr>
                                <td style="font-weight:bold;">Contenu de l'Ecue</td>
                                <td>{{syllabus.pubNivVise|linebreaks}}</td>
                            </tr>
                            <!--<tr>
                                <td>Status</td>
                                <td></td>
                            </tr>-->
                            <tr>
                                <td style="font-weight:bold;">Compétences</td>
                                <td>{{syllabus.Competence|linebreaks}}</td>
                            </tr>
                            <tr>
                                <td style="font-weight:bold;">Evaluation de l'ECUE</td>
                                <td>{{syllabus.description|linebreaks}}</td>
                            </tr>
                            <tr>
                                <td style="font-weight:bold;">Equipe de rédaction</td>
                                <td>{{syllabus.participant|linebreaks}}</td>
                            </tr>
                            <tr>
                                <td style="font-weight:bold;">No. Version et date</td>
                                <td>{{syllabus.versionDate|linebreaks}}</td>
                            </tr>
                            <tr>
                                <td style="font-weight:bold;">Bibliographie</td>
                                <td>{{syllabus.bibliographie|linebreaks}}</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <!-- /.card-body -->
              </div>
              <!-- /.card -->
        </div>


    </div>
  </section>
{% endblock content %}

{% block custom_js %}

{% endblock custom_js %}