Initial commit
This commit is contained in:
		
						commit
						793bb6a488
					
				
					 182 changed files with 17153 additions and 0 deletions
				
			
		
							
								
								
									
										19
									
								
								templates/403.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								templates/403.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,19 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block title %}Accès non autorisé{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
<div id="container">
 | 
			
		||||
  <h2>Oups !!!</h2>
 | 
			
		||||
  {% if exception %}
 | 
			
		||||
    <h5>{{ exception }}</h5>
 | 
			
		||||
  {% else %}
 | 
			
		||||
    <p>Vous n'avez pas la permission d'accéder au contenu de cette page.</p>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  <p>
 | 
			
		||||
  <form>
 | 
			
		||||
    <input type="button" value="Retour!" onclick="history.back()">
 | 
			
		||||
  </form></p>
 | 
			
		||||
</div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										8
									
								
								templates/404-public.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								templates/404-public.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
{% extends "base-public.html" %}
 | 
			
		||||
 | 
			
		||||
{% block title %}Page introuvable{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
  <h2>Page introuvable</h2>
 | 
			
		||||
  <p>Nous sommes désolés, la page demandée n'existe pas ou plus.</p>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										8
									
								
								templates/404.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								templates/404.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block title %}Page introuvable{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
  <h2>Page introuvable</h2>
 | 
			
		||||
  <p>Nous sommes désolés, la page demandée n'existe pas ou plus.</p>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										8
									
								
								templates/500.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								templates/500.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block title %}Erreur de serveur{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
  <h2>Erreur de serveur</h2>
 | 
			
		||||
  <p>Nous sommes désolés, une erreur de serveur s'est produite. L'administrateur a été informé et fera tout son possible pour la résoudre rapidement.</p>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										16
									
								
								templates/actions.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								templates/actions.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,16 @@
 | 
			
		|||
<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="button"
 | 
			
		||||
                data-confirm="Voulez-vous vraiment supprimer cet objet ?"
 | 
			
		||||
                formaction="{{ view.delete_url }}"
 | 
			
		||||
                >Supprimer</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>
 | 
			
		||||
							
								
								
									
										22
									
								
								templates/admin/menu_principal.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								templates/admin/menu_principal.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,22 @@
 | 
			
		|||
<div class="dropdown">
 | 
			
		||||
    <a class="btn btn-sm btn-outline-secondary dropdown-toggle {% if active == 'ressources' %}active{% endif %} "
 | 
			
		||||
      href="#"
 | 
			
		||||
      role="button" id="dropdownMenuRessources"
 | 
			
		||||
      data-bs-toggle="dropdown" aria-expanded="false">Ressources
 | 
			
		||||
    </a>
 | 
			
		||||
    <div class="dropdown-menu" aria-labelledby="dropdownMenuRessources">
 | 
			
		||||
      <a class="dropdown-item" href="{% url 'utilisateur-list' %}">Utilisateurs</a>
 | 
			
		||||
      <a class="dropdown-item" href="{% url 'cercle-list' %}">Écoles</a>
 | 
			
		||||
      <a class="dropdown-item" href="{% url 'role-list' %}">Roles</a>
 | 
			
		||||
      <a class="dropdown-item" href="{% url 'contact-list' %}">Contacts</a>
 | 
			
		||||
      <a class="dropdown-item" href="{% url 'service-list' %}">Services</a>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
{% if perms.aemo.export_stats %}
 | 
			
		||||
<div class="nav-item">
 | 
			
		||||
    <a href="{% url 'stats' %}" class="btn btn-sm btn-outline-secondary" role="button">Stats</a>
 | 
			
		||||
</div>
 | 
			
		||||
<li class="nav-item">
 | 
			
		||||
  <a href="{% url 'archive-list' 'aemo' %}" class="btn btn-sm btn-outline-secondary" role="button">Archives</a>
 | 
			
		||||
</li>
 | 
			
		||||
{% endif %}
 | 
			
		||||
							
								
								
									
										12
									
								
								templates/aemo/acces_famille.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								templates/aemo/acces_famille.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
<h2 class="text-center">Confirmation d’accès</h2>
 | 
			
		||||
 | 
			
		||||
<p class="text-center">Veuillez confirmer l'accès à la famille {{ famille.nom }}. Comme ce n’est 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 %}
 | 
			
		||||
							
								
								
									
										127
									
								
								templates/aemo/agenda_suivi.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										127
									
								
								templates/aemo/agenda_suivi.html
									
										
									
									
									
										Normal 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. d’intervention {{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 l’accompagnement 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
									
								
							
							
						
						
									
										42
									
								
								templates/aemo/bilan.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										22
									
								
								templates/aemo/cercle_scolaire_edit.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								templates/aemo/cercle_scolaire_edit.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										34
									
								
								templates/aemo/cercle_scolaire_list.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								templates/aemo/cercle_scolaire_list.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										39
									
								
								templates/aemo/charge_utilisateurs.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								templates/aemo/charge_utilisateurs.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										45
									
								
								templates/aemo/contact_edit.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								templates/aemo/contact_edit.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										79
									
								
								templates/aemo/contact_list.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										79
									
								
								templates/aemo/contact_list.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										47
									
								
								templates/aemo/demande_edit.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								templates/aemo/demande_edit.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										24
									
								
								templates/aemo/document_upload.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								templates/aemo/document_upload.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										22
									
								
								templates/aemo/export.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								templates/aemo/export.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										35
									
								
								templates/aemo/famille_adresse.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								templates/aemo/famille_adresse.html
									
										
									
									
									
										Normal 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 d’adresse</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 %}
 | 
			
		||||
							
								
								
									
										8
									
								
								templates/aemo/famille_boutons.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								templates/aemo/famille_boutons.html
									
										
									
									
									
										Normal 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>
 | 
			
		||||
							
								
								
									
										165
									
								
								templates/aemo/famille_edit.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										165
									
								
								templates/aemo/famille_edit.html
									
										
									
									
									
										Normal 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 l’adresse
 | 
			
		||||
                            </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 %}
 | 
			
		||||
							
								
								
									
										156
									
								
								templates/aemo/famille_list.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										156
									
								
								templates/aemo/famille_list.html
									
										
									
									
									
										Normal 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 d’attente{% 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 d’attente</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 %}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										36
									
								
								templates/aemo/form_in_popup.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								templates/aemo/form_in_popup.html
									
										
									
									
									
										Normal 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>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										67
									
								
								templates/aemo/formation_edit.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								templates/aemo/formation_edit.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										15
									
								
								templates/aemo/menu_principal.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								templates/aemo/menu_principal.html
									
										
									
									
									
										Normal 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>
 | 
			
		||||
							
								
								
									
										11
									
								
								templates/aemo/niveau_change.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								templates/aemo/niveau_change.html
									
										
									
									
									
										Normal 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>
 | 
			
		||||
							
								
								
									
										22
									
								
								templates/aemo/object_confirm_delete.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								templates/aemo/object_confirm_delete.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										29
									
								
								templates/aemo/permissions.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								templates/aemo/permissions.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										125
									
								
								templates/aemo/personne_edit.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										125
									
								
								templates/aemo/personne_edit.html
									
										
									
									
									
										Normal 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 l’anné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 %}
 | 
			
		||||
							
								
								
									
										88
									
								
								templates/aemo/personne_reseau_list.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										88
									
								
								templates/aemo/personne_reseau_list.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										48
									
								
								templates/aemo/prestation_edit.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								templates/aemo/prestation_edit.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										67
									
								
								templates/aemo/prestation_generale.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								templates/aemo/prestation_generale.html
									
										
									
									
									
										Normal 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><</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>></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 %}
 | 
			
		||||
							
								
								
									
										74
									
								
								templates/aemo/prestation_list.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										74
									
								
								templates/aemo/prestation_list.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										59
									
								
								templates/aemo/prestation_menu.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								templates/aemo/prestation_menu.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										92
									
								
								templates/aemo/prestation_personnelle.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										92
									
								
								templates/aemo/prestation_personnelle.html
									
										
									
									
									
										Normal 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><</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>></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 %}
 | 
			
		||||
							
								
								
									
										48
									
								
								templates/aemo/rapport.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								templates/aemo/rapport.html
									
										
									
									
									
										Normal 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 l’objet du résumé, peuvent <b>ensemble</b> lever ce secret ou accepter la divulgation des données. Si cette autorisation n’est pas donnée, l’autorité 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 %}
 | 
			
		||||
							
								
								
									
										25
									
								
								templates/aemo/rapport_edit.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								templates/aemo/rapport_edit.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										22
									
								
								templates/aemo/role_edit.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								templates/aemo/role_edit.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										40
									
								
								templates/aemo/role_list.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								templates/aemo/role_list.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										19
									
								
								templates/aemo/service_edit.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								templates/aemo/service_edit.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										36
									
								
								templates/aemo/service_list.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								templates/aemo/service_list.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										175
									
								
								templates/aemo/suivi_edit.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										175
									
								
								templates/aemo/suivi_edit.html
									
										
									
									
									
										Normal 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 d’agenda hebdo.
 | 
			
		||||
            </a>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    {% if can_edit %}
 | 
			
		||||
    <div class="row">
 | 
			
		||||
        <div class="col">
 | 
			
		||||
            {% include "actions.html" %}
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
</form>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										130
									
								
								templates/aemo/suivis_termines_list.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										130
									
								
								templates/aemo/suivis_termines_list.html
									
										
									
									
									
										Normal 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 d’archivage n’apparaît que si vous avez la permission d’archivage, que le suivi est terminé depuis plus de 180 jours et que le suivi s’est terminé l’anné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 %}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										48
									
								
								templates/aemo/utilisateur_edit.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								templates/aemo/utilisateur_edit.html
									
										
									
									
									
										Normal 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 d’accè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 %}
 | 
			
		||||
							
								
								
									
										24
									
								
								templates/aemo/utilisateur_journal.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								templates/aemo/utilisateur_journal.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										65
									
								
								templates/aemo/utilisateur_list.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								templates/aemo/utilisateur_list.html
									
										
									
									
									
										Normal 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 %}
 | 
			
		||||
							
								
								
									
										119
									
								
								templates/base.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										119
									
								
								templates/base.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,119 @@
 | 
			
		|||
<!DOCTYPE html>
 | 
			
		||||
<html lang="fr">
 | 
			
		||||
    <head>
 | 
			
		||||
        <title>AEMO Fribourg {% block title %}{% endblock %}</title>
 | 
			
		||||
        <meta charset="utf-8" />
 | 
			
		||||
        <meta name="viewport" content="width=device-width, initial-scale=1">
 | 
			
		||||
        {% include 'bootstrap_headers.html' %}
 | 
			
		||||
 | 
			
		||||
        <link rel="stylesheet" type="text/css" href="{% static 'admin/css/dashboard.css' %}">
 | 
			
		||||
        <link rel="stylesheet" type="text/css" href="{% static 'admin/css/widgets.css' %}">
 | 
			
		||||
        <link rel="stylesheet" type="text/css" href="{% static 'css/tablesort.css' %}">
 | 
			
		||||
        <link rel="stylesheet" type="text/css" href="{% static 'css/main.css' %}">
 | 
			
		||||
        <link rel="icon" type="image/png" href="{% static 'favicon.png' %}" sizes="16x16">
 | 
			
		||||
        {% block extrastyle %}{% endblock %}
 | 
			
		||||
 | 
			
		||||
        <script src="{% url 'javascript-catalog' %}"></script>
 | 
			
		||||
        <script src="{% static 'admin/js/core.js' %}" defer></script>
 | 
			
		||||
        <script src="{% static 'admin/js/calendar.js' %}" defer></script>
 | 
			
		||||
        <script src="{% static 'js/DateTimeShortcuts.js' %}" defer></script>
 | 
			
		||||
        <script src="{% static 'js/tablesort.min.js' %}" defer></script>
 | 
			
		||||
        <script src="{% static 'js/sorts/tablesort.number.min.js' %}" defer></script>
 | 
			
		||||
        <script src="{% static 'js/autosize.min.js' %}" defer></script>
 | 
			
		||||
        <script src="{% static 'js/main.js' %}" defer></script>
 | 
			
		||||
        {% block extra_javascript %}{% endblock %}
 | 
			
		||||
        {{ form.media }}
 | 
			
		||||
    </head>
 | 
			
		||||
    <body>
 | 
			
		||||
        <div class="top-container">
 | 
			
		||||
            {% block header %}
 | 
			
		||||
            <header>
 | 
			
		||||
                <figure class="mb-0">
 | 
			
		||||
                    <img id="logo-cr" src="{% static 'img/logo-cr.svg' %}">
 | 
			
		||||
                    <img id="bandeau-cr" src="{% static 'img/bandeau_rouge.png' %}">
 | 
			
		||||
                </figure>
 | 
			
		||||
            </header>
 | 
			
		||||
            {% include 'user_bar.html' %}
 | 
			
		||||
            {% endblock %}
 | 
			
		||||
            {% block top-navigation %}
 | 
			
		||||
            <nav class="container-fluid border-bottom">
 | 
			
		||||
                <div class="row bg-light">
 | 
			
		||||
                    <div class="col-sm-6">
 | 
			
		||||
                        {% block nav-left %}
 | 
			
		||||
                        {% if user.is_authenticated %}
 | 
			
		||||
                            <nav id="menu_crne" class="navbar navbar-expand-lg">
 | 
			
		||||
                                <ul class="navbar-nav py-2">
 | 
			
		||||
                                    <li class="nav-item">
 | 
			
		||||
                                        <a href="{% url 'home' %}" class="btn btn-sm btn-outline-secondary" role="button">Accueil</a>
 | 
			
		||||
                                    </li>
 | 
			
		||||
                                    {% if source %}
 | 
			
		||||
                                        {% include 'aemo/menu_principal.html' %}
 | 
			
		||||
                                    {% else %}
 | 
			
		||||
                                        {% include 'admin/menu_principal.html' %}
 | 
			
		||||
                                    {% endif %}
 | 
			
		||||
                                </ul>
 | 
			
		||||
                            </nav>
 | 
			
		||||
                        {% endif %}
 | 
			
		||||
                        {% endblock %}
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div class="col-sm-6 ps-0 text-end pt-2">
 | 
			
		||||
                        {% block boutons_droite %}{% endblock %}
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
            </nav>
 | 
			
		||||
            {% endblock %}
 | 
			
		||||
 | 
			
		||||
            {% block messages %}
 | 
			
		||||
                {% if messages %}
 | 
			
		||||
                    <div class="mt-3">
 | 
			
		||||
                        <div class="col-xl-10 offset-xl-1">
 | 
			
		||||
                            <ul class="list-unstyled messages">
 | 
			
		||||
                                {% for message in messages %}
 | 
			
		||||
                                    <li class="alert {{ message.tags }}">{{ message|linebreaksbr|capfirst }}</li>
 | 
			
		||||
                                {% endfor %}
 | 
			
		||||
                            </ul>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    </div>
 | 
			
		||||
                {% endif %}
 | 
			
		||||
            {% endblock messages %}
 | 
			
		||||
 | 
			
		||||
            {% block above-content %}{% endblock %}
 | 
			
		||||
            <section class="mt-3 main-content container-fluid">
 | 
			
		||||
              <div class="row">
 | 
			
		||||
                <div class="col-xl-10 offset-lg-1">
 | 
			
		||||
                    {% block content %}{% endblock %}
 | 
			
		||||
                    {% block pagination %}
 | 
			
		||||
                        {% include 'pagination.html' %}
 | 
			
		||||
                    {% endblock %}
 | 
			
		||||
                </div>
 | 
			
		||||
              </div>
 | 
			
		||||
            </section>
 | 
			
		||||
 | 
			
		||||
            <footer>
 | 
			
		||||
                <div class="footer text-center p-4 border-top pl-0 pr-0">
 | 
			
		||||
                    Fondation Transit
 | 
			
		||||
                </div>
 | 
			
		||||
            </footer>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
    <!-- Fenêtre pour l’édition d’objets en fenêtre modale -->
 | 
			
		||||
    <div id="popup0" class="modal" role="dialog">
 | 
			
		||||
      <div class="modal-dialog" role="document">
 | 
			
		||||
        <div class="modal-content">
 | 
			
		||||
          <div class="modal-header">
 | 
			
		||||
            <h5 class="modal-title"></h5>
 | 
			
		||||
            <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="modal-body"></div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <!-- simple modal for images -->
 | 
			
		||||
    <div id="imgModal" class="modal modal-image">
 | 
			
		||||
      <span id="modalClose">×</span>
 | 
			
		||||
      <img class="modal-content" id="img01">
 | 
			
		||||
      <div id="caption"></div>
 | 
			
		||||
    </div>
 | 
			
		||||
    </body>
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										7
									
								
								templates/bootstrap_headers.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								templates/bootstrap_headers.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
 | 
			
		||||
 | 
			
		||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
 | 
			
		||||
 | 
			
		||||
<script src="{% static 'admin/js/vendor/jquery/jquery.min.js' %}"></script>
 | 
			
		||||
 | 
			
		||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin="anonymous"></script>
 | 
			
		||||
							
								
								
									
										31
									
								
								templates/index.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								templates/index.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,31 @@
 | 
			
		|||
<!DOCTYPE html>
 | 
			
		||||
<html lang="fr">
 | 
			
		||||
<head>
 | 
			
		||||
    <title>AEMO FribourgE</title>
 | 
			
		||||
    <meta charset="utf-8" />
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1">
 | 
			
		||||
    {% include 'bootstrap_headers.html' %}
 | 
			
		||||
    <link rel="stylesheet" type="text/css" href="{% static 'css/main.css' %}">
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
    <div id="bg_home" class="top-container p-0 m-0">
 | 
			
		||||
        <section class="main-content">
 | 
			
		||||
        {% include 'user_bar.html' %}
 | 
			
		||||
        <div class="row g-3" id="home-app-line">
 | 
			
		||||
            <div class="col-sm-auto">
 | 
			
		||||
                <a class="btn btn-primary btn-lg me-3 mt-2" href="{% url 'famille-list' %}" role="button">AEMO</a>
 | 
			
		||||
                </div>
 | 
			
		||||
            <div class="col-sm-auto">
 | 
			
		||||
                <a class="btn btn-light btn-lg mt-2" href="{% url 'utilisateur-list' %}" role="button">Administration</a>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        </section>
 | 
			
		||||
 | 
			
		||||
        <footer>
 | 
			
		||||
            <div class="col text-center footer p-4 border-top" >
 | 
			
		||||
                AEMO Fribourg
 | 
			
		||||
            </div>
 | 
			
		||||
        </footer>
 | 
			
		||||
    </div>
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										32
									
								
								templates/login.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								templates/login.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,32 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    <div id="login">
 | 
			
		||||
        <form class="form-horizontal" name="LoginForm" action="{% url 'login' %}" method="post">
 | 
			
		||||
        {% csrf_token %}
 | 
			
		||||
        <input type="hidden" name="next" value="{{ next }}">
 | 
			
		||||
        {% if form.non_field_errors %}
 | 
			
		||||
        {% for error in form.non_field_errors %}
 | 
			
		||||
        <p class="errornote">{{ error }}</p>
 | 
			
		||||
        {% endfor %}
 | 
			
		||||
        {% endif %}
 | 
			
		||||
        <div class="control-group">
 | 
			
		||||
            {{ form.username.label_tag }}
 | 
			
		||||
            <div class="controls">
 | 
			
		||||
                {{ form.username.errors }}{{ form.username }}
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="control-group mt-3">
 | 
			
		||||
            {{ form.password.label_tag }}
 | 
			
		||||
            <div class="controls">
 | 
			
		||||
                {{ form.password.errors }}{{ form.password }}
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="control-group mt-3">
 | 
			
		||||
            <div class="controls">
 | 
			
		||||
                <button type="submit" class="btn btn-primary">Se connecter</button>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        </form>
 | 
			
		||||
    </div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										13
									
								
								templates/pagination.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								templates/pagination.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,13 @@
 | 
			
		|||
{% if is_paginated %}
 | 
			
		||||
<div id="pagination" aria-label="pagination" class="mt-5">
 | 
			
		||||
  <ul class="pagination pagination-sm justify-content-center flex-wrap">
 | 
			
		||||
    {% for i in paginator.page_range %}
 | 
			
		||||
      {% if page_obj.number == i %}
 | 
			
		||||
        <li class="page-item active"><span class="page-link">{{ i }}<span class="visually-hidden">(current)</span></span></li>
 | 
			
		||||
      {% else %}
 | 
			
		||||
        <li class="page-item" ><a class="page-link" href="{{ request.path }}?{% param_replace page=i %}">{{ i }}</a></li>
 | 
			
		||||
      {% endif %}
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
  </ul>
 | 
			
		||||
</div>
 | 
			
		||||
{% endif %}
 | 
			
		||||
							
								
								
									
										6
									
								
								templates/partial_agenda_cloture.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								templates/partial_agenda_cloture.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,6 @@
 | 
			
		|||
<h6 class="pb-2 fw-bold">Fin de l’accompagnement le</h6>
 | 
			
		||||
<p>{{ form.date_fin_suivi.errors }}{{ form.date_fin_suivi }}</p>
 | 
			
		||||
<h6 class="mt-2 fw-bold">Motif de fin</h6>
 | 
			
		||||
<p class="px-5 fin">{{ form.motif_fin_suivi.errors }}{{ form.motif_fin_suivi }}</p>
 | 
			
		||||
<h6 class="mt-2 fw-bold">Destination</h6>
 | 
			
		||||
<p class="px-5 fin">{{ form.destination.errors }}{{ form.destination }}</p>
 | 
			
		||||
							
								
								
									
										8
									
								
								templates/partial_show_docs.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								templates/partial_show_docs.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
{% for doc in docs %}
 | 
			
		||||
<div class="py-1">
 | 
			
		||||
    <a href="{{ doc.get_absolute_url }}">{{ doc.title }}</a>
 | 
			
		||||
    <a href="{{ doc.get_print_url }}">
 | 
			
		||||
        <img class="icon-xs" src="{% static 'img/printer.png' %}">
 | 
			
		||||
    </a>
 | 
			
		||||
</div>
 | 
			
		||||
{% endfor %}
 | 
			
		||||
							
								
								
									
										31
									
								
								templates/partial_table_documents.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								templates/partial_table_documents.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,31 @@
 | 
			
		|||
<table class="table table-sm table-borderless mb-3">
 | 
			
		||||
   <tr>
 | 
			
		||||
      <th class="left-label">Documents
 | 
			
		||||
         {% if famille|can_edit:user %}
 | 
			
		||||
         <span>
 | 
			
		||||
            <a href="{% url 'famille-doc-upload' famille.pk %}"
 | 
			
		||||
               class="btn btn-sm btn-mini btn-primary"
 | 
			
		||||
               role="button "
 | 
			
		||||
               title="Ajouter un document">+</a>
 | 
			
		||||
          </span>
 | 
			
		||||
         {% endif %}
 | 
			
		||||
      </th>
 | 
			
		||||
      <td colspan="4">
 | 
			
		||||
         <div>
 | 
			
		||||
            {% for doc in famille.documents.all %}
 | 
			
		||||
               <a href="{{ doc.fichier.url }}">{{ doc.titre }}</a>
 | 
			
		||||
               {% if famille|can_edit:user %}
 | 
			
		||||
               <span class="hoverimage">
 | 
			
		||||
                  <button type="submit" class="btn confirm"
 | 
			
		||||
                     formaction="{% url 'famille-doc-delete' famille.pk doc.pk %}"
 | 
			
		||||
                     title="Supprimer ce document"
 | 
			
		||||
                     data-confirm="Voulez-vous vraiment supprimer ce document ?">
 | 
			
		||||
                     <img src="{% static 'admin/img/icon-deletelink.svg' %}">
 | 
			
		||||
                  </button>
 | 
			
		||||
               </span>
 | 
			
		||||
               {% endif %}
 | 
			
		||||
            {% endfor %}
 | 
			
		||||
         </div>
 | 
			
		||||
      </td>
 | 
			
		||||
   </tr>
 | 
			
		||||
</table>
 | 
			
		||||
							
								
								
									
										27
									
								
								templates/registration/password_change_form.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								templates/registration/password_change_form.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,27 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block extrastyle %}
 | 
			
		||||
<style>
 | 
			
		||||
label { width: 100%; }
 | 
			
		||||
.topmargin { margin-top: 1rem; }
 | 
			
		||||
ul { padding: 0; list-style: none; color: #555; }
 | 
			
		||||
</style>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
<h1>Modification du mot de passe</h1>
 | 
			
		||||
 | 
			
		||||
<p>Pour des raisons de sécurité, saisissez votre ancien mot de passe puis votre nouveau mot de passe à deux reprises afin de vérifier qu'il est correctement saisi.</p>
 | 
			
		||||
 | 
			
		||||
<form method="post">
 | 
			
		||||
    {% csrf_token %}
 | 
			
		||||
    {% for field in form %}
 | 
			
		||||
        <label class="control-label" for="id_{{ field.name }}">{{ field.label }}</label>
 | 
			
		||||
        {{ field }}
 | 
			
		||||
        {{ field.help_text }}
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
    <div class="row topmargin">
 | 
			
		||||
        <button class="btn btn-outline-primary btn-sm" type="submit">Modifier le mot de passe</button>
 | 
			
		||||
    </div>
 | 
			
		||||
</form>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										10
									
								
								templates/registration/password_reset_complete.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								templates/registration/password_reset_complete.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,10 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
{% load i18n %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
<p>{% translate "Your password has been set.  You may go ahead and log in now." %}</p>
 | 
			
		||||
 | 
			
		||||
<p><a href="{{ login_url }}">{% translate 'Log in' %}</a></p>
 | 
			
		||||
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										35
									
								
								templates/registration/password_reset_confirm.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								templates/registration/password_reset_confirm.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,35 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
{% load i18n static %}
 | 
			
		||||
 | 
			
		||||
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}">{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
{% if validlink %}
 | 
			
		||||
 | 
			
		||||
<p>{% translate "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
 | 
			
		||||
 | 
			
		||||
<form method="post">{% csrf_token %}
 | 
			
		||||
<fieldset class="module aligned">
 | 
			
		||||
    <input class="hidden" autocomplete="username" value="{{ form.user.get_username }}">
 | 
			
		||||
    <div class="row field-password1">
 | 
			
		||||
        {{ form.new_password1.errors }}
 | 
			
		||||
        <label for="id_new_password1">{% translate 'New password:' %}</label>
 | 
			
		||||
        {{ form.new_password1 }}
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="row field-password2">
 | 
			
		||||
        {{ form.new_password2.errors }}
 | 
			
		||||
        <label for="id_new_password2">{% translate 'Confirm password:' %}</label>
 | 
			
		||||
        {{ form.new_password2 }}
 | 
			
		||||
    </div>
 | 
			
		||||
    <button type="submit" class="btn btn-primary">{% translate 'Change my password' %}</button>
 | 
			
		||||
</fieldset>
 | 
			
		||||
</form>
 | 
			
		||||
 | 
			
		||||
{% else %}
 | 
			
		||||
 | 
			
		||||
<p>{% translate "The password reset link was invalid, possibly because it has already been used.  Please request a new password reset." %}</p>
 | 
			
		||||
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										12
									
								
								templates/registration/password_reset_done.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								templates/registration/password_reset_done.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
{% load i18n %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
 | 
			
		||||
<h2>{% translate 'Password reset sent' %}</h2>
 | 
			
		||||
 | 
			
		||||
<p>{% translate 'We’ve emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly.' %}</p>
 | 
			
		||||
 | 
			
		||||
<p>{% translate 'If you don’t receive an email, please make sure you’ve entered the address you registered with, and check your spam folder.' %}</p>
 | 
			
		||||
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										14
									
								
								templates/registration/password_reset_form.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								templates/registration/password_reset_form.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
{% extends 'base.html' %}
 | 
			
		||||
 | 
			
		||||
{% block title %}Mot de passe oublié ?{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
  <h1>Mot de passe oublié ?</h1>
 | 
			
		||||
  <p>Saisissez votre adresse électronique ci-dessous et nous vous enverrons les instructions pour en créer un nouveau.</p>
 | 
			
		||||
 | 
			
		||||
  <form method="POST">
 | 
			
		||||
    {% csrf_token %}
 | 
			
		||||
    {{ form.as_p }}
 | 
			
		||||
    <button type="submit" class="btn btn-primary">Envoyez-moi les instructions</button>
 | 
			
		||||
  </form>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										11
									
								
								templates/statistiques/stat-form.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								templates/statistiques/stat-form.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
<div class="row border-bottom mb-3">
 | 
			
		||||
    <div class="col">
 | 
			
		||||
        <form method="get">
 | 
			
		||||
            {{ date_form.non_field_errors }}
 | 
			
		||||
            <p class="lead">
 | 
			
		||||
                Statistiques du 1<sup>er</sup> {{ date_form.start_month }} {{ date_form.start_year }} à fin {{ date_form.end_month }} {{ date_form.end_year }}
 | 
			
		||||
                <button type="submit" class="btn btn-sm btn-outline-primary">Mettre à jour</button>
 | 
			
		||||
            </p>
 | 
			
		||||
        </form>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
							
								
								
									
										41
									
								
								templates/statistiques/stat-tabs.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								templates/statistiques/stat-tabs.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,41 @@
 | 
			
		|||
<ul class="nav nav-tabs nav-statistiques">
 | 
			
		||||
    {# active is defined in include tag #}
 | 
			
		||||
    <li class="nav-item">
 | 
			
		||||
        <a class="nav-link {% if active == 'general' %}active{% endif %}"
 | 
			
		||||
           href="{% url 'stats' %}?{% param_replace %}">Familles et enfants</a>
 | 
			
		||||
    </li>
 | 
			
		||||
    <li class="nav-item">
 | 
			
		||||
        <a class="nav-link {% if active == 'localite' %}active{% endif %}"
 | 
			
		||||
           href="{% url 'stats-localite' %}?{% param_replace %}">Par localité</a>
 | 
			
		||||
    </li>
 | 
			
		||||
    <li class="nav-item">
 | 
			
		||||
        <a class="nav-link {% if active == 'region' %}active{% endif %}"
 | 
			
		||||
           href="{% url 'stats-region' %}?{% param_replace %}">Par région</a>
 | 
			
		||||
    </li>
 | 
			
		||||
    <li class="nav-item">
 | 
			
		||||
        <a class="nav-link {% if active == 'duree' %}active{% endif %}"
 | 
			
		||||
           href="{% url 'stats-duree' %}?{% param_replace %}">Par durée</a>
 | 
			
		||||
    </li>
 | 
			
		||||
    <li class="nav-item">
 | 
			
		||||
        <a class="nav-link {% if active == 'age' %}active{% endif %}"
 | 
			
		||||
           href="{% url 'stats-age' %}?{% param_replace %}">Par âge</a>
 | 
			
		||||
    </li>
 | 
			
		||||
    <li class="nav-item">
 | 
			
		||||
        <a class="nav-link {% if active == 'motifs' %}active{% endif %}"
 | 
			
		||||
           href="{% url 'stats-motifs' %}?{% param_replace %}">Motifs, proven. et destin.</a>
 | 
			
		||||
    </li>
 | 
			
		||||
    <li class="nav-item">
 | 
			
		||||
        <a class="nav-link {% if active == 'prestations' %}active{% endif %}"
 | 
			
		||||
           href="{% url 'stats-prestations' %}">Prestations</a>
 | 
			
		||||
    </li>
 | 
			
		||||
    <li class="nav-item">
 | 
			
		||||
        <a class="nav-link {% if active == 'niveau' %}active{% endif %}"
 | 
			
		||||
           href="{% url 'stats-niveaux' %}?{% param_replace %}">Niveaux</a>
 | 
			
		||||
    </li>
 | 
			
		||||
    {% if perms.aemo.export_stats %}
 | 
			
		||||
    <li class="nav-item">
 | 
			
		||||
        <a class="nav-link {% if active == 'export' %}active{% endif %}"
 | 
			
		||||
           href="{% url 'export-prestation' %}">Exportations</a>
 | 
			
		||||
    </li>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
</ul>
 | 
			
		||||
							
								
								
									
										98
									
								
								templates/statistiques/statistiques.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										98
									
								
								templates/statistiques/statistiques.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,98 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block title %}Statistiques{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    {% include "statistiques/stat-form.html" %}
 | 
			
		||||
    {% include "statistiques/stat-tabs.html" with active="general" %}
 | 
			
		||||
 | 
			
		||||
    <div class="row">
 | 
			
		||||
        <div class="col">
 | 
			
		||||
            <table class="table table-sm table-hover stat_table">
 | 
			
		||||
                <thead>
 | 
			
		||||
                    <tr><th></th>{% for month in months %}<th>{{ month }}</th>{% endfor %}<th>Total</th></tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td colspan="{{ months|length|add:2 }}" class="app_line">
 | 
			
		||||
                            <h3>Familles</h3>
 | 
			
		||||
                            <small><em>{{ familles.total_familles }} familles prise en compte sur la période choisie</em></small>
 | 
			
		||||
                        </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>Total familles (évaluation et/ou accomp.)</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ familles.familles_total|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ familles.familles_total.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>Total enfants suivis (évaluation et/ou accomp.)</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ familles.enfants_total|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ familles.enfants_total.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>Familles évaluées</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ familles.familles_evaluees|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ familles.familles_evaluees.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>Enfants évalués</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ familles.enfants_evalues|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ familles.enfants_evalues.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>Enfants non suivis de familles évaluées</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ familles.enfants_evalues_non_suivis|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ familles.enfants_evalues_non_suivis.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>Familles évaluées sans aboutir à un suivi</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ familles.familles_eval_sans_suivi|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ familles.familles_eval_sans_suivi.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>Familles suivies</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ familles.familles_suivies|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ familles.familles_suivies.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>Enfants suivis</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ familles.enfants_suivis|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ familles.enfants_suivis.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>Enfants non suivis de familles suivies</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ familles.enfants_suivis_non_suivis|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ familles.enfants_suivis_non_suivis.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>dont Familles d’accueil</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ familles.familles_accueil|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ familles.familles_accueil.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>dont Familles déjà suivies</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ familles.familles_connues|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ familles.familles_connues.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>Demandes prioritaires</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ familles.prioritaires|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ familles.prioritaires.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>Rendez-vous manqués</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ familles.rdv_manques|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ familles.rdv_manques.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td colspan="{{ months|length|add:1 }}">Durée moyenne entre demande et début de suivi</td>
 | 
			
		||||
                        <td class="num">{{ familles.duree_attente.moyenne.days }} jours</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </tbody>
 | 
			
		||||
            </table>
 | 
			
		||||
            <div class="text-end">
 | 
			
		||||
                <a href=".?{% param_replace %}&export=1"><img class="icon-ui" src="{% static 'ficons/xlsx.svg' %}"></a>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										43
									
								
								templates/statistiques/stats-age.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								templates/statistiques/stats-age.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,43 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    {% include "statistiques/stat-form.html" %}
 | 
			
		||||
    {% include "statistiques/stat-tabs.html" with active="age" %}
 | 
			
		||||
 | 
			
		||||
    <div class="row">
 | 
			
		||||
        <div class="col">
 | 
			
		||||
            <p class="fw-bold mt-3">
 | 
			
		||||
                Répartition des enfants suivis (dès demande jusqu'à la fin d’accompagnement) par âge. L’âge est calculé à la date médiane entre la demande et la fin du suivi.
 | 
			
		||||
            </p>
 | 
			
		||||
 | 
			
		||||
            <table class="table table-sm table-hover stat_table">
 | 
			
		||||
                <thead>
 | 
			
		||||
                    <tr><th class="left">Âge</th>
 | 
			
		||||
                        {% for month in months %}<th>{{ month }}</th>{% endfor %}
 | 
			
		||||
                        <th>Total</th>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
                    <tr><td colspan="{{ months|length|add:3 }}" style="background-color: #eee;">
 | 
			
		||||
                        <h3>Âges</h3>
 | 
			
		||||
                    </td></tr>
 | 
			
		||||
                    {% for age, stats in ages.items %}
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>{{ age }}</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ stats|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ stats.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>Âge moyen</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ means|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ means.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </tbody>
 | 
			
		||||
            </table>
 | 
			
		||||
            <div class="text-end">
 | 
			
		||||
                <a href=".?{% param_replace %}&export=1"><img class="icon-ui" src="{% static 'ficons/xlsx.svg' %}"></a>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										33
									
								
								templates/statistiques/stats-duree.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								templates/statistiques/stats-duree.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,33 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    {% include "statistiques/stat-form.html" %}
 | 
			
		||||
    {% include "statistiques/stat-tabs.html" with active="duree" %}
 | 
			
		||||
 | 
			
		||||
    <div class="row">
 | 
			
		||||
        <div class="col">
 | 
			
		||||
            <p class="fw-bold mt-3">
 | 
			
		||||
                Répartition des suivis par durée d’accompagnement. Les suivis pris en compte sont ceux dont la date de fin de suivi se situe entre les bornes temporelles sélectionnées.
 | 
			
		||||
            </p>
 | 
			
		||||
 | 
			
		||||
            <table class="table table-sm table-hover stat_table">
 | 
			
		||||
                <thead>
 | 
			
		||||
                    <tr><th class="left">Durée</th>
 | 
			
		||||
                        <th>Nb de suivis</th>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
                    {% for slice in slices %}
 | 
			
		||||
                        <tr>
 | 
			
		||||
                            <td>{{ slice.label }}</td>
 | 
			
		||||
                            <td class="num">{{ durees|get_item:slice.label }}</td>
 | 
			
		||||
                        </tr>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                </tbody>
 | 
			
		||||
            </table>
 | 
			
		||||
            <div class="text-end">
 | 
			
		||||
                <a href=".?{% param_replace %}&export=1"><img class="icon-ui" src="{% static 'ficons/xlsx.svg' %}"></a>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										45
									
								
								templates/statistiques/stats-interv.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								templates/statistiques/stats-interv.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,45 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block extrastyle %}
 | 
			
		||||
<style>
 | 
			
		||||
    .stat_table tr.first td { border-top: 1px solid #999; }
 | 
			
		||||
</style>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    {% include "statistiques/stat-form.html" %}
 | 
			
		||||
    {% include "statistiques/stat-tabs.html" with active="interv" %}
 | 
			
		||||
 | 
			
		||||
    <div class="row">
 | 
			
		||||
        <div class="col">
 | 
			
		||||
            <table class="table table-sm table-hover stat_table">
 | 
			
		||||
                <thead>
 | 
			
		||||
                    <tr><th class="left">Intervenant-e</th><th></th>
 | 
			
		||||
                        {% for month in months %}<th>{{ month }}</th>{% endfor %}
 | 
			
		||||
                        <th>Total</th>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
                    <tr><td colspan="{{ months|length|add:3 }}" class="app_line">
 | 
			
		||||
                        <h3>AEMO</h3>
 | 
			
		||||
                    </td></tr>
 | 
			
		||||
                    {% for interv, counters in intervs.items %}
 | 
			
		||||
                    <tr class="first">
 | 
			
		||||
                        <td>{{ interv.nom_prenom }}</td><td><small>Familles</small></td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ counters.num_familles|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ counters.num_familles.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td></td><td><small>Enfants</small></td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ counters.num_enfants|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ counters.num_enfants.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                </tbody>
 | 
			
		||||
            </table>
 | 
			
		||||
            <div class="text-end">
 | 
			
		||||
                <a href=".?{% param_replace %}&export=1"><img class="icon-ui" src="{% static 'ficons/xlsx.svg' %}"></a>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										45
									
								
								templates/statistiques/stats-localite.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								templates/statistiques/stats-localite.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,45 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    {% include "statistiques/stat-form.html" %}
 | 
			
		||||
    {% include "statistiques/stat-tabs.html" with active="localite" %}
 | 
			
		||||
 | 
			
		||||
    <div class="row">
 | 
			
		||||
        <div class="col">
 | 
			
		||||
            <p class="fw-bold mt-3">
 | 
			
		||||
                Nombre d’enfants suivis (dès demande jusqu'à la fin d’accompagnement) par localité.
 | 
			
		||||
            </p>
 | 
			
		||||
 | 
			
		||||
            <table class="table table-sm table-hover stat_table">
 | 
			
		||||
                <thead>
 | 
			
		||||
                    <tr><th class="left">Localité</th>
 | 
			
		||||
                        {% for month in months %}<th>{{ month }}</th>{% endfor %}
 | 
			
		||||
                        <th>Total</th>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
                    <tr><td colspan="{{ months|length|add:3 }}" style="background-color: #eee;">
 | 
			
		||||
                        <h3>Localités</h3>
 | 
			
		||||
                    </td></tr>
 | 
			
		||||
                    {% for localite, stats in localites.items %}
 | 
			
		||||
                    {% if localite != 'totals' %}
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>{{ localite }}</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ stats|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ stats.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>Totaux</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ localites.totals|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ localites.totals.totals }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </tbody>
 | 
			
		||||
            </table>
 | 
			
		||||
            <div class="text-end">
 | 
			
		||||
                <a href=".?{% param_replace %}&export=1"><img class="icon-ui" src="{% static 'ficons/xlsx.svg' %}"></a>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										120
									
								
								templates/statistiques/stats-motifs.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										120
									
								
								templates/statistiques/stats-motifs.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,120 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    {% include "statistiques/stat-form.html" %}
 | 
			
		||||
    {% include "statistiques/stat-tabs.html" with active="motifs" %}
 | 
			
		||||
 | 
			
		||||
    <div class="row">
 | 
			
		||||
        <div class="col">
 | 
			
		||||
            <table class="table table-sm table-hover stat_table">
 | 
			
		||||
                <thead>
 | 
			
		||||
                    <tr><th class="left">Motif d’annonce</th>
 | 
			
		||||
                        {% for month in months %}<th>{{ month }}</th>{% endfor %}
 | 
			
		||||
                        <th>Total</th>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
                    {% for motif, stats in data.ann.items %}
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>{{ motif }}</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ stats|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ stats.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                </tbody>
 | 
			
		||||
 | 
			
		||||
                <thead>
 | 
			
		||||
                    <tr><th class="left">Service annonceur</th>
 | 
			
		||||
                        {% for month in months %}<th>{{ month }}</th>{% endfor %}
 | 
			
		||||
                        <th>Total</th>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
                    {% for service, stats in data.orient.items %}
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>{{ service }}</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ stats|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ stats.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                </tbody>
 | 
			
		||||
 | 
			
		||||
                <thead>
 | 
			
		||||
                    <tr><th class="left">Motif de fin d’évaluation ou d’accompagnement</th>
 | 
			
		||||
                        {% for month in months %}<th>{{ month }}</th>{% endfor %}
 | 
			
		||||
                        <th>Total</th>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
                    <tr class="subdiv2"><td>Abandon avant évaluation</td></tr>
 | 
			
		||||
                    {% for motif, stats in data.fin_preeval.items %}
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>{{ motif }}</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ stats|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ stats.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                    <tr class="subdiv2"><td>Abandon après évaluation</td></tr>
 | 
			
		||||
                    {% for motif, stats in data.fin_posteval.items %}
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>{{ motif }}</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ stats|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ stats.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                    <tr class="subdiv2"><td>Fin de l'accompagnement</td></tr>
 | 
			
		||||
                    {% for motif, stats in data.fin_postacc.items %}
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>{{ motif }}</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ stats|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ stats.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                    <tr class="subdiv2"><td>Total</td></tr>
 | 
			
		||||
                    {% for motif, stats in data.fin_total.items %}
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>{{ motif }}</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ stats|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ stats.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                </tbody>
 | 
			
		||||
 | 
			
		||||
                <thead>
 | 
			
		||||
                    <tr><th class="left">Provenance</th>
 | 
			
		||||
                        {% for month in months %}<th>{{ month }}</th>{% endfor %}
 | 
			
		||||
                        <th>Total</th>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
                    {% for prov, stats in data.prov.items %}
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>{{ prov }}</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ stats|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ stats.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                </tbody>
 | 
			
		||||
 | 
			
		||||
                <thead>
 | 
			
		||||
                    <tr><th class="left">Destination</th>
 | 
			
		||||
                        {% for month in months %}<th>{{ month }}</th>{% endfor %}
 | 
			
		||||
                        <th>Total</th>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
                    {% for dest, stats in data.dest.items %}
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>{{ dest }}</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ stats|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ stats.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                </tbody>
 | 
			
		||||
            </table>
 | 
			
		||||
            <div class="text-end">
 | 
			
		||||
                <a href=".?{% param_replace %}&export=1"><img class="icon-ui" src="{% static 'ficons/xlsx.svg' %}"></a>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										37
									
								
								templates/statistiques/stats-niveaux.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								templates/statistiques/stats-niveaux.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,37 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    {% include "statistiques/stat-form.html" %}
 | 
			
		||||
    {% include "statistiques/stat-tabs.html" with active="niveau" %}
 | 
			
		||||
 | 
			
		||||
    <div class="row">
 | 
			
		||||
        <div class="col">
 | 
			
		||||
            <table class="table table-sm stat_table table-hover mt-4">
 | 
			
		||||
                <thead>
 | 
			
		||||
                    <tr class="app_line">
 | 
			
		||||
                        <th class="text-start h4 pt-3">Ressources par niveau</th>
 | 
			
		||||
                        {% for month in months %}<th>{{ month }}</th>{% endfor %}
 | 
			
		||||
                        <th>Total</th>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
                {% for niveau, prest_list in stats.items %}
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td colspan="3" class="fw-bold bg-light">Niveau {{ niveau }}</td><td></td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    {% for prest, prest_data in prest_list.items %}
 | 
			
		||||
                        <tr>
 | 
			
		||||
                            <td class="ps-5">{{ prest_map|get_item:prest }}</td>
 | 
			
		||||
                            {% for month in months %}<td class="num">{{ prest_data|get_item:month|format_duree }}</td>{% endfor %}
 | 
			
		||||
                            <td class="num">{{ prest_data|get_item:'total'|format_duree }}</td>
 | 
			
		||||
                        </tr>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                {% endfor %}
 | 
			
		||||
                </tbody>
 | 
			
		||||
            </table>
 | 
			
		||||
            <div class="text-end">
 | 
			
		||||
                <a href=".?{% param_replace %}&export=1"><img class="icon-ui" src="{% static 'ficons/xlsx.svg' %}"></a>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										78
									
								
								templates/statistiques/stats-prestations.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								templates/statistiques/stats-prestations.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,78 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    <div class="row border-bottom mb-3">
 | 
			
		||||
        <div class="col">
 | 
			
		||||
            <form method="get">
 | 
			
		||||
                {{ date_form.non_field_errors }}
 | 
			
		||||
                <p class="lead">
 | 
			
		||||
                    Statistiques de l'année {{ date_form.year }}
 | 
			
		||||
                    <button type="submit" class="btn btn-sm btn-outline-primary">Mettre à jour</button>
 | 
			
		||||
                </p>
 | 
			
		||||
            </form>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    {% include "statistiques/stat-tabs.html" with active="prestations" %}
 | 
			
		||||
 | 
			
		||||
    <div class="row">
 | 
			
		||||
        <div class="col">
 | 
			
		||||
            <table class="table table-sm stat_table">
 | 
			
		||||
                <thead>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <th></th>
 | 
			
		||||
                        {% for month in months %}
 | 
			
		||||
                        <th class="month">{{ month|date:"N" }}</th>
 | 
			
		||||
                        {% endfor %}
 | 
			
		||||
                        <th class="total num">Total</th>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
                    <tr><td colspan="15" class="app_line">
 | 
			
		||||
                        <h3>Intervenant·e·s {{ unite|upper }}</h3><small>Heures prestées</small></td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    {% for user, detail in intervenants.items %}
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td class="m-0 p-1">{{ user|nom_prenom_abreg }}</td>
 | 
			
		||||
                        {% for h in detail.heures_prestees %}
 | 
			
		||||
                        <td class="m-0 p-1 num">{{ h|format_duree|default_if_zero }}</td>
 | 
			
		||||
                        {% endfor %}
 | 
			
		||||
                        <td class="m-0 p-1 num">{{ detail.tot_prestees|format_duree }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                </tbody>
 | 
			
		||||
                <!-- Résumé par type de prestation -->
 | 
			
		||||
                <thead class="table-light">
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <th></th>
 | 
			
		||||
                        {% for month in months %}
 | 
			
		||||
                        <th class="month">{{ month|date:"N" }}</th>
 | 
			
		||||
                        {% endfor %}
 | 
			
		||||
                        <th class="total">Total</th>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
 | 
			
		||||
                <tbody>
 | 
			
		||||
                    {% for libelle in libelles_prest %}
 | 
			
		||||
                    <tr {% if forloop.first %}class="first"{% endif %}>
 | 
			
		||||
                        <td class="m-0 p-1">{{ libelle.nom }}</td>
 | 
			
		||||
                        {% for month, data in totaux_prest_mensuels.items %}
 | 
			
		||||
                        <td class="m-0 p-1 num">{% if month.is_future %}-{% else %}{{ data|get_item:libelle.nom|format_duree }}{% endif %}</td>
 | 
			
		||||
                        {% endfor %}
 | 
			
		||||
                        <td class="m-0 p-1 num">{{ totaux_par_prest|get_item:libelle.nom|format_duree }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                    <tr class="first">
 | 
			
		||||
                        <td class="m-0 p-1">Totaux</td>
 | 
			
		||||
                        {% for month, data in totaux_prest_mensuels.items %}
 | 
			
		||||
                        <td class="m-0 p-1 num">{{ data.total|format_duree }}</td>
 | 
			
		||||
                        {% endfor %}
 | 
			
		||||
                        <td class="m-0 p-1 num">{{ total_gen|format_duree }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </tbody>
 | 
			
		||||
            </table>
 | 
			
		||||
            <div class="text-end">
 | 
			
		||||
                <a href=".?{% param_replace %}&export=1"><img class="icon-ui" src="{% static 'ficons/xlsx.svg' %}"></a>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										45
									
								
								templates/statistiques/stats-region.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								templates/statistiques/stats-region.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,45 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    {% include "statistiques/stat-form.html" %}
 | 
			
		||||
    {% include "statistiques/stat-tabs.html" with active="region" %}
 | 
			
		||||
 | 
			
		||||
    <div class="row">
 | 
			
		||||
        <div class="col">
 | 
			
		||||
            <p class="fw-bold mt-3">
 | 
			
		||||
                Nombre d’enfants suivis (dès demande jusqu'à la fin d’accompagnement) par région.
 | 
			
		||||
            </p>
 | 
			
		||||
 | 
			
		||||
            <table class="table table-sm table-hover stat_table">
 | 
			
		||||
                <thead>
 | 
			
		||||
                    <tr><th class="left">Région</th>
 | 
			
		||||
                        {% for month in months %}<th>{{ month }}</th>{% endfor %}
 | 
			
		||||
                        <th>Total</th>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
                    <tr><td colspan="{{ months|length|add:3 }}" style="background-color: #eee;">
 | 
			
		||||
                        <h3>Régions</h3>
 | 
			
		||||
                    </td></tr>
 | 
			
		||||
                    {% for region, stats in regions.items %}
 | 
			
		||||
                    {% if region != 'totals' %}
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>{{ region }}</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ stats|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ stats.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>Totaux</td>
 | 
			
		||||
                        {% for month in months %}<td class="num">{{ regions.totals|get_item:month }}</td>{% endfor %}
 | 
			
		||||
                        <td class="num">{{ regions.totals.total }}</td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </tbody>
 | 
			
		||||
            </table>
 | 
			
		||||
            <div class="text-end">
 | 
			
		||||
                <a href=".?{% param_replace %}&export=1"><img class="icon-ui" src="{% static 'ficons/xlsx.svg' %}"></a>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										1
									
								
								templates/two_factor/_base.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								templates/two_factor/_base.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
							
								
								
									
										13
									
								
								templates/two_factor/_wizard_forms.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								templates/two_factor/_wizard_forms.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,13 @@
 | 
			
		|||
{{ wizard.management_form }}
 | 
			
		||||
<table class="mb-3">
 | 
			
		||||
  {% for field in form.visible_fields %}
 | 
			
		||||
  <tr><th>{{ field.label_tag }}</th>
 | 
			
		||||
      <td>{{ field.errors }}{{ field }}
 | 
			
		||||
      {% if field.name == 'password' %} <a href="{% url 'password_reset' %}">Mot de passe oublié ?</a>{% endif %}
 | 
			
		||||
      </td>
 | 
			
		||||
  </tr>
 | 
			
		||||
  {% endfor %}
 | 
			
		||||
</table>
 | 
			
		||||
{% for hidden in form.hidden_fields %}
 | 
			
		||||
{{ hidden }}
 | 
			
		||||
{% endfor %}
 | 
			
		||||
							
								
								
									
										41
									
								
								templates/two_factor/profile/profile.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								templates/two_factor/profile/profile.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,41 @@
 | 
			
		|||
{% extends "two_factor/_base.html" %}
 | 
			
		||||
{% load i18n %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
  <h1>{% block title %}{% trans "Account Security" %}{% endblock %}</h1>
 | 
			
		||||
 | 
			
		||||
  {% if default_device %}
 | 
			
		||||
 | 
			
		||||
    <a class="btn btn-info" href="{% url 'password_change' %}">Modifier mon mot de passe</a>
 | 
			
		||||
 | 
			
		||||
    <p>{% trans "Tokens will be generated by your token generator." %}</p>
 | 
			
		||||
 | 
			
		||||
    <h2>{% trans "Backup Tokens" %}</h2>
 | 
			
		||||
    <p>
 | 
			
		||||
      {% blocktrans trimmed %}If you don't have any device with you, you can access
 | 
			
		||||
        your account using backup tokens.{% endblocktrans %}
 | 
			
		||||
      {% blocktrans trimmed count counter=backup_tokens %}
 | 
			
		||||
        You have only one backup token remaining.
 | 
			
		||||
      {% plural %}
 | 
			
		||||
        You have {{ counter }} backup tokens remaining.
 | 
			
		||||
      {% endblocktrans %}
 | 
			
		||||
    </p>
 | 
			
		||||
    <p><a href="{% url 'two_factor:backup_tokens' %}"
 | 
			
		||||
          class="btn btn-info">{% trans "Show Codes" %}</a></p>
 | 
			
		||||
 | 
			
		||||
    <h3>Ajouter un appareil supplémentaire pour l’authentification à deux facteurs</h3>
 | 
			
		||||
    <p><a href="{% url 'two_factor:setup' %}" class="btn btn-info">Ajouter un autre appareil</a></p>
 | 
			
		||||
 | 
			
		||||
    <h3>{% trans "Disable Two-Factor Authentication" %}</h3>
 | 
			
		||||
    <p>Si vous désactivez l’authentification à deux facteurs, vous devrez ensuite la réactiver pour pouvoir vous connecter. Cela peut être utile si vous souhaitez changer d’appareil.</p>
 | 
			
		||||
    <p><a class="btn btn-secondary" href="{% url 'two_factor:disable' %}">
 | 
			
		||||
      {% trans "Disable Two-Factor Authentication" %}</a></p>
 | 
			
		||||
  {% else %}
 | 
			
		||||
    <p>{% blocktrans trimmed %}Two-factor authentication is not enabled for your
 | 
			
		||||
      account. Enable two-factor authentication for enhanced account
 | 
			
		||||
      security.{% endblocktrans %}</p>
 | 
			
		||||
    <p><a href="{% url 'two_factor:setup' %}" class="btn btn-primary">
 | 
			
		||||
      {% trans "Enable Two-Factor Authentication" %}</a>
 | 
			
		||||
    </p>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										13
									
								
								templates/user_bar.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								templates/user_bar.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,13 @@
 | 
			
		|||
<div class="row">
 | 
			
		||||
    <div id="user-bar" class="col-xl-6 text-end">
 | 
			
		||||
            {% if user.is_authenticated %}
 | 
			
		||||
            <div id="user-tools" class="d-flex justify-content-end">
 | 
			
		||||
                <div class="p-1"><a href="{% url 'two_factor:profile' %}">{% firstof user.get_short_name user.get_username %}</a> |</div>
 | 
			
		||||
                <form method="post" class="d-inline p-1" action="{% url 'logout' %}">{% csrf_token %}
 | 
			
		||||
                    <button type="submit" class="btn btn-link p-0">Se déconnecter</button>
 | 
			
		||||
                </form>
 | 
			
		||||
            </div>
 | 
			
		||||
            {% endif %}
 | 
			
		||||
        <div class="col-xl-1"></div>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue