Project

General

Profile

« Previous | Next » 

Revision a5a20700

Added by Benjamin Dauvergne over 12 years ago

factorize all agenda navigation code in an agenda/base.html template

View differences:

calebasse/agenda/templates/agenda/act-validation.html
1
{% extends "calebasse/base.html" %}
1
{% extends "agenda/base.html" %}
2 2
{% load url from future %}
3
{% block extrascripts %}
4
<script src="{{ STATIC_URL }}js/calebasse.agenda.js"></script>
5
{% endblock %}
6

  
7
{% block title %}{{ block.super }} - Agenda {% endblock %}
8

  
9
{% block header %}
10
  {{ block.super }}
11
  <span>Agenda - {{ service_name }}</spam>
12
{% endblock %}
13 3

  
14 4
{% block appbar %}
15 5
<h2>Validation des actes - {{ date|date:"DATE_FORMAT" }}</h2>
......
17 7
    {% if day_locked %}<button id="unlock-all" data-url="{% url 'unlock-all' service=service date=date %}">Tout déverrouiller</button> {% endif %}<button id="validation-all" data-url="{% url 'validation-all' service=service date=date %}">Validation automatique</button>
18 8
{% endblock %}
19 9

  
20
{% block content %}
21
<div class="content">
22
   <div id="datesel">
23
     <a href="../../{{ previous_month|date:"SHORT_DATE_FORMAT"}}/activite-du-service">««</a>
24
     <a href="../../{{ previous_day|date:"SHORT_DATE_FORMAT"}}/activite-du-service">«</a>
25
     <input id="agenda-date" value="{{ date|date:"DATE_FORMAT" }}"/>
26
     <a href="../../{{ next_day|date:"SHORT_DATE_FORMAT"}}/activite-du-service">»</a>
27
     <a href="../../{{ next_month|date:"SHORT_DATE_FORMAT"}}/activite-du-service">»»</a>
28
   </div>
29

  
10
{% block agenda-content %}
30 11
    {% if validation_msg %}
31 12
    <ul>
32 13
    {% for message in validation_msg %}
......
39 20
    {% if actes %}
40 21
    <div id="actes">
41 22
    {% for acte, last_status in actes %}
42
    <div class="frame acte">
43
    <h3>{{ acte.date }} - <strong>{{ acte.patient.last_name }} {{ acte.patient.first_name }}</strong>{% if acte.patient.paper_id %} ({{ acte.patient.paper_id }}){% endif %}{% if acte.doctors %}{% for doctor in acte.doctors.all %} - {{ doctor.last_name }} {{ doctor.first_name }}{% endfor %}{% endif %} - <strong>{{ acte.act_type }}</strong>{% if acte.description %} <img title="Un commentaire existe" src="{{ STATIC_URL }}images/emblem-documents.png">{% endif%}<!-- <button class="acte-btn">✍</button>--></h3>
44
    <p>{% if last_status %}<strong>{{ last_status.state_name }}</strong>, le {{ last_status.created }} par {{ last_status.author }}{% if last_status.auto %}(par validation automatique){% endif %}.{% else %}Non pointé.{% endif %} {% if acte.validation_locked %}{% if authorized_lock %}<button>Déverrouiller</button>{% endif %}{% else %}<select name="acte_state" id="acte_state">{% for state_name, display_state_name in validation_states.items %}<option value="{{ state_name }}">{{ display_state_name }}</option>{% endfor %}</select> <button>Modifier</button>{% if authorized_lock %}{% if last_status %} <button>Verrouiller</button>{% endif %}{% endif %}{% endif %}</p>
23
    <div class="frame acte" id="acte-frame-{{ acte.id }}">
24
      <h3>{{ acte.date }} - <strong>{{ acte.patient.last_name }} {{ acte.patient.first_name }}</strong>
25
          {% if acte.patient.paper_id %} ({{ acte.patient.paper_id }}){% endif %}
26
          {% if acte.doctors %}{% for doctor in acte.doctors.all %} - {{ doctor.last_name }} {{ doctor.first_name }}{% endfor %}{% endif %} - 
27
          <strong>{{ acte.act_type }}</strong>
28
          {% if acte.description %} <img title="Un commentaire existe" src="{{ STATIC_URL }}images/emblem-documents.png">{% endif%}
29
      </h3>
30
      <p>{% if last_status %}<strong>{{ last_status.state_name }}</strong>, le {{ last_status.created }} par {{ last_status.author }}
31
           {% if last_status.auto %}(par validation automatique){% endif %}.
32
         {% else %}
33
           Non pointé.
34
         {% endif %}
35
         {% if acte.validation_locked %}
36
            {% if authorized_lock %}<button>Déverrouiller</button>{% endif %}
37
         {% else %}
38
           <select name="acte_state" id="acte_state">
39
             {% for state_name, display_state_name in validation_states.items %}
40
               <option value="{{ state_name }}">{{ display_state_name }}</option>
41
             {% endfor %}
42
           </select>
43
           <button>Modifier</button>
44
           {% if authorized_lock %}
45
              {% if last_status %}<button>Verrouiller</button>{% endif %}
46
           {% endif %}
47
         {% endif %}
48
      </p>
45 49
    </div>
46 50
    {% endfor %}
47 51
    </div>
48 52
    {% else %}
49 53
    <p><strong>Il n'y a pas d'acte à valider le {{ date|date:"DATE_FORMAT" }}.</strong></p>
50 54
    {% endif %}
51

  
52
</div>
53 55
{% endblock %}

Also available in: Unified diff