* started workin on 'navbar' module

* changed bootstrap theme to bootswatch/Simplex

* big work on navbar logic

* starting creating menus using navbar

* converted app views to new Wepage decorator, updated navbar

* reimplemented DernieresMaraudes as a dropdown instead of ContextMixin

* reorganised static files, minor code cleanups

* turned Link.href into lazy-evaluated property

* collapsed 'navbar' module into 'website', dynamic building of ApplicationMenu subclasses

* minor cleanup

* blah blah blah

* added way to add admin/non-admin links

* minor style change : red border for active page instead of all dropdowns

* deleted file

* prepare adding removing menu templates files, being replaced by code

* essayé de généraliser le code pour les modaux bootstrap, non testé git status

* more preparation and thinking on navbar app_menus logic...

* added LinkManager and DropdownManager, getting closer...

* small fix in DropdownManager.__get__

* boosted up work: keep it simple so it can be merged fast, major layout changes

* added month filter on maraudes:liste

* added 'as_icon' filter to display boolean/null values as bootstrap icons

* remove inactive user from planning selection

* removed all unused 'menu' templates

* set up django_select2 to use static files

* small fix after review
This commit is contained in:
artus40
2017-02-11 18:20:13 +01:00
committed by GitHub
parent 288ca2cc20
commit 0be59a61a7
61 changed files with 665 additions and 525 deletions

View File

@@ -1,7 +0,0 @@
{% if user.is_superuser %}
{% load bootstrap3 %}
<li class="dropdown app-menu"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Sujet<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="{% url 'admin:notes_note_changelist' %}?sujet__personne_ptr__exact={{sujet.pk}}">{% bootstrap_icon "wrench" %} Éditer les notes</a></li>
</ul>
{% endif %}

View File

@@ -1,16 +1,63 @@
{% load boolean_icons %}
<table class="table">
<tr><th colspan="4" class="active">Informations générales</th></tr>
<tr><th>Première rencontre :</th><td> {{ sujet.premiere_rencontre }}</td></tr>
<tr><th colspan="4" class="active">État-civil</th></tr>
<tr><th>Nom</th><td>{{ sujet.nom|default:'?' }}</td><th>Prénom</th><td>{{ sujet.prenom|default:'?' }}</td></tr>
<tr><th>Sexe</th><td>{{ sujet.genre }}</td><th>Âge</th><td>{{ sujet.age|default:'?' }}</td></tr>
<tr><th colspan="4" class="active">Problématiques</th></tr>
<tr><th>Psychiatrique</th><td>{{ sujet.prob_psychiatrie }}</td><th>Addiction</th><td>{{ sujet.prob_addiction }}</td></tr>
<tr><th>Administratif</th><td>{{ sujet.prob_administratif }}</td><th>Somatique</th><td>{{ sujet.prob_somatique }}</td></tr>
<tr><th colspan="4" class="active">Habitation</th></tr></td></tr>
<tr><th>Type</th><td>{{ sujet.habitation }}</td><th>Connu du SIAO</th><td>{{ sujet.connu_siao }}</td></tr>
<tr><th colspan="4" class="active">Ressources</th></tr></td></tr>
<tr><td colspan="4">{{ sujet.ressources }}</td></tr>
<tr><th colspan="4" class="active">Parcours de vie</th></tr></td></tr>
<tr><td colspan="2">{{ sujet.parcours_de_vie }}</td><th>Lien familial</th><td>{{ sujet.lien_familial }}</td></tr>
<tr>
<th colspan="4" class="active">Informations générales</th>
</tr>
<tr>
<th>Première rencontre :</th>
<td> {{ sujet.premiere_rencontre }}</td>
</tr>
<tr>
<th colspan="4" class="active">État-civil</th>
</tr>
<tr>
<th>Nom</th>
<td>{{ sujet.nom|default:'?' }}</td>
<th>Prénom</th>
<td>{{ sujet.prenom|default:'?' }}</td>
</tr>
<tr>
<th>Sexe</th>
<td>{{ sujet.genre }}</td>
<th>Âge</th>
<td>{{ sujet.age|default:'?' }}</td>
</tr>
<tr>
<th colspan="4" class="active">Problématiques</th>
</tr>
<tr>
<th>Psychiatrique</th>
<td>{{ sujet.prob_psychiatrie|as_icon }}</td>
<th>Addiction</th>
<td>{{ sujet.prob_addiction|as_icon }}</td>
</tr>
<tr>
<th>Administratif</th>
<td>{{ sujet.prob_administratif|as_icon }}</td>
<th>Somatique</th>
<td>{{ sujet.prob_somatique|as_icon }}</td>
</tr>
<tr>
<th colspan="4" class="active">Habitation</th>
</tr>
<tr>
<th>Type</th>
<td>{{ sujet.habitation }}</td>
<th>Connu du SIAO</th>
<td>{{ sujet.connu_siao|as_icon }}</td>
</tr>
<tr>
<th colspan="4" class="active">Ressources</th>
</tr>
<tr>
<td colspan="4">{{ sujet.ressources }}</td>
</tr>
<tr>
<th colspan="4" class="active">Parcours de vie</th>
</tr>
<tr>
<td colspan="2">{{ sujet.parcours_de_vie }}</td>
<th>Lien familial</th>
<td>{{ sujet.lien_familial|as_icon }}</td>
</tr>
</table>

View File

@@ -1,10 +1,12 @@
{% load tables %}
{% load bootstrap3 %}
<div class="col-md-12 col-lg-6">
<div class="col-lg-10">
<div class="panel panel-primary">
<!-- Default panel contents -->
<div class="panel-heading text-center">
<h3 class="panel-title">Sujets rencontrés</h3>
<h3 class="panel-title">Sujets rencontrés
</h3>
</div>
<div class="panel-body">
<form action="" method="POST" class="form form-group">{% csrf_token %}
@@ -41,19 +43,17 @@
{% endif %}{% endif %}
</div>
</div>
<div class="col-lg-3 col-md-3">
<div class="panel panel-default">
<!-- Default panel contents -->
<div class="panel-heading text-center">
<h3 class="panel-title">Filtres</h3>
</div>
<div class="list-group">
<a href="#" class="list-group-item disabled">Rencontrés ce mois-ci</a></li>
<a href="#" class="list-group-item disabled"><strong>Mes accompagnements</strong></a></li>
<a href="#" class="list-group-item disabled">Hébérgé en urgence</a></li>
<a href="#" class="list-group-item disabled">Sans logement</a></li>
</div>
</div>
<div class="pull-left">
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Filtrer <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="{% url 'suivi:liste' %}">Pas de filtre</a></li>
<li role="separator" class="divider"></li>
<li><a href="?filter=month-only">Rencontrés ce mois-ci</a></li>
<li><a href="?filter=">Hébérgé en urgence</a></li>
<li><a href="?filter=">Sans abri</a></li>
</ul>
</div>
</div>