Project

General

Profile

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

calebasse / calebasse / agenda / templates / agenda / agendas-therapeutes.html @ 67de2724

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_name }} - {{ date|date:"DATE_FORMAT"|title }}</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
        <strong>{{ service_name }}</strong> - 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"|title }}</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">
39
                    {% if appointment.patient_record_id %}
40
                    {% if appointment.patient_record_paper_id %}
41
                    {{ appointment.patient_record_paper_id }}
42
                    {% else %}
43
                    Pas de numéro papier.
44
                    {% endif %}
45
                    {% endif %}
46
                </td>
47
                <td> {% if appointment.title %}{{ appointment.title }}{% endif %}</td>
48
                <td/>
49
                <td> {% if appointment.act_absence %}<strong>{{ appointment.act_absence }}</strong>{% endif %}</td>
50
                <td> {% if appointment.act_type %}{{ appointment.act_type }}{% endif %}</td>
51
                <td> {% if appointment.description %}{{ appointment.description }}{% endif %}</td>
52
                <td>
53
                    {% if appointment.workers and appointment.workers|length > 10 %}
54
                    {{ appointment.workers|length }} intervenants
55
                    {% else %}
56
                    {% for worker in appointment.workers %}
57
                    <span class="lastname">{{ worker.last_name }}</span> {{ worker.first_name }}<br/>
58
                    {% endfor %}
59
                    {% endif %}
60
                </td>
61
            </tr>
62
            {% endfor %}
63
        </tbody>
64
    </table>
65

    
66
    <div class="summary">
67
        RDV :      {{ worker_agenda.summary.rdv }} —
68
        Présence : {{ worker_agenda.summary.presence }} —
69
        Absence :  {{ worker_agenda.summary.absence }} —
70
        Doubles :  {{ worker_agenda.summary.doubles }} —
71
        Validés :  {{ worker_agenda.summary.valides }}
72
        <div class="pagebreak"></div>
73
    </div>
74

    
75
</div> <!-- .worker-agenda -->
76

    
77
{% endif %}
78
{% endfor %}
79
    <script>
80
        $(function () {
81
            /* Control page break on last printed page */
82
            function update_page_break() {
83
                $('.pagebreak').css('page-break-after', 'always');
84
                $('.pagebreak').not('.screen-only').last().css('page-break-before', 'avoid');
85
            }
86
            update_page_break();
87
            $('.printable').on('change', function () {
88
                if ($(this).is(':checked')) {
89
                    $(this).parents('.worker-agenda').removeClass('screen-only');
90
                    } else {
91
                    $(this).parents('.worker-agenda').addClass('screen-only');
92
                }
93
                update_page_break();
94
            });
95
            $('#uncheck-all').on('click', function () {
96
                $('.printable').attr('checked', false);
97
                $('.printable').trigger('change');
98
                $('#uncheck-all').hide();
99
                $('#check-all').show();
100
                update_page_break();
101
            });
102
            $('#check-all').on('click', function () {
103
                $('.printable').attr('checked', true);
104
                $('.printable').trigger('change');
105
                $('#check-all').hide();
106
                $('#uncheck-all').show();
107
                update_page_break();
108
            });
109
        });
110
    </script>
111

    
112
<button id='print-button' class='screen-only'>Imprimer</button>
113
{% endblock %}
(2-2/18)