Projet

Général

Profil

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

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

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 %}>
8
    <span class="hour">{{ appointment.begin_hour }}</span>
9
    {% if appointment.event_type %} — {{ appointment.event_type }}  {% endif %}
10
    {% if appointment.title %} — {{ appointment.title }}  {% endif %}
11
    {% if appointment.length %} — {{ appointment.length }}m {% endif %}
12
    {% if appointment.ressources_initial %} —{{ appointment.ressources_initial }} {% endif %}
13
    {% if appointment.act_type %} — {{ appointment.act_type }} {% endif %}
14
    {% if appointment.ressource %} — {{ appointment.ressource }} {% endif %}
15
    <span class="right">
16
      {% for service_name in appointment.other_services_names %}
17
      <span class="box {{ service_name }}" title="{{ service_name }}"></span>
18
      {% endfor %}
19
      {% if appointment.description %}
20
      <span title="Un commentaire existe" class="icon-comment"></span>
21
      {% endif %}
22
      {% if appointment.event_id %}
23
      {% if appointment.is_recurrent %} R {% endif %}
24
      {% if appointment.patient_record_id %}
25
      <button title="Éditer un rendez-vous" class="edit-appointment icon-edit" data-event-id="{{ appointment.event_id }}"></button>
26
      {% else %}
27
      <button title="Éditer un événement" class="edit-event icon-edit" data-event-id="{{ appointment.event_id }}">
28
        {% endif %}
29
        <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>
30
        {% endif %}
31
    </span>
32
  </h3>
33

    
34
  <div>
35
    {% if appointment.type == 'free' %}
36
    <button class='newrdv' data-url="{% url 'nouveau-rdv' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouveau rendez-vous patient</button>
37
    <button class='newevent' data-url="{% url 'new-event' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouvel événement</button>
38
    {% endif %}
39
    {% if appointment.event_id %}
40
    {% if appointment.workers %}
41
    <p class="workers">
42
      Intervenants :
43
      {% for worker in appointment.workers %}
44
      {{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span>{% if forloop.last %}.{% else %}, {% endif %}
45
      {% endfor %}
46
    </p>
47
    {% endif %}
48
    <div class="tabs-ressource-{{ ressource_agenda.ressource.id }} textedit">
49
      <span></span>
50
      <textarea>{{ appointment.description }}</textarea>
51
      <button disabled="disabled" data-event-id="{{ appointment.event_id }}"></button>
52
    </div>
53
    {% endif %}
54
    {% if appointment.patient_record_id %}
55
    <p class="phones">
56
      {% for address in appointment.patient.addresses.all %}
57
      {% if address.place_of_life and address.phone %}
58
      <span title="{{ address.number }} {{ address.street }} {{ address.zip_code }} {{ address.city }}" class="icon-home-space">{{ address.phone }}</span>
59
      {% for contact in address.patientcontact_set.all  %}
60
      <span title="{{ contact.first_name }} {{ contact.last_name|upper }}" class="icon-user-space">{{ contact.mobile }}</span>
61
      {% endfor %}
62
      {% endif %}
63
      {% endfor %}
64
    </p>
65
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view" target="_blank">Dossier patient</a> -
66
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view#tab=5" target="_blank">Prochains rendez-vous</a> -
67
    <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>
68
    {% endif %}
69
    {% if appointment.validation %}
70
    <div><span>{% if appointment.validation.1 %}<strong>{{ appointment.validation.2 }}</strong>, le {{ appointment.validation.1.created }} par {{ appointment.validation.1.author }}
71
        {% if appointment.validation.1.auto %}(par validation automatique){% endif %}. {% if appointment.validation.0.is_billed %}<strong>Acte facturé</strong>{% endif %}
72
        {% else %}
73
        Non pointé.
74
        {% endif %}
75
      </span>
76
      {% if not appointment.validation.0.validation_locked and appointment.validation.3 %}
77
      <form method="post" class="inline-form">
78
        {% csrf_token %}
79
        <input type="hidden" value="{{appointment.validation.0.id}}" name="acte-id">
80
        <select data-previous="{{ last_status.state_name }}" name="act_state">
81
          {% for state_name, display_state_name in appointment.validation.3.items %}
82
          <option value="{{ state_name }}" {% if state_name == appointment.validation.1.state_name %}selected{% endif %}>{{ display_state_name }}</option>
83
          {% endfor %}
84
        </select>
85
        <button>Modifier</button>
86
      </form>
87
      {% endif %}
88
    </div>
89
    {% endif %}
90
  </div>
91
  {% endfor %}
92
</div>
93
</div>
94

    
(4-4/19)