parent
e050ce5eda
commit
cd52ae0286
@ -117,6 +117,15 @@ class DayInCalendar:
|
|||||||
if e.start_time is None
|
if e.start_time is None
|
||||||
else e.start_time
|
else e.start_time
|
||||||
)
|
)
|
||||||
|
if self.is_today():
|
||||||
|
now = timezone.now()
|
||||||
|
nday = now.date()
|
||||||
|
ntime = now.time()
|
||||||
|
for idx,e in enumerate(self.events):
|
||||||
|
if (nday < e.start_day) or (nday == e.start_day and e.start_time and ntime <= e.start_time):
|
||||||
|
self.events[idx].is_first_after_now = True
|
||||||
|
break
|
||||||
|
|
||||||
|
|
||||||
def events_by_category_ordered(self):
|
def events_by_category_ordered(self):
|
||||||
from .models import Category
|
from .models import Category
|
||||||
|
@ -148,7 +148,7 @@ TIME_ZONE = "Europe/Paris"
|
|||||||
|
|
||||||
USE_I18N = True
|
USE_I18N = True
|
||||||
|
|
||||||
USE_TZ = True
|
USE_TZ = False
|
||||||
|
|
||||||
LANGUAGES = (
|
LANGUAGES = (
|
||||||
("fr", _("French")),
|
("fr", _("French")),
|
||||||
|
@ -329,6 +329,7 @@ footer [data-tooltip] {
|
|||||||
scroll-behavior: smooth;
|
scroll-behavior: smooth;
|
||||||
transition-duration: 200ms;
|
transition-duration: 200ms;
|
||||||
|
|
||||||
|
|
||||||
.cat {
|
.cat {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
@ -1551,4 +1552,20 @@ label.required::after {
|
|||||||
grid-column: 1 / 3;
|
grid-column: 1 / 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-now {
|
||||||
|
font-size: 60%;
|
||||||
|
div {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: fit-content(2em) auto;
|
||||||
|
column-gap: .2em;
|
||||||
|
color: red;
|
||||||
|
.line {
|
||||||
|
margin-top: .6em;
|
||||||
|
border-top: 1px solid red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
margin-bottom: 0;
|
||||||
|
|
||||||
}
|
}
|
@ -85,6 +85,9 @@
|
|||||||
{% if day.events %}
|
{% if day.events %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for event in day.events %}
|
{% for event in day.events %}
|
||||||
|
{% if event.is_first_after_now %}
|
||||||
|
<li class="line-now"><div><div>{% now "H:i" %}</div><div class="line"></div></div></li>
|
||||||
|
{% endif %}
|
||||||
<li>{{ event.category | circle_cat:event.has_recurrences }}
|
<li>{{ event.category | circle_cat:event.has_recurrences }}
|
||||||
{% if event.start_day == day.date and event.start_time %}
|
{% if event.start_day == day.date and event.start_time %}
|
||||||
{{ event.start_time }}
|
{{ event.start_time }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user