resolved #21, started new design (removing some panels :)
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
from django.forms import inlineformset_factory
|
from django.forms import inlineformset_factory
|
||||||
from notes.forms import *
|
from notes.forms import *
|
||||||
|
from django_select2.forms import Select2Widget
|
||||||
|
|
||||||
# Models
|
# Models
|
||||||
from .models import *
|
from .models import *
|
||||||
from .notes import *
|
from .notes import *
|
||||||
@@ -22,7 +24,9 @@ class RencontreForm(forms.ModelForm):
|
|||||||
class Meta:
|
class Meta:
|
||||||
model = Rencontre
|
model = Rencontre
|
||||||
fields = ['lieu', 'heure_debut', 'duree']
|
fields = ['lieu', 'heure_debut', 'duree']
|
||||||
|
widgets = {
|
||||||
|
'lieu': Select2Widget(),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ObservationInlineFormSet = inlineformset_factory( Rencontre, Observation,
|
ObservationInlineFormSet = inlineformset_factory( Rencontre, Observation,
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
{% load notes %}
|
{% load notes %}
|
||||||
<div class="panel panel-primary">
|
<h3> Compte-rendu </h3>
|
||||||
<!-- Default panel contents -->
|
|
||||||
<div class="panel-heading">
|
<table class="table table-bordered">
|
||||||
<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">
|
|
||||||
{% for note in notes %}
|
{% for note in notes %}
|
||||||
{% inline_table note header="sujet" %}
|
{% inline_table note header="sujet" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</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 class="well bg-info">
|
||||||
</div>{%endif%}
|
<p><strong>Informations</strong></p>
|
||||||
|
<p>Rencontres : {{ maraude.observation_count}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ class MaraudeDetailsView(DerniereMaraudeMixin, generic.DetailView):
|
|||||||
class PageInfo:
|
class PageInfo:
|
||||||
title = "Maraude - {{maraude.date}}"
|
title = "Maraude - {{maraude.date}}"
|
||||||
header = "{{maraude.date}}"
|
header = "{{maraude.date}}"
|
||||||
header_small = "compte-rendu"
|
header_small = "{{maraude.referent}} & {{maraude.binome}}"
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
|
|||||||
@@ -8,5 +8,5 @@
|
|||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td ><p>{{text}}</p></td>
|
<td style="background-color:#fff"><p>{{text}}</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user