Projet

Général

Profil

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

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

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.workers_absent %}
31
        <span title="Au moins un intervenant est absent" class="icon-warning-sign absent"></span>
32
        {% endif %}
33
        {% for service_name in appointment.other_services_names %}
34
        <span class="box {{ service_name }}" title="{{ service_name }}"></span>
35
        {% endfor %}
36
        <span title="Un commentaire existe" class="icon-comment" {% if appointment.description %}style='display: inline'{% endif %}></span>
37
        {% if appointment.event_id %}
38
        {% if appointment.is_recurrent %} R {% endif %}
39
          {% if appointment.patient.confidential %}
40
          <span title="Dossier confidentiel" class="icon-lock"></span>
41
          {% endif %}
42
          {% if appointment.convocation_sent %}
43
          <button title="Courrier envoyé" class="icon-envelope">
44
          {% endif %}
45
         {% if service in appointment.services_names or not appointment.services_names %}
46
          {% if appointment.patient_record_id %}
47
            {% if not appointment.is_billed %}
48
            <button title="Éditer un rendez-vous" class="edit-appointment icon-edit" data-event-id="{{ appointment.event_id }}"></button>
49
            {% endif %}
50
          {% else %}
51
            <button title="Éditer un événement" class="edit-event icon-edit" data-event-id="{{ appointment.event_id }}">
52
          {% endif %}
53
          {% if not appointment.is_billed %}
54
          <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>
55
          {% endif %}
56
         {% endif %}
57
        {% endif %}
58
   </span>
59
  </h3>
60

    
61
  <div>
62
      {% if appointment.type == 'free' %}
63
      <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>
64
      <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>
65
      {% endif %}
66
    {% if appointment.event_id %}
67
        {% if appointment.workers %}
68
          <p class="workers">
69
          Intervenants :
70
          {% for worker in appointment.workers %}
71
            {% if worker in appointment.workers_absent %}<span class="absent" title="Absent">{% endif %}
72
            {{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span>{% if forloop.last %}.{% else %}, {% endif %}
73
            {% if worker in appointment.workers_absent %}</span>{% endif %}
74
          {% endfor %}
75
          </p>
76
        {% endif %}
77
    {% endif %}
78
    {% if appointment.patient_record_id %}
79
    <p class="phones">
80
    {% if appointment.patient.mobile %}
81
    <span title="{{ appointment.patient.first_name }} {{ appointment.patient.last_name|upper }} (Patient - Perso)" class="icon-user-space">
82
    {{ appointment.patient.mobile }}
83
    </span>
84
    {% endif %}
85
    {% if appointment.patient.phone %}
86
    <span title="{{ appointment.patient.first_name }} {{ appointment.patient.last_name|upper }} (Patient - Pro)" class="icon-user-space">
87
    {{ appointment.patient.phone }}
88
    </span>
89
    {% endif %}
90
    {% for address in appointment.patient.addresses.all %}
91
      {% if address.place_of_life %}
92
        {% if address.phone %}<span title="{{ address.display_name }}" class="icon-home-space">{{ address.phone }}</span>{% endif %}
93
        {% for contact in address.patientcontact_set.all  %}
94
          {% if contact.id != appointment.patient.id %}
95
          {% if contact.mobile %}<span title="{{ contact.first_name }} {{ contact.last_name|upper }} (Perso)" class="icon-user-space">{{ contact.mobile }}</span>{% endif %}
96
          {% if contact.phone %}<span title="{{ contact.first_name }} {{ contact.last_name|upper }} (Pro)" class="icon-user-space">{{ contact.phone }}</span>{% endif %}
97
          {% endif %}
98
        {% endfor %}
99
      {% endif %}
100
    {% endfor %}
101
    </p>
102
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view" target="_blank">Dossier patient</a> -
103
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view#tab=5" target="_blank">Prochains rendez-vous</a>
104
    {% 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 %}
105
    {% endif %}
106
    {% if appointment.validation %}
107
      <div><span>{% if appointment.validation.1 %}<strong>{{ appointment.validation.2 }}</strong> {% if appointment.validation.0.is_billed %}<strong>Acte facturé</strong>{% endif %}
108
        {% else %}
109
          Non pointé.
110
        {% endif %}
111
        </span>
112
        {% if not appointment.validation.0.validation_locked and appointment.validation.3 %}
113
          <form method="post" class="inline-form">
114
          {% csrf_token %}
115
          <input type="hidden" value="{{appointment.event_id}}" name="event-id">
116
          <select name="act_state">
117
            {% for state_name, display_state_name in appointment.validation.3 %}
118
            <option value="{{ state_name }}" {% if state_name == appointment.validation.1.state_name %}selected{% endif %}>{{ display_state_name }}</option>
119
            {% endfor %}
120
          </select>
121
          <button>Pointer</button>
122
          </form>
123
        {% endif %}
124
       </div>
125
    {% endif %}
126
    {% if appointment.event_id %}
127
    <div class="tabs-worker-{{ worker_agenda.worker.id }} textedit">
128
            <span></span>
129
            {% if service in appointment.services_names or not appointment.services_names %}
130
            <textarea>{{ appointment.description }}</textarea>
131
            <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>
132
            {% else %}
133
            <p>{{ appointment.description }}</p>
134
            {% endif %}
135
        </div>
136
    {% else %}
137
        {% if appointment.description %}
138
        <p>{{ appointment.description }}</p>
139
        {% endif %}
140
    {% endif %}
141
  </div>
142
  {% endfor %}
143
</div>
(5-5/18)