forked from nextcloud/calendar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.php
executable file
·162 lines (142 loc) · 4.93 KB
/
main.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
<?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/>.
*
*/
/* OpenGraph */
if($_['isPublic']) {
OCP\Util::addHeader('meta', ['property' => "og:title", 'content' => $theme->getName() . ' - ' . $theme->getSlogan()]);
OCP\Util::addHeader('meta', ['property' => "og:site_name", 'content' => $theme->getName()]);
OCP\Util::addHeader('meta', ['property' => "og:url", 'content' => $_['shareURL']]);
OCP\Util::addHeader('meta', ['property' => "og:type", 'content' => "object"]);
OCP\Util::addHeader('meta', ['property' => "og:image", 'content' => $_['previewImage']]);
}
$styles = [
'public/vendor.min',
'public/app.min'
];
foreach ($styles as $style) {
style('calendar', $style);
}
$scripts = [];
if ($_['isIE']) {
$scripts[] = 'public/vendor.ie.min';
} else {
$scripts[] = 'public/vendor.min';
}
$scripts[] = 'public/app.min';
foreach ($scripts as $script) {
script('calendar', $script);
}
?>
<?php if($_['isPublic'] && !$_['isEmbedded']): ?>
<style>
#body-public.layout-base #content {
padding-top: 50px;
}
@media only screen and (max-width: 768px) {
#app-navigation, #app-content {
top: 45px !important;
}
}
</style>
<?php endif; ?>
<?php if($_['isEmbedded']): ?>
<style>
#body-public.layout-base #app-navigation {
top: 0;
height: 100%;
}
@media only screen and (max-width: 768px) {
#app-navigation-toggle {
top: 0 !important;
}
}
</style>
<?php endif; ?>
<div class="app" ng-app="Calendar" ng-controller="CalController">
<!-- The Left Calendar Navigation -->
<div id="app-navigation">
<div ng-controller="DatePickerController" id="datepickercontainer" ng-class="{active: visibility}">
<?php print_unescaped($this->inc('part.datepicker')); ?>
<?php print_unescaped($this->inc('part.buttonarea')); ?>
<div class="clear-both"></div>
</div>
<?php if(!$_['isPublic']): ?>
<ul ng-controller="CalendarListController" id="calendarlistcontainer" ng-cloak>
<?php print_unescaped($this->inc('part.createcalendar')); ?>
<?php print_unescaped($this->inc('part.calendarlist')); ?>
<li id="spacer"></li><!-- Creates space between Subscriptionlist and Calendarlist.-->
<?php print_unescaped($this->inc('part.createsubscription')); ?>
<?php print_unescaped($this->inc('part.subscriptionlist')); ?>
</ul>
<div id="app-settings" ng-controller="SettingsController">
<?php print_unescaped($this->inc('part.settings')); ?>
</div>
<?php else: ?>
<div ng-controller="CalendarListController" id="publicinformationscontainer">
<?php print_unescaped($this->inc('part.publicinformations')); ?>
</div>
<?php endif; ?>
</div>
<!-- The Calendar on the right -->
<div id="app-content">
<?php print_unescaped($this->inc('part.fullcalendar')); ?>
</div>
<div id="popover-container"></div>
<?php if(!$_['isPublic']): ?>
<div id="importpopover-container"></div>
<?php endif; ?>
<div id="emptycontent-container">
<?php print_unescaped($this->inc('part.emptycontent')); ?>
</div>
<script type="text/ng-template" id="eventspopovereditor.html">
<?php print_unescaped($this->inc('editor.popover')); ?>
</script>
<script type="text/ng-template" id="eventssidebareditor.html">
<?php print_unescaped($this->inc('editor.sidebar')); ?>
</script>
<script type="text/ng-template" id="confirmation.html">
<button class="confirmation-default">
<span class="icon-delete svg"></span>
<span><?php p($l->t('Delete')); ?></span>
</button>
<span class="confirmation-abort icon-close svg" title="<?php p($l->t('Cancel')); ?>">
</span>
<span class="confirmation-confirm icon-delete-white svg no-permission">
<span class="countdown">3</span>
</span>
</script>
<script type="text/ng-template" id="customShareMatchTemplate.html">
<a tabindex="-1"
ng-attr-title="{{ match.label }}">
<div class="share-autocomplete-item" title="{{ match.label }}">
<div class="avatardiv" data-user="{{ match.model.identifier }}" avatar></div>
<div class="autocomplete-item-text" ng-bind-html="match.label | uibTypeaheadHighlight:query"></div>
</div>
</a>
</script>
<?php if(!$_['isPublic']): ?>
<script type="text/ng-template" id="import.html">
<?php print_unescaped($this->inc('part.import.dialog')); ?>
</script>
<?php endif; ?>
</div>