Week view: relative start-day offset for non-7-day counts; hide week-only settings elsewhere
Build and push server image / build-and-push (push) Successful in 53s
Build and push server image / build-and-push (push) Successful in 53s
calendar_week_start's fixed-weekday anchor ("start on the most recent
Monday") stops making sense once the view isn't a literal calendar
week, so a non-7-day week view now starts calendar_week_start_offset
days from today instead (0 = starts today, negative/positive = past/
future) -- calendar_week_start still governs at the default 7 days,
unchanged.
Also hides the Calendar tab's week-only fields (days to show, layout,
start offset) unless View is actually set to Week, and further hides
the new start-offset field specifically when Days to show is 7 (where
it has no effect). "Week starts on" stays visible for Month too, since
it actually still applies there.
This commit is contained in:
@@ -31,23 +31,36 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<label>Week starts on
|
||||
<select id="calendar_week_start">
|
||||
{% for value, label in week_start_labels.items() %}
|
||||
<option value="{{ value }}" {% if frame.calendar_week_start == value %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<p class="sub" style="margin-top: 4px;">Only affects the Week and Month views.</p>
|
||||
<label>Days to show (Week view)
|
||||
<input type="number" id="calendar_week_days" min="2" max="10" value="{{ frame.calendar_week_days }}">
|
||||
</label>
|
||||
<label>Week view layout
|
||||
<select id="calendar_week_layout">
|
||||
<option value="horizontal" {% if frame.calendar_week_layout == "horizontal" %}selected{% endif %}>Days side by side</option>
|
||||
<option value="vertical" {% if frame.calendar_week_layout == "vertical" %}selected{% endif %}>Days stacked</option>
|
||||
</select>
|
||||
</label>
|
||||
<div id="calendar-week-start-row">
|
||||
<label>Week starts on
|
||||
<select id="calendar_week_start">
|
||||
{% for value, label in week_start_labels.items() %}
|
||||
<option value="{{ value }}" {% if frame.calendar_week_start == value %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<p class="sub" style="margin-top: 4px;">Only affects the Week and Month views, and (for Week) only at 7 days.</p>
|
||||
</div>
|
||||
<div id="calendar-week-days-row">
|
||||
<label>Days to show (Week view)
|
||||
<input type="number" id="calendar_week_days" min="2" max="10" value="{{ frame.calendar_week_days }}">
|
||||
</label>
|
||||
</div>
|
||||
<div id="calendar-week-layout-row">
|
||||
<label>Week view layout
|
||||
<select id="calendar_week_layout">
|
||||
<option value="horizontal" {% if frame.calendar_week_layout == "horizontal" %}selected{% endif %}>Days side by side</option>
|
||||
<option value="vertical" {% if frame.calendar_week_layout == "vertical" %}selected{% endif %}>Days stacked</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<div id="calendar-week-offset-row">
|
||||
<label>Week view starts (days from today)
|
||||
<input type="number" id="calendar_week_start_offset" min="-30" max="30" value="{{ frame.calendar_week_start_offset }}">
|
||||
</label>
|
||||
<p class="sub" style="margin-top: 4px;">0 = starts today, negative = starts in the
|
||||
past, positive = starts in the future. Only used when Days to show isn't 7.</p>
|
||||
</div>
|
||||
<div class="checkbox-row" id="calendar-inlay-row">
|
||||
<input type="checkbox" id="calendar_photo_inlay" {% if frame.calendar_photo_inlay %}checked{% endif %}>
|
||||
<label for="calendar_photo_inlay">Show a photo alongside the calendar</label>
|
||||
|
||||
Reference in New Issue
Block a user