mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
Board Settings -> Date has Calendar sync. A board admin gives a calendar collection's address, a user and an app password made for WeKan, and turns it on. Each card with a due date is one event, <cardId>.ics, UID <cardId>@wekan, an hour long, with the card's title and link; a card that loses its due date or is archived has its event removed. Every 15 minutes the events are read back, and a due date moved in the calendar comes back to its card. Sync all now pushes every card at once. The link and its password are in a server-only collection that is never published, and only a board admin can read or change it. Requests go through webhookFetch: the SSRF guard, so a calendar on WeKan's own network is reached only when a site admin lists it under Internal destinations. Text values are escaped as RFC 5545 requires - a semicolon included, which the first version of the test did not catch. Thanks to scriptPilot and xet7 !
92 lines
3.5 KiB
Plaintext
92 lines
3.5 KiB
Plaintext
template(name="boardDateSettingsPopup")
|
|
+dateFormatEditor(scope="board")
|
|
hr
|
|
ul.show-week-of-year-toggle
|
|
a.flex.js-show-week-of-year-toggle(title="{{_ 'show-week-of-year'}}")
|
|
i.fa(class="{{#if isShowWeekOfYear}}fa-check{{else}}fa-square-o{{/if}}")
|
|
span {{_ 'show-week-of-year'}}
|
|
//- #687: this board's due dates in a CalDAV calendar (Nextcloud Calendar...).
|
|
Board admins; the password is never sent back to the browser.
|
|
if currentUser.isBoardAdmin
|
|
hr
|
|
form.caldav-link.js-caldav-link
|
|
strong {{_ 'caldav-sync'}}
|
|
p.quiet {{_ 'caldav-sync-desc'}}
|
|
input.js-caldav-url(type="url" placeholder="https://cloud.example.com/remote.php/dav/calendars/user/wekan/" aria-label="{{_ 'caldav-url'}}" value=caldav.url)
|
|
input.js-caldav-username(type="text" placeholder="{{_ 'username'}}" aria-label="{{_ 'username'}}" value=caldav.username)
|
|
input.js-caldav-password(type="password" autocomplete="off" placeholder="{{#if caldav.hasPassword}}{{_ 'cloud-secret-keep-blank'}}{{else}}{{_ 'caldav-app-password'}}{{/if}}" aria-label="{{_ 'caldav-app-password'}}")
|
|
a.flex.js-caldav-enabled
|
|
i.fa(class="{{#if caldav.enabled}}fa-check{{else}}fa-square-o{{/if}}")
|
|
span {{_ 'caldav-enabled'}}
|
|
button.primary.js-caldav-save(type="submit") {{_ 'save'}}
|
|
button.js-caldav-sync-now(type="button") {{_ 'caldav-sync-now'}}
|
|
if caldavMessage
|
|
p.quiet= caldavMessage
|
|
|
|
template(name="memberDateSettingsPopup")
|
|
+dateFormatEditor(scope="member")
|
|
|
|
template(name="dateFormatEditor")
|
|
.date-format-inherited
|
|
.js-global-date-format-status
|
|
strong {{_ 'date-format-for-everyone'}}
|
|
p
|
|
if globalEnabled
|
|
span {{_ 'r-rule-enabled'}}
|
|
else
|
|
span {{_ 'r-rule-disabled'}}
|
|
| : {{globalFormat}}
|
|
if isMember
|
|
.js-board-date-format-status
|
|
strong {{_ 'board'}}: {{_ 'date-format'}}
|
|
p
|
|
if boardEnabled
|
|
span {{_ 'r-rule-enabled'}}
|
|
else
|
|
span {{_ 'r-rule-disabled'}}
|
|
| : {{boardFormat}}
|
|
unless isMember
|
|
hr
|
|
form.js-date-format-form
|
|
if isMember
|
|
strong.js-member-date-format-heading {{_ 'memberMenuPopup-title'}}: {{_ 'date-format'}}
|
|
label.flex
|
|
input.js-date-format-override(type="checkbox" checked=enabled)
|
|
if isMember
|
|
span.js-member-date-format-enabled
|
|
if enabled
|
|
| {{_ 'r-rule-enabled'}}
|
|
else
|
|
| {{_ 'r-rule-disabled'}}
|
|
else
|
|
| {{_ 'date-format'}}
|
|
select.js-date-format-select(aria-label="{{_ 'date-format'}}")
|
|
each formats
|
|
option(value=value selected=selected) {{label}}
|
|
if isMember
|
|
hr
|
|
label.bold.clear
|
|
i.fa.fa-calendar
|
|
| {{_ 'start-day-of-week'}}
|
|
select#start-day-of-week
|
|
each day in weekDays startDayOfWeek
|
|
if day.isSelected
|
|
option(selected="true", value="#{day.value}") #{day.name}
|
|
else
|
|
option(value="#{day.value}") #{day.name}
|
|
hr
|
|
label.bold.clear
|
|
i.fa.fa-calendar-check-o
|
|
| {{_ 'calendar-system'}}
|
|
//- #4335: display-only toggle. Dates stay stored as Gregorian; this
|
|
//- only changes how dates are RENDERED.
|
|
select#calendar-system
|
|
each system in calendarSystems
|
|
if system.isSelected
|
|
option(selected="true", value="#{system.value}") #{system.name}
|
|
else
|
|
option(value="#{system.value}") #{system.name}
|
|
if error
|
|
p.error {{error}}
|
|
button.primary(type="submit" disabled=saving) {{_ 'save'}}
|