From 9bb4a067f097ef2bdc24e14284dd1f0d3d9653c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 3 Jan 2019 16:55:46 +0100 Subject: [PATCH] manager: use bold for current day header in month view (#29431) --- chrono/manager/static/css/style.scss | 7 ++++++- .../templates/chrono/manager_agenda_month_view.html | 4 ++-- chrono/manager/views.py | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/chrono/manager/static/css/style.scss b/chrono/manager/static/css/style.scss index 7675cb9d..274c4152 100644 --- a/chrono/manager/static/css/style.scss +++ b/chrono/manager/static/css/style.scss @@ -94,6 +94,7 @@ a.timeperiod-exception-all { .agenda-table thead th { width: 14vw; padding-bottom: 1ex; + font-weight: normal; } @for $i from 1 through 7 { @@ -110,6 +111,7 @@ a.timeperiod-exception-all { padding: 1ex 2ex; vertical-align: top; width: 8ex; + font-weight: normal; &.hour { width: 5%; text-align: left; @@ -121,12 +123,15 @@ a.timeperiod-exception-all { &.weekday { width: 12.5%; padding-top: 3rem; + &.today { + font-weight: bold; + } } } .agenda-table tbody tr:first-child th.weekday { // don't add extra padding on top row - padding-top: 0; + padding-top: 1ex; } .agenda-table tbody tr.odd th.hour, diff --git a/chrono/manager/templates/chrono/manager_agenda_month_view.html b/chrono/manager/templates/chrono/manager_agenda_month_view.html index fb06692e..9647c181 100644 --- a/chrono/manager/templates/chrono/manager_agenda_month_view.html +++ b/chrono/manager/templates/chrono/manager_agenda_month_view.html @@ -39,14 +39,14 @@ {% for day in week_days.days %} - {% if not day.other_month %}{{ day.date|date:"l j" }}{% endif %} + {% if not day.other_month %}{{ day.date|date:"l j" }}{% endif %} {% endfor %} {% for hour in week_days.periods %} {{ hour|date:"TIME_FORMAT" }} {% for day in week_days.days %} - + {% if forloop.parentloop.first %} {% for slot in day.infos.opening_hours %}
diff --git a/chrono/manager/views.py b/chrono/manager/views.py index e2173494..fa05923d 100644 --- a/chrono/manager/views.py +++ b/chrono/manager/views.py @@ -386,6 +386,7 @@ class AgendaMonthView(AgendaDateView, MonthArchiveView): def get_day_timetable_infos(self, day, interval): period = current_date = day.replace(hour=self.min_timeperiod.hour, minute=0) timetable = {'date': current_date, + 'today': day.date() == datetime.date.today(), 'other_month': day.month != self.date.month, 'infos': {'opening_hours': [], 'booked_slots': []}}