Project

General

Profile

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

calebasse / calebasse / actes / templates / actes / act_listing.html @ 48a85f96

1
{% extends "calebasse/base.html" %}
2

    
3
{% load url from future %}
4

    
5
{% block extrascripts %}
6
{{ block.super }}
7
<script src="{{ STATIC_URL }}js/calebasse.datesel.js"></script>
8
<script src="{{ STATIC_URL }}js/calebasse.dialog.js"></script>
9
<script>
10
  $(function() {
11
    $('table#actes tr').click(function() {
12
        generic_ajaxform_dialog($(this).data('id') + '/update', "Modifier l'acte",
13
            '#acte-dlg', '700px', 'Enregistrer', '..');
14
    });
15
    $('.date').datepicker();
16
    $('#new-acte').click(function() {
17
      $('#new-acte-dlg').dialog({title: 'Nouvel acte',
18
        width: '550px',
19
        buttons: [ { text: "Fermer",
20
          click: function() { $(this).dialog("close"); } },
21
        { text: "Ajouter",
22
          click: function() { $(this).dialog("close"); } }
23
        ]}
24
      );
25
    });
26
    $('#search-form input[type="checkbox"]').on('change', function () {
27
      $('#search-form').submit();
28
    });
29

    
30
  });
31
</script>
32
{% endblock %}
33

    
34
{% block header %}
35
  {{ block.super }}
36
  <span>Actes - {{ service_name }}</spam>
37
{% endblock %}
38

    
39
{% block appbar %}
40
<div id="appbar">
41
  <h2>Saisie des actes</h2>
42
  <a href="../..">Retourner à l'accueil</a>
43
  <button class="dialog-button"
44
          data-url="nouvel-acte/"
45
          data-default-button="Ajouter"
46
      >Ajouter un acte</button>
47
</div>
48
{% endblock %}
49

    
50

    
51
{% block content %}
52
<div id="sidebar">
53
  <form method="get" id="search-form">
54
    <div>
55
      <h3>Rechercher dans les actes</h3>
56
      <h4>Patient</h4>
57
      {{ search_form.non_field_errors }}
58
      <label>Nom: {{ search_form.last_name }}</label>
59
      {{ search_form.last_name.errors }}
60
      <label>Numéro de dossier: {{ search_form.patient_record_id }}</label>
61
      {{ search_form.patient_record_id.errors }}
62
      <label>Numéro de sécu: {{ search_form.social_security_number }}</label>
63
      {{ search_form.social_security_number.errors }}
64
      <button>Rechercher</button>
65
      <h4>Intervenant</h4>
66
      <label>Nom: {{ search_form.doctor_name }}</label>
67
      {{ search_form.doctor_name.errors }}
68
      <button>Rechercher</button>
69
    </div>
70
    <div id="filtre">
71
      <h3>Filtrer les actes</h3>
72
      {{ search_form.filters }}
73
    </div>
74
  </form>
75
</div>
76

    
77
<div class="content">
78
  {% include 'calebasse/datesel.html' %}
79
  <br/>
80

    
81
  <table id="actes" class="main">
82
    <thead>
83
    <tr>
84
      <th>Dossier</th>
85
      <th>État</th>
86
      <th>Type d'acte</th>
87
      <th>Validé</th>
88
      <th>Facturé</th>
89
      <th>Intervenants</th>
90
      <th>Heure</th>
91
      <th>Durée</th>
92
    </tr>
93
    </thead>
94
    <tbody>
95
      {% for act in object_list %}
96
      {% comment %}
97
      FIXME: comment mettre la classe non-factu ?
98
      <tr class="non-factu">
99
      {% endcomment %}
100
      <tr data-id="{{ act.id }}">
101
        <td>
102
            {{ act.patient.id }}
103
            {{ act.patient.first_name }}
104
            <span class="lastname">{{ act.patient.last_name }}</span>
105
        </td>
106
        <td>{{ act.get_state }}</td>
107
        <td>({{ act.act_type.id }}) {{ act.act_type }}</td>
108
        <td>{{ act.valide|yesno:"Oui,Non," }}</td>
109
        <td>{{ act.is_billed|yesno:"Oui,Non,None" }}</td>
110
        <td>
111
            {% for doctor in act.doctors.all %}
112
            ({{ doctor.id }}) {{ doctor }}
113
            {% if not forloop.last %}
114
            <br/>
115
            {% endif %}
116
            {% endfor %}
117
        </td>
118
        <td>{{ act.time|date:"H:i" }}</td>
119
        <td>{{ act.duration }}</td>
120
      </tr>
121
    {% endfor %}
122
    </tbody>
123
  </table>
124
</div>
125
{% endblock %}
126

    
127
{% block dialogs %}
128

    
129
<div id="acte-dlg" style="display: none;"></div>
130
{% endblock %}
(1-1/2)