Projet

Général

Profil

0001-chateauroux-add-family-templates-15045.patch

Thomas Noël, 17 février 2017 15:50

Télécharger (12,7 ko)

Voir les différences:

Subject: [PATCH] chateauroux: add family templates (#15045)

 templates/variants/chateauroux/family/adult.html   |  47 ++++++
 .../variants/chateauroux/family/child-full.html    |  72 ++++++++
 templates/variants/chateauroux/family/child.html   |  42 +++++
 templates/variants/chateauroux/family/contact.html |  43 +++++
 templates/variants/chateauroux/family/infos.html   | 184 +++++++++++++++++++++
 5 files changed, 388 insertions(+)
 create mode 100644 templates/variants/chateauroux/family/adult.html
 create mode 100644 templates/variants/chateauroux/family/child-full.html
 create mode 100644 templates/variants/chateauroux/family/child.html
 create mode 100644 templates/variants/chateauroux/family/contact.html
 create mode 100644 templates/variants/chateauroux/family/infos.html
templates/variants/chateauroux/family/adult.html
1
{% load i18n combo %}
2
<h3>{{ person.title.text }} {{ person.text }}</h3>
3

  
4
{% if person.sas %}
5
<p>
6
L'ajout de cet adulte à votre dossier famille est en cours d'instruction par la
7
ville.
8
</p>
9
{% endif %}
10

  
11
<ul>
12
  {% if person.birthdate %}
13
  <li>Date de naissance&nbsp;:  {{ person.birthdate|strptime:"%Y-%m-%d"|date:"d F Y" }}</li>
14
  {% endif %}
15

  
16
  {% if person.address %}
17
  <li>Adresse&nbsp;: {{ person.address.full }}</li>
18
  {% endif %}
19

  
20
  {% if person.email %}
21
  <li>{% trans "Email:" %} {{ person.email }}</li>
22
  {% endif %}
23

  
24
  {% if person.cellphone %}
25
  <li>{% trans "Cellphone:" %} {{ person.cellphone }}</li>
26
  {% endif %}
27

  
28
  {% if person.phone %}
29
  <li>{% trans "Phone:" %}{{ person.phone }}</li>
30
  {% endif %}
31

  
32
  {% if person.profession %}
33
  <li>Profession : {{ person.profession }}</li>
34
  {% endif %}
35

  
36
  {% if person.employer %}
37
  <li>Employeur : {{ person.employer }}</li>
38
  {% endif %}
39

  
40
  {% if person.employer_phone %}
41
  <li>Téléphone de l'employeur : {{ person.employer_phone }}</li>
42
  {% endif %}
43

  
44
  {% if person.employer_address.full %}
45
  <li>Ville de l'employeur : {{ person.employer_address.city.text }}</li>
46
  {% endif %}
47
</ul>
templates/variants/chateauroux/family/child-full.html
1
{% load i18n combo %}
2
<h1>{{ person.text }}
3
<em>({% if person.sex == 'F' %}fille</em>{% elif person.sex == 'M' %}garçon{% endif %})</em>
4
</h1>
5

  
6
{% if person.sas %}
7
<p>
8
Note&nbsp;: vous avez demandé à ce que cet enfant soit ajouté à votre dossier
9
famille, cette demande est en cours d'instruction par la ville.
10
</p>
11
{% endif %}
12

  
13
<ul>
14
  {% if person.birthdate %}
15
  <li>Date de naissance&nbsp;: {{ person.birthdate|strptime:"%Y-%m-%d"|date:"d F Y" }}</li>
16
  {% endif %}
17

  
18
  {% if person.school.text %}
19
  <li>Établissement d'inscription : {{ person.school.text }}</li>
20
  <li>Niveau : {{ person.school.grade.text }}</li>
21
  {% endif %}
22

  
23
  {% if person.email %}
24
  <li>{% trans "Email:" %} {{ person.email }}</li>
25
  {% endif %}
26

  
27
  {% if person.cellphone %}
28
  <li>{% trans "Cellphone:" %}{{ person.cellphone }}</li>
29
  {% endif %}
30

  
31
  {% if person.phone %}
32
  <li>{% trans "Phone:" %}{{ person.phone }}</li>
33
  {% endif %}
34
</ul>
35

  
36
<h2>Présences sur les 3 derniers mois (90 jours)</h2>
37

  
38
{% if person.plannings %}
39

  
40
<table class="invoices">
41
<tbody>
42

  
43
    {% for planning in person.plannings|dictsort:"date" %}
44

  
45
    {% ifchanged planning.year planning.month %}
46
      <tr><td colspan="4"><h4>{{ planning.month|strptime:"%m"|date:"E" }} {{ planning.year }}</h4></td></tr>
47
      <tr>
48
        <th>Date</th>
49
        <th>Horaire prévu</th>
50
        <th>Horaire constaté</th>
51
        <th>Remarque</th>
52
      </tr>
53
    {% endifchanged %}
54

  
55
    <tr>
56
      <td>{{ planning.date|strptime:"%Y-%m-%d"|date:"l j E"|lower }}</td>
57
      <td>{{ planning.expected_in }}→{{ planning.expected_out }}</td>
58
      <td>{% if not planning.absent %}
59
          <span style="color:{%if planning.differ %}orange{% else %}green{% endif %}">{{ planning.in }}→{{ planning.out }}</span>
60
      {% else %}<span style="color:red;">Absence</span>{% endif %}</td>
61
      <td>{{planning.message}}
62
      </td>
63
    </tr>
64

  
65
    {% endfor %}
66

  
67
</tbody>
68
</table>
69

  
70
{% else %}
71
    <p>Aucun planning disponible</p>
72
{% endif %}
templates/variants/chateauroux/family/child.html
1
{% load i18n combo %}
2
<h3>{{ person.text }}
3
<em>({% if person.sex == 'F' %}fille</em>{% elif person.sex == 'M' %}garçon{% endif %})</em>
4
</h3>
5

  
6
{% if person.sas %}
7
<p>
8
Note&nbsp;: vous avez demandé à ce que cet enfant soit ajouté à votre dossier
9
famille, cette demande est en cours d'instruction par la ville.
10
</p>
11
{% endif %}
12

  
13
<ul>
14
  {% if person.birthdate %}
15
  <li>Date de naissance&nbsp;: {{ person.birthdate|strptime:"%Y-%m-%d"|date:"d F Y" }}</li>
16
  {% endif %}
17

  
18
  {% if person.school.text %}
19
  <li>Établissement d'inscription : {{ person.school.text }}</li>
20
  <li>Niveau : {{ person.school.grade.text }}</li>
21
  {% endif %}
22

  
23
  {% if person.email %}
24
  <li>{% trans "Email:" %} {{ person.email }}</li>
25
  {% endif %}
26

  
27
  {% if person.cellphone %}
28
  <li>{% trans "Cellphone:" %}{{ person.cellphone }}</li>
29
  {% endif %}
30

  
31
  {% if person.phone %}
32
  <li>{% trans "Phone:" %}{{ person.phone }}</li>
33
  {% endif %}
34
</ul>
35

  
36
{% comment %}
37
{% if not selected_user %}
38
{% if not person.sas %}
39
<a href="?child={{ person.id }}">Présences et absences de {{ person.text }}</a>
40
{% endif %}
41
{% endif %}
42
{% endcomment %}
templates/variants/chateauroux/family/contact.html
1
{% load i18n combo %}
2
<h3>{{ person.title.text }} {{ person.text }}</h3>
3

  
4
{% if person.sas %}
5
<p>Vous avez demandé l'ajout de ce contact à votre dossier famille,
6
cette demande est en cours d'instruction par la ville.
7
</p>
8
{% endif %}
9

  
10
<ul>
11
  {% if person.birthdate %}
12
  <li>Date de naissance&nbsp;: {{ person.birthdate|strptime:"%Y-%m-%d"|date:"d F Y" }}</li>
13
  {% endif %}
14

  
15
  {% if person.address %}
16
  <li>Adresse&nbsp;: {{ person.address.full }}</li>
17
  {% endif %}
18

  
19
  {% if person.email %}
20
  <li>{% trans "Email:" %} {{ person.email }}</li>
21
  {% endif %}
22

  
23
  {% if person.cellphone %}
24
  <li>{% trans "Cellphone:" %} {{ person.cellphone }}</li>
25
  {% endif %}
26

  
27
  {% if person.phone %}
28
  <li>{% trans "Phone:" %} {{ person.phone }}</li>
29
  {% endif %}
30

  
31
  {% if person.children %}
32
  <li>Contact pour {{ person.children|pluralize:"l'enfant,les enfants" }} :
33
  <ul>
34
    {% for child in person.children %}
35
    <li>{{ child.text }} <em>({{ child.link.text }})</em>
36
    {% if child.parental_authority %}[autorité parentale]{% endif %}
37
    {% if child.banned %}[INTERDICTION]{% endif %}
38
    </li>
39
    {% endfor %}
40
  </ul>
41
  </li>
42
  {% endif %}
43
</ul>
templates/variants/chateauroux/family/infos.html
1
{% load i18n %}
2

  
3
{% if selected_user %}<!-- affichage portail agent -->{% endif %}
4

  
5
{% if not family or not family.data %}
6

  
7
{% if 'agent' in request.META.SERVER_NAME %}
8
<h1>Pas de famille lié à ce compte</h1>
9
{% else %}
10

  
11
<div>
12
<h2>Le portail famille</h2>
13

  
14
<p>Le portail famille permet de suivre et de gérer les activités de votre
15
enfant pour la restauration scolaire, les accueils périscolaires, l'accueil de
16
loisirs de La Valla et l'accueil en crèche.</p>
17

  
18
<p>
19
Vous pouvez alors :
20
<ul>
21
<li>inscrire votre enfant à l'ALSH La Valla, les mercredis, aux petites
22
vacances, et informer de son absence le cas échéant ;</li>
23

  
24
<li>visualiser les activités périscolaires auxquelles votre enfant a participé : accueil du matin et du soir, restauration, TAP ;</li>
25
<li>consulter votre facture en ligne et la télécharger si vous avez opté pour la facture électronique ;</li>
26
<li>payer votre facture en ligne ;</li>
27
<li>mettre à jour vos coordonnées téléphoniques ou votre mail si nécessaire.</li>
28
</ul>
29
</p>
30

  
31
<p>Votre accès parent est crée automatiquement à partir d'une adresse mail
32
valide, si votre enfant est inscrit dans une école, au centre de loisirs de La
33
Valla ou dans une crèche municipale.</p>
34

  
35
<h3>Associer votre compte famille et votre compte usager</h3>
36

  
37
<p>Vous pouvez associer votre compte famille à votre compte usager grâce à vos
38
<a href="{% url 'family-link' %}" rel="popup">identifiants famille en cliquant
39
ici</a> et commencer vos démarches.</p>
40

  
41
<h3>Accéder directement au portail famille</h3>
42

  
43
<p>Si vous ne souhaitez pas associer vos comptes, vous pouvez <a
44
href="sso">accéder au portail famille
45
directement</a>. Il vous faudra alors saisir votre identifiant et mot de passe
46
qui vous ont été indiqués soit par courrier, soit lors de votre passage au
47
service Education-Jeunesse ou au service Petite Enfance au RDC de la mairie de
48
Châteauroux.</p>
49

  
50
<h3>Vous avez perdu vos identifiants famille ?</h3>
51

  
52
<p>Utilisez <a href="codes">notre formulaire pour les demander de
53
nouveau</a>.</p>
54

  
55

  
56
</div>
57

  
58
{% endif %}
59

  
60
{% else %}
61

  
62
{% with data=family.data %}
63

  
64
{% if request.GET.child %}
65

  
66
{### only one child ###}
67

  
68
{% for child in data.children %}
69
{% if child.id == request.GET.child %}
70
{% include 'family/child-full.html' with person=child %}
71
{% endif %}
72
{% endfor %}
73

  
74
<p>
75
<a href="./">Retour au dossier complet</a>
76
</p>
77

  
78
{% else %}
79

  
80
{### complete family ###}
81

  
82
<div>
83
{% if selected_user %}
84
<h2>Dossier famille lié</h2>
85
{% else %}
86
<h2>Mon dossier famille</h2>
87
<p>
88
Pour vous rendre sur le portail famille et commencer vos démarches, <a
89
href="sso">cliquez ici</a>.
90

  
91
</p>
92
<p>
93
Ci-dessous les informations sur votre famille actuellement connues par la ville.
94
</p>
95
{% endif %}
96

  
97
{% if data.sas %}
98
{% if selected_user %}
99
<p style="background: red;">
100
<strong >Attention : dossier famille en attente de validation, uniquement stocké
101
temporairement dans le SAS du système Publik, n'existe pas encore dans le
102
logiciel famille</strong>
103
</p>
104
{% else %}
105
<p>
106
<strong>Note : les informations ci-dessous n'ont pas encore été validées
107
par la ville. Il s'agit ici d'une vision de votre <em>demande</em> de création
108
dossier famille, dont l'instruction est en cours.</strong>
109
</p>
110
{% endif %}
111
{% endif %}
112
</div>
113

  
114
<div>
115
  <h2>{% trans "Adults" %}</h2>
116
  <ul>
117
    {% for adult in data.adults %}
118
    <li>{% include 'family/adult.html' with person=adult %}
119
    </li>
120
    {% endfor %}
121
  </ul>
122
</div>
123

  
124
<div id="children">
125
  <h2>{% trans "Children" %}</h2>
126
  <ul>
127
    {% for child in data.children %}
128
    <li>
129
    {% include 'family/child.html' with person=child kind='child' %}
130
    </li>
131
    {% endfor %}
132
  </ul>
133
  <p>
134
  </p>
135
</div>
136

  
137
<div>
138
  <h2>{% trans "Contacts" %}</h2>
139
  {% if data.contacts %}
140
  <ul>
141
    {% for contact in data.contacts %}
142
    <li>{% include 'family/contact.html' with person=contact %}</li>
143
    {% endfor %}
144
  </ul>
145
  {% else %}
146
  <p>Aucun contact n'est déclaré dans ce dossier famille</p>
147
  {% endif %}
148
</div>
149

  
150
<div>
151
  <h2>Administratif</h2>
152
  <ul>
153
    <li>Adresse du foyer : {{ data.address.full }}</li>
154
    <li>Situation : {{ data.informations.situation.text }}</li>
155
    <li>Allocataire :
156
      {{ data.informations.allowance_adult.text|default:'(inconnu)' }}
157
      — numéro {{ data.informations.allowance_number|default:'(inconnu)' }}
158
      — régime {{ data.informations.regime.text|default:'(inconnu)' }}
159
    </li>
160
    {% if data.informations.allowance_aeeh == '1' %}
161
    <li>Allocation d'éducation de l'enfant handicapé (AEEH)</li>
162
    {% endif %}
163
  </ul>
164
</div>
165

  
166
<div>
167
  {% if not selected_user %}
168
  {% if not data.sas %}
169
  <h2>Ne plus être relié à cette famille</h2>
170
  <p>
171
    <a class="button" href="{% url 'family-unlink' %}" rel="popup">Cliquer ici
172
    pour ne plus relier mon compte usager à ce dossier famille.</a>
173
    Attention cette action est définitive, vous devrez disposer de vos codes
174
    famille pour vous relier à nouveau.
175
  </p>
176
  {% endif %}
177
  {% endif %}
178
</div>
179

  
180
{% endif %}{### /complete family ###}
181

  
182
{% endwith %}
183

  
184
{% endif %}
0
-