resolved #21, started new design (removing some panels :)

This commit is contained in:
artus40
2016-12-29 13:52:29 +01:00
parent 2acea0e625
commit 6c995a34db
4 changed files with 17 additions and 14 deletions

View File

@@ -1,6 +1,8 @@
from django import forms
from django.forms import inlineformset_factory
from notes.forms import *
from django_select2.forms import Select2Widget
# Models
from .models import *
from .notes import *
@@ -22,7 +24,9 @@ class RencontreForm(forms.ModelForm):
class Meta:
model = Rencontre
fields = ['lieu', 'heure_debut', 'duree']
widgets = {
'lieu': Select2Widget(),
}
ObservationInlineFormSet = inlineformset_factory( Rencontre, Observation,

View File

@@ -1,16 +1,15 @@
{% load notes %}
<div class="panel panel-primary">
<!-- Default panel contents -->
<div class="panel-heading">
<h3 class="panel-title">{{ maraude.binome }} & {{ maraude.referent }}
<span class="pull-right"><span class="label pull-right">Rencontres : {{ maraude.observation_count}}</span></span></h3>
</div>
<table class="table table-bordered table-striped">
<h3> Compte-rendu </h3>
<table class="table table-bordered">
{% for note in notes %}
{% inline_table note header="sujet" %}
{% endfor %}
</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%}
</table>
<div class="well bg-info">
<p><strong>Informations</strong></p>
<p>Rencontres : {{ maraude.observation_count}}</p>
</div>

View File

@@ -113,7 +113,7 @@ class MaraudeDetailsView(DerniereMaraudeMixin, generic.DetailView):
class PageInfo:
title = "Maraude - {{maraude.date}}"
header = "{{maraude.date}}"
header_small = "compte-rendu"
header_small = "{{maraude.referent}} & {{maraude.binome}}"
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)

View File

@@ -8,5 +8,5 @@
</th>
</tr>
<tr>
<td ><p>{{text}}</p></td>
<td style="background-color:#fff"><p>{{text}}</p></td>
</tr>