Projet

Général

Profil

Télécharger (6,61 ko) Statistiques
| Branche: | Tag: | Révision:

calebasse / calebasse / agenda / templates / agenda / ajax-ressource-tab.html @ fbfab2cc

1
{% load url from future %}
2
{% load apptags %}
3
<a class="print" href="#">Imprimer</a>
4
<div>
5
  {% for appointment in ressource_agenda.appointments %}
6
  <h3 class="{{ appointment.type }} {% if appointment.act_absence %}act-absence{% endif %} appointment"
7
      {% if appointment.act_absence %}title="{{appointment.act_absence}}"{% endif %} id="{{ appointment.event_id }}">
8
    <span class="hour">{{ appointment.begin_hour }}</span>
9
    {% if appointment.title %}<span class="title">{{ appointment.title }}</span>{% endif %}
10
    {% if appointment.length %}<span class="length">{{ appointment.length }} min</span> {% endif %}
11
    {% if appointment.act_type %}<span class="act_type">{{ appointment.act_type }}</span>{% endif %}
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

    
28
    <span class="right">
29
      {% for service_name in appointment.other_services_names %}
30
      <span class="box {{ service_name }}" title="{{ service_name }}"></span>
31
      {% endfor %}
32
      <span title="Un commentaire existe" class="icon-comment" {% if appointment.description %}style='display: inline'{% endif %}></span>
33
      {% if appointment.event_id %}
34
      {% if appointment.is_recurrent %} R {% endif %}
35
      {% if service in appointment.services_names %}
36
      {% if appointment.patient_record_id %}
37
      <button title="Éditer un rendez-vous" class="edit-appointment icon-edit" data-event-id="{{ appointment.event_id }}"></button>
38
      {% else %}
39
      <button title="Éditer un événement" class="edit-event icon-edit" data-event-id="{{ appointment.event_id }}">
40
        {% endif %}
41
        <button class="remove-appointment icon-remove-sign" title="Supprimer un rendez-vous" data-url="{% url 'delete-occurrence' date=date service=service pk=appointment.event_id %}" data-rdv="{{ appointment.title }}"></button>
42
        {% endif %}
43
        {% endif %}
44
    </span>
45
  </h3>
46
  <div>
47
    {% if appointment.type == 'free' %}
48
    <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>
49
    <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>
50
    {% endif %}
51
    {% if appointment.event_id %}
52
    {% if appointment.workers %}
53
    <p class="workers">
54
      Intervenants :
55
      {% for worker in appointment.workers %}
56
      {{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span>{% if forloop.last %}.{% else %}, {% endif %}
57
      {% endfor %}
58
    </p>
59
    <p class="phones">
60
    {% if appointment.patient.mobile %}
61
    <span title="{{ appointment.patient.first_name }} {{ appointment.patient.last_name|upper }} (Patient - Perso)" class="icon-user-space">
62
    {{ appointment.patient.mobile }}
63
    </span>
64
    {% endif %}
65
    {% if appointment.patient.phone %}
66
    <span title="{{ appointment.patient.first_name }} {{ appointment.patient.last_name|upper }} (Patient - Pro)" class="icon-user-space">
67
    {{ appointment.patient.phone }}
68
    </span>
69
    {% endif %}
70
    {% for address in appointment.patient.addresses.all %}
71
      {% if address.place_of_life %}
72
        {% if address.phone %}<span title="{{ address.display_name }}" class="icon-home-space">{{ address.phone }}</span>{% endif %}
73
        {% for contact in address.patientcontact_set.all  %}
74
          {% if contact.id != appointment.patient.id %}
75
          {% if contact.mobile %}<span title="{{ contact.first_name }} {{ contact.last_name|upper }} (Perso)" class="icon-user-space">{{ contact.mobile }}</span>{% endif %}
76
          {% if contact.phone %}<span title="{{ contact.first_name }} {{ contact.last_name|upper }} (Pro)" class="icon-user-space">{{ contact.phone }}</span>{% endif %}
77
          {% endif %}
78
        {% endfor %}
79
      {% endif %}
80
    {% endfor %}
81
    </p>
82
    {% endif %}
83
    {% endif %}
84

    
85
    {% if appointment.patient_record_id %}
86
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view" target="_blank">Dossier patient</a> -
87
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view#tab=5" target="_blank">Prochains rendez-vous</a> -
88
    <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>
89
    {% endif %}
90

    
91
    {% if appointment.validation %}
92
    <div>
93
      <span>{% if appointment.validation.1 %}<strong>{{ appointment.validation.2 }}</strong>, le {{ appointment.validation.1.created }} par {{ appointment.validation.1.author }}
94
        {% if appointment.validation.1.auto %}(par validation automatique){% endif %}. {% if appointment.validation.0.is_billed %}<strong>Acte facturé</strong>{% endif %}
95
        {% else %}
96
        Non pointé.
97
        {% endif %}
98
      </span>
99
    </div>
100
    {% endif %}
101

    
102
    {% if not appointment.validation.0.validation_locked and appointment.validation.3 %}
103
    <form method="post" class="inline-form">
104
      {% csrf_token %}
105
      <input type="hidden" value="{{appointment.validation.0.id}}" name="acte-id">
106
      <select data-previous="{{ last_status.state_name }}" name="act_state">
107
        {% for state_name, display_state_name in appointment.validation.3.items %}
108
        <option value="{{ state_name }}" {% if state_name == appointment.validation.1.state_name %}selected{% endif %}>{{ display_state_name }}</option>
109
        {% endfor %}
110
      </select>
111
      <button>Pointer</button>
112
    </form>
113
    {% endif %}
114

    
115
    {% if service in appointment.services_names %}
116
    <div class="tabs-ressource-{{ ressource_agenda.ressource.id }} textedit">
117
      <span></span>
118
      <textarea>{{ appointment.description }}</textarea>
119
      <button disabled="disabled" data-event-id="{{ appointment.event_id }}" data-date="{{ date|date:"Y-m-d" }}"></button>
120
    </div>
121
    {% else %}
122
    <p>{{ appointment.description }}</p>
123
    {% endif %}
124
  </div>
125
  {% endfor %}
126
</div>
127
</div>
128

    
(4-4/18)