Project

General

Profile

Download (5 KB) Statistics
| Branch: | Tag: | Revision:

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

1 b306fcbb Frédéric Péters
{% load url from future %}
2
<a class="print" href="#">Imprimer</a>
3
<div>
4
  {% for appointment in worker_agenda.appointments %}
5
  <h3 class="{{ appointment.type }} {% if appointment.act_absence %}act-absence{% endif %} appointment"
6
      {% if appointment.act_absence %}title="{{appointment.act_absence}}"{% endif %}>
7
    <span class="hour">{{ appointment.begin_hour }}</span>
8
    {% if appointment.event_type %} — {{ appointment.event_type }}  {% endif %}
9
    {% if appointment.title %} — {{ appointment.title }}  {% endif %}
10
    {% if appointment.length %} — {{ appointment.length }}m {% endif %}
11
    {% if appointment.workers_initial %} —{{ appointment.workers_initial }} {% endif %}
12
    {% if appointment.act_type %} — {{ appointment.act_type }} {% endif %}
13
    {% if appointment.room %} — {{ appointment.room }} {% endif %}
14
    <span class="right">
15
        {% for service_name in appointment.other_services_names %}
16
        <span class="box {{ service_name }}" title="{{ service_name }}"></span>
17
        {% endfor %}
18
        {% if appointment.convocation_sent %}
19
        <span title="Une convocation a été envoyée" class="icon-envelope"></span>
20
        {% endif %}
21
        {% if appointment.description %}
22
        <span title="Un commentaire existe" class="icon-comment"></span>
23
        {% endif %}
24
        {% if appointment.event_id %}
25
         {% if appointment.patient_record_id %}
26
           <button title="Éditer un rendez-vous" class="edit-appointment icon-edit" data-occurrence-id="{{ appointment.occurrence_id }}"></button>
27
         {% else %}
28
           <button title="Éditer un événement" class="edit-event icon-edit" data-occurrence-id="{{ appointment.occurrence_id }}">
29
         {% endif %}
30
        <button class="remove-appointment icon-remove-sign" title="Supprimer un rendez-vous" data-occurrence-id="{{ appointment.occurrence_id }}" data-rdv="{{ appointment.title }}"></button>
31
        {% endif %}
32
   </span>
33
  </h3>
34
35
  <div>
36
      {% if appointment.type == 'free' %}
37
      <button class='newrdv' data-url="{% url 'nouveau-rdv' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouveau rendez-vous patient</button>
38
      <button class='newevent' data-url="{% url 'new-event' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouvel événement</button>
39
      {% endif %}
40
    {% if appointment.event_id %}
41
    {% if appointment.workers %}
42
      <p class="workers">
43
      Intervenants :
44
      {% for worker in appointment.workers %}
45
        {{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span>{% if forloop.last %}.{% else %}, {% endif %}
46
      {% endfor %}
47
      </p>
48
    {% endif %}
49
    <div class="tabs-worker-{{ worker_agenda.worker.id }} textedit">
50
        <span></span>
51
        <textarea>{{ appointment.description }}</textarea>
52
        <button disabled="disabled" data-event-id="{{ appointment.event_id }}"></button>
53
    </div>
54
    {% endif %}
55
    {% if appointment.patient_record_id %}
56
    <p class="phones">
57
    {% for address in appointment.patient.addresses.all %}
58
      {% if address.place_of_life %}
59
        <span title="{{ address.number }} {{ address.street }} {{ address.zip_code }} {{ address.city }}" class="icon-home-space">{{ address.phone }}</span>
60
        {% for contact in address.patientcontact_set.all  %}
61
          <span title="{{ contact.first_name }} {{ contact.last_name|upper }}" class="icon-user-space">{{ contact.mobile }}</span>
62
        {% endfor %}
63
      {% endif %}
64
    {% endfor %}
65
    </p>
66
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view" target="_blank">Dossier patient</a> -
67
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view#tab=5" target="_blank">Prochains rendez-vous</a> -
68
    <a href="#">Courrier</a>
69
    {% endif %}
70
    {% if appointment.validation %}
71
      <div><span>{% if appointment.validation.1 %}<strong>{{ appointment.validation.2 }}</strong>, le {{ appointment.validation.1.created }} par {{ appointment.validation.1.author }}
72
          {% if appointment.validation.1.auto %}(par validation automatique){% endif %}. {% if appointment.validation.0.is_billed %}<strong>Acte facturé</strong>{% endif %}
73
        {% else %}
74
          Non pointé.
75
        {% endif %}
76
        </span>
77
        {% if not appointment.validation.0.validation_locked and appointment.validation.3 %}
78
          <form method="post" class="inline-form">
79
          {% csrf_token %}
80
          <input type="hidden" value="{{appointment.validation.0.id}}" name="acte-id">
81
          <select data-previous="{{ last_status.state_name }}" name="act_state">
82
            {% for state_name, display_state_name in appointment.validation.3.items %}
83
            <option value="{{ state_name }}" {% if state_name == appointment.validation.1.state_name %}selected{% endif %}>{{ display_state_name }}</option>
84
            {% endfor %}
85
          </select>
86
          <button {% if appointment.validation.1 %}disabled{% endif %}>Modifier</button>
87
          </form>
88
        {% endif %}
89
     </div>
90
     {% endif %}
91
  </div>
92
  {% endfor %}
93
</div>