Project

General

Profile

Download (9.43 KB) Statistics
| Branch: | Tag: | Revision:
{% extends "agenda/base.html" %}
{% load url from future %}
{% load apptags %}

{% block appbar %}
<h2>Agenda</h2>
<a href="../..">Retourner à l'accueil</a>
<button class="newevent" data-hour="" data-url="{% url 'new-event' service=service date=date %}">Nouvel événement</button>
<button class="newrdv" data-hour="" data-url="{% url 'nouveau-rdv' service=service date=date %}">Nouveau rendez-vous patient</button>
{% endblock %}

{% block beforecontent %}
<div id="extra-top-links">
<a href="activite-du-service">Activité du service</a>
<a href="validation-des-actes">Validation des actes</a>
<a href="rendez-vous-periodiques">Rendez-vous périodiques</a>
<a href="agendas-therapeutes">Tous les agendas thérapeutes</a>
</div>


<div id="users">
<div id="filtre">
<input type="text"/>
</div>
<p id="filtre-workers">
<input type="checkbox" id="hide-workers" checked="checked"><label for="hide-workers">{{ service_name }} seulement</label></input>
</p>
<dl>
{% for workers_type in workers_types %}
<dt>{{ workers_type.type }}</dt>
<dd><ul>
{% for worker in workers_type.workers %}
{% if worker|is_worker_in_service:service_name %}
<li id="selector-worker-{{worker.id}}" class="person-item in_service" data-worker-id="{{worker.id}}" data-target=".worker-{{worker.id}}.agenda">{{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span> <span class="toggle" title="cliquer pour déselectionner">(-)</span></li>
{% else %}
<li id="selector-worker-{{worker.id}}" class="person-item" data-worker-id="{{worker.id}}" data-target=".worker-{{worker.id}}.agenda">{{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span> <span class="toggle" title="cliquer pour déselectionner">(-)</span></li>
{% endif %}
{% endfor %}
</ul></dd>
{% endfor %}
</dl>
</div>
{% endblock %}

{% block agenda-content %}
<table>
<tbody>
<tr>
<td id="dispos">
Disponibilités
<table>
{% for start_time, quaters in disponibility.items %}
<tr class="hour-mark">
<td rowspan="4">{{ start_time }}:00</td>
{% for quater in quaters %}
{% if forloop.counter != 1 %}
<tr>
{% endif %}
{% for value in quater %}
<td class="worker-{{ value.id }} agenda {{ value.dispo }}" style="display: none; "></td>
{% endfor %}
{% endfor %}
</tr>
{% endfor %}
</table>
</td>

<td id="agendas">
<div id="tabs">
<ul>
{% for worker_agenda in workers_agenda %}
<li style="display: none" class="worker-{{ worker_agenda.worker.id }} agenda">
<a id="link-tab-worker-{{ worker_agenda.worker.id }}" href="#tabs-worker-{{ worker_agenda.worker.id }}" class="tab" data-id="{{ worker_agenda.worker.id }}">{{ worker_agenda.worker.first_name }} <span class="lastname">{{ worker_agenda.worker.last_name }}</span></a>
<a href="#" style="padding: 3px;cursor: auto;" class="close-tab" data-target="selector-worker-{{ worker_agenda.worker.id }}"><span class="ui-icon ui-icon-circle-close"></span></a>
</li>
{% endfor %}
</ul>
{% for worker_agenda in workers_agenda %}
<div id="tabs-worker-{{ worker_agenda.worker.id }}" class="tabs agenda worker-{{ worker_agenda.worker.id }}" style="display: none;">
<a class="print" href="#">Imprimer</a>
<div>
{% for appointment in worker_agenda.appointments %}
<h3 class="{{ appointment.type }} {% if appointment.act_absence %}act-absence{% endif %} appointment"
{% if appointment.act_absence %}title="{{appointment.act_absence}}"{% endif %}>
<span class="hour">{{ appointment.begin_hour }}</span>
{% if appointment.event_type %} — {{ appointment.event_type }} {% endif %}
{% if appointment.title %} — {{ appointment.title }} {% endif %}
{% if appointment.length %} — {{ appointment.length }}m {% endif %}
{% if appointment.workers_initial %} —{{ appointment.workers_initial }} {% endif %}
{% if appointment.act_type %} — {{ appointment.act_type }} {% endif %}
{% if appointment.room %} — {{ appointment.room }} {% endif %}
<span class="right">
{% for service_name in appointment.other_services_names %}
<span class="box {{ service_name }}" title="{{ service_name }}"></span>
{% endfor %}
{% if appointment.convocation_sent %}
<span title="Une convocation a été envoyée" class="icon-envelope"></span>
{% endif %}
{% if appointment.description %}
<span title="Un commentaire existe" class="icon-comment"></span>
{% endif %}
{% if appointment.event_id %}
{% if appointment.patient_record_id %}
<button title="Éditer un rendez-vous" class="edit-appointment icon-edit" data-occurrence-id="{{ appointment.occurrence_id }}"></button>
{% else %}
<button title="Éditer un événement" class="edit-event icon-edit" data-occurrence-id="{{ appointment.occurrence_id }}">
{% endif %}
<button class="remove-appointment icon-remove-sign" title="Supprimer un rendez-vous" data-occurrence-id="{{ appointment.occurrence_id }}" data-rdv="{{ appointment.title }}"></button>
{% endif %}
</span>
</h3>

<div>
{% if appointment.type == 'free' %}
<button class='newrdv' data-url="{% url 'nouveau-rdv' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouveau rendez-vous patient</button>
<button class='newevent' data-url="{% url 'new-event' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouvel événement</button>
{% endif %}
{% if appointment.event_id %}
{% if appointment.workers %}
<p class="workers">
Thérapeutes :
{% for worker in appointment.workers %}
{{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span>{% if forloop.last %}.{% else %}, {% endif %}
{% endfor %}
</p>
{% endif %}
<div class="tabs-worker-{{ worker_agenda.worker.id }} textedit">
<span></span>
<textarea>{{ appointment.description }}</textarea>
<button disabled="disabled" data-event-id="{{ appointment.event_id }}"></button>
</div>
{% endif %}
{% if appointment.patient_record_id %}
<p class="phones">Téléphone(s) :
{% for address in appointment.patient.addresses.all %}
{% if address.place_of_life %}
<span title="{{ address.number }} {{ address.street }}" class="icon-home-space">{{ address.phone }}</span>
{% for contact in address.patientcontact_set.all %}
<span title="{{ contact.first_name }} {{ contact.last_name|upper }}" class="icon-user-space">{{ contact.mobile }}</span>
{% endfor %}
{% endif %}
{% endfor %}
</p>
<a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view" target="_blank">Dossier patient</a> -
<a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view#tab=5" target="_blank">Prochains rendez-vous</a> -
<a href="#">Convoquer patient</a>
{% endif %}
{% if appointment.validation %}
<div><span>{% if appointment.validation.1 %}<strong>{{ appointment.validation.2 }}</strong>, le {{ appointment.validation.1.created }} par {{ appointment.validation.1.author }}
{% if appointment.validation.1.auto %}(par validation automatique){% endif %}. {% if appointment.validation.0.is_billed %}<strong>Acte facturé</strong>{% endif %}
{% else %}
Non pointé.
{% endif %}
</span>
{% if not appointment.validation.0.validation_locked and appointment.validation.3 %}
<form method="post" class="inline-form">
{% csrf_token %}
<input type="hidden" value="{{appointment.validation.0.id}}" name="acte-id">
<select data-previous="{{ last_status.state_name }}" name="act_state">
{% for state_name, display_state_name in appointment.validation.3.items %}
<option value="{{ state_name }}" {% if state_name == appointment.validation.1.state_name %}selected{% endif %}>{{ display_state_name }}</option>
{% endfor %}
</select>
<button {% if appointment.validation.1 %}disabled{% endif %}>Modifier</button>
</form>
{% endif %}
</div>
{% endif %}
</div>
{% endfor %}
</div>
</div>
{% endfor %}

</div>

</div>
</td>
</tr>
</tbody>
</table>

{% endblock %}

{% block dialogs %}
<div id="rdv" style="display: none;">
</div>
{% endblock %}
(8-8/13)