forked from nextcloud/calendar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpart.calendarlist.item.php
216 lines (214 loc) · 7.76 KB
/
part.calendarlist.item.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<?php
/**
* Calendar App
*
* @author Raghu Nayyar
* @author Georg Ehrke
* @copyright 2016 Raghu Nayyar <hey@raghunayyar.com>
* @copyright 2016 Georg Ehrke <oc.list@georgehrke.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
?>
<span class="calendarCheckbox app-navigation-entry-bullet"
ng-click="triggerEnable(item)"
ng-if="item.displayColorIndicator() && !item.calendar.hasWarnings()"
ng-style="{ 'background-color' : item.calendar.enabled == true ? item.calendar.color : 'transparent' }">
</span>
<a class="action permanent"
ng-class="{'icon-error': item.calendar.hasWarnings()}"
href="#"
ng-click="triggerEnable(item)"
title="{{ item.calendar.hasWarnings() ? warningLabel : item.calendar.displayname }}">
{{ item.calendar.displayname }}
</span>
</a>
<div class="app-navigation-entry-utils"
ng-show="item.displayActions()">
<ul ng-class="{'withitems': item.calendar.isShared() || item.calendar.isPublished() }">
<li class="app-navigation-entry-utils-menu-button calendarlist-icon share permanent"
ng-click="item.toggleEditingShares()"
ng-if="item.showSharingIcon()"
role="button">
<button ng-class="{
'icon-shared shared-style': item.calendar.isShared() && !item.calendar.isPublished(),
'icon-public': item.calendar.isPublished(),
'icon-shared': !item.calendar.isShared() && !item.calendar.isPublished()}"
title="{{item.calendar.isShared() && item.calendar.isShareable() || item.calendar.isPublished() ? sharedLabel : shareLabel}}">
</button>
</li>
<li class="app-navigation-entry-utils-menu-button"
href="#"
title="<?php p($l->t('More')); ?>"
role="button"><button on-toggle-show="#more-actions-{{ $id }}"></button></li>
</ul>
</div>
<div id="more-actions-{{ $id }}"
class="app-navigation-entry-menu hidden">
<ul>
<li ng-show="item.calendar.arePropertiesWritable()">
<button ng-click="item.openEditor()">
<span class="icon-rename svg"></span>
<span><?php p($l->t('Edit')); ?></span>
</button>
</li>
<li ng-show="item.calendar.eventsAccessibleViaCalDAV()">
<button ng-click="item.showCalDAVUrl()">
<span class="icon-public svg"></span>
<span><?php p($l->t('Link')); ?></span>
</button>
</li>
<li ng-show="item.isWebCal()">
<button ng-click="item.showWebCalUrl()">
<span class="icon-link svg"></span>
<span><?php p($l->t('iCal link')); ?></span>
</button>
</li>
<li>
<button ng-click="download(item)">
<span class="icon-download svg"></span>
<span><?php p($l->t('Download')); ?></span>
</button>
</li>
<li confirmation="remove(item)"></li>
</ul>
</div>
<div class="app-navigation-entry-edit"
ng-if="item.isEditing()">
<form ng-submit="performUpdate(item)">
<input type="text" ng-model="item.displayname">
<input type="button" value="" class="btn close-button icon-close" ng-click="item.cancelEditor()">
<input type="submit" value="" class="icon-checkmark accept-button">
</form>
<colorpicker class="colorpicker"
selected="item.color">
</colorpicker>
</div>
<div class="app-navigation-entry-edit"
ng-if="item.displayCalDAVUrl()">
<form ng-submit="performUpdate(item)">
<input ng-value="item.calendar.caldav"
readonly
type="text"/>
<input type="button" value="" class="n icon-close button-next-to-input" ng-click="item.hideCalDAVUrl()">
</form>
</div>
<div class="app-navigation-entry-edit"
ng-if="item.displayWebCalUrl()">
<form ng-submit="performUpdate(item)">
<input ng-value="item.calendar.storedUrl"
readonly
type="text"/>
<input type="button" value="" class="n icon-close button-next-to-input" ng-click="item.hideWebCalUrl()">
</form>
</div>
<div class="calendarShares"
ng-show="item.isEditingShares()">
<i class="glyphicon glyphicon-refresh refresh-shares"
ng-show="loadingSharees">
</i>
<input class="shareeInput"
ng-if="isSharingAPI"
ng-model="item.selectedSharee"
placeholder="<?php p($l->t('Share with users or groups')); ?>"
type="text"
typeahead-on-select="onSelectSharee($item, $model, $label, item)"
typeahead-loading="loadingSharees"
typeahead-template-url="customShareMatchTemplate.html"
uib-typeahead="sharee.display for sharee in findSharee($viewValue, item.calendar)">
<ul class="calendar-share-list">
<li class="calendar-share-item"
ng-repeat="userShare in item.calendar.shares.users"
title="{{ userShare.displayname }}">
{{ userShare.displayname }} -
<span>
<input id="checkbox_sharedWithUser_{{ $parent.$index }}_{{ $id }}"
name="editable"
class="checkbox"
ng-change="updateExistingUserShare(item.calendar, userShare.id, userShare.displayname, userShare.writable)"
ng-model="userShare.writable"
type="checkbox"
value="edit">
<label for="checkbox_sharedWithUser_{{ $parent.$index }}_{{ $id }}">
<?php p($l->t('can edit')); ?>
</label>
</span>
<span class="utils hide">
<span class="action">
<span class="icon-delete"
href="#"
id="calendarlist-icon delete"
ng-click="unshareFromUser(item.calendar, userShare.id)"
title="<?php p($l->t('Delete')); ?>">
</span>
</span>
</span>
</li>
<li class="calendar-share-item"
ng-repeat="groupShare in item.calendar.shares.groups"
title="{{ groupShare.displayname }} (<?php p($l->t('group')); ?>)">
{{ groupShare.displayname }} (<?php p($l->t('group')); ?>) -
<span>
<input id="checkbox_sharedWithGroup_{{ $parent.$index }}_{{ $id }}"
name="editable"
class="checkbox"
ng-change="updateExistingGroupShare(item.calendar, groupShare.id, groupShare.displayname, groupShare.writable)"
ng-model="groupShare.writable"
type="checkbox"
value="edit">
<label for="checkbox_sharedWithGroup_{{ $parent.$index }}_{{ $id }}">
<?php p($l->t('can edit')); ?>
</label>
</span>
<span class="utils hide">
<span class="action">
<span class="icon-delete"
href="#"
id="calendarlist-icon delete"
ng-click="unshareFromGroup(item.calendar, groupShare.id)"
title="<?php p($l->t('Delete')); ?>">
</span>
</span>
</span>
</li>
</ul>
<div class="publishing" ng-if="item.calendar.isPublishable() && canSharePublicLink">
<input type="checkbox" name="publish"
class="checkbox"
id="checkbox_publish_calendar_{{ $index }}"
ng-model="item.calendar.published" value="edit"
ng-change="togglePublish(item)">
<label for="checkbox_publish_calendar_{{ $index }}">
<?php p($l->t('Share link')); ?>
</label>
<div ng-show="item.calendar.published">
<span><?php p($l->t('Public access')); ?></span>
<span class="icon-public pull-right svg publication-tools"
target="_blank"
ng-href="item.publicSharingURL"
ng-click="goPublic(item)"></span>
<span class="icon-mail pull-right svg publication-tools"
target="_blank"
ng-click="item.toggleSendingMail()"></span>
</div>
<form ng-submit="sendMail(item)" ng-show="item.isSendingMail() && item.calendar.published">
<input class="mailerInput"
ng-model="item.email"
placeholder="<?php p($l->t('Email link to person')); ?>"
type="text">
<button type="submit"><?php p($l->t('Send')); ?></button>
</form>
</div>
</div>