Project

General

Profile

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

calebasse / calebasse / personnes / templates / personnes / workers.html @ a69db8e6

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

    
3
{% block extrascripts %}
4
<script>
5
  $(function() {
6
    $('#new-membre').click(function() {
7
      $('#new-membre-dlg').dialog({title: 'Nouveau membre',
8
          width: '500px',
9
          buttons: [ { text: "Fermer",
10
                 click: function() { $(this).dialog("close"); } },
11
               { text: "Ajouter",
12
                 click: function() {
13
                 $(this).dialog("close"); } } ]
14
          });
15
      });
16
    var $searchform = $('#sidebar form');
17
    $('#sidebar input[type="checkbox"]').on('change', function () {
18
      $searchform.submit();
19
    });
20
    $('#clear').click(function () {
21
      $('#sidebar input[type="text"]').val('');
22
      $('#sidebar select').val('');
23
      $('#sidebar input[type="checkbox"]').attr('checked', true);
24
      $('#sidebar button').click();
25
    });
26
  });
27
</script>
28
{% endblock %}
29

    
30
{% block appbar %}
31
<h2>Gestion des personnes</h2>
32
<a href="..">Retourner à la gestion des personnes</a>
33

    
34
<button class="dialog-button"
35
        data-url="new/ #form-content"
36
        data-default-button="Créer">Nouveau membre</button>
37
{% endblock %}
38

    
39
{% block beforecontent %}
40
<div id="sidebar">
41
  <form>
42
    <div>
43
      <h3>Rechercher dans les membres du personnel</h3>
44

    
45
      {% with field=search_form.last_name %}
46
        <label>{{ field.label }} :
47
        <div class="text-input-wrapper">
48
          {{ field }}
49
          <span class="clear">&#x2716;</span>
50
        </div>
51
        </label>
52
      {% endwith %}
53

    
54
      {% with field=search_form.first_name %}
55
        <label>{{ field.label }} :
56
        <div class="text-input-wrapper">
57
          {{ field }}
58
          <span class="clear">&#x2716;</span>
59
        </div>
60
        </label>
61
      {% endwith %}
62

    
63

    
64
      {% with field=search_form.profession %}
65
      <label>{{ field.label }} :
66
      <div class="text-input-wrapper">
67
        {{ field }}
68
      </div>
69
      </label>
70
      {% endwith %}
71

    
72

    
73
      <button>Rechercher</button>
74

    
75
    </div>
76
    <div id="filtre">
77
      <h3>Afficher les personnes</h3>
78

    
79
      {{ search_form.intervene_status }}
80
    </div>
81
    <a id="clear">Effacer</a>
82
  </form>
83
</div>
84
{% endblock %}
85

    
86
{% block content %}
87
<div class="content">
88
  <table id="membres" class="main">
89
    <thead>
90
    <tr>
91
      <th class="last_name">Nom</th>
92
      <th class="first_name">Prénom</th>
93
      <th class="profession">Profession</th>
94
      <th class="services">Services</th>
95
      <th class="is_away">Absent</th>
96
      <th class="active">Actif</th>
97
    </tr>
98
    </thead>
99
    <tbody>
100

    
101
    {% for object in object_list %}
102
    <tr data-pk="{{ object.pk }}" id="object-{{ object.pk }}">
103
      <td class="last_name"><span class="lastname">{{ object.last_name }}</span></td>
104
      <td class="first_name">{{ object.first_name }}</td>
105
      <td class="profession">{{ object.type }}</td>
106
      <td class="services">
107
        {% if object.services.all %}
108
            {% for service in object.services.all %}
109
            {{ service.name }}
110
            {% if not forloop.last %} / {% endif %}
111
            {% endfor %}
112
        {% else %}
113
            {% if object.enabled %}Externe{% endif %}
114
        {% endif %}
115
      </td>
116
      <td class="is_away">
117
        {% if object.holiday %}×{% else %}&nbsp;{% endif %}
118
      </td>
119
      <td class="active">
120
        {% if object.enabled %}✔{% else %}&nbsp;{% endif %}
121
      </td>
122
    </tr>
123
    {% endfor %}
124

    
125
    </tbody>
126
  </table>
127
</div>
128
{% endblock %}
(16-16/16)