better integration of notes, templates clean up

This commit is contained in:
Arthur Gerbaud
2016-08-06 19:28:15 +02:00
parent b3ca132a73
commit aefeb2e349
12 changed files with 101 additions and 63 deletions

View File

@@ -1,29 +1,16 @@
{% load notes %}
<div class="panel panel-primary">
<!-- Default panel contents -->
<div class="panel-heading"><h3 class="panel-title">Compte-Rendu</h3>
</div>
<div class="panel-body">
<p class="bg-info">Maraudeurs: {{ maraude.binome.first_name }}, {{ maraude.referent.first_name }}</p>
{% if maraude.est_terminee %}<p>Terminée à {{ maraude.heure_fin}} </p>
<p>{{maraude.rencontre_count}} rencontres</p>
{% else %}
{% endif %}
<div class="panel-heading">
<h3 class="panel-title">{{ maraude.binome }} & {{ maraude.referent }}
<span class="pull-right"><span class="label pull-right">Rencontres : {{ maraude.rencontre_count}}</span></span></h3>
</div>
<table class="table table-bordered table-striped">
{% for rencontre, observations in maraude %}
<tr>
<th>{{ rencontre.lieu }}</th>
<th>{{ rencontre.heure_debut }}</th>
<th style="text-align:right" width="150">Durée: {{ rencontre.duree }}min</th>
</tr>
{% for observation in observations %}
<tr><td>{{ observation.sujet }}</td><td colspan="2"> {{ observation.note }}</td>
</tr>
{% for note in notes %}
{% inline_table note header="sujet" %}
{% endfor %}
{% endfor %}
</table>
{% if user.is_superuser and maraude.est_terminee %}<div class="panel-footer">
<a class="btn btn-primary" href="{% url 'maraudes:update' maraude.pk %}">Modifier</a>
</table>
{% if user.is_superuser and maraude.est_terminee %}<div class="panel-footer text-right">
<a class="btn btn-sm btn-default" href="{% url 'maraudes:update' maraude.pk %}">Modifier</a>
</div>{%endif%}
</div>