Add first day of the week feature to user settings and calendar functionality
This commit is contained in:
parent
39f5b968b4
commit
fdbf2e4f27
15 changed files with 191 additions and 42 deletions
|
|
@ -26,7 +26,7 @@
|
|||
</div>
|
||||
|
||||
<ul class="weekdays">
|
||||
{% for day in [
|
||||
{% let day_names = [
|
||||
Sentence::CalendarMondayAbbreviation,
|
||||
Sentence::CalendarTuesdayAbbreviation,
|
||||
Sentence::CalendarWednesdayAbbreviation,
|
||||
|
|
@ -34,9 +34,16 @@
|
|||
Sentence::CalendarFridayAbbreviation,
|
||||
Sentence::CalendarSaturdayAbbreviation,
|
||||
Sentence::CalendarSundayAbbreviation,
|
||||
] %}
|
||||
<li class="weekday">{{ context.tr.t(*day) }}</li>
|
||||
] %}
|
||||
|
||||
{% for i in 0..7 %}
|
||||
<li class="weekday">
|
||||
{{ context.tr.t(*day_names[
|
||||
(i + context.first_day_of_the_week().num_days_from_monday() as usize) % 7
|
||||
]) }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
</ul>
|
||||
|
||||
<ul class="days">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue