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"
|
||||
body = []
|
||||
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":
|
||||
body.append('style="color:#4169E1">'+esc(ev.nom))
|
||||
body.append('style="color:#160083">'+esc(ev.nom))
|
||||
elif ev.calendrier == "D":
|
||||
body.append('style="color:#a9008a">'+esc(ev.nom))
|
||||
body.append('style="color:#770083">'+esc(ev.nom))
|
||||
else:
|
||||
body.append('>'+esc(ev.nom))
|
||||
body.append("</a><br/>")
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<p>{{event.desc_users_en|safe}}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div
|
||||
</div>
|
||||
</div>
|
||||
<div class="6u 12u$(small)">
|
||||
{% if user.is_authenticated %}
|
||||
|
|
|
@ -81,7 +81,7 @@ class Calendar(LoginRequiredMixin, TemplateView):
|
|||
).exclude(calendrier__iexact="C").exclude(calendrier__iexact="D")
|
||||
lEvents_chef = Event.objects.filter(
|
||||
date__gte=lCalendarFromMonth, date__lte=lCalendarToMonth
|
||||
).filter(calendrier__in=["C","D"])
|
||||
)
|
||||
lCalendar = EventCalendar(lEvents).formatmonth(lYear, lMonth)
|
||||
lCalendar_chef = EventCalendar(lEvents_chef).formatmonth(lYear, lMonth)
|
||||
lPreviousYear = lYear
|
||||
|
|
|
@ -15,6 +15,7 @@ class ChefEditInstrumentForm(forms.ModelForm):
|
|||
fields = (
|
||||
"statut",
|
||||
"user",
|
||||
"etat",
|
||||
"infos",
|
||||
"type",
|
||||
"owner",
|
||||
|
|
|
@ -28,7 +28,7 @@ class ListeInstru(LoginRequiredMixin, TemplateView):
|
|||
|
||||
class CreateInstru(ChefRequiredMixin, CreateView):
|
||||
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"
|
||||
success_url = reverse_lazy("instruments:liste")
|
||||
|
||||
|
|
Loading…
Reference in a new issue