diff --git a/chrono/manager/static/css/style.scss b/chrono/manager/static/css/style.scss
index 26d78e9e..c37f2163 100644
--- a/chrono/manager/static/css/style.scss
+++ b/chrono/manager/static/css/style.scss
@@ -137,6 +137,10 @@ table.agenda-table {
&.hour {
text-align: left;
}
+ &.weeknum {
+ text-align: left;
+ padding-top: 3rem;
+ }
a {
color: #000;
border: 0;
@@ -149,14 +153,15 @@ table.agenda-table {
}
}
-.agenda-table tbody tr:first-child th.weekday {
+.agenda-table tbody tr:first-child th.weekday,
+.agenda-table tbody tr:first-child th.weeknum {
// don't add extra padding on top row
padding-top: 1ex;
}
// hour cells width
.agenda-table thead tr:first-child td:first-child,
.agenda-table tbody tr:first-child th:not(.weekday) {
- width: 5em;
+ width: 6em;
}
.agenda-table tbody tr.odd th.hour,
diff --git a/chrono/manager/templates/chrono/manager_meetings_agenda_week_timetable_fragment.html b/chrono/manager/templates/chrono/manager_meetings_agenda_week_timetable_fragment.html
index 28904d6d..e67ad3fa 100644
--- a/chrono/manager/templates/chrono/manager_meetings_agenda_week_timetable_fragment.html
+++ b/chrono/manager/templates/chrono/manager_meetings_agenda_week_timetable_fragment.html
@@ -5,8 +5,16 @@
{% endif %}
- |
{% for day in week_days.days %}
+ {% if forloop.first %}
+
+ {% if kind == 'month' %}
+
+ {% blocktrans with weeknum=day.date|date:"W" %}Week{{ weeknum }}{% endblocktrans %}
+
+ {% endif %}
+ |
+ {% endif %}
{% if kind == 'month' and not day.other_month or kind == 'week' %}{{ day.date|date:"l j" }}{% if kind == 'week' %} {{ day.date|date:"F" }}{% endif %}{% endif %} |
{% endfor %}
diff --git a/chrono/manager/templates/chrono/manager_resource_week_timetable_fragment.html b/chrono/manager/templates/chrono/manager_resource_week_timetable_fragment.html
index 0b9890ae..54afe087 100644
--- a/chrono/manager/templates/chrono/manager_resource_week_timetable_fragment.html
+++ b/chrono/manager/templates/chrono/manager_resource_week_timetable_fragment.html
@@ -6,8 +6,16 @@
{% endif %}
- |
{% for day in week_days.days %}
+ {% if forloop.first %}
+
+ {% if kind == 'month' %}
+
+ {% blocktrans with weeknum=day.date|date:"W" %}Week{{ weeknum }}{% endblocktrans %}
+
+ {% endif %}
+ |
+ {% endif %}
{% if kind == 'month' and not day.other_month or kind == 'week' %}{{ day.date|date:"l j" }}{% if kind == 'week' %} {{ day.date|date:"F" }}{% endif %}{% endif %} |
{% endfor %}
diff --git a/tests/manager/test_all.py b/tests/manager/test_all.py
index b636fce2..1b66ce17 100644
--- a/tests/manager/test_all.py
+++ b/tests/manager/test_all.py
@@ -1817,7 +1817,7 @@ def test_agenda_month_view_januaries(app, admin_user, kind):
with freezegun.freeze_time(date):
login(app)
resp = app.get('/manage/agendas/%s/%s/1/' % (agenda.id, date.year))
- assert resp.text.count(' | ') in (4, 5)
+ assert resp.text.count('') in (4, 5)
@pytest.mark.parametrize('kind', ['meetings', 'virtual'])
@@ -2194,7 +2194,7 @@ def test_agenda_week_view_januaries(app, admin_user, kind):
with freezegun.freeze_time(date):
login(app)
resp = app.get('/manage/agendas/%s/%s/week/01/' % (agenda.id, date.year))
- assert resp.text.count(' | | ') == 1
+ assert resp.text.count('') == 1
@pytest.mark.parametrize('kind', ['meetings', 'virtual'])
diff --git a/tests/manager/test_resource.py b/tests/manager/test_resource.py
index 1ca5c7c1..ad3a6874 100644
--- a/tests/manager/test_resource.py
+++ b/tests/manager/test_resource.py
@@ -399,7 +399,7 @@ def test_resource_week_view_januaries(app, admin_user):
with freezegun.freeze_time(date):
login(app)
resp = app.get('/manage/resource/%s/%s/week/01/' % (resource.pk, date.year))
- assert resp.text.count(' | | ') == 1
+ assert resp.text.count('') == 1
def test_resource_week_view_event_outside_timeperiod(app, admin_user):
@@ -699,7 +699,7 @@ def test_resource_month_view_januaries(app, admin_user):
with freezegun.freeze_time(date):
login(app)
resp = app.get('/manage/resource/%s/%s/1/' % (resource.pk, date.year))
- assert resp.text.count(' | | ') in (4, 5)
+ assert resp.text.count('') in (4, 5)
def test_resource_month_view_event_outside_timeperiod(app, admin_user):
|