corrections
This commit is contained in:
parent
d1d0980778
commit
446acd1cb7
5 changed files with 7 additions and 6 deletions
|
@ -20,11 +20,11 @@ class EventCalendar(HTMLCalendar):
|
||||||
cssclass += " filled"
|
cssclass += " filled"
|
||||||
body = []
|
body = []
|
||||||
for ev in self.events[day]:
|
for ev in self.events[day]:
|
||||||
body.append(_('<a href="/agenda/') + '%s"' % ev.id)
|
body.append('<a href="/agenda/' + '%s"' % ev.id)
|
||||||
if ev.calendrier == "C":
|
if ev.calendrier == "C":
|
||||||
body.append('style="color:#4169E1">'+esc(ev.nom))
|
body.append('style="color:#160083">'+esc(ev.nom))
|
||||||
elif ev.calendrier == "D":
|
elif ev.calendrier == "D":
|
||||||
body.append('style="color:#a9008a">'+esc(ev.nom))
|
body.append('style="color:#770083">'+esc(ev.nom))
|
||||||
else:
|
else:
|
||||||
body.append('>'+esc(ev.nom))
|
body.append('>'+esc(ev.nom))
|
||||||
body.append("</a><br/>")
|
body.append("</a><br/>")
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<p>{{event.desc_users_en|safe}}</p>
|
<p>{{event.desc_users_en|safe}}</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="6u 12u$(small)">
|
<div class="6u 12u$(small)">
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
|
|
|
@ -81,7 +81,7 @@ class Calendar(LoginRequiredMixin, TemplateView):
|
||||||
).exclude(calendrier__iexact="C").exclude(calendrier__iexact="D")
|
).exclude(calendrier__iexact="C").exclude(calendrier__iexact="D")
|
||||||
lEvents_chef = Event.objects.filter(
|
lEvents_chef = Event.objects.filter(
|
||||||
date__gte=lCalendarFromMonth, date__lte=lCalendarToMonth
|
date__gte=lCalendarFromMonth, date__lte=lCalendarToMonth
|
||||||
).filter(calendrier__in=["C","D"])
|
)
|
||||||
lCalendar = EventCalendar(lEvents).formatmonth(lYear, lMonth)
|
lCalendar = EventCalendar(lEvents).formatmonth(lYear, lMonth)
|
||||||
lCalendar_chef = EventCalendar(lEvents_chef).formatmonth(lYear, lMonth)
|
lCalendar_chef = EventCalendar(lEvents_chef).formatmonth(lYear, lMonth)
|
||||||
lPreviousYear = lYear
|
lPreviousYear = lYear
|
||||||
|
|
|
@ -15,6 +15,7 @@ class ChefEditInstrumentForm(forms.ModelForm):
|
||||||
fields = (
|
fields = (
|
||||||
"statut",
|
"statut",
|
||||||
"user",
|
"user",
|
||||||
|
"etat",
|
||||||
"infos",
|
"infos",
|
||||||
"type",
|
"type",
|
||||||
"owner",
|
"owner",
|
||||||
|
|
|
@ -28,7 +28,7 @@ class ListeInstru(LoginRequiredMixin, TemplateView):
|
||||||
|
|
||||||
class CreateInstru(ChefRequiredMixin, CreateView):
|
class CreateInstru(ChefRequiredMixin, CreateView):
|
||||||
model = Instrument
|
model = Instrument
|
||||||
fields = ["owner", "etat", "type", "marque", "model", "serial", "annee", "prix"]
|
fields = ["owner","user", "etat", "type", "marque", "model", "serial", "annee", "prix"]
|
||||||
template_name = "instruments/create_instru.html"
|
template_name = "instruments/create_instru.html"
|
||||||
success_url = reverse_lazy("instruments:liste")
|
success_url = reverse_lazy("instruments:liste")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue