list.html.j2 1.67 KB
Newer Older
Nicolas Joyard's avatar
Nicolas Joyard committed
1 2 3 4 5
{% extends "_base.html.j2" %}

{% block content %}
  <section class="panel panel-default">
    <header class="panel-heading">
6
      <b>Liste des {{ parlementaires|length }} parlementaires</b>
Nicolas Joyard's avatar
Nicolas Joyard committed
7 8
    </header>

9 10
    <table class="table table-condensed table-striped sortable">
      <thead>
Nicolas Joyard's avatar
Nicolas Joyard committed
11
        <tr>
12 13 14 15
          <th colspan="2" data-defaultsort="asc" data-mainsort="1">Parlementaire</th>
          <th>Groupe</th>
          <th>Circonscription</th>
          <th>Etape</th>
Nicolas Joyard's avatar
Nicolas Joyard committed
16
        </tr>
17 18 19
      </thead>
      <tbody>
        {% for parl in parlementaires %}
Nicolas Joyard's avatar
Nicolas Joyard committed
20

21 22 23 24 25 26 27 28 29
          <tr>
            <td>
              <img class="chamber-icon" src="{{ url_for('static', filename=parl.chambre|lower+'.png') }}">
            </td>
            <td data-value="{{ parl.nom }} {{ parl.prenom }}">{{ parl.prenom }} {{ parl.nom }}</td>
            <td>{{ parl.groupe_sigle }}</td>
            <td data-value="{{ parl.num_deptmt }} {{ parl.num_circo }}">{{ parl.nom_circo }} n°{{ parl.num_circo }}</td>
            <td>{{ parl.etape }}</td>
          </tr>
Nicolas Joyard's avatar
Nicolas Joyard committed
30

31
        {% else %}
Nicolas Joyard's avatar
Nicolas Joyard committed
32

33 34 35 36 37 38 39 40
          <tr>
            <td class="warning" colspan="5">
              <em>Aucun parlementaire trouvé :(</em>
            </td>
          </tr>

        {% endfor %}
      </tbody>
Nicolas Joyard's avatar
Nicolas Joyard committed
41 42 43
    </table>
  </section>
{% endblock %}
44 45 46 47 48 49 50 51 52 53

{% block header %}
  <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='bootstrap-sortable.css') }}">
{% endblock %}

{% block scripts %}
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
  <script src="{{ url_for('static', filename='moment.min.js') }}"></script>
  <script src="{{ url_for('static', filename='bootstrap-sortable.js') }}"></script>
{% endblock %}