Projet

Général

Profil

Télécharger (8,42 ko) Statistiques
| Branche: | Tag: | Révision:

calebasse / calebasse / agenda / templates / agenda / ajax-worker-tab.html @ e2df6d5e

1
{% load url from future %}
2
{% load apptags %}
3
<p><a href="{% url 'periodic-events-for-worker' service=service date=date worker_id=worker_agenda.worker.id %}">Rendez-vous périodiques</a></p>
4
<div {% if appointment.event_id %}data-event-id="{{ appointment.event_id }}"{% endif %}>
5
  {% for appointment in worker_agenda.appointments %}
6
  <h3 id="{{ appointment.event_id }}" class="{{ appointment.type }} {% if appointment.act_absence %}act-absence{% endif %} appointment"
7
      {% if appointment.act_absence %}title="{{appointment.act_absence}}"{% endif %}>
8
    <span class="hour">{{ appointment.begin_hour }}</span>
9
    <span class="length">{% if appointment.length %}{% if appointment.length|str_length_lt:3 %}&nbsp;{% endif %}{{ appointment.length }} min{% endif %}</span>
10
    <span class="title">{% if appointment.title %}{{ appointment.title }}{% endif %}
11
    {% if appointment.patient.paper_id %} {{ appointment.patient.paper_id }} {% endif %}</span>
12
    <span class="participants">
13
    {% if appointment.len_workers > 4 %}
14
        {% if appointment.workers_absent %}<span class="absent" title="Au moins un intervenant est absent">{% endif %}
15
        {{ appointment.len_workers }} inter.
16
        {% if appointment.workers_absent %}</span>{% endif %}
17
    {% else %}
18
        {% if appointment.workers %}
19
          {% for worker in appointment.workers %}
20
            {% if worker in appointment.workers_absent %}<span class="absent" title="Absent">{% endif %}
21
            {{ worker.worker.initials }}{% if not forloop.last %} {% endif %}
22
            {% if worker in appointment.workers_absent %}</span>{% endif %}
23
          {% endfor %}
24
        {% endif %}
25
    {% endif %}
26
    </span>
27
    <span class="act_type">{% if appointment.act_type %}{{ appointment.act_type|trunc_act_type }}{% endif %}</span>
28
    <span class="ressource">{% if appointment.ressource %}{{ appointment.ressource }}{% endif %}</span>
29
    <span class="right">
30
        {% if appointment.is_recurrent %}
31
        {% if appointment.patient.periodic_appointment_transport %}
32
        <span title="Transport" class="icon-car"></span>
33
        {% endif %}
34
        {% elif appointment.patient.simple_appointment_transport %}
35
        <span title="Transport" class="icon-car"></span>
36
        {% endif %}
37

    
38
        {% if appointment.workers_absent %}
39
        <span title="Au moins un intervenant est absent" class="icon-warning-sign absent"></span>
40
        {% endif %}
41
        {% for service_name in appointment.other_services_names %}
42
        <span class="box {{ service_name }}" title="{{ service_name }}"></span>
43
        {% endfor %}
44
        <span title="Un commentaire existe" class="icon-comment" {% if appointment.description %}style='display: inline'{% endif %}></span>
45
        {% if appointment.event_id %}
46
        {% if appointment.is_recurrent %} R {% endif %}
47
          {% if appointment.patient.confidential %}
48
          <span title="Dossier confidentiel" class="icon-lock"></span>
49
          {% endif %}
50
          {% if appointment.convocation_sent %}
51
          <button title="Courrier envoyé" class="icon-envelope">
52
          {% endif %}
53
         {% if service in appointment.services_names or not appointment.services_names %}
54
          {% if appointment.patient_record_id %}
55
            {% if not appointment.is_billed %}
56
            <button title="Éditer un rendez-vous" class="edit-appointment icon-edit" data-event-id="{{ appointment.event_id }}"></button>
57
            {% endif %}
58
          {% else %}
59
            <button title="Éditer un événement" class="edit-event icon-edit" data-event-id="{{ appointment.event_id }}">
60
          {% endif %}
61
          {% if not appointment.is_billed %}
62
          <button class="remove-appointment icon-remove-sign" title="Supprimer un rendez-vous" data-url="{% url 'delete-occurrence' service=service date=date pk=appointment.event_id %}" data-rdv="{{ appointment.title }}"></button>
63
          {% endif %}
64
         {% endif %}
65
        {% endif %}
66
   </span>
67
  </h3>
68

    
69
  <div>
70
      {% if appointment.type == 'free' %}
71
      <button class='newrdv' data-url="{% url 'nouveau-rdv' service=service date=date %}" data-hour="{{ appointment.begin_hour }}" data-duration="{{ appointment.length }}">Nouveau rendez-vous patient</button>
72
      <button class='newevent' data-url="{% url 'new-event' service=service date=date %}" data-hour="{{ appointment.begin_hour }}" data-duration="{{ appointment.length }}">Nouvel événement</button>
73
      {% endif %}
74
    {% if appointment.event_id %}
75
        {% if appointment.workers %}
76
          <p class="workers">
77
          Intervenants :
78
          {% for worker in appointment.workers %}
79
            {% if worker in appointment.workers_absent %}<span class="absent" title="Absent">{% endif %}
80
            {{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span>{% if forloop.last %}.{% else %}, {% endif %}
81
            {% if worker in appointment.workers_absent %}</span>{% endif %}
82
          {% endfor %}
83
          </p>
84
        {% endif %}
85
    {% endif %}
86
    {% if appointment.patient_record_id %}
87
    <p class="phones">
88
    {% if appointment.patient.mobile %}
89
    <span title="{{ appointment.patient.first_name }} {{ appointment.patient.last_name|upper }} (Patient - Perso)" class="icon-user-space">
90
    {{ appointment.patient.mobile }}
91
    </span>
92
    {% endif %}
93
    {% if appointment.patient.phone %}
94
    <span title="{{ appointment.patient.first_name }} {{ appointment.patient.last_name|upper }} (Patient - Pro)" class="icon-user-space">
95
    {{ appointment.patient.phone }}
96
    </span>
97
    {% endif %}
98
    {% for address in appointment.patient.addresses.all %}
99
      {% if address.place_of_life %}
100
        {% if address.phone %}<span title="{{ address.display_name }}" class="icon-home-space">{{ address.phone }}</span>{% endif %}
101
        {% for contact in address.patientcontact_set.all  %}
102
          {% if contact.id != appointment.patient.id %}
103
          {% if contact.mobile %}<span title="{{ contact.first_name }} {{ contact.last_name|upper }} (Perso)" class="icon-user-space">{{ contact.mobile }}</span>{% endif %}
104
          {% if contact.phone %}<span title="{{ contact.first_name }} {{ contact.last_name|upper }} (Pro)" class="icon-user-space">{{ contact.phone }}</span>{% endif %}
105
          {% endif %}
106
        {% endfor %}
107
      {% endif %}
108
    {% endfor %}
109
    </p>
110
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view" target="_blank">Dossier patient</a> -
111
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view#tab=5" target="_blank">Prochains rendez-vous</a>
112
    {% if mail %}- <a href="#" class="generate-mail-btn" data-dossier-id="{{ appointment.patient_record_id }}" data-date="{{date|date:"Y-m-d"}}" data-event-id="{{ appointment.event_id }}" data-next-url="{{ request.get_full_path }}">Courrier</a>{% endif %}
113
    {% endif %}
114
    {% if appointment.validation %}
115
      <div><span>{% if appointment.validation.1 %}<strong>{{ appointment.validation.2 }}</strong> {% if appointment.validation.0.is_billed %}<strong>Acte facturé</strong>{% endif %}
116
        {% else %}
117
          Non pointé.
118
        {% endif %}
119
        </span>
120
        {% if not appointment.validation.0.validation_locked and appointment.validation.3 %}
121
          <form method="post" class="inline-form">
122
          {% csrf_token %}
123
          <input type="hidden" value="{{appointment.event_id}}" name="event-id">
124
          <select name="act_state">
125
            {% for state_name, display_state_name in appointment.validation.3 %}
126
            <option value="{{ state_name }}" {% if state_name == appointment.validation.1.state_name %}selected{% endif %}>{{ display_state_name }}</option>
127
            {% endfor %}
128
          </select>
129
          <button>Pointer</button>
130
          </form>
131
        {% endif %}
132
       </div>
133
    {% endif %}
134
    {% if appointment.event_id %}
135
    <div class="tabs-worker-{{ worker_agenda.worker.id }} textedit">
136
            <span></span>
137
            {% if service in appointment.services_names or not appointment.services_names %}
138
            <textarea>{{ appointment.description }}</textarea>
139
            <button disabled="disabled" data-event-id="{{ appointment.event_id }}" data-date="{{ date|date:"Y-m-d" }}" {% if appointment.act_id %}data-act-id="{{ appointment.act_id }}{% endif %}"></button>
140
            {% else %}
141
            <p>{{ appointment.description }}</p>
142
            {% endif %}
143
        </div>
144
    {% else %}
145
        {% if appointment.description %}
146
        <p>{{ appointment.description }}</p>
147
        {% endif %}
148
    {% endif %}
149
  </div>
150
  {% endfor %}
151
</div>
(5-5/18)