Project

General

Profile

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

calebasse / calebasse / personnes / templates / personnes / worker_update.html @ dee80d5e

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

    
3
{% block extrascripts %}
4
{{ block.super }}
5
    <script>
6
        $(function() {
7
            $('#lundi').click(function() {
8
                $('#lundi-dlg').dialog({title: 'Plages du lundi',
9
                    width: '950px',
10
                    buttons: [ { text: "Annuler",
11
                        click: function() { $(this).dialog("close"); } },
12
                    { text: "Valider",
13
                        click: function() { $(this).dialog("close"); } }]}
14
                );
15
            });
16
        });
17
</script>
18
{% endblock %}
19

    
20
{% block appbar %}
21
<h2>Personnel - <span class="lastname">{{ object.last_name }}</span> {{ object.first_name }}
22
  {% if holiday %}<span class="en-conge">(en congé jusqu'au {{ holiday.end_date|date:"j F" }})</span>{% endif %}
23
</h2>
24
    <a href="..">Retourner à l'administration du personnel</a>
25
    <form action="delete/" method="post" data-confirmation-msg="Êtes-vous sûr de vouloir supprimer le personnel {{object.last_name}} {{object.first_name}} ?" class="form-with-confirmation">
26
      {% csrf_token %}
27
      <button>Supprimer</button>
28
    </form>
29
{% endblock %}
30

    
31
{% block content %}
32

    
33
{% if messages %}
34
<ul class="messages">
35
    {% for message in messages %}
36
    <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
37
    {% endfor %}
38
</ul>
39
<script type="text/javascript">
40
$('.messages').delay(1000*(1+{{ messages|length }})).fadeOut('slow');
41
</script>
42
{% endif %}
43

    
44
<div id="info-membre">
45
  <form method="post" class="ajax" id="id-form">
46
    {% csrf_token %}
47
    <div class="frame inline">
48
      <h3>État civil</h3>
49
      <button class="save enable-on-change"></button>
50
      <p>
51
      {% for field in forms.id %}
52
      {{ field.label_tag  }} : {{ field }}
53
      {% endfor %}
54
    </div>
55
  </form>
56

    
57
  <form method="post" class="ajax" id="services-form">
58
    {% csrf_token %}
59
    <div class="inline frame">
60
      <h3>Services</h3>
61
      <button class="save enable-on-change"></button>
62

    
63
      <p class="services">
64
      {{ forms.services.services }}
65
      </p>
66
    </div>
67
  </form>
68

    
69
  <div class="frame" id="schedule">
70
    <h3>Horaires de travail</h3>
71

    
72
    <table>
73
      <thead>
74
        <tr>
75
          {% for weekday, name in weekdays %}
76
            <td><a href="{{weekday}}/">{{ name|capfirst }}</a></td>
77
          {% endfor %}
78
        </tr>
79
      </thead>
80
      <tbody>
81
      <tr>
82
        {% for timetable in timetables %}
83
        <td>
84
          {% for schedule in timetable.schedules %}
85
            De {{ schedule.start_time }} à {{ schedule.end_time }}
86
            {% if not forloop.last %}
87
            <br/>
88
            {% endif %}
89
          {% empty %}
90
          -
91
          {% endfor %}
92
        </td>
93
        {% endfor %}
94
      </tr>
95
      </tbody>
96
    </table>
97
  </div>
98
  <form action="holidays/" method="get">
99
    <div class="frame">
100
      <h3>Congés</h3>
101
      <button class="save icon-edit"></button>
102
      <ul>
103
        {% for holiday in holidays %}
104
        <li>{{ holiday|capfirst }}
105
            {% if holiday.is_current and holiday.service %}
106
            (congés annuels, en cours)
107
            {% elif holiday.is_current %}
108
            (en cours)
109
            {% elif holiday.service %}
110
            (congés annuels)
111
            {% endif %}
112
            {% if holiday.comment %}
113
            « {{ holiday.comment }} »
114
            {% endif %}
115
        </li>
116
        {% endfor %}
117
      </ul>
118
    </div>
119
  </form>
120
</div>
121
{% endblock %}
122

    
123
{% block dialogs %}
124
<div id="lundi-dlg" style="display: none;">
125
  <table>
126
    <tr>
127
      <th>Heure début</th> <th>Heure fin</th> <th>Date début</th> <th>Date fin</th> <th>Périodicité</th> <th>Services</th>
128
    </tr>
129
    <tr>
130
      <td><input value="13h30" size="8"/></td> <td><input value="17h30" size="8"/></td> <td><input value="20/04/2012" size="12"/></td> <td><input value="-" size="12"/></td> <td><select><option>Toutes les semaines</option></select></td> <td><select><option>CAMSP</option><option>CMPP</option><option>...</option><option>+</option></select></td> <td><button>-</button></td>
131
    </tr>
132
    <tr class="expired"> <td>13h30</td> <td>15h30</td> <td>2/01/2012</td> <td>14/04/2012</td> <td>2× par mois</td> <td>CAMSP</td> <td><button>déver.</button> </tr>
133
  </table>
134
  <button>+</button>
135
</div>
136
{% endblock %}
(10-10/11)