<!-- Button trigger modal -->
<!-- Modal -->
{% load custom_tag %}
{% load custom_tag_obj %}
{% load widget_tweaks %}
<div class="modal fade" id="syllabus_ue_{{item.id}}" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true" >
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header" style="background: #21618C;color:#fff;">
        <h5 class="modal-title" id="exampleModalLabel">
          <span>SYLLABUS</span>
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
          <h5>|CODE MATI&Egrave;RES: <span style="color:red">{{item.code}}</span> <br/>| LIBELLE: <span style="color:red;text-transform:uppercase;">{{item.libelle}}</span></h5>
          <hr/>
          <table class="table table-striped table-bordered">
              <thead>
                  <tr>
                      <th>CODE</th>
                      <th>LIBELLE</th>
                      <th>SYLLABUS</th>
                  </tr>
              </thead>
            <tbody>
            {% for ecue in item.id|get_ecue_by_ue %}
                <tr>
                    <td style="width:50px;font-weight:bold;">{{ecue.code}}</td>
                    <td style="text-transform:uppercase;">{{ecue.libelle}}</td>
                    <td>
                        {% if ecue.id|check_syllabus == True %}
                        <a href="{% url 'EspaceEnseignant:syllabus_ecue_pdf' ecue.id %}" target="_blank" class="btn btn-secondary"><i class="fa fa-print"></i>&nbsp; Syllabus</a>
                        {% else %}
                        <button class="btn btn-secondary" disabled><i class="fa fa-print"></i>&nbsp; Syllabus</button>
                        {% endif %}
                    </td>
                </tr>
            {% endfor %}
            </tbody>
          </table>
      </div>
    </div>
  </div>
</div>