Project

General

Profile

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

calebasse / calebasse / agenda / templates / agenda / index.html @ 4b2aabc4

1
{% extends "calebasse/base.html" %}
2
{% load url from future %}
3
{% block extrascripts %}
4
  <script src="{{ STATIC_URL }}js/calebasse.agenda.js"></script>
5
  <style>
6
      uveau rendez-vous patient
7
    .person-item span { display: none; }
8
    .person-item.active span { display: inline; }
9
    #agenda-date { width: 20em; }
10
  </style>
11
{% endblock %}
12

    
13
{% block title %}{{ block.super }} - Agenda {% endblock %}
14

    
15
{% block header %}
16
  {{ block.super }}
17
  <span>Agenda - {{ service_name }}</spam>
18
{% endblock %}
19

    
20
{% block appbar %}
21
    <h2>Agenda</h2>
22
    <a href="../..">Retourner à l'accueil</a>
23
    <button class="newevent" data-url="{% url 'new-event' service=service date=date %}">Nouvel événement</button>
24
    <button class="newrdv" data-url="{% url 'nouveau-rdv' service=service date=date %}">Nouveau rendez-vous patient</button>
25
{% endblock %}
26

    
27
{% block beforecontent %}
28
    <div id="extra-top-links">
29
     <a href="activite-du-service">Activité du service</a>
30
31
     <a href="validation-des-actes">Validation des actes</a>
32
33
     <a href="rendez-vous-periodiques">Rendez-vous périodiques</a>
34
    </div>
35

    
36

    
37
    <div id="users">
38
    <div id="filtre">
39
     <input type="text"/>
40
    </div>
41
    <dl>
42
     {% for workers_type in workers_types %}
43
     <dt>{{ workers_type.type }}</dt>
44
     <dd><ul>
45
       {% for worker in workers_type.workers %}
46
       <li id="selector-worker-{{worker.id}}" class="person-item" data-worker-id="{{worker.id}}" data-target=".worker-{{worker.id}}.agenda">{{ worker.display_name }} <span title="cliquer pour déselectionner">(-)</span></li>
47
       {% endfor %}
48
     </ul></dd>
49
     {% endfor %}
50
   </dl>
51
 </div>
52
{% endblock %}
53

    
54
{% block content %}
55
<div class="content">
56
   <div id="datesel">
57
     <a href="../{{ previous_month|date:"SHORT_DATE_FORMAT"}}">««</a>
58
     <a href="../{{ previous_day|date:"SHORT_DATE_FORMAT"}}">«</a>
59
   <input id="agenda-date" value="{{ date|date:"DATE_FORMAT" }}"/>
60
   <a href="../{{ next_day|date:"SHORT_DATE_FORMAT"}}">»</a>
61
   <a href="../{{ next_month|date:"SHORT_DATE_FORMAT"}}">»»</a>
62
   </div>
63

    
64
   <table>
65
    <tbody>
66
    <tr>
67
     <td id="dispos">
68
      Disponibilités
69
      <table>
70
        {% for start_time, quaters in disponibility.items %}
71
          <tr class="hour-mark">
72
              <td rowspan="4">{{ start_time }}:00</td>
73
              {% for quater in quaters|slice:":1" %}
74
                {% for value in quater %}
75
                <td class="worker-{{ value.id }} agenda {{ value.dispo }}" style="display: none; "></td>
76
                {% endfor %}
77
              {% endfor %}
78
          </tr>
79
          {% for quater in quaters|slice:"1:4" %}
80
            <tr>
81
              {% for value in quater %}
82
                <td class="worker-{{ value.id }} agenda {{ value.dispo }}" style="display: none; "></td>
83
              {% endfor %}
84
            </tr>
85
          {% endfor %}
86
        {% endfor %}
87
      </table>
88
     </td>
89

    
90
     <td id="agendas">
91
       <div id="tabs">
92
       <ul>
93
        {% for worker_agenda in workers_agenda %}
94
           <li><a href="#tabs-worker-{{ worker_agenda.worker.id }}" class="worker-{{ worker_agenda.worker.id }} agenda" style="display: none;">{{ worker_agenda.worker.display_name }}</a></li>
95
        {% endfor %}
96
       </ul>
97
       {% for worker_agenda in workers_agenda %}
98
       <div id="tabs-worker-{{ worker_agenda.worker.id }}" class="tabs agenda worker-{{ worker_agenda.worker.id }}" style="display: none;">
99
         <a class="print" href="#">Imprimer</a>
100
         <div>
101
           {% for appointment in worker_agenda.appointments %}
102
           <h3 class="{{ appointment.type }} appointment">
103
             <span class="hour">{{ appointment.begin_hour }}</span>
104
             {% if appointment.title %} — {{ appointment.title }}  {% endif %}
105
             {% if appointment.length %} — {{ appointment.length }}m {% endif %}
106
             {% if appointment.workers_initial %} —{{ appointment.workers_initial }} {% endif %}
107
             {% if appointment.act_type %} — {{ appointment.act_type }} {% endif %}
108
             {% if appointment.room %} — {{ appointment.room }} {% endif %}
109
             <span class="right">
110
                 {% if appointment.service and appointment.service != service %}
111
                 <span class="box {{ appointment.service }}" title="{{ appointment.service }}"></span>
112
                 {% endif %}
113
                 {% if appointment.convocation_sent %}
114
                 <img title="Une convocation a été envoyée" src="{{ STATIC_URL }}images/emblem-mail.png">
115
                 {% endif %}
116
                 {% if appointment.description %}
117
                 <img title="Un commentaire existe" src="{{ STATIC_URL }}images/emblem-documents.png">
118
                 {% endif %}
119
                 {% if appointment.event_id %}
120
                 <img title="Editer un rendez-vous" src="{{ STATIC_URL }}images/accessories-text-editor.png">
121
                 <img class="remove-appointment" title="Supprimer un rendez-vous" src="{{ STATIC_URL }}images/list-remove.png" data-occurrence-id="{{ appointment.occurrence_id }}" data-rdv="{{ appointment.title }}">
122
                 {% endif %}
123
            </span>
124
           </h3>
125

    
126
           <div>
127
               {% if appointment.type == 'free' %}
128
               <button class='newrdv' data-url="{% url 'nouveau-rdv' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouveau rendez-vous patient</button>
129
               <button class='newevent' data-url="{% url 'new-event' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouvel événement</button>
130
               {% endif %}
131
             {% if appointment.event_id %}
132
             <div class="tabs-worker-{{ worker_agenda.worker.id }} textedit">
133
                 <span></span>
134
                 <textarea>{{ appointment.description }}</textarea>
135
                 <button disabled="disabled" data-event-id="{{ appointment.event_id }}"></button>
136
             </div>
137
             {% endif %}
138
             {% if appointment.patient_record_id %}
139
             <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}" target="_blank">Dossier patient</a> -
140
             <a href="#">Prochains rendez-vous</a> -
141
             <a href="#">Convoquer patient</a>
142
             {% endif %}
143
           </div>
144
           {% endfor %}
145
         </div>
146
       </div>
147
       {% endfor %}
148

    
149
       </div>
150

    
151
       </div>
152
     </td>
153
    </tr>
154
    </tbody>
155
   </table>
156
 </div>
157

    
158

    
159
{% endblock %}
160

    
161
{% block dialogs %}
162
  <div id="rdv" style="display: none;">
163
 </div>
164
{% endblock %}
(4-4/7)