better integration of notes, templates clean up
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
|
||||
{% load bootstrap3 %}
|
||||
<form method="post" action="{% url 'maraudes:update' maraude.pk %}?continue=True">
|
||||
{% csrf_token %}
|
||||
{{ base_formset.management_form }}
|
||||
{% csrf_token %}
|
||||
{{ base_formset.management_form }}
|
||||
<div class="col-md-12 text-center well">
|
||||
<div class="btn-group">
|
||||
<button type="submit" class="btn btn-sm btn-success" formaction="{% url 'maraudes:update' maraude.pk %}?continue=False">
|
||||
{% bootstrap_icon "refresh" %} Mettre à jour</button>
|
||||
{% bootstrap_button "Enregistrer et quitter" button_type="submit" button_class="btn-primary btn-sm" icon="ok-circle" %}
|
||||
</div>
|
||||
</div>
|
||||
{% for form, inline_formset in forms %}
|
||||
<div class="col-md-6 col-sd-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading text-right">
|
||||
{% bootstrap_field form.DELETE field_class="col-md-1"%}
|
||||
<button type="submit" class="btn btn-sm btn-success" formaction="{% url 'maraudes:update' maraude.pk %}?continue=False">
|
||||
{% bootstrap_icon "refresh" %} Mettre à jour</button>
|
||||
{% bootstrap_button "Enregistrer et quitter" button_type="submit" button_class="btn-primary btn-sm" icon="ok-circle" %}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% include "compte_rendu/compterendu_form.html" %}
|
||||
</div>
|
||||
<div class="panel-footer text-right">
|
||||
{% bootstrap_field form.DELETE %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user