Projet

Général

Profil

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

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

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

    
(4-4/18)