Project

General

Profile

Download (3.43 KB) Statistics
| Branch: | Tag: | Revision:

calebasse / calebasse / agenda / templates / agenda / agendas-therapeutes.html @ 2fd808bf

1
{% extends "agenda/base.html" %}
2

    
3
{% block body-class %}{{ block.super }} no-left-column{% endblock %}
4

    
5
{% block appbar %}
6
<h2>Tous les agendas des intervenants du service - {{ date|date:"DATE_FORMAT" }}</h2>
7
<a href="..">Retourner à l'agenda</a>
8
<button id='print-button'>Imprimer</button>
9
{% endblock %}
10

    
11

    
12
{% block agenda-content %}
13
<button id="uncheck-all" type="button">Tout décocher</button>
14
<button id="check-all" type="button" style="display: none">Tout cocher</button>
15

    
16
{% for worker_agenda in workers_agenda %}
17
{% if worker_agenda.appointments %}
18
<div class="worker-agenda">
19
  <h2>
20
    {{service_name }} - Planning de {{ worker_agenda.worker.first_name }} <span class="lastname">{{ worker_agenda.worker.last_name }}</span>
21
    <input type="checkbox" class="printable" checked>
22
  </h2>
23
<h3>{{ date|date:"DATE_FORMAT" }}</h3>
24

    
25
<span class="remarque">Remarque :</span>
26

    
27
<table>
28
 <thead>
29
  <tr> <th>Heure</th> <th>Durée</th> <th></th> <th>Libellé</th><th>Prés.</th>
30
       <th>Absence</th>
31
       <th>Type d'acte</th> <th>Commentaire</th> <th>Intervenants</th></tr>
32
 </thead>
33
 <tbody>
34
   {% for appointment in worker_agenda.appointments %}
35
   <tr data-event-id="{{ appointment.event_id }}">
36
    <td class="col-time">{{ appointment.begin_hour }}</td>
37
    <td class="col-duration">{% if appointment.length %}{{ appointment.length }}min{% endif %}</td>
38
    <td class="col-record-id">{% if appointment.patient_record_id %}
39
      {{ appointment.patient_record_paper_id }}<br/>
40
      ({{ appointment.patient_record_id }}){% endif %}
41
    </td>
42
    <td> {% if appointment.title %}{{ appointment.title }}{% endif %}</td>
43
    <td/>
44
    <td> {% if appointment.act_absence %}{{ appointment.act_absence }}{% endif %}</td>
45
    <td> {% if appointment.act_type %}{{ appointment.act_type }}{% endif %}</td>
46
    <td> {% if appointment.description %}{{ appointment.description }}{% endif %}</td>
47
    <td> {% for worker in appointment.workers %}
48
          <span class="lastname">{{ worker.last_name }}</span> {{ worker.first_name }}<br/>
49
         {% endfor %}
50
    </td>
51
   </tr>
52
   {% endfor %}
53
 </tbody>
54
</table>
55

    
56
<div class="summary">
57
RDV :      {{ worker_agenda.summary.rdv }} —
58
Présence : {{ worker_agenda.summary.presence }} —
59
Absence :  {{ worker_agenda.summary.absence }} —
60
Doubles :  {{ worker_agenda.summary.doubles }} —
61
Validés :  {{ worker_agenda.summary.valides }}
62
</div>
63

    
64
</div> <!-- .worker-agenda -->
65

    
66
{% endif %}
67
{% endfor %}
68
<script>
69
  $(function () {
70
    /* Control page break on last printed page */
71
    function update_page_break() {
72
      $('.worker-agenda').css('page-break-after', 'always');
73
      $('.worker-agenda').not('.screen-only').last().css('page-break-after', 'avoid');
74
    }
75
    update_page_break();
76
    $('.printable').on('change', function () {
77
      if ($(this).is(':checked')) {
78
        $(this).parents('.worker-agenda').removeClass('screen-only');
79
      } else {
80
        $(this).parents('.worker-agenda').addClass('screen-only');
81
      }
82
      update_page_break();
83
    });
84
    $('#uncheck-all').on('click', function () {
85
      $('.printable').attr('checked', false);
86
      $('.printable').trigger('change');
87
      $('#uncheck-all').hide();
88
      $('#check-all').show();
89
      update_page_break();
90
    });
91
    $('#check-all').on('click', function () {
92
      $('.printable').attr('checked', true);
93
      $('.printable').trigger('change');
94
      $('#check-all').hide();
95
      $('#uncheck-all').show();
96
      update_page_break();
97
    });
98
  });
99
</script>
100
{% endblock %}
(2-2/16)