Projet

Général

Profil

Télécharger (5,98 ko) Statistiques
| Branche: | Tag: | Révision:

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

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

    
47
  <div>
48
    {% if appointment.type == 'free' %}
49
    <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>
50
    <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>
51
    {% endif %}
52
    {% if appointment.event_id %}
53
    {% if appointment.workers %}
54
    <p class="workers">
55
      Intervenants :
56
      {% for worker in appointment.workers %}
57
      {{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span>{% if forloop.last %}.{% else %}, {% endif %}
58
      {% endfor %}
59
    </p>
60
    {% endif %}
61
      {% if service in appointment.services_names %}
62
        <div class="tabs-ressource-{{ ressource_agenda.ressource.id }} textedit">
63
          <span></span>
64
          <textarea>{{ appointment.description }}</textarea>
65
          <button disabled="disabled" data-event-id="{{ appointment.event_id }}" data-date="{{ date|date:"Y-m-d" }}"></button>
66
        </div>
67
      {% else %}
68
        <p>{{ appointment.description }}</p>
69
      {% endif %}
70
    {% endif %}
71
    {% if appointment.patient_record_id %}
72
    <p class="phones">
73
      {% for address in appointment.patient.addresses.all %}
74
      {% if address.place_of_life and address.phone %}
75
      <span title="{{ address.number }} {{ address.street }} {{ address.zip_code }} {{ address.city }}" class="icon-home-space">{{ address.phone }}</span>
76
      {% for contact in address.patientcontact_set.all  %}
77
        {% if contact.mobile %}
78
          <span title="{{ contact.first_name }} {{ contact.last_name|upper }}" class="icon-user-space">{{ contact.mobile }}</span>
79
        {% endif %}
80
      {% endfor %}
81
      {% endif %}
82
      {% endfor %}
83
    </p>
84
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view" target="_blank">Dossier patient</a> -
85
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view#tab=5" target="_blank">Prochains rendez-vous</a> -
86
    <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>
87
    {% endif %}
88
    {% if appointment.validation %}
89
    <div><span>{% if appointment.validation.1 %}<strong>{{ appointment.validation.2 }}</strong>, le {{ appointment.validation.1.created }} par {{ appointment.validation.1.author }}
90
        {% if appointment.validation.1.auto %}(par validation automatique){% endif %}. {% if appointment.validation.0.is_billed %}<strong>Acte facturé</strong>{% endif %}
91
        {% else %}
92
        Non pointé.
93
        {% endif %}
94
      </span>
95
      {% if not appointment.validation.0.validation_locked and appointment.validation.3 %}
96
      <form method="post" class="inline-form">
97
        {% csrf_token %}
98
        <input type="hidden" value="{{appointment.validation.0.id}}" name="acte-id">
99
        <select data-previous="{{ last_status.state_name }}" name="act_state">
100
          {% for state_name, display_state_name in appointment.validation.3.items %}
101
          <option value="{{ state_name }}" {% if state_name == appointment.validation.1.state_name %}selected{% endif %}>{{ display_state_name }}</option>
102
          {% endfor %}
103
        </select>
104
        <button>Pointer</button>
105
      </form>
106
      {% endif %}
107
    </div>
108
    {% endif %}
109
  </div>
110
  {% endfor %}
111
</div>
112
</div>
113

    
(4-4/18)