on ajoute la semaine au début de la ligne dans la vue par mois
This commit is contained in:
parent
d15d54283e
commit
361b033485
@ -177,6 +177,21 @@ footer {
|
|||||||
.infos-and-buttons .buttons {
|
.infos-and-buttons .buttons {
|
||||||
flex: auto;
|
flex: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.grid.week-in-month {
|
||||||
|
grid-template-columns: 2.5em repeat(auto-fit, minmax(0%, 1fr));
|
||||||
|
margin-bottom: .5em;
|
||||||
|
}
|
||||||
|
.entete-semaine {
|
||||||
|
text-orientation: upright;
|
||||||
|
writing-mode: sideways-lr;
|
||||||
|
background: rgba(0, 137, 137, 0.2);
|
||||||
|
padding: 1em 0;
|
||||||
|
h2 {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
article.day {
|
article.day {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<article class="day{{ day|calendar_classes:fixed_style }}" id="{{ daytag }}">
|
<article class="day{{ day|calendar_classes:fixed_style }}" id="{{ daytag }}">
|
||||||
<header>
|
<header>
|
||||||
<h2><a href="{{ day.date | url_day }}?{{ filter.get_url }}">{{ day.date | date:"l j" }}</a></h2>
|
<{% if headers %}{{ headers }}{% else %}h2{% endif %}><a href="{{ day.date | url_day }}?{{ filter.get_url }}">{{ day.date | date:"l j" }}</a></{% if headers %}{{ headers }}{% else %}h2{% endif %}>
|
||||||
</header>
|
</header>
|
||||||
{% if day.events %}
|
{% if day.events %}
|
||||||
{% if resume %}
|
{% if resume %}
|
||||||
|
@ -45,10 +45,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div id="calendar">
|
<div id="calendar">
|
||||||
<div class="grid">
|
<div class="grid week-in-month">
|
||||||
{% for d in calendar.calendar_days_list %}
|
{% for d in calendar.calendar_days_list %}
|
||||||
{% if forloop.counter0|divisibleby:7 and not forloop.first %}</div><div class="grid">{% endif %}
|
{% if forloop.counter0|divisibleby:7 %}
|
||||||
{% include "agenda_culturel/day-inc.html" with day=d resume=1 fixed_style=calendar.all_in_past filter=filter %}
|
{% if not forloop.first %}</div><div class="grid week-in-month">{% endif %}
|
||||||
|
<div class="entete-semaine"><h2><a href="{% url 'week_view' calendar.month d.week %}?{{ filter.get_url }}">Semaine {{ d.week }}</a></h2></div>
|
||||||
|
{% endif %}
|
||||||
|
{% include "agenda_culturel/day-inc.html" with day=d resume=1 fixed_style=calendar.all_in_past filter=filter headers="h3" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -41,6 +41,7 @@ class CalendarDay:
|
|||||||
def __init__(self, d, on_requested_interval = True):
|
def __init__(self, d, on_requested_interval = True):
|
||||||
self.date = d
|
self.date = d
|
||||||
now = date.today()
|
now = date.today()
|
||||||
|
self.week = d.isocalendar()[1]
|
||||||
|
|
||||||
self.in_past = d < now
|
self.in_past = d < now
|
||||||
self.today = d == now
|
self.today = d == now
|
||||||
|
Loading…
Reference in New Issue
Block a user