Initial commit

This commit is contained in:
Claude Paroz 2024-06-03 16:49:01 +02:00
commit 793bb6a488
182 changed files with 17153 additions and 0 deletions

View file

@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block content %}
<h2 class="text-center">Confirmation daccès</h2>
<p class="text-center">Veuillez confirmer l'accès à la famille {{ famille.nom }}. Comme ce nest pas un accès habituel, il sera journalisé comme tel.</p>
<p class="fs-2 text-center">
<a href="{{ url }}?confirm=1">Continuer vers la famille {{ famille.nom }}</a>
</p>
{% endblock %}

View file

@ -0,0 +1,127 @@
{% extends "base.html" %}
{% block extrastyle %}
<style>
{% if mode == 'evaluation' %}
.fin, .suivi { display: none; }
{% endif %}
</style>
{% endblock %}
{% block boutons_droite %}
{% include './famille_boutons.html' with active='agenda' %}
{% endblock %}
{% block content %}
<div class="row border-bottom lead mt-3 mb-3">
<div class="col">Famille {{ famille.nom }} - {{ famille.adresse }}</div>
<div class="col text-end">Dossier de suivi</div>
</div>
<form action= "." method="post">{% csrf_token %}
<input type="hidden" name="famille" value="{{ famille.pk }}">
{% for error in form.non_field_errors %}
<div class="alert alert-danger">
<strong>{{ error }}</strong>
</div>
{% endfor %}
<div class="row mt-2">
<div class="col-4 text-center h5 py-3 mb-0" style="background-color:#FFDDAA;">ÉVALUATION</div>
<div class="col-4 text-center h5 py-3 mb-0" style="background-color:#77BBFF;">ACCOMPAGNEMENT</div>
<div class="col-4 text-center h5 py-3 mb-0" style="background-color:#FFDDAA;">CLÔTURE DU DOSSIER</div>
</div>
<div class="row">
<div class="col-4 text-center border" style="background-color:#FFEECC;">
<h6 class="mt-3 p-1 fw-bold">Demande déposée le</h6>
<p class="">{{ form.date_demande.errors }}{{ form.date_demande }}</p>
<h6 class="m-1 p-1 fw-bold">Début de lévaluation le</h6>
<p class="">{{ form.date_debut_evaluation.errors }}{{ form.date_debut_evaluation }}</p>
<h6 class="m-1 p-1 fw-bold">Fin de lévaluation le</h6>
<p>{{ form.date_fin_evaluation.errors }}{{ form.date_fin_evaluation }}</p>
{% if mode == 'evaluation' %}
<div class="border m-3 p-3" style="background-color:#FFDDAA;">
<h6 class="m-1 p-3"><em>Si abandon du dossier:</em></h6>
<h6 class="mt-2">Motif de fin</h6>
<p class="">{{ form.motif_fin_suivi.errors }}{{ form.motif_fin_suivi }}</p>
</div>
{% endif %}
<p id="aemo_print_buttons" class="py-3">
<a class="btn btn-outline-info btn-sm"
href="{% url 'print-evaluation' famille.pk %}">Évaluation PDF</a>
</p>
</div>
<div class="col-4 d-flex flex-column">
<div class="row flex-grow-0" style="background-color:#BBEEFF;">
<div class="col text-center mt-3 p-1">
<span class="fw-bold">Début de l'accompagnement le </span> {{ form.date_debut_suivi.errors }}{{ form.date_debut_suivi }}
{% if famille.suivi.date_debut_suivi and not famille.suivi.date_fin_suivi %}
<div>Depuis {{ famille.suivi.date_debut_suivi|timesince }}</div>
{% endif %}
</div>
</div>
<div class="row flex-grow-0" style="background-color:#BBEEFF;">
<div class="col-12 mt-3 p-1">
{% for niveau in niveaux %}
<div class="ms-5"><span class="fw-bold">Niv. dintervention {{niveau.niveau_interv }}</span>
du {{ niveau.date_debut|date:"d.m.Y" }} au {{ niveau.date_fin_calc|date:"d.m.Y"|default:'--'}}
</div>
{% endfor %}
</div>
<div class="col text-center mt-3 p-1">
<div class="fw-bold">Accompagnement(s) temporaire(s)</div>
{% for intervention in interv_temporaires %}
<div>{{ intervention.intervenant.nom_prenom }} ({{ intervention.role }})
({{ intervention.date_debut|date:"d.m.Y" }} - {{intervention.date_fin|date:"d.m.Y" }})
</div>
{% empty %} -
{% endfor %}
</div>
</div>
<div class="row flex-grow-1">
<div class="col text-center border" style="background-color:#CCEEFF;">
<h5 class="mt-3 p-1">BILANS ET RÉSUMÉS</h5>
<p class="m-1">
{% include "partial_show_docs.html" with docs=bilans_et_rapports %}
</p>
{% if can_edit and mode == 'suivi' %}
<p class="">
<a class="btn btn-primary btn-sm" href="{% url 'famille-bilan-add' famille.pk %}">Ajouter un bilan</a>
<a class="btn btn-primary btn-sm" href="{% url 'famille-rapport-add' famille.pk %}">Ajouter un résumé</a>
</p>
{% endif %}
</div>
</div>
</div>
<div class="col-4 text-center border" style="background-color:#FFEECC;">
{% if mode == 'suivi' %}
<div class="fin mt-5 p-3 border" style="background-color:#FFDDAA;">
{% include 'partial_agenda_cloture.html' %}
</div>
{% endif %}
{% if mode == 'reactivation' %}
<h6 class="mt-3 p-1 fw-bold">Fin de laccompagnement le</h6>
<p class="mt-2">{{ object.date_fin_suivi }}</p>
<h6 class="m-1 p-1 fw-bold">Motif de fin</h6>
<p class="fin">{{ object.get_motif_fin_suivi_display }}</p>
<h6 class="m-1 p-1 fw-bold">Destination</h6>
<p class="fin">{{ object.famille.get_destination_display }}</p>
{% if famille|can_be_reactivated:user %}
<button class="btn btn-danger btn-sm mt-3" type="submit"
data-confirm="Les champs «Date de fin de l'accompagnement», «Motif de fin» et éventuellement «Destination» seront effacés. Voulez-vous continuer?"
formaction="{% url 'famille-reactivation' famille.pk %}">Réactiver</button>
{% endif %}
{% endif %}
</div>
</div>
<div class="row">
<div class="col">
{% if famille|can_edit:user %}
{% include "actions.html" %}
{% endif %}
</div>
</div>
</form>
{% endblock %}

42
templates/aemo/bilan.html Normal file
View file

@ -0,0 +1,42 @@
{% extends "base.html" %}
{% block boutons_droite %}
{% include 'aemo/famille_boutons.html' with active='agenda' %}
{% endblock %}
{% block content %}
<div class="row border-bottom lead mt-3 mb-3">
<div class="col">Famille {{ famille.nom }} - {{ famille.adresse }}</div>
<div class="col text-end">
Bilan du {{ bilan.date }}{% if bilan.phase %} - Phase {{ bilan.phase }}{% endif %}
</div>
</div>
<div class="row justify-content-center">
<div class="col-10">
{% for label, value in data %}
<h3>{{ label }}</h3>
{{ value|default:'-'|raw_or_html }}
{% endfor %}
{% if bilan.fichier and bilan.famille|can_edit:user %}
<h3>Document annexé</h3>
<a href="{{ bilan.fichier.url }}">{{ bilan.fichier }}</a>
{% endif %}
</div>
</div>
<div class="row mt-5">
<div class="col mt-3 text-end">
<a class="btn btn-sm btn-secondary" href="javascript: history.go(-1)">Retour</a>
{% if bilan|can_edit:user %}
<a class="btn btn-sm btn-success" href="{{ bilan.edit_url }}">Modifier</a>
<form class="inline ms-5" method="post">{% csrf_token %}
<button class="btn btn-sm btn-danger" name="delete" type="submit"
data-confirm="Voulez-vous vraiment supprimer ce bilan ?"
formaction="{% url bilan.delete_urlname famille.pk bilan.pk %}"
>Supprimer</button>
</form>
{% endif %}
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,22 @@
{% extends "base.html" %}
{% block content %}
<div class="row border-bottom mb-3">
<div class="col"><p class="lead">Centre scolaire</p></div>
</div>
<div class="row justify-content-center">
<div class="col-6">
<form action="#" method="post">
{% csrf_token %}
<form action="." method="post">
{% csrf_token %}
<table class="table table-sm">
{{ form.as_table }}
</table>
{% include "actions.html" %}
</form>
</form>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,34 @@
{% extends "base.html" %}
{% block content %}
<div class="row border-bottom mb-3">
<div class="col"><p class="lead">Centres scolaires</p></div>
{% if perms.aemo.add_cerclescolaire %}
<div class="col text-end">
<a class="btn btn-sm btn-outline-primary" href="{% url 'cercle-add' %}">Nouveau</a>
</div>
{% endif %}
</div>
<div class="row">
<div class="col">
<table class="table table-sm table-hover stat_table">
<thead class="table-light">
<tr>
<th>Nom</th>
<th>Téléphone</th>
</tr>
</thead>
<tbody>
{% with can_edit=perms.aemo.change_cerclescolaire %}
{% for item in object_list %}
<tr>
<td>{% if can_edit %}<a href="{% url 'cercle-edit' item.pk %}">{% endif %}{{ item.nom }}{% if can_edit %}</a>{% endif %}</td>
<td>{{ item.telephone }}</td>
</tr>
{% endfor %}
{% endwith %}
</tbody>
</table>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,39 @@
{% extends "base.html" %}
{% block content %}
<div class="row border-bottom mb-3">
<div class="col"><p class="lead">Charge des dossiers en cours par utilisateur (rôles psy et éduc)</p></div>
<div class="col text-end">
<form method="get" action="." class="inline">{{ filter_form }}</form>
<a class="btn btn-sm btn-outline-primary" href="{% url 'utilisateur-list' %}">Utilisateurs</a>
</div>
</div>
<div class="row">
<div class="col">
<table id="user_table" class="table table-sm table-striped sortable">
<thead class="table-light">
<tr><th></th>
<th class="text-end">Taux act.</th>
<th class="text-end" data-sort-method="number">Familles éval.</th>
<th class="text-end" data-sort-method="number">Familles suivies</th>
<th class="text-end" data-sort-method="number">Charge hebdo</th>
<th class="text-end" data-sort-method="number">Charge max.</th>
<th class="text-end" data-sort-method="number">Différence</th>
</tr>
</thead>
<tbody>
{% for util in utilisateurs %}
<tr><td>{{ util }}</td>
<td class="text-end">{{ util.taux_activite }}%</td>
<td class="text-end">{{ util.nbre_eval }}</td>
<td class="text-end">{{ util.nbre_suivi }}</td>
<td class="text-end">{{ util.heures }}</td>
<td class="text-end">{{ util.charge_max }}</td>
<td class="text-end{% if util.charge_diff < 0 %} text-danger{% endif %}">{{ util.charge_diff }}</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,45 @@
{% extends "base.html" %}
{% block extra_javascript %}
<script type="text/javascript">
$(document).ready(function() {
$("#contact-form").submit(function(ev) {
var form = $(this);
mode = '{{ view.action }}';
if (form.data('checked') == 'true' || mode != 'Création') return true;
ev.preventDefault();
var checkUrl = "{% url 'contact-doublon' %}";
var postUrl = form.action;
$.post(checkUrl, form.serialize(), function (data) {
if (data) {
var resp = confirm("Un contact " + data[0].nom + " " + data[0].prenom + " existe déjà!\nVoulez-vous vraiment créer ce nouveau contact ?");
if (!resp) {
return false;
}
}
form.data('checked', 'true');
form.submit();
});
});
});
</script>
{% endblock %}
{% block content %}
<div class="row border-bottom mb-3">
<div class="col"><p class="lead">Contact professionnel</p></div>
<div class="col text-end"><p class="lead">{{ view.action }}</p></div>
</div>
<div class="row mb-3 justify-content-center">
<div class="col-8">
<form id="contact-form" data-checked="false" action="#" method="post">{% csrf_token %}
<table class="table table-sm">
{{ form.as_table }}
</table>
{% include "actions.html" %}
</form>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,79 @@
{% extends "base.html" %}
{% block extra_javascript %}
<script type="text/javascript">
$(document).ready(function() {
$("#id_service, #id_role").change(function() { this.form.submit(); });
});
</script>
{% endblock %}
{% block extrastyle %}
<style>
#id_texte { width: initial; }
</style>
{% endblock %}
{% block boutons_droite %}
<div class="topnav-right me-3">
<form class="form selection_form" method="get" action=".">
<div class="select-container">
{{ form.role.label_tag }} {{ form.role }}
</div>
<div class="select-container">
{{ form.service.label_tag }} {{ form.service }}
</div>
<div class="select-container">
{{ form.texte }}
<button id="search-button" type="submit" title="Rechercher"><img src="{% static 'admin/img/search.svg' %}"></button>
<button id="reset-button" type="reset" title="Réinitialiser tous les filtres"><img src="{% static 'img/filter_off.svg' %}"></button>
{{ form.sort_by }}
</div>
</form>
</div>
{% endblock %}
{% block content %}
<div class="row border-bottom mb-3">
<div class="col"><p class="lead">Contacts</p></div>
{% if perms.aemo.add_contact %}
<div class="col text-end">
<a class="btn btn-sm btn-outline-primary" href="{% url 'contact-add' %}">Nouveau contact</a>
</div>
{% endif %}
</div>
<div class="row">
<div class="col">
<table id="contact_table" class="table table-sm table-hover table-sortable">
<thead class="table-light">
<tr>
<th data-col="nom">Nom, prénom</th>
<th>Téléphone (prof.)</th>
<th>Téléphone (privé)</th>
<th>Email</th>
<th data-col="service">Service</th>
<th data-col="role">Rôles</th>
<th data-col="activite">Activité/prof.</th>
</tr>
</thead>
<tbody>
{% with can_edit=perms.aemo.change_contact %}
{% for contact in object_list %}
<tr>
<td>{% if can_edit %}<a href="{% url 'contact-edit' contact.pk %}">{% endif %}{{ contact.nom_prenom }}{% if can_edit %}</a>{% endif %}</td>
<td>{{ contact.tel_prof }}</td>
<td>{{ contact.tel_prive }}</td>
<td>{{ contact.email }}</td>
<td>{{ contact.service.sigle }}</td>
<td>{{ contact.roles_str }}</td>
<td>{{ contact.profession }}</td>
</tr>
{% endfor %}
{% endwith %}
</tbody>
</table>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,47 @@
{% extends "base.html" %}
{% block boutons_droite %}
{% if form.instance.pk %}
{% include 'aemo/famille_boutons.html' with active='demande' %}
{% endif %}
{% endblock %}
{% block content %}
<div class="row border-bottom lead mt-3 mb-5">
<div class="col">Famille {{ famille.nom }} - {{ famille.adresse }}</div>
<div class="col text-end">Analyse de la demande</div>
</div>
<div class="row justify-content-center mb-3">
<div class="col-10">
<form action= "." name="DemandeForm" method="post">{% csrf_token %}
<input type="hidden" name="famille" value="{{ famille.pk }}">
<table class="table table-sm table-borderless">
{{ form.as_table }}
<tr>
<th>Réseau prof.</th>
<td>
<table>
<tr>
<td>OPE:</td>
<td>{{ famille.suivi|noms_referents_ope }} {{ famille.suivi.mandat_ope|join:', '|in_parens }}</td>
</tr>
{% for enfant in famille.membres_suivis %}
{% for ct in enfant.reseaux.all %}
<tr>
<td>{{ enfant.prenom }}:</td>
<td>{{ ct }} {{ ct.contact }}</td>
</tr>
{% endfor %}
{% endfor %}
</table>
</td>
</tr>
</table>
{% if famille|can_edit:user %}
{% include "actions.html" %}
{% endif %}
</form>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,24 @@
{% extends "base.html" %}
{% block content %}
<div class="row border-bottom mt-3 mb-3">
<div class="col"><p class="lead">{{ view.titre_page }}</p></div>
</div>
<div class="row justify-content-center">
<div class="col-8">
<form action="." method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.non_field_errors }}
<table class="table table-sm table-bordered mt-3 border-bottom">
<thead class="table-light">
<tr><th width="20%">{{ view.titre_formulaire }}</th><th></th></tr>
</thead>
<tbody>
{{ form.as_table }}
</tbody>
</table>
{% include 'actions.html' %}
</form>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,22 @@
{% extends "base.html" %}
{% block content %}
{% include "statistiques/stat-tabs.html" with active="export" %}
<div class="row mb-3">
<div class="col"><p class="app_line lead">Exportation mensuelle</p></div>
</div>
<div class="row justify-content-center">
<div class="col-6">
<p class="lead">Exportation des statistiques mensuelles pour le SPAJ</p>
<form class="selection_form" action="#" method="post">{% csrf_token %}
<table class="table table-sm">
{{ form.as_table }}
<tr>
<td class="text-end" colspan="2"><button class="btn btn-primary" type="submit">Exporter</button></td>
</tr>
</table>
</form>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,35 @@
{% extends "base.html" %}
{% block content %}
<div class="row justify-content-center mt-5 border-bottom">
<div class="col-12">
<h3 align="center">Famille: {{ famille }}</h3>
</div>
</div>
<div class="row justify-content-center mt-3 pt-3">
<div class="col-8">
<h4>Changement dadresse</h4>
<form id="changement-adresse" method="post">{% csrf_token %}
<table class="table table-sm">
<tr>
<td>{{ form.rue.label_tag }}</td>
<td>{{ form.rue.errors }}{{ form.rue }}</td>
</tr>
<tr>
<td>{{ form.city_auto.label_tag }}</td>
<td>{{ form.city_auto.errors }}{{ form.city_auto }}</td>
</tr>
<tr>
<td colspan="2" class="pt-4">
<h5>Appliquer le changement aux personnes suivantes</h5>
</td>
</tr>
<tr>
<td colspan="2">{{ form.membres.errors }}{{ form.membres }}</td>
</tr>
</table>
{% include "actions.html" %}
</form>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,8 @@
<div id="aemo_buttons">
<a class="btn btn-outline-primary btn-sm {% if active == 'coordonnees' %} active {% endif %}" href="{% url 'famille-edit' famille.pk %}">Coordonnées</a>
<a class="btn btn-outline-primary btn-sm {% if active == 'demande' %} active {% endif %}" href="{% url 'demande' famille.pk %}">Demande</a>
<a class="btn btn-outline-primary btn-sm {% if active == 'prestation' %} active {% endif %}" href="{% url 'journal-list' famille.pk %}">Journal</a>
<a class="btn btn-outline-primary btn-sm {% if active == 'suivi' %} active {% endif %}" href="{% url 'famille-suivi' famille.pk %}">Suivi</a>
<a class="btn btn-outline-primary btn-sm {% if active == 'agenda' %} active {% endif %}"
href="{% url 'famille-agenda' famille.pk %}">Agenda</a>
</div>

View file

@ -0,0 +1,165 @@
{% extends "base.html" %}
{% block boutons_droite %}
{% if form.instance.pk %}
{% include 'aemo/famille_boutons.html' with active='coordonnees' %}
{% endif %}
{% endblock %}
{% block content %}
<div class="row border-bottom mt-3 mb-5 lead">
{% if form.instance.pk %}
<div class="col">Famille {{ famille.nom }} - {{ famille.adresse }}</div>
<div class="col text-end">
Informations générales
<a href="{{ famille.print_coords_url }}"><img class="icon" src="{% static 'img/printer.png' %}"></a>
</div>
{% else %}
<div class="col">Nouvelle famille</div>
{% endif %}
</div>
<form name="FamilleForm" method="post">{% csrf_token %}
<div class="row mb-3 justify-content-center">
<div class="col-6">
{% for hidden in subform.hidden_fields %}{{ hidden }}{% endfor %}
<table class="table table-sm table-borderless">
{% for field in form.visible_fields %}
<tr>
<td>{{ field.label_tag }}</td>
<td>{{ field.errors }}{{ field }}</td>
</tr>
{% if form.instance.pk and not form.readonly and field.name == "localite" %}
<tr>
<td colspan="2" class="text-end">
<a class="btn btn-sm btn-outline-primary"
href="{% url 'famille-adresse-change' famille.pk %}">
Changer ladresse
</a>
</td>
</tr>
{% endif %}
{% endfor %}
</table>
</div>
{% if form.instance.pk %}
<div class="col-6">
<p class="h5 border-bottom pt-2">Parents et personnes significatives
{% if famille|can_edit:user and form.instance.pk %}
<a class="btn btn-outline-primary btn-sm ms-3" role="button"
href="{{ famille.add_person_url }}?role=ps">Ajouter pers. sign.
</a>
{% endif %}
</p>
{% with parents=famille.parents %}
<table class="table table-sm table-borderless">
{% for parent in parents %}
<tr><td width="100px">{{ parent.role }}:</td>
<td><a href="{{ parent.edit_url }}">{{ parent.nom_prenom }}</a> - {{ parent.adresse }} {% if parent.telephone %}/ {{ parent.telephone}}{% endif %}</td>
</tr>
{% endfor %}
{% if parents|length < 2 %}
<tr>
<td colspan="2">
<a class="btn btn-outline-primary btn-sm ml-3" role="button"
href="{% url 'personne-add' famille.pk %}?role=parent">Ajouter parent</a>
</td>
</tr>
{% endif %}
</table>
{% endwith %}
<table class="table table-sm table-borderless">
{% for person in famille.autres_parents %}
<tr {% if membre.decedee %}class="decedee"{% endif %}>
<td width="100px">{{ person.role }}:</td>
<td><a href="{{ person.edit_url }}">{{ person.nom_prenom }}</a>
{% if person.adresse %}- {{ person.adresse }}{% endif %}
{% if person.telephone %} / {{ person.telephone }}{% endif %}
</td>
</tr>
{% endfor %}
</table>
<!-- Enfants non suivis -->
<p class="h5 border-bottom pt-2">Enfants non-suivis
{% if famille|can_edit:user %}
{% if form.instance.pk %}
<a class="btn btn-outline-primary btn-sm ms-3" role="button"
href="{{ famille.add_person_url }}?role={{ enfant_non_suivi.pk }}">Ajouter
</a>
{% endif %}
{% endif %}
</p>
<table class="table table-sm table-borderless">
{% for membre in famille.enfants_non_suivis %}
<tr {% if membre.decedee %}class="decedee"{% endif %}>
<td><a href="{{ membre.edit_url }}">{{ membre.nom_prenom }}</a><br>
{{ membre.age_str }}</td>
<td>{{ membre.adresse }}</td>
<td>{{ membre.formation.get_statut_display }}</td>
</tr>
{% endfor %}
</table>
<!-- Enfants suivis -->
<p class="h5 border-bottom pt-2">Enfants suivis
{% if famille|can_edit:user %}
{% if form.instance.pk %}
<a class="btn btn-outline-primary btn-sm ms-3" role="button"
href="{{ famille.add_person_url }}?role={{ enfant_suivi.pk }}">Ajouter</a>
{% endif %}
{% endif %}
</p>
<div class="row no-gutters">
<table class="table table-sm table-borderless">
{% for membre in famille.membres_suivis %}
<tr>
<td width="40%">
<div class="ms-1">
<a href="{{ membre.edit_url }}"
title="{{ membre.formation.info_scol }}">{{ membre.nom_prenom }}</a>
{% if membre.formation %}
<a href="{% url 'formation' membre.pk %}" title="Formation">
<img src="{% static 'img/formation.png' %}" class="icon">
</a>
<a href="{% url 'personne-reseau-list' membre.pk %}" title="Réseau">
<img src="{% static 'img/reseau.png' %}" class="icon">
</a>
{% endif %}
<br>
{{ membre.age_str }}
</div>
</td>
<td width="40%">{{ membre.adresse }}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
{% endif %}
</div>
<div class="row mb-3 justify-content-center">
{% if view.archive_url %}
<div class="col mt-3">
<button class="btn btn-sm btn-danger" type="button"
data-confirm="Voulez-vous vraiment archiver cette famille ?"
formaction="{{ view.archive_url }}"
>Archiver</button>
</div>
{% elif view.unarchive_url %}
<div class="col-1 mt-4">
<button class="btn btn-sm btn-warning confirm" type="button"
data-confirm="Voulez-vous vraiment désarchiver cette famille ?"
formaction="{{ view.unarchive_url }}"
>Désarchiver</button>
</div>
{% endif %}
<div class="col">
{% if not form.instance.pk or not form.readonly %}
{% include "actions.html" %}
{% endif %}
</div>
</div>
</form>
{% endblock %}

View file

@ -0,0 +1,156 @@
{% extends "base.html" %}
{% block extra_javascript %}
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", () => {
document.querySelectorAll("#id_niveau, #id_interv, #id_equipe").forEach(el => {
el.addEventListener('change', (ev) => { ev.target.form.submit(); });
});
});
</script>
{% endblock %}
{% block boutons_droite %}
<div class="topnav-right text-start float-end">
<form method="get" action=".">
<div class="form-floating float-start pb-2">
{{ form.duos }}{{ form.duos.label_tag }}
</div>
<div class="form-floating float-start pb-2 ms-1">
{{ form.ressource }}{{ form.ressource.label_tag }}
</div>
<div class="form-floating float-start pb-2 ms-1">
{{ form.equipe }}{{ form.equipe.label_tag }}
</div>
<div class="form-floating float-start ms-1">
{{ form.interv }}{{ form.interv.label_tag }}
</div>
<div class="form-floating float-start ms-1" style="width:8em;">
{{ form.niveau }}{{ form.niveau.label_tag }}
</div>
<div class="float-start input-group ms-1 mt-2" style="width:16em;">
{{ form.nom }}
<button class="px-2" type="submit" title="Rechercher">
<img src="{% static 'admin/img/search.svg' %}">
</button>
<button id="reset-button" class="ms-1" type="reset" title="Réinitialiser tous les filtres">
<img src="{% static 'img/filter_off.svg' %}">
</button>
</div>
</form>
</div>
{% endblock %}
{% block content %}
<div class="row border-bottom mb-3">
<div class="col"><p class="lead">Familles {% if view.mode == 'attente' %}- Liste dattente{% endif %}</p></div>
<div class="col text-end" >
{% if view.mode == 'attente' %}
<a class="btn btn-sm btn-outline-primary" href="{% url 'famille-list' %}">Liste</a>
{% else %}
<a class="btn btn-sm btn-outline-primary" href="{% url 'famille-attente' %}">Liste dattente</a>
{% endif %}
{% if perms.aemo.add_famille %}
<a class="btn btn-sm btn-outline-primary" href="{% url 'famille-add' %}">Nouvelle famille</a>
{% endif %}
</div>
</div>
<div class="row">
<div class="col">
<table id="benef_table" class="table table-sm table-hover sortable">
<thead class="table-light">
<tr>
{% for label in labels %}
<th>{{ label }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for famille in object_list %}
{% with suivi=famille.suivi %}
<tr data-statut="{{ suivi.etape.code }}" data-intervenant="{{ suivi|referents_pk_data }}">
{% for col_key in col_keys %}
{% if col_key == 'nom' %}
<td>
<div>
<a href="{% url 'famille-suivi' famille.pk %}" title="Suivi">{{ famille.nom }}</a>
<span class="hoverimage">
<a class="btn btn-sm m-0 p-0" role="button"
href="{% url 'famille-edit' famille.pk %}"
title="{{ famille.telephone }}">
<img src="{% static 'img/coordonnees.gif' %}" width="15" height="15">
</a>
</span>
</div>
</td>
{% elif col_key == 'localite' %}
<td>{{ famille.npa}} {{ famille.localite }}</td>
{% elif col_key == 'referents' %}
<td>{{ suivi|sigles_referents }}</td>
{% elif col_key == 'referents_ope' %}
<td>
{{ suivi.ope_referent|info_ope }}
</td>
{% elif col_key == 'suivi' %}
<td data-sort="{{ famille.suivi.etape.num }}">
<table class="statut_suivi">
<tr><td>{{ suivi|etape_cellule:"demande" }}</td>
<td>{{ suivi|etape_cellule:"debut_evaluation" }}</td>
<td>{{ suivi|etape_cellule:"fin_evaluation" }}</td>
<td>{{ suivi|etape_cellule:"debut_suivi" }}</td>
<td>{{ suivi|etape_cellule:"bilan_suivant" }}</td>
<td>{{ suivi|etape_cellule:"resume" }}</td>
<td>{{ suivi|etape_cellule:"fin_suivi" }}</td>
</tr>
</table>
</td>
{% elif col_key == 'prioritaire' %}
<td class="text-center">{{ suivi.demande_prioritaire|yesno:'Oui,' }}</td>
{% elif col_key == 'niveau_interv' %}
<td class="text-center">{{ famille.niveau_interv|default_if_none:'-' }}</td>
{% elif col_key == 'date_demande' %}
<td data-sort="{{ suivi.date_demande|date:'Ymd' }}">
{{ suivi.date_demande|date:"d.m.Y" }}
</td>
{% elif col_key == 'region' %}
<td>{{ famille.region.nom }}</td>
{% elif col_key == 'evaluation' %}
{% if suivi.date_fin_evaluation %}<td class="green">Terminée le {{ suivi.date_fin_evaluation }}</td>
{% elif suivi.date_debut_evaluation %}<td class="orange">En cours</td>
{% else %}<td class="red">À faire</td>{% endif %}
{% endif %}
{% endfor %}
</tr>
{% endwith %}
{% empty %}
<td colspan="8" class="bg-warning" align="center">
<i>Aucune famille ne correspond à votre recherche.</i>
</td>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% if can_view_rdvs %}
<div class="alert alert-secondary">
{% if duo_rdv_passes %}
<div>Derniers RdV:
{% for rdv in duo_rdv_passes %}{% if not forloop.first %}, {% endif %}{{ rdv.rendez_vous|date:'d.m.Y' }}{% endfor %}
</div>
{% endif %}
<div>
Prochain RdV pour {{ form.duos.value }}:
{% if can_edit_rdvs %}<a href="{% url 'duo-date-change' form.duos.value %}" class="js-edit">{% endif %}
{% if prochain_duo_rdv %}{{ prochain_duo_rdv.rendez_vous|date:'d.m.Y' }}{% else %}<i>à définir</i>{% endif %}
{% if can_edit_rdvs %}</a>{% endif %}
</div>
</div>
{% endif %}
{% if ma_charge %}
<div class="alert alert-info">
Ma charge actuelle: {{ ma_charge.nbre_eval }} familles en éval., {{ ma_charge.nbre_suivi }} familles suivies, {{ ma_charge.heures|default_if_none:0 }}h. hebdo (sur max. {{ user.charge_max}}h)
</div>
{% endif %}
{% endblock %}

View file

@ -0,0 +1,36 @@
<div class="row border-bottom">
<div class="col"><p class="lead">{{ view.titre_page }}</p></div>
</div>
<div class="row justify-content-center">
<div class="col">
<form action="{{ request.path }}" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.non_field_errors }}
<table class="table table-sm table-bordered mt-3 border-bottom">
<thead class="table-light">
<tr><th colspan="2" class="py-2">{{ view.titre_formulaire }}</th></tr>
</thead>
<tbody>
{{ form.as_table }}
</tbody>
</table>
<div id="actions" class="row border-top mt-2">
{% if form.instance.pk %}
<div class="col mt-3">
{% if view.delete_url %}
<button class="btn btn-sm btn-danger" name="delete" type="submit"
data-confirm="Voulez-vous vraiment supprimer cet objet ?"
formaction="{{ view.delete_url }}"
>Supprimer</button>
{% endif %}
</div>
{% endif %}
<div class="col mt-3 text-end">
<button type="button" class="btn btn-sm btn-secondary cancel" data-bs-dismiss="modal">Annuler</button>
<button class="btn btn-sm btn-success" name="save" type="submit">Enregistrer</button>
</div>
</div>
</form>
</div>
</div>

View file

@ -0,0 +1,67 @@
{% extends "base.html" %}
{% block extra_javascript %}
<script type="text/javascript">
$(document).ready(function() {
function setup() {
var statut = $("#id_statut").val();
if (statut) {
$('table#formation_table tr[class!=always]').each(function(){
if ($(this).hasClass(statut)) { $(this).show(); } else {$(this).hide();}
});
} else {
$('table#formation_table tr').show();
}
}
$("#id_statut").change(function() {
setup();
});
setup();
});
</script>
{% endblock %}
{% block content %}
<div class="row border-bottom mt-3 mb-3">
<div class="col">
<p class="lead">Famille {{ form.instance.personne.famille.nom }} - {{ form.instance.personne.famille.adresse }}</p>
</div>
<div class="col text-end">
<p class="lead">Formation de {{ form.instance.personne.nom_prenom }}</p>
</div>
</div>
<div class="row mb-3 justify-content-center">
<div class="col-10">
<form method="post" action=".">{% csrf_token %}
<input type="hidden" name="personne" value="{{ personne.pk }}">
<table id="formation_table" class="table table-sm table-borderless">
<tr class="always">
<th>Niveau de formation:</th><td>{{ form.statut }}<td>
</td>
<tr class="cycle1 cycle2 cycle3 etudiant apprenti">
<th>École:</th><td>{{ form.cercle_scolaire }}</td>
<th>Collège:</th><td >{{ form.college }}</td>
</tr>
<tr class="cycle1 cycle2 cycle3 etudiant apprenti">
<th>Classe:</th><td>{{ form.classe }}</td>
<th>Enseignant:</th><td>{{ form.enseignant }}</td>
</tr>
<tr class="pre_scol cycle1 cycle2 cycle3">
<th>Accueil extra-fam.:</th><td>{{ form.creche }}</td>
<th>Responsable:</th><td>{{ form.creche_resp }}</td>
</tr>
<tr class="apprenti en_emploi sans_emploi">
<th>Entreprise:</th><td>{{ form.entreprise }}</td>
<th>Maître d'apprent.:</th><td>{{ form.maitre_apprentissage }}</td>
</tr>
<tr class="always">
<th>Remarque:</th><td colspan="3">{{ form.remarque }}</td>
</tr>
</table>
{% if form.instance|can_edit:user %}
{% include "actions.html" %}
{% endif %}
</form>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,15 @@
<li class="nav-item">
<a href="{% url 'famille-list' %}" class="btn btn-sm btn-outline-secondary" role="button">Familles</a>
</li>
<li class="nav-item">
<a href="{% url 'suivis-termines' %}" class="btn btn-sm btn-outline-secondary" role="button">Suivis terminés</a>
</li>
<li class="nav-item">
<a href="{% url 'contact-list' %}" class="btn btn-sm btn-outline-secondary" role="button">Contacts</a>
</li>
<li class="nav-item">
<a href="{% url 'service-list' %}" class="btn btn-sm btn-outline-secondary" role="button">Service</a>
</li>
<li class="nav-item">
<a href="{% url 'prestation-menu' %}" class="btn btn-sm btn-outline-secondary" role="button">Prestations</a>
</li>

View file

@ -0,0 +1,11 @@
<div class="row justify-content-center">
<div class="col-md-12">
<div class="h4 border-bottom mb-3">Famille: {{ famille.nom }}</div>
<form action="." method="post">{% csrf_token %}
<table class="table table-borderless">
{{ form.as_table }}
</table>
{% include "actions.html" %}
</form>
</div>
</div>

View file

@ -0,0 +1,22 @@
{% extends "base.html" %}
{% block content %}
<div class="row">
<div class="offset-xl-2 col-6 border border-danger p-5">
<div class="row h2 mb-3">Suppression de données</div>
<div class="row mb-5">Voulez-vous vraiment supprimer l'information suivante ?</div>
<div class="row mb-5"><strong>{{ object }}</strong> ?</div>
<div class="row mb-5 alert alert-warning">Cette opération est définitive !</div>
<form action= "." method="post">{% csrf_token %}
<div class="row">
<div class="col ms-0 pl-0"><button class="btn btn-sm btn-danger" name="delete" type="submit">Supprimer</button></div>
<div class="col me-0 text-end">
<a href="javascript: history.go(-1)">Annuler</a>
</div>
</div>
</div>
</form>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,29 @@
{% extends "base.html" %}
{% block extrastyle %}
<style>
table.perms td, table.perms th { border: 1px dotted gray; text-align: center }
th { width: 1.5em; }
th div { vertical-align: bottom; writing-mode: vertical-rl; text-orientation: mixed; }
td.obj_label { text-align: left !important; font-weight: bold; background-color: #eee; }
td.pcode { text-align: left !important; }
</style>
{% endblock %}
{% block content %}
<table class="perms">
<thead><tr><td></td>{% for grp in groups %}<th><div>{{ grp.name }}</div></th>{% endfor %}</tr></thead>
<tbody>
{% for label, plist in perms_by_categ.items %}
<tr><td class="obj_label" colspan="{{ groups|length|add:1 }}">{{ label }}</td></tr>
{% for pcode, pverb in plist %}
<tr><td class="pcode">{{ pverb }}</td>
{% for grp, pcodes in grp_perms.items %}
<td>{% if pcode in pcodes %}<img src="{% static 'admin/img/icon-yes.svg' %}">{% endif %}</td>
{% endfor %}
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
{% endblock %}

View file

@ -0,0 +1,125 @@
{% extends "base.html" %}
{% block extrastyle %}
{{ block.super }}
<style>
.form-check label { font-weight: normal; }
</style>
{% endblock %}
{% block boutons_droite %}
{% include 'aemo/famille_boutons.html' with active='coordonnees' %}
{% endblock %}
{% block content %}
<div class="row border-bottom mt-3 mb-3 lead">
<div class="col">Famille {{ famille.nom }} - {{ famille.adresse }}</div>
<div class="col text-end">{% if personne.pk %}{{ personne.nom_prenom }}{% else %}Nouveau membre{% endif %}</div>
</div>
<div class="row mb-3 justify-content-center">
<div class="col-xl-8">
<form action="#" method="post">{% csrf_token %}
<input type="hidden" name="famille" value="{{ famille.pk }}">
<div class="row g-3 mb-3">
<div class="col-md-6">
{{ form.nom.label_tag }}{{ form.nom.errors }}{{ form.nom }}
</div>
<div class="col-md-6">
{{ form.prenom.label_tag }}{{ form.prenom.errors }}{{ form.prenom }}
</div>
</div>
<div class="row mb-3">
<div class="col-md-4">
{{ form.date_naissance.label_tag }}{% help_tooltip 'Si lâge est connu, mais pas la date de naissance exacte, saisir le 1er janvier de lannée supposée' %}
<br>{{ form.date_naissance.errors }}{{ form.date_naissance }}
</div>
<div class="col-md-2">
{{ form.genre.label_tag }}{{ form.genre.errors }}{{ form.genre }}
</div>
<div class="col-md-6">
{{ form.role.label_tag }}{{ form.role.errors }}{{ form.role }}
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
{{ form.filiation.label_tag }}{% help_tooltip 'Précision sur le lien familial (père de…, etc.)' %}{{ form.filiation.errors }}{{ form.filiation }}
</div>
{% if form.prescripteur %}{# CIPE #}
<div class="col-md-6">
{{ form.prescripteur.label_tag }}{{ form.prescripteur.errors }}{{ form.prescripteur }}
</div>
{% endif %}
</div>
<div class="row mb-3">
<div class="col-md-6">
{{ form.rue.label_tag }}{{ form.rue.errors }}{{ form.rue }}
</div>
<div class="col-md-6">
{{ form.city_auto.label_tag }}{{ form.city_auto.errors }}{{ form.city_auto }}
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
{{ form.telephone.label_tag }}{{ form.telephone.errors }}{{ form.telephone }}
</div>
<div class="col-md-6">
{{ form.email.label_tag }}{{ form.email.errors }}{{ form.email }}
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
{{ form.profession.label_tag }}{{ form.profession.errors }}{{ form.profession }}
</div>
<div class="col-md-6">
{{ form.pays_origine.label_tag }}{{ form.pays_origine.errors }}{{ form.pays_origine }}
</div>
</div>
<div class="row mb-3">
<div class="col-md-12">
{{ form.allergies.label_tag }}{{ form.allergies.errors }}{{ form.allergies }}
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
{{ form.remarque.label_tag }}{{ form.remarque.errors }}{{ form.remarque }}
</div>
<div class="col-md-6">
{{ form.remarque_privee.label_tag }}{{ form.remarque_privee.errors }}{{ form.remarque_privee }}
</div>
</div>
{% with gestite=personne.gestite %}
{% if gestite %}
<div class="row">
<div class="col">Gestité : {{ gestite }}</div>
</div>
{% endif %}
{% endwith %}
<div class="row mb-3">
<div class="col-md-6">
<div class="form-check">
{{ form.decedee.errors }}{{ form.decedee }} {{ form.decedee.label_tag|strip_colon }}
</div>
</div>
</div>
{% if personne.pk %}
<div class="row">
{% if form.instance.formation %}
<div class="col-auto me-2">
<a class="btn btn-sm btn-outline-primary" href="{% url 'formation' personne.pk %}">Formation</a>
</div>
{% endif %}
<div class="col-auto">
<a class="btn btn-sm btn-outline-primary" href="{% url 'personne-reseau-list' personne.pk %}">Réseau prof.</a>
</div>
</div>
{% endif %}
{% if famille|can_edit:user %}
{% include "actions.html" %}
{% endif %}
</form>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,88 @@
{% extends "base.html" %}
{% block extra_javascript %}
<script type="text/javascript">
$(document).ready(function() {
$(".js-contact-attach").click(function() {
var token = '{{ csrf_token }}';
var url ="{% url 'personne-reseau-add' personne.pk %}";
var value = $("#id_reseaux").val();
$.post(url, {csrfmiddlewaretoken: token, contacts:value}, function() {
$('#popup').modal('hide');
window.location.reload(true);
});
});
});
</script>
{% endblock %}
{% block content %}
<div class="row border-bottom mt-3 mb-3 lead">
<div class="col">Famille {{ personne.famille.nom }} - {{ personne.famille.adresse }}</div>
<div class="col text-end">Réseau professionnel de {{ personne.nom_prenom }}</div>
</div>
<div class="row mb-3">
<div class="col text-end">
{% if personne.famille|can_edit:user %}
<button type="button" class="btn btn-sm btn-outline-primary"
data-bs-toggle="modal" data-bs-target="#popup">Ajouter un contact
</button>
{% endif %}
</div>
</div>
<div class="row">
<div class="col">
<form action="#" method="post">{% csrf_token %}
<input type="hidden" name="famille" value="{{ famille.pk }}">
<table id="t_contacts" class="table table-sm table-borderless table-hover">
<thead class="table-light">
<tr>
<th>Nom, prénom</th><th>Rôle/Act./prof.</th><th>Téléphone</th>
<th>Email</th><th width="60px">Action</th>
</tr>
</thead>
<tbody>
{% for contact in reseau %}
<tr>
<td>{{ contact.nom_prenom }}</td>
<td>{{ contact|role_profession }}</td>
<td>{{ contact.tel_prof }}</td>
<td>{{ contact.email }} </td>
<td align="center">
<button class="btn btn-xs me-2 btn-danger confirm" title="Retirer ce contact" data-confirm="Voulez-vous vraiment retirer ce contact ?"
formaction="{% url 'personne-reseau-remove' personne.pk contact.pk %}">X
</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
</div>
</div>
<!-- Modal -->
<div class="row mb-3 justify-content-center">
<div class="modal" id="popup" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">Contacts disponibles</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>
<a class="btn btn-sm btn-outline-primary" role="button"
href="{% url 'contact-add' %}?forpers={{ personne.pk }}">Créer un nouveau contact
</a>
</p>
<p>{{ form.as_p }}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Annuler</button>
<button type="button" class="btn btn-sm btn-primary js-contact-attach" data-bs-dismiss="modal">Enregistrer</button>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,48 @@
{% extends "base.html" %}
{% block extrastyle %}
<style>
.tooltip-inner { text-align: left; max-width: 480px; }
#id_date_prestation, #id_duree { display: inline-block; }
</style>
{% endblock %}
{% block boutons_droite %}
{% if famille %}
{% include './famille_boutons.html' with active='prestation' %}
{% endif %}
{% endblock %}
{% block content %}
<div class="row border-bottom mt-3 mb-3 justify-content-between">
<div class="col">
<p id='nom_famille' class="lead">
{% if famille %}
Famille {{ famille.nom }} - {{ famille.adresse }}
{% else %}
Mes prestations générales
{% endif %}</p>
</div>
</div>
<form action="#" class="mb-5" name="PrestationForm" method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="row">
<div class="col-6">{{ form.date_prestation|as_field_group }}</div>
<div class="col-6">{{ form.duree|as_field_group }}</div>
</div>
<div class="row">
<div class="col">{{ form.texte|as_field_group }}</div>
</div>
<div class="row mt-3 mb-2">
<div class="col">{{ form.manque }} {{ form.manque.label_tag|strip_colon }}</div>
</div>
<div class="row">
<div class="col">{{ form.fichier|as_field_group }}</div>
</div>
<div class="row mt-3">
<div class="col">{{ form.intervenants|as_field_group }}</div>
</div>
{% include "actions.html" %}
</form>
{% endblock %}

View file

@ -0,0 +1,67 @@
{% extends "base.html" %}
{% block content %}
<ul class="nav nav-tabs nav-prestations">
<li class="nav-item">
<a class="nav-link" href="{% url 'prestation-menu' %}">Prestations par famille</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="{% url 'prestation-generale' %}">Prestations générales</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'prestation-personnelle' %}">Mes prestations</a>
</li>
</ul>
<div class="row mt-3">
<div class="col">
<p class="lead">
{% if prev_month %}
<a class="btn btn-sm" href="?date={{ prev_month|date:'mY' }}"><button>&lt;</button></a>
{% endif %}
{{ current_date.month|month_name }} {{ current_date.year }}
{% if next_month %}
<a class="btn btn-sm" href="?date={{ next_month|date:'mY' }}"><button>&gt;</button></a>
{% endif %}
</p>
</div>
<div class="col text-end">
<a class="btn btn-outline-primary" href="{% url 'prestation-gen-add' %}">
<img src="{% static 'admin/img/icon-addlink.svg' %}"> Ajouter une prestation générale
</a>
</div>
</div>
<div class="row mt-2">
<div class="col">
<table class="table table-sm prestations">
<thead class="table-light">
<tr>
<th width="10%">Date</th>
<th>Durée</th>
<th>Participants</th>
<th>Texte</th>
<th width="5%">Auteur</th>
<th class="action">Action</th>
</tr>
</thead>
<tbody>
{% for prest in prestations %}
<tr>
<td>{{ prest.date_prestation }}</td>
<td>{{ prest.duree|format_duree }}</td>
<td>{{ prest|sigles_intervenants }}</td>
<td>{{ prest.texte|striptags }}</td>
<td>{{ prest.auteur|sigle_personne }}</td>
<td class="action">
{% if prest|can_edit:user %}
<a href="{% url 'prestation-edit' 0 prest.pk %}">
<img src="{% static 'admin/img/icon-changelink.svg' %}">
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,74 @@
{% extends "base.html" %}
{% block boutons_droite %}
{% if famille %}
{% include './famille_boutons.html' with active='prestation' %}
{% endif %}
{% endblock %}
{% block content %}
<div class="row border-bottom lead mt-3 mb-3">
{% if famille %}
<div class="col">Famille {{ famille.nom }} - {{ famille.adresse }}</div>
<div class="col text-end d-flex flex-column justify-content-end">
<a class="btn btn-primary btn-sm ms-3 mb-2 align-self-end" href="{% url 'prestation-famille-add' famille.pk %}">
Ajouter
</a>
{% if filter_form %}<form class="filter-form d-flex flex-column" method="get">{{ filter_form.as_div }}</form>{% endif %}
</div>
{% else %}
<div class="col">Mes prestations générales</div>
<div class="col text-end">
<a class="btn btn-primary btn-sm mb-2" href="{% url 'prestation-gen-add' %}">
Ajouter
</a>
</div>
{% endif %}
</div>
<div class="row">
<div class="col">
<table class="table table-sm">
<thead class="table-light">
<tr>
<th>Date</th>
<th>Durée</th>
<th>Interv.</th>
<th>Contenu</th>
<th>Auteur</th>
<th>Prest.</th>
<th align="center">Actions</th>
</tr>
</thead>
<tbody>
{% for prestation in prestations %}
<tr>
<td>{{ prestation.date_prestation|date:"d.m.Y" }}</td>
<td>{{ prestation.duree|strip_seconds }}</td>
<td>{{ prestation|sigles_intervenants }}</td>
<td>{{ prestation.texte|truncate_html_with_more:40 }} {{ prestation.fichier|as_icon }}</td>
<td>{{ prestation.auteur|sigle_personne }}</td>
<td>{{ prestation.lib_prestation.nom }}</td>
<td align="center">
{% with fam_pk=famille.pk|default:0 %}
{% if prestation|can_edit:user %}
<a href="{% url 'prestation-edit' fam_pk prestation.pk %}">
<img src="{% static 'admin/img/icon-changelink.svg' %}">
</a>
{% endif %}
{% endwith %}
</td>
</tr>
{% empty %}
<tr><td colspan="5" align="center">
{% if filter_form.cleaned_data.recherche or filter_form.cleaned_data.famille %}
Pas de résultat pour votre recherche.
{% else %}
Aucune prestation saisie
{% endif %}
</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,59 @@
{% extends "base.html" %}
{% block content %}
<ul class="nav nav-tabs nav-prestations">
<li class="nav-item">
<a class="nav-link active" href="#">Prestations par famille</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'prestation-generale' %}">Prestations générales</a>
</li>
<li class="nav-item">
<li class="nav-item">
<a class="nav-link" href="{% url 'prestation-personnelle' %}">Mes prestations</a>
</li>
</li>
</ul>
<div class="row mt-5">
<div class="col">
<table class="table table-sm table-bordered prestations">
<thead class="table-light">
<tr>
<th>Familles</th>
<th>RDV manqués</th>
<th>Eval.</th>
<th>Accomp.</th>
<th>Total</th>
<th class="mesprest">Mes prestations</th>
</tr>
</thead>
<tbody>
{% for famille in familles %}
<tr>
<td>
<a href="{% url 'journal-list' famille.pk %}">{{ famille.nom }}</a>
- {{ famille.adresse }}
</td>
<td{% if famille.rdv_manques|length == 0 %} class="zero"{% endif %} align="center">
<div title="{{ famille.rdv_manques|join:'; ' }}">{{ famille.rdv_manques|length }}</div>
</td>
<td{% if not famille.aemo1 %} class="zero"{% endif %}>{{ famille.aemo1|format_duree }}</td>
<td{% if not famille.aemo2 %} class="zero"{% endif %}>{{ famille.aemo2|format_duree }}</td>
{% with temps_total=famille.temps_total_prestations %}
<td class="total{% if not temps_total %} zero{% endif %}">
{{ temps_total|format_duree }}
</td>
{% endwith %}
<td class="mesprest{% if not famille.user_prest %} zero{% endif %}">
{{ famille.user_prest|format_duree }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<p class="alert alert-info">
Les prestations générales sont réparties chaque mois entre toutes les familles en fonction des familles actives durant le mois donné. Elles ne figurent pas sur cette page.
</p>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,92 @@
{% extends "base.html" %}
{% load static my_tags %}
{% block content %}
<ul class="nav nav-tabs nav-prestations">
<li class="nav-item">
<a class="nav-link" href="{% url 'prestation-menu' %}">Prestations par famille</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'prestation-generale' %}">Prestations générales</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="{% url 'prestation-personnelle' %}">Mes prestations</a>
</li>
</ul>
<div class="row mt-3">
<div class="col">
<p class="lead">
{% if prev_month %}
<a class="btn btn-sm" href="?date={{ prev_month|date:'mY' }}"><button>&lt;</button></a>
{% endif %}
{{ current_date.month|month_name }} {{ current_date.year }}
{% if next_month %}
<a class="btn btn-sm" href="?date={{ next_month|date:'mY' }}"><button>&gt;</button></a>
{% endif %}
</p>
</div>
</div>
<div class="row mt-2">
<div class="col">
<table class="table table-sm">
<thead class="table-light">
<tr>
<th width="7%">Date</th>
<th width="5%">Durée</th>
<th width="10">Famille</th>
<th width="10%">Intervenant-e-s</th>
<th>Contenu</th>
<th width="5%">Auteur</th>
<th width="10%">Prestation</th>
<th width="5%" align="center">Actions</th>
</tr>
</thead>
<tbody>
{% for prest in object_list %}
<tr>
<td>{{ prest.date_prestation|date:"d.m.Y" }}</td>
<td>{{ prest.duree|strip_seconds }}</td>
<td>{{ prest.famille.nom }}</td>
<td>{{ prest|sigles_intervenants }}</td>
<td>{{ prest.texte|truncate_html_with_more:20 }}</td>
<td>{{ prest.auteur|sigle_personne }}</td>
<td>{{ prest.lib_prestation.nom }}</td>
<td align="center">
{% if prest|can_edit:user %}
<a href="{{ prest.edit_url }}">
<img src="{% static 'admin/img/icon-changelink.svg' %}">
</a>
{% endif %}
</td>
</tr>
{% empty %}
<tr><td colspan="5" align="center">Aucune prestation saisie</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-3">
<div class="card border border-success mb-2">
<div class="card-header bg-success-3">
RÉCAPITULATIF pour {{ current_date.month|month_name }} {{ current_date.year }}
</div>
<div class="card-body">
<table class="table table-sm table-borderless">
{% for code, total in totaux %}
<tr>
<th>Total prestations {{ code }}</th>
<td align="right">{{ total|strip_seconds|default:'00:00' }}</td>
</tr>
{% endfor %}
<tr class="border-top">
<th>Total</th>
<th class="text-end">{{ total_final|strip_seconds|default:'00:00' }}</th>
</tr>
</table>
</div>
</div>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,48 @@
{% extends "base.html" %}
{% block boutons_droite %}
{% include 'aemo/famille_boutons.html' with active='agenda' %}
{% endblock %}
{% block content %}
<div class="row border-bottom lead mt-3 mb-3">
<div class="col">Famille {{ famille.nom }} - {{ famille.adresse }}</div>
<div class="col text-end">Dossier de suivi</div>
</div>
<div class="float-end">
<a href="{{ rapport.get_print_url }}">
<img class="icon-xs" src="{% static 'img/printer.png' %}">
</a>
</div>
<h2>Résumé du {{ rapport.date }}</h2>
<p><b>Enfants:</b><br> {{ enfants|linebreaksbr }}</p>
<p><b>Intervenant-e-s:</b> {{ intervenants }}</p>
<p><b>Début du suivi:</b> {{ rapport.famille.suivi.date_debut_suivi }}</p>
{% for label, value in data %}
<h3>{{ label }}</h3>
{{ value|default:'-'|raw_or_html }}
{% endfor %}
<p class="secret">
Le présent résumé comporte des éléments <b>couverts par le secret professionnel au sens de la LPSy et du Code pénal</b>. Seuls les propriétaires des données, à savoir les membres de la famille faisant lobjet du résumé, peuvent <b>ensemble</b> lever ce secret ou accepter la divulgation des données. Si cette autorisation nest pas donnée, lautorité compétente en matière de levée du secret professionnel doit impérativement être saisie.
</p>
<div class="mt-3 text-end">
<a class="btn btn-sm btn-secondary" href="javascript: history.go(-1)">Retour</a>
{% if rapport|can_edit:user %}
<a class="btn btn-sm btn-success"
href="{% url 'famille-rapport-edit' famille.pk rapport.pk %}">Modifier</a>
{% endif %}
{% if rapport|can_delete:user %}
<form class="inline ms-5" method="post">{% csrf_token %}
<button class="btn btn-sm btn-danger" name="delete" type="submit"
data-confirm="Voulez-vous vraiment supprimer ce résumé ?"
formaction="{% url 'famille-rapport-delete' famille.pk rapport.pk %}"
>Supprimer</button>
</form>
{% endif %}
</div>
{% endblock %}

View file

@ -0,0 +1,25 @@
{% extends "base.html" %}
{% load my_tags %}
{% block content %}
<div class="row border-bottom mt-3 mb-3">
<div class="col"><p class="lead">Édition de résumé pour la famille {{ form.instance.famille }}</p></div>
</div>
<div class="row justify-content-center">
<div class="col-10">
<form action="." method="post">
{% csrf_token %}
{{ form.non_field_errors }}
{% for field in form %}
<div>
{{ field.label_tag }} {{ field.errors }}
{% if field.field.disabled %}{% get_field_value form.instance field.name|safe %}
{% else %}{{ field }}{% endif %}
</div>
{% endfor %}
{% include 'actions.html' %}
</form>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,22 @@
{% extends "base.html" %}
{% block content %}
<div class="row border-bottom mb-3">
<div class="col"><p class="lead">Role</p></div>
</div>
<div class="row justify-content-center">
<div class="col-6">
<form action="#" method="post">
{% csrf_token %}
<form action="." method="post">
{% csrf_token %}
<table class="table table-sm">
{{ form.as_table }}
</table>
{% include "actions.html" %}
</form>
</form>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,40 @@
{% extends "base.html" %}
{% block title %}Rôles{% endblock %}
{% block content %}
<div class="row border-bottom mb-3">
<div class="col"><p class="lead">Rôles</p></div>
{% if perms.aemo.add_role %}
<div class="col text-end">
<a class="btn btn-sm btn-outline-primary" href="{% url 'role-add' %}">Nouveau</a>
</div>
{% endif %}
</div>
<div class="row">
<div class="col">
<table class="table table-sm table-hover">
<thead class="table-light">
<tr>
<th>Nom</th>
<th>Rôle familial</th>
<th>Rôle intervenant</th>
<th>Éditeur ? {% help_tooltip editeur_help %}</th>
</tr>
</thead>
<tbody>
{% with can_edit=perms.aemo.change_role %}
{% for role in object_list %}
<tr>
<td>{% if can_edit and role.editable %}<a href="{% url 'role-edit' role.pk %}">{% endif %}{{ role.nom }}{% if can_edit and role.editable %}</a>{% endif %}</td>
<td>{{ role.est_famille|boolean_icon }}</td>
<td>{{ role.est_intervenant|boolean_icon }}</td>
<td>{{ role.est_editeur|boolean_icon }}</td>
</tr>
{% endfor %}
{% endwith %}
</tbody>
</table>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,19 @@
{% extends "base.html" %}
{% block content %}
<div class="row border-bottom mb-3 justify-content-center">
<div class="col"><p class="lead">Services partenaires</p></div>
<div class="col text-end">{{ view.action }}</div>
</div>
<div class="row mb-3 justify-content-center">
<div class="col-6">
<form action="#" method="post">{% csrf_token %}
<table class="table table-borderless">
{{ form.as_table }}
</table>
{% include "actions.html" %}
</form>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,36 @@
{% extends "base.html" %}
{% block title %}Services{% endblock %}
{% block content %}
<div class="row border-bottom mb-3">
<div class="col"><p class="lead">Services partenaires</p></div>
{% if perms.aemo.add_service %}
<div class="col text-end"><a class="btn btn-sm btn-outline-primary" href="{% url 'service-add' %}">Nouveau service</a></div>
{% endif %}
</div>
<div class="row">
<div class="col">
<table class="table table-sm table-hover">
<thead class="table-light">
<tr>
<th>Sigle</th><th>Nom</th>
</tr>
</thead>
<tbody>
{% with can_edit=perms.aemo.change_service %}
{% for service in object_list %}
<tr>
<td>{% if can_edit %}<a href="{% url 'service-edit' service.pk %}">{% endif %}{{ service.sigle }}{% if can_edit %}</a>{% endif %}</td>
<td>{{ service.nom_complet }}</td>
</tr>
{% endfor %}
{% endwith %}
</tbody>
</table>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,175 @@
{% extends "base.html" %}
{% block boutons_droite %}
{% include './famille_boutons.html' with active='suivi' %}
{% endblock %}
{% block content %}
<div class="row border-bottom lead mt-3 mb-3">
<div class="col">Famille {{ famille.nom }} - {{ famille.adresse }}</div>
<div class="col text-end">Dossier de suivi</div>
</div>
<form name="Suivi" action= "." method="post">{% csrf_token %}
<input type="hidden" name="famille" value="{{ famille.pk }}">
<div class="row ">
<div class="col">
<table class="table table-sm table-borderless border-bottom">
<tr>
<th class="left-label">Enfant(s) suivi(s)</th>
<td>
<table class="table table-sm table-hover">
{% for enfant in famille.membres_suivis %}
<tr>
<th width="400"><a href="{% url 'personne-edit' famille.pk enfant.pk %}">{{ enfant.nom_prenom }}</a></th>
<td width="100">{{ enfant.age|floatformat }} ans</td>
<td>{{ enfant.formation.info_scol }}</td>
</tr>
{% endfor %}
</table>
</td>
</tr>
</table>
</div>
</div>
<div class="row border-bottom pb-3 mb-3">
<div class="col-3"><label>Equipe:</label> {{ form.equipe }}</div>
<div class="col-5"><label>Annonceur:</label> {{ form.service_annonceur }}</div>
<div class="col-4"><label>Service orienteur:</label> {{ form.service_orienteur }}</div>
</div>
<div class="row mb-4">
<div class="col-3">
<label>Intervenants Fondation:</label>
{% if can_edit %}
<span>
<a href=""
class="btn btn-sm btn-mini btn-primary js-add"
data-url="{% url 'intervenant-add' famille.pk %}"
role="button"
title="Ajouter un intervenant">+</a>
</span>
{% endif %}
{% for interv in intervenants %}
{% if not interv.date_fin %}
<div><em>{{ interv.role }}</em>: {{ interv.intervenant.nom_prenom }}
{% if can_edit %}
<span class="hoverimage">
<a href=""
class="btn btn-sm btn-mini js-edit"
data-url="{% url 'intervenant-edit' famille.pk interv.pk %}"
role="button"
title="Modifier une intervention">
<img src="{% static 'admin/img/icon-changelink.svg' %}">
</a>
</span>
{% endif %}
</div>
{% else %}
<div class="text-secondary"><em>{{ interv.role }}</em>: {{ interv.intervenant.nom_prenom }}</div>
{% endif %}
{% endfor %}
</div>
<div class="col-9">
<div class="row">
<div class="col-6">
<label for="id_ope_referent">Ass. soc. OPE:</label>{{ form.ope_referent }}
</div>
<div class="col-6">
<label for="id_ope_referent_2">Ass. soc. OPE (2):</label>{{ form.ope_referent_2 }}
</div>
<div class="col-12">
{{ form.mandat_ope }}
</div>
</div>
</div>
</div>
<div class="row border-bottom pb-3 mb-5">
<div class="col-6">
<label>Niveau d'intervention:</label>
{% if can_edit %}
<span>
<a href=""
class="btn btn-sm btn-mini btn-primary js-edit"
data-url="{% url 'niveau-add' famille.pk %}"
role="button"
title="Ajouter un niveau">+</a>
</span>
{% endif %}
<table class="table table-sm w-75">
<tr>
<th width="30%">Du</th><th width="30%">Au</th><th>Niveau d'interv.</th><th></th>
</tr>
{% for niv in niveaux %}
<tr>
<td>{{ niv.date_debut|date:"d.m.Y" }}</td>
<td>{{ niv.date_fin_calc|date:"d.m.Y"|default:"---" }}</td>
<td>{{ niv.niveau_interv }}</td>
<td>
<a href=""
class="btn btn-sm btn-mini js-edit"
data-url="{% url 'niveau-edit' famille.pk niv.pk %}"
role="button"
title="Modifier"><img src="{% static 'admin/img/icon-changelink.svg' %}">
</a>
</td>
</tr>
{% endfor %}
</table>
</div>
<div class="col-3">
<div class="form-check">
{{ form.demande_prioritaire }} <label for="id_demande_prioritaire">Demande prioritaire</label>
</div>
</div>
<div class="col-3">
{{ form.heure_coord }} {{ form.heure_coord.label_tag|strip_colon }}
</div>
</div>
<div class="row mb-1">
<div class="col-2 fw-bold">Motif standardisé:</div>
<div class="col-10">{{ form.motif_demande.errors }}{{ form.motif_demande }}</div>
</div>
<div class="row mb-1">
<div class="col-2 fw-bold">Motif de la demande:</div>
<div class="col-10">{{ form.motif_detail.errors }}{{ form.motif_detail }}</div>
</div>
<div class="row mb-1">
<div class="col-2 fw-bold">Collaborations:</div>
<div class="col-10">{{ form.collaboration.errors }}{{ form.collaboration }}</div>
</div>
<div class="row mb-1">
<div class="col-2 fw-bold">Ressources:</div>
<div class="col-10">{{ form.ressource.errors }}{{ form.ressource }}</div>
</div>
<div class="row mb-1">
<div class="col-2 fw-bold">Gestion de crise:</div>
<div class="col-10">{{ form.crise.errors }}{{ form.crise }}</div>
</div>
<div class="row mb-1">
<div class="col-2 fw-bold">Remarque:</div>
<div class="col-10">{{ form.remarque.errors }}{{ form.remarque }}</div>
</div>
{% include 'partial_table_documents.html' %}
<div class="row mb-1">
<div class="col">
<a type="button" class="btn btn-sm btn-outline-primary"
href="{% static 'docs/sifp_agenda_hebdo.doc' %}">Modèle dagenda hebdo.
</a>
</div>
</div>
{% if can_edit %}
<div class="row">
<div class="col">
{% include "actions.html" %}
</div>
</div>
{% endif %}
</form>
{% endblock %}

View file

@ -0,0 +1,130 @@
{% extends "base.html" %}
{% block extra_javascript %}
<script>
$(document).ready(function() {
$('#btn-js-archivage').on('click', archiveFamilies);
});
</script>
{% endblock %}
{% block boutons_droite %}
<div class="topnav-right text-end">
<div class="float-end">
{% if request.user|has_group:'direction' %}
<a class="btn btn-sm btn-outline-primary mt-2" name="export" role="button"
href="{% url 'export-prestation' %}">Exporter
</a>
{% endif %}
<form method="get" action=".">
<div class="float-end input-group ms-2 mt-2">
{{ form.nom }}
<button class="px-2" type="submit" title="Rechercher">
<img src="{% static 'admin/img/search.svg' %}">
</button>
<button id="reset-button" class="ms-2" type="reset" title="Réinitialiser tous les filtres">
<img src="{% static 'img/filter_off.svg' %}">
</button>
</div>
</form>
</div>
</div>
{% endblock %}
{% block content %}
<div class="row border-bottom mb-3">
<div class="col lead">Suivis terminés</div>
{% if perms.aemo.can_archive %}
<div class="col text-end">
<button type="button" class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#archiveModal">
Archivage de masse
</button>
</div>
{% endif %}
</div>
<div id="archive-message" class="row" hidden>
<div class="col">
<p class="alert alert-danger">
Archivage en cours: <span id="archive-counter">0</span> dossiers sur <span id="archive-total">0</span>
</p>
</div>
</div>
<div class="row">
<div class="col">
<table id="benef_table" class="table table-sm table-hover sortable">
<thead class="table-light">
<tr>
<th>Nom</th>
<th>Adresse</th>
<th>Réf. AEMO</th>
<th>Réf. OPE</th>
<th>Début du suivi</th>
<th>Fin du suivi</th>
<th>Total heures</th>
<th>Motif de fin</th>
<th>Archiver {% help_tooltip "Le bouton darchivage napparaît que si vous avez la permission darchivage, que le suivi est terminé depuis plus de 180 jours et que le suivi sest terminé lannée précédente." %}
</th>
</tr>
</thead>
<tbody>
{% for famille in object_list %}
<tr data-famille="{{ famille.pk }}">
<td>
<div>
<a href="{% url 'famille-suivi' famille.id %}" title="Suivi">{{ famille.nom }}</a>
</div>
</td>
<td>{{ famille.npa}} {{ famille.localite }}</td>
<td>{{ famille.suivi|sigles_referents }}</td>
<td>{{ famille.suivi.ope_referent.nom_prenom|default_if_none:'' }}
{{ famille.suivi.mandat_ope|join:', '|in_parens }}
</td>
<td>{{ famille.suivi.date_debut_suivi|date:'d.m.Y' }}</td>
<td>{{ famille.suivi.date_fin_suivi|date:'d.m.Y' }}</td>
<td>{{ famille.temps_total_prestations|format_duree }}</td>
<td>{{ famille.suivi.get_motif_fin_suivi_display }}</td>
<td class="text-center">
{% if famille|archivable:user %}
<form method="post" action="{% url 'archive-add' 'aemo' famille.pk %}">{% csrf_token %}
<button type="submit" class="btn btn-xs btn-danger confirm"
data-confirm="Voulez-vous vraiment archiver cette famille ?">X</button>
</form>
{% endif %}
</td>
</tr>
{% empty %}
<tr><td colspan="8">Cette liste est actuellement vide.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<!-- Modal pour archivage de masse-->
<div class="modal" id="archiveModal" tabindex="-1" aria-labelledby="archiveModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="archiveModalLabel">Archivage</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Fermer"></button>
</div>
<div class="modal-body">
<p>Cette action va archiver tous les dossiers qui correspondent aux critères définis.
Les données seront cryptées puis effacées de la base de données.
Cette action est irréversible.
</p>
<p>Voulez-vous continuer ?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Annuler</button>
<button type="button" id="btn-js-archivage" class="btn btn-warning"
data-archiveurl="{% url 'archive-add' 'aemo' 999 %}"
data-getarchivableurl="{% url 'famille-archivable' %}">Archivage</button>
</div>
</div>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,48 @@
{% extends "base.html" %}
{% block extrastyle %}
<style>span.helptext { display: none; }</style>
{% endblock %}
{% block content %}
<div class="row border-bottom mb-3">
<div class="col"><p class="lead">Utilisateur</p></div>
{% if form.instance.pk %}
<div class="col text-end">
<form class="form-reinit form inline" action="{% url 'utilisateur-password-reinit' object.pk %}" method="post">{% csrf_token %}
<button id="reinit" class="btn btn-outline-primary btn-sm">Réinit. mot de passe</button>
</form>
<form class="form-renit form inline" action="{% url 'utilisateur-otp-device-reinit' object.pk %}" method="post">{% csrf_token %}
<button id="otp-reinit" class="btn btn-outline-primary btn-sm">Réinit. du mobile</button>
</form>
<a class="btn btn-outline-primary btn-sm" href="{% url 'utilisateur-journalacces' form.instance.pk %}">Journal daccès</a>
</div>
{% endif %}
</div>
<div class="row justify-content-center">
<div class="col-8">
<form action="." method="post">
{% csrf_token %}
<table class="table table-sm">
{{ form.as_table }}
</table>
<div id="actions" class="row border-top mt-2">
{% if form.instance.pk %}
<div class="col mt-3">
{% if view.delete_url %}
<button class="btn btn-sm btn-danger" name="delete" type="submit"
data-confirm="Voulez-vous vraiment désactiver cet utilisateur ?"
formaction="{{ view.delete_url }}" title="Cet utilisateur n'apparaîtra plus dans les listes"
>Désactiver</button>
{% endif %}
</div>
{% endif %}
<div class="col mt-3 text-end">
<a class="btn btn-sm btn-secondary" href="javascript: history.go(-1)">Annuler</a>
<button class="btn btn-sm btn-success" name="save" type="submit">Enregistrer</button>
</div>
</div>
</form>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,24 @@
{% extends "base.html" %}
{% block content %}
<div class="row border-bottom mb-3">
<div class="col"><p class="lead">Accès aux familles par {{ utilisateur }}</p></div>
</div>
<table id="user_table" class="table table-sm table-hover sortable">
<thead class="table-light">
<tr>
<th>Date/heure</th>
<th>Famille</th>
<th>Accès ordinaire</th>
</tr>
</thead>
<tbody>
{% for line in object_list %}
<tr>
<td class="m-0 p-1">{{ line.quand|date:'d.m.Y H:i' }}</td>
<td class="m-0 p-1">{{ line.famille }}</td>
<td class="m-0 p-1">{{ line.ordinaire|boolean_icon }}</td>
{% endfor %}
</tbody>
</table>
{% endblock %}

View file

@ -0,0 +1,65 @@
{% extends "base.html" %}
{% block content %}
<div class="row border-bottom mb-3">
<div class="col"><p class="lead">Utilisateurs {% if active_users %}activés{% else %}désactivés{% endif %}</p></div>
{% if perms.aemo.add_utilisateur %}
<div class="col text-end">
{% if active_users %}
<a class="btn btn-sm btn-outline-primary" href="{% url 'charge-utilisateurs' %}">Charge dossiers</a>
<a class="btn btn-sm btn-outline-primary" href="{% url 'utilisateur-desactive-list' %}">Utilisateurs désactivés</a>
{% else %}
<a class="btn btn-sm btn-outline-primary" href="{% url 'utilisateur-list' %}">Utilisateurs actifs</a>
{% endif %}
<a class="btn btn-sm btn-outline-primary" href="{% url 'utilisateur-add' %}">Nouveau</a>
</div>
{% endif %}
</div>
<div class="row">
<div class="col">
<table id="user_table" class="table table-sm table-hover sortable">
<thead class="table-light">
<tr>
<th>Nom, prénom</th>
<th>Sigle</th>
<th>Courriel</th>
<th>Taux act.</th>
<th>Titre</th>
<th>Équipe</th>
<th>Rôles</th>
<th style="width: 250px;">Groupes</th>
{% if not active_users %}<th>Action</th>{% endif %}
</tr>
</thead>
<tbody>
{% with can_edit=perms.aemo.change_utilisateur %}
{% for util in object_list %}
<tr>
<td class="m-0 p-1">{% if can_edit %}<a href="{% url 'utilisateur-edit' util.pk %}">{% endif %}
{{ util.nom_prenom }}{% if can_edit %}</a>{% endif %}</td>
<td class="m-0 p-1">{{ util.sigle }}</td>
<td class="m-0 p-1">{{ util.email }}</td>
<td class="m-0 p-1">
{{ util.taux_activite }}%
{% if util.decharge %}<br><small title="Heures de décharge">D. {{ util.decharge }}h</small>{% endif %}
</td>
<td class="m-0 p-1">{{ util.profession }}</td>
<td class="m-0 p-1">{{ util.get_equipe_display }}</td>
<td class="m-0 p-1">{{ util.roles_str }}</td>
<td class="m-0 p-1">{{ util.groupes|join:", " }}</td>
{% if not active_users %}
<td>
<form method="post" action="{% url 'utilisateur-reactiver' util.pk %}">
{% csrf_token %}
<button class="btn btn-sm btn-outline-success" type="submit">Ré-activer</button>
</form>
</td>
{% endif %}
</tr>
{% endfor %}
{% endwith %}
</tbody>
</table>
</div>
</div>
{% endblock %}