Project

General

Profile

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

calebasse / calebasse / personnes / templates / personnes / acces.html @ d4883b5e

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

    
3
{% block extrascripts %}
4
<script>
5
$(function() {
6
    $('tr').click(function () {
7
      var pk = $(this).data('pk');
8
      window.location.href=pk+'/';
9
    });
10
    if ($('input').val()) {
11
      $('#input-box span').show();
12
    }
13
    $('#input-box .clear').click(function () {
14
      $(this).prev('input').val('');
15
      $(this).closest('form').submit();
16
    });
17
});
18
</script>
19
<style>
20
  #input-box { position: relative; }
21
  div input { display: inline; }
22
  .clear {
23
    position: absolute;
24
    top: 6px;
25
    right: 3px;
26
    display: none;
27
  }
28
  .clear:active {
29
    color: black;
30
  }
31
</style>
32
{% endblock %}
33

    
34
{% block appbar %}
35
<h2>Gestion des personnes — Accès</h2>
36
<a href="gestion-personnes.html">Retourner à la gestion des personnes</a>
37

    
38
<button class="dialog-button" data-url="new/ #form-content" data-default-button="Créer">Nouvel accès</button>
39
{% endblock %}
40

    
41
{% block beforecontent %}
42
<div id="sidebar">
43
  <div>
44
    <h3>Rechercher dans les comptes</h3>
45
    <form>
46
      <label>Identifiant : <div id="input-box"><input type="text"/ name='identifier' value="{{ request.GET.identifier }}"><span class="clear">&#x2716;</span></div></label>
47
      <button>Rechercher</button>
48
    </form>
49
  </div>
50
</div>
51
{% endblock %}
52

    
53
{% block content %}
54
<div class="content">
55
  <table class="main">
56
    <thead>
57
    <tr>
58
      <th>Identifiant</th>
59
      <th>Courriel</th>
60
      <th>Fiche Personnel</th>
61
    </tr>
62
    </thead>
63
    <tbody>
64
   {% for object in object_list %}
65
    {% if object.is_active %}
66
    <tr data-pk="{{object.pk}}">
67
      <td>{{object.username}}</td>
68
      <td>{{object.email}}</td>
69
      <td>{% firstof object.userworker "-" %}</td>
70
      <td><button></button> <button>-</button> <button>Histo</button></td>
71
    </tr>
72
    {% endif %}
73
   {% endfor %}
74
    </tbody>
75
  </table>
76

    
77
  <h4>Comptes désactivés</h4>
78

    
79
  <table class="main">
80
    <thead>
81
    <tr>
82
      <th>Identifiant</th>
83
      <th>Courriel</th>
84
      <th>Fiche Personnel</th>
85
    </tr>
86
    </thead>
87
    <tbody>
88
   {% for object in object_list %}
89
    {% if not object.is_active %}
90
    <tr data-pk="{{object.pk}}">
91
      <td>{{object.username}}</td>
92
      <td>{{object.email}}</td>
93
      <td>{% firstof object.userworker.worker "-" %}</td>
94
      <td><button></button> <button>-</button> <button>Histo</button></td>
95
    </tr>
96
    {% endif %}
97
   {% endfor %}
98
    </tbody>
99
  </table>
100
</div>
101
{% endblock %}
102

    
103
{% block dialogs %}
104
<div id="new-membre-dlg" style="display: none;">
105
  <form>
106
    <p>
107
    <label for="id_nom">Identifiant :</label>
108
    <input id="id_nom" type="text" name="nom"/>
109
    </p>
110
    <p>
111
    <label for="id_password">Mot de passe :</label>
112
    <input id="id_password" type="text" name="password"/>
113
    </p>
114
    <p>
115
    <label for="id_member">Membre du personnel associé :</label>
116
    <select id="id_member" name="member">
117
      <option>aucun</option>
118
      <option>Bob Leponge</option>
119
      <option>...</option>
120
    </select>
121
    </p>
122
  </form>
123
</div>
124
{% endblock %}
125

    
126

    
(2-2/16)