Skip to content
Snippets Groups Projects
Verified Commit ddca143d authored by Gabriel Zachmann's avatar Gabriel Zachmann
Browse files

refactor web partials

parent b61aca26
Branches
Tags
No related merge requests found
Showing
with 150 additions and 143 deletions
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<div id="{{prefix}}cap-body" class="{{#collapse.Capabilities}}collapse{{/collapse.Capabilities}}"> <div id="{{prefix}}cap-body" class="{{#collapse.Capabilities}}collapse{{/collapse.Capabilities}}">
<ul class="list-group bg-my_grey list-group-striped"> <ul class="list-group bg-my_grey list-group-striped">
{{#capabilities}} {{#capabilities}}
{{> capabilities-part}} {{> capabilities/part}}
{{/capabilities}} {{/capabilities}}
</ul> </ul>
</div> </div>
<li class="list-group-item capability"> <li class="list-group-item capability">
{{#ReadWriteCapability}} {{#ReadWriteCapability}}
{{> capability-single-part}} {{> capabilities/single-part}}
{{/ReadWriteCapability}} {{/ReadWriteCapability}}
<ul class="list-group"> <ul class="list-group">
{{#Children}} {{#Children}}
{{> capabilities-part}} {{> capabilities/part}}
{{/Children}} {{/Children}}
</ul> </ul>
</li> </li>
\ No newline at end of file
...@@ -81,13 +81,13 @@ ...@@ -81,13 +81,13 @@
<div class="col-md"> <div class="col-md">
<div class="alert border"> <div class="alert border">
{{> capabilities}} {{> capabilities/capabilities}}
</div> </div>
</div> </div>
<div class="col-md"> <div class="col-md">
<div class="alert border"> <div class="alert border">
{{> restrictions}} {{> restrictions/restrictions}}
</div> </div>
</div> </div>
</div> </div>
......
...@@ -9,4 +9,4 @@ ...@@ -9,4 +9,4 @@
</button> </button>
<p class="card-text" id="list-msg"></p> <p class="card-text" id="list-msg"></p>
{{>notifications-subscribe-modal}} {{>notifications/info-subscribe-modal}}
{{#notifications}}
<div class="modal fade" id="notifications-subscribe-modal" tabindex="-1" role="dialog"
aria-labelledby="notifications-modal-title"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal" role="document">
<div class="modal-content bg-my_grey">
<div class="modal-header">
<h5 class="modal-title" id="notifications-modal-title">Notifications</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<input id="notify-id" type="text" hidden>
<span class="input-group">
<select id="notification-type-selector" class="form-control custom-select form-inline">
<option value="entry" id="notification-type-option-entry" class="notification-type-option">Single
Calendar Invite</option>
<option value="email" id="notification-type-option-email"
class="notification-type-option">Email</option>
<option value="calendar" id="notification-type-option-calendar" class="notification-type-option">Calendar</option>
</select>
<span id="input-group-append">
<span class="input-group-text"><i class="fas fa-paper-plane
notify-entry-content"></i></span>
<span class="input-group-text d-none notify-email-content"><i class="fas fa-envelope"></i></span>
<span class="input-group-text d-none notify-calendar-content"><i
class="fas fa-calendar-alt"></i></span>
</span>
</span>
</div>
<div class="notify-entry-content">
<div class="alert alert-danger border notify-entry-content-element d-none"
id="email-not-verified-hint">
Your email address is not yet verified. Please verify it with the verification link we sent
you or request a new verification code from <a href="/settings">Settings -> Notifications ->
Email</a>.
</div>
<div class="alert alert-danger border notify-entry-content-element d-none" id="email-not-set-hint">
We currently do not have an email address linked to your identity. Please set an email
address under <a href="/settings">Settings -> Notifications -> Email</a>.
</div>
<div class="notify-entry-content-element" id="notify-entry-content-normal">
<p>
You can send a calendar invite to your email address with an event for the token's
expiration.
This will remind in advance, so you can create a new token timely.
</p>
<p>
If you want, you can add a comment:
</p>
<textarea class="form-control" id="notify-entry-comment"></textarea>
<button class="btn btn-primary mt-2" id="sent-entry">
<i class="fas fa-paper-plane"></i>
<i class="fas fa-calendar-alt"></i>
Sent
</button>
</div>
</div>
<div class="notify-email-content d-none">
<div class="form-group">
<div>
<ul class="list-group bg-my_grey list-group-striped">
{{#notification-classes}}
{{> capabilities-part}}
{{/notification-classes}}
</ul>
</div>
<div class="form-group">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input"
aria-describedby="{{prefix}}rotationATHelp"
id="notification-req-include-children" checked>
<label class="custom-control-label" for="notification-req-include-children">Include
children</label>
</div>
<small class="form-text text-muted">If enabled, you will also receive notifications for all
future children (and their children and so on).</small>
</div>
<button class="btn btn-primary mt-2" id="sent-create-mail-notification">
<i class="fas fa-envelope"></i>
Subscribe to email notifications
</button>
</div>
</div>
<div class="notify-calendar-content d-none">
<p>
You can add this mytoken to one of your calendars. If you have subscribed to the calendar, it
will automatically be added, and you will be reminded that the token expires in advance, so you
can create a new token timely.
</p>
<select class="form-control custom-select form-inline" id="notify-calendar-selector"></select>
<p>You can subscribe to this calendar using the following url: <a href="#"
id="notify-calendar-url"></a></p>
<p>
If you want, you can add a comment:
</p>
<textarea class="form-control" id="notify-calendar-comment"></textarea>
<button class="btn btn-primary mt-2" id="sent-calendar-add">
<i class="fas fa-calendar-alt"></i>
Add to calendar
</button>
</div>
</div>
</div>
</div>
</div>
{{/notifications}}
\ No newline at end of file
...@@ -14,5 +14,5 @@ ...@@ -14,5 +14,5 @@
</button> </button>
<p class="card-text" id="notifications-msg"></p> <p class="card-text" id="notifications-msg"></p>
{{>notification-modify}} {{>notifications/modify-container}}
{{/notifications}} {{/notifications}}
<h4>Notifications</h4>
{{#collapse.Notifications}}
<button class="btn btn-info my-expand" type="button" data-toggle="collapse"
data-target="#{{prefix}}not-info-body"
aria-expanded="false" aria-controls="{{prefix}}not-info-body" id="{{prefix}}not-info-expand">Expand
</button>
{{/collapse.Notifications}}
<div id="{{prefix}}not-info-body" class="{{#collapse.Notifications}}collapse{{/collapse.Notifications}}"> <div id="{{prefix}}not-info-body" class="{{#collapse.Notifications}}collapse{{/collapse.Notifications}}">
...@@ -23,7 +15,7 @@ ...@@ -23,7 +15,7 @@
<h5>Calendars</h5> <h5>Calendars</h5>
<div id="{{prefix}}tokeninfo-calendar-listing"> <div id="{{prefix}}tokeninfo-calendar-listing">
<p>This mytoken is included in the following calendars:</p> <p>This mytoken is included in the following calendars:</p>
{{>calendar-listing}} {{>notifications/calendar-listing}}
</div> </div>
<div id="{{prefix}}tokeninfo-calendar-no" class="d-none"> <div id="{{prefix}}tokeninfo-calendar-no" class="d-none">
<p>This mytoken is not included in any calendars</p> <p>This mytoken is not included in any calendars</p>
......
{{#notifications}}
<div class="modal fade" id="notifications-subscribe-modal" tabindex="-1" role="dialog"
aria-labelledby="notifications-modal-title"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal" role="document">
<div class="modal-content bg-my_grey">
<div class="modal-header">
<h5 class="modal-title" id="notifications-modal-title">Notifications</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
{{>notifications/info-content}}
<div>
{{>notifications/subscribe-content}}
</div>
</div>
</div>
</div>
</div>
{{/notifications}}
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<h5>Subscribed Notification Classes</h5> <h5>Subscribed Notification Classes</h5>
<ul class="list-group bg-my_grey list-group-striped"> <ul class="list-group bg-my_grey list-group-striped">
{{#notification-classes}} {{#notification-classes}}
{{> capabilities-part}} {{> capabilities/part}}
{{/notification-classes}} {{/notification-classes}}
</ul> </ul>
<button role="button" class="btn btn-primary" id="btn-save-notification-classes"><i class="fas fa-save"></i> <button role="button" class="btn btn-primary" id="btn-save-notification-classes"><i class="fas fa-save"></i>
......
<div class="form-group">
<input id="notify-id" type="text" hidden>
<span class="input-group">
<select id="notification-type-selector" class="form-control custom-select form-inline">
<option value="entry" id="notification-type-option-entry" class="notification-type-option">Single
Calendar Invite</option>
<option value="email" id="notification-type-option-email"
class="notification-type-option">Email</option>
<option value="calendar" id="notification-type-option-calendar" class="notification-type-option">Calendar</option>
</select>
<span id="input-group-append">
<span class="input-group-text"><i class="fas fa-paper-plane
notify-entry-content"></i></span>
<span class="input-group-text d-none notify-email-content"><i class="fas fa-envelope"></i></span>
<span class="input-group-text d-none notify-calendar-content"><i
class="fas fa-calendar-alt"></i></span>
</span>
</span>
</div>
<div class="notify-entry-content">
<div class="alert alert-danger border notify-entry-content-element d-none"
id="email-not-verified-hint">
Your email address is not yet verified. Please verify it with the verification link we sent
you or request a new verification code from <a href="/settings">Settings -> Notifications ->
Email</a>.
</div>
<div class="alert alert-danger border notify-entry-content-element d-none" id="email-not-set-hint">
We currently do not have an email address linked to your identity. Please set an email
address under <a href="/settings">Settings -> Notifications -> Email</a>.
</div>
<div class="notify-entry-content-element" id="notify-entry-content-normal">
<p>
You can send a calendar invite to your email address with an event for the token's
expiration.
This will remind in advance, so you can create a new token timely.
</p>
<p>
If you want, you can add a comment:
</p>
<textarea class="form-control" id="notify-entry-comment"></textarea>
<button class="btn btn-primary mt-2" id="sent-entry">
<i class="fas fa-paper-plane"></i>
<i class="fas fa-calendar-alt"></i>
Sent
</button>
</div>
</div>
<div class="notify-email-content d-none">
<div class="form-group">
<div>
<ul class="list-group bg-my_grey list-group-striped">
{{#notification-classes}}
{{> capabilities/part}}
{{/notification-classes}}
</ul>
</div>
<div class="form-group">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input"
aria-describedby="{{prefix}}rotationATHelp"
id="notification-req-include-children" checked>
<label class="custom-control-label" for="notification-req-include-children">Include
children</label>
</div>
<small class="form-text text-muted">If enabled, you will also receive notifications for all
future children (and their children and so on).</small>
</div>
<button class="btn btn-primary mt-2" id="sent-create-mail-notification">
<i class="fas fa-envelope"></i>
Subscribe to email notifications
</button>
</div>
</div>
<div class="notify-calendar-content d-none">
<p>
You can add this mytoken to one of your calendars. If you have subscribed to the calendar, it
will automatically be added, and you will be reminded that the token expires in advance, so you
can create a new token timely.
</p>
<select class="form-control custom-select form-inline" id="notify-calendar-selector"></select>
<p>You can subscribe to this calendar using the following url: <a href="#"
id="notify-calendar-url"></a></p>
<p>
You can add a comment to the event entry:
</p>
<textarea class="form-control" id="notify-calendar-comment"></textarea>
<button class="btn btn-primary mt-2" id="sent-calendar-add">
<i class="fas fa-calendar-alt"></i>
Add to calendar
</button>
</div>
<h4>Notifications</h4>
{{#collapse.Notifications}}
<button class="btn btn-info my-expand" type="button" data-toggle="collapse"
data-target="#{{prefix}}not-info-body"
aria-expanded="false" aria-controls="{{prefix}}not-info-body" id="{{prefix}}not-info-expand">Expand
</button>
{{/collapse.Notifications}}
{{>notifications/info-content}}
\ No newline at end of file
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<div id="{{prefix}}restr-body" class="{{#collapse.Restrictions}}collapse{{/collapse.Restrictions}}"> <div id="{{prefix}}restr-body" class="{{#collapse.Restrictions}}collapse{{/collapse.Restrictions}}">
{{>restrictions-gui-editor}} {{>restrictions/gui-editor}}
<div id="{{prefix}}restr-json-editor" class="justify-content-center d-none"> <div id="{{prefix}}restr-json-editor" class="justify-content-center d-none">
<small class="mt-4">{{#read-only}} <small class="mt-4">{{#read-only}}
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<tr class="collapse no-top-border" id="settings-notifications-email-body"> <tr class="collapse no-top-border" id="settings-notifications-email-body">
<td class="no-top-border"></td> <td class="no-top-border"></td>
<td class="no-top-border" colspan="3"> <td class="no-top-border" colspan="3">
<div>{{> settings-notifications-email }}</div> <div>{{> settings/notifications-email }}</div>
</td> </td>
</tr> </tr>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<tr class="collapse no-top-border" id="settings-notifications-calendar-body"> <tr class="collapse no-top-border" id="settings-notifications-calendar-body">
<td class="no-top-border"></td> <td class="no-top-border"></td>
<td class="no-top-border" colspan="3"> <td class="no-top-border" colspan="3">
<div>{{> calendar-listing }}</div> <div>{{> notifications/calendar-listing }}</div>
</td> </td>
</tr> </tr>
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<div class="row"> <div class="row">
<div class="col-md"> <div class="col-md">
<div class="alert border"> <div class="alert border">
{{>capabilities}} {{>capabilities/capabilities}}
</div> </div>
<div class="alert border"> <div class="alert border">
...@@ -129,13 +129,13 @@ ...@@ -129,13 +129,13 @@
</div> </div>
<div class="col-md"> <div class="col-md">
<div class="alert border"> <div class="alert border">
{{>restrictions}} {{>restrictions/restrictions}}
</div> </div>
<div class="alert border"> <div class="alert border">
{{>rotation}} {{>rotation}}
</div> </div>
<div id="tokeninfo-notifications-display" class="alert border d-none"> <div id="tokeninfo-notifications-display" class="alert border d-none">
{{>notifications-info}} {{>notifications/tokeninfo}}
</div> </div>
</div> </div>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div class="row"> <div class="row">
<div class="col-md"> <div class="col-md">
<div class="alert border"> <div class="alert border">
{{> capabilities}} {{> capabilities/capabilities}}
</div> </div>
<div class="form-group alert border"> <div class="form-group alert border">
<div class="input-group"> <div class="input-group">
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</div> </div>
<div class="col-md"> <div class="col-md">
<div class="alert border"> <div class="alert border">
{{> restrictions}} {{> restrictions/restrictions}}
</div> </div>
<div class="alert border"> <div class="alert border">
{{> rotation}} {{> rotation}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment