Project

General

Profile

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

calebasse / calebasse / agenda / templates / agenda / index.html @ 02fff58c

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
    .person-item span { display: none; }
7
    .person-item.active span { display: inline; }
8
    #agenda-date { width: 20em; }
9
  </style>
10
{% endblock %}
11

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

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

    
19
{% block appbar %}
20
    <h2>Agenda</h2>
21
    <a href="../..">Retourner à l'accueil</a>
22
    <button>Nouvel événement (autre)</button>
23
    <button id="newrdv">Nouveau rendez-vous patient</button>
24
{% endblock %}
25

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

    
35

    
36
    <div id="users">
37
    <div id="filtre">
38
     <input type="text"/>
39
    </div>
40
    <dl>
41
     {% for workers_type in workers_types %}
42
     <dt>{{ workers_type.type }}</dt>
43
     <dd><ul>
44
       {% for worker in workers_type.workers %}
45
       <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>
46
       {% endfor %}
47
     </ul></dd>
48
     {% endfor %}
49
   </dl>
50
 </div>
51
{% endblock %}
52

    
53
{% block content %}
54
<div class="content">
55
   <div id="datesel">
56
     <a href="../{{ previous_month|date:"SHORT_DATE_FORMAT"}}">««</a>
57
     <a href="../{{ previous_day|date:"SHORT_DATE_FORMAT"}}">«</a>
58
   <!-- <span>Jeudi 5 juillet 2012</span> -->
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
                 <button type="button"><img title="Editer un rendez-vous" src="{{ STATIC_URL }}images/accessories-text-editor.png"></button>
121
                 <button data-occurrence-id="{{ appointment.occurrence_id }}" data-rdv="{{ appointment.title }}"  type="button" class="remove-appointment">
122
                     <img title="Supprimer un rendez-vous" src="{{ STATIC_URL }}images/list-remove.png">
123
                 </button>
124
                 {% endif %}
125
            </span>
126
           </h3>
127

    
128
           <div>
129
             {% if appointment.type == 'free' %}<button class='booking' data-hour="{{ appointment.begin_hour }}">Prendre un rendez-vous</button> {% endif %}
130
             {% if appointment.event_id %}
131
             <div class="tabs-worker-{{ worker_agenda.worker.id }} textedit">
132
                 <span></span>
133
                 <textarea>{{ appointment.description }}</textarea>
134
                 <button disabled="disabled" data-event-id="{{ appointment.event_id }}"></button>
135
             </div>
136
             {% endif %}
137
             {% if appointment.patient_record_id %}
138
             <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}">Dossier patient</a> -
139
             <a href="#">Prochains rendez-vous</a> -
140
             <a href="#">Convoquer patient</a>
141
             {% endif %}
142
           </div>
143
           {% endfor %}
144
         </div>
145
       </div>
146
       {% endfor %}
147

    
148
       </div>
149

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

    
157

    
158
{% endblock %}
159

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