agents.html 1.17 KB
{% extends "base_page.html" %}


{% block more_heads %}
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.min.css"/>
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.7.0/css/buttons.dataTables.min.css"/>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='lib/datatables-1.10.24/css/datatables.min.css') }}"/>
{% endblock %}

{% block content %}

<!-- Invisible span to definte wich ul and a in the navbar are actived -->
<span id="nav_actived" style="display: none">agent,agents</span>

<table id="table_datatables" class="table table-hover">
  <thead>
  <tr>
    <th scope="col">Nom</th>
    <th scope="col">Charge</th>
    <th scope="col">Projets</th>
  </tr>
  </thead>
  <tbody>
  {% for agent in agents %}
  <tr>
    <td><a href="{{url_for('main.agent', agent_id=agent.id)}}">
      {{ agent.firstname }}
      {{ agent.secondname }}
    </a></td>
    <td>{{agent.total_charge / 100}}</td>
    <td>{{agent.num_projects}}</td>
  </tr>
  {% endfor %}
  </tbody>
</table>
{% endblock %}


{% block more_scripts %}
{% include 'datatables-includes.html' %}
{% endblock %}