From e40bb77beb862e36b4b7e69360bc3429b102564d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 22 Sep 2018 15:39:38 +0200 Subject: [PATCH] manager: improve association between day label and hours (#26426) --- chrono/manager/static/css/style.scss | 19 +++++++++++++------ .../chrono/manager_agenda_day_view.html | 2 +- .../chrono/manager_agenda_month_view.html | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/chrono/manager/static/css/style.scss b/chrono/manager/static/css/style.scss index 0c7676e..9281d2b 100644 --- a/chrono/manager/static/css/style.scss +++ b/chrono/manager/static/css/style.scss @@ -120,17 +120,28 @@ a.timeperiod-exception-all { } &.weekday { width: 12.5%; + padding-top: 3rem; } } -.agenda-table tbody tr:nth-child(2n+1) th.hour, -.agenda-table tbody tr:nth-child(2n+1) td { +.agenda-table tbody tr:first-child th.weekday { + // don't add extra padding on top row + padding-top: 0; +} + +.agenda-table tbody tr.odd th.hour, +.agenda-table tbody tr.odd td { background: #f0f0f0; @media print { border-top: 1px solid #aaa; } } +.agenda-table tbody tr.odd td.other-month { + background: #f8f8f8; +} + + .agenda-table tbody td { padding: 0 1ex; vertical-align: top; @@ -143,10 +154,6 @@ a.timeperiod-exception-all { border-width: 0 5px; } -.agenda-table tbody tr td.other-month { - background: transparent; -} - @for $i from 1 through 60 { table.hourspan-#{$i} tbody td { height: calc(#{$i} * 2.5em); diff --git a/chrono/manager/templates/chrono/manager_agenda_day_view.html b/chrono/manager/templates/chrono/manager_agenda_day_view.html index e41df3d..766d8bb 100644 --- a/chrono/manager/templates/chrono/manager_agenda_day_view.html +++ b/chrono/manager/templates/chrono/manager_agenda_day_view.html @@ -48,7 +48,7 @@ {% endif %} - + {{ period|date:"TIME_FORMAT" }} {% for desk_info in desk_infos %} diff --git a/chrono/manager/templates/chrono/manager_agenda_month_view.html b/chrono/manager/templates/chrono/manager_agenda_month_view.html index 53254ff..782b313 100644 --- a/chrono/manager/templates/chrono/manager_agenda_month_view.html +++ b/chrono/manager/templates/chrono/manager_agenda_month_view.html @@ -43,7 +43,7 @@ {% endfor %} {% for hour in week_days.periods %} - + {{ hour|date:"TIME_FORMAT" }} {% for day in week_days.days %} -- 2.19.0