This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
1 | <?php |
||
2 | /** |
||
3 | * CMS Pico - Create websites using Pico CMS for Nextcloud. |
||
4 | * |
||
5 | * @copyright Copyright (c) 2017, Maxence Lange (<[email protected]>) |
||
6 | * @copyright Copyright (c) 2019, Daniel Rudolf (<[email protected]>) |
||
7 | * |
||
8 | * @license GNU AGPL version 3 or any later version |
||
9 | * |
||
10 | * This program is free software: you can redistribute it and/or modify |
||
11 | * it under the terms of the GNU Affero General Public License as |
||
12 | * published by the Free Software Foundation, either version 3 of the |
||
13 | * License, or (at your option) any later version. |
||
14 | * |
||
15 | * This program is distributed in the hope that it will be useful, |
||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
18 | * GNU Affero General Public License for more details. |
||
19 | * |
||
20 | * You should have received a copy of the GNU Affero General Public License |
||
21 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
22 | */ |
||
23 | |||
24 | use OCA\CMSPico\AppInfo\Application; |
||
25 | |||
26 | /** @var $_ array */ |
||
27 | /** @var $l \OCP\IL10N */ |
||
28 | script(Application::APP_NAME, [ 'pico', 'admin' ]); |
||
0 ignored issues
–
show
|
|||
29 | style(Application::APP_NAME, [ 'fontello', 'pico' ]); |
||
30 | |||
31 | ?> |
||
32 | |||
33 | <?php if (!$_['parsedownCompatible']) { ?> |
||
34 | <article class="section"> |
||
35 | <div class="message large error"> |
||
36 | <div class="icon icon-attention-circled"></div> |
||
37 | <div> |
||
38 | <p><strong><?php p($l->t( |
||
39 | 'Your Nextcloud installation is incompatible with Pico CMS for Nextcloud!' |
||
40 | )); ?></strong></p> |
||
41 | <p><?php p($l->t( |
||
42 | 'Some of your Nextcloud apps have known incompatibilities with Pico CMS for Nextcloud. This is ' |
||
43 | . 'no-one\'s fault, neither are Nextcloud nor the conflicting apps to blame, this is just ' |
||
44 | . 'some technical limitation of Nextcloud\'s app infrastructure we cannot solve in the ' |
||
45 | . 'short term. We\'re working on a solution! In the meantime you must remove the ' |
||
46 | . 'conflicting apps. Known conflicting apps are "Issue Template" and "Terms of service".' |
||
47 | )); ?></p> |
||
48 | <p><?php print_unescaped($l->t( |
||
49 | 'If you see the error <code>"Call to undefined method ParsedownExtra::textElements()"</code> ' |
||
50 | . 'in Nextcloud\'s logs even though you\'ve removed all conflicting apps, please don\'t ' |
||
51 | . 'hesitate to <a href="https://github.com/nextcloud/cms_pico/issues/new">open a new Issue ' |
||
52 | . 'on GitHub</a> with a copy of the error including its stack trace and a complete list ' |
||
53 | . 'of all apps installed.' |
||
54 | )); ?></p> |
||
55 | </div> |
||
56 | </div> |
||
57 | </article> |
||
58 | <?php } ?> |
||
59 | |||
60 | <article class="section"> |
||
61 | <h2><?php p($l->t('Pico CMS for Nextcloud')); ?></h2> |
||
62 | <p class="settings-hint"><?php p($l->t( |
||
63 | 'Change Pico CMS for Nextcloud\'s behavior and manage optional features.' |
||
64 | )); ?></p> |
||
65 | |||
66 | <section class="lane"> |
||
67 | <header> |
||
68 | <h3 class="select2-align"><?php p($l->t('Limit to groups')); ?></h3> |
||
69 | </header> |
||
70 | <section> |
||
71 | <form id="picocms-limit_groups" class="picocms-limit_groups-form" |
||
72 | data-route="/apps/cms_pico/admin/limit_groups"> |
||
73 | <div> |
||
74 | <input type="hidden" class="input select2-placeholder" name="data[limit_groups]" |
||
75 | value="<?php p(implode('|', $_['limitGroups'])); ?>" /> |
||
76 | <div class="message input select2-loading"> |
||
77 | <div class="icon icon-loading"></div> |
||
78 | <div> |
||
79 | <p><?php p($l->t('Loading groups…')); ?></p> |
||
80 | </div> |
||
81 | </div> |
||
82 | </div> |
||
83 | <p class="note"><?php p($l->t( |
||
84 | 'If you wish not to enable all of your users to create personal websites, you can limit Pico CMS ' |
||
85 | . 'for Nextcloud to certain groups. Select the groups you want to limit access to. If you ' |
||
86 | . 'leave this field empty, usage isn\'t limited. Revoking access for certain groups won\'t ' |
||
87 | . 'delete any of a user\'s websites, however, they get inaccessible.' |
||
88 | )); ?></p> |
||
89 | </form> |
||
90 | </section> |
||
91 | </section> |
||
92 | </article> |
||
93 | |||
94 | <article class="section"> |
||
95 | <h2><?php p($l->t('Custom themes')); ?></h2> |
||
96 | <p class="settings-hint"><?php p($l->t( |
||
97 | 'Add custom themes for greater individuality and style.' |
||
98 | )); ?></p> |
||
99 | |||
100 | <div class="message large"> |
||
101 | <div class="icon icon-info-circled"></div> |
||
102 | <div> |
||
103 | <p><?php p($l->t( |
||
104 | 'Pico CMS for Nextcloud allows you to add custom themes for some greater individuality and style. ' |
||
105 | . 'However, for security reasons, users cannot add custom themes on their own. Before you can ' |
||
106 | . 'add a new custom theme using the "Add custom theme" button below, you\'ll have to upload ' |
||
107 | . 'all of its files to the data folder of your Nextcloud instance. After uploading the theme ' |
||
108 | . 'it will show up in the form below to actually allow users to use the custom theme. If you ' |
||
109 | . 'want to modify one of your previously added custom themes, simply edit the corresponding ' |
||
110 | . 'files in Nextcloud\'s data folder. For the changes to take effect you must hit the "Reload ' |
||
111 | . 'custom theme" button next to the edited theme in the form below.' |
||
112 | )); ?></p> |
||
113 | <p><?php p($l->t( |
||
114 | 'Before adding a new custom theme, upload all of the theme\'s files to a new folder in the following ' |
||
115 | . 'directory. If you want to edit one of your custom themes, refer to this directory likewise.' |
||
116 | )); ?> |
||
117 | <p class="followup indent"><code><?php p($_['themesPath']); ?></code></p> |
||
118 | </div> |
||
119 | </div> |
||
120 | |||
121 | <section id="picocms-themes" class="picocms-admin-list" |
||
122 | data-route="/apps/cms_pico/admin/themes" |
||
123 | data-template="#picocms-themes-template" |
||
124 | data-system-template="#picocms-themes-template-system-item" |
||
125 | data-custom-template="#picocms-themes-template-custom-item" |
||
126 | data-new-template="#picocms-themes-template-new-item" |
||
127 | data-copy-template="#picocms-themes-template-copy-item" |
||
128 | data-loading-template="#picocms-themes-template-loading" |
||
129 | data-error-template="#picocms-themes-template-error"> |
||
130 | <div class="app-content-loading message large"> |
||
131 | <div class="icon loading"></div> |
||
132 | <div> |
||
133 | <p><?php p($l->t('Loading themes…')); ?></p> |
||
134 | </div> |
||
135 | </div> |
||
136 | </section> |
||
137 | |||
138 | <script id="picocms-themes-template" type="text/template" |
||
139 | data-replaces="#picocms-themes"> |
||
140 | <div class="app-content-list"> |
||
141 | <div class="app-content-list-item app-content-list-add"> |
||
142 | <div class="app-content-list-item-line-one"> |
||
143 | <select class="action-new-item"></select> |
||
144 | <button class="action-new has-tooltip" title="<?php p($l->t('Add custom theme')); ?>"> |
||
145 | <span class="icon icon-plus"></span> |
||
146 | <span class="hidden-visually"><?php p($l->t('Add custom theme')); ?></span> |
||
147 | </button> |
||
148 | </div> |
||
149 | <div class="action-reload icon-arrows-cw has-tooltip" data-placement="left" |
||
150 | title="<?php p($l->t('Reload themes list')); ?>"> |
||
151 | <span class="hidden-visually"><?php p($l->t('Reload themes list')); ?></span> |
||
152 | </div> |
||
153 | </div> |
||
154 | </div> |
||
155 | </script> |
||
156 | |||
157 | <script id="picocms-themes-template-system-item" type="text/template" |
||
158 | data-append-to="#picocms-themes > .app-content-list"> |
||
159 | <div class="app-content-list-item"> |
||
160 | <div class="app-content-list-item-line-one"> |
||
161 | <p>{name}</p> |
||
162 | <div class="info-compat message"> |
||
163 | <div class="icon-ok has-tooltip" title="<?php p($l->t('Compatible theme.')); ?>"></div> |
||
164 | <div> |
||
165 | <p class="note"><?php p($l->t('System theme')); ?></p> |
||
166 | </div> |
||
167 | </div> |
||
168 | </div> |
||
169 | <div class="action-copy icon-docs has-tooltip" data-placement="left" |
||
170 | title="<?php p($l->t('Copy system theme')); ?>"> |
||
171 | <span class="hidden-visually"><?php p($l->t('Copy system theme')); ?></span> |
||
172 | </div> |
||
173 | </div> |
||
174 | </script> |
||
175 | |||
176 | <script id="picocms-themes-template-custom-item" type="text/template" |
||
177 | data-append-to="#picocms-themes > .app-content-list"> |
||
178 | <div class="app-content-list-item"> |
||
179 | <div class="app-content-list-item-line-one"> |
||
180 | <p>{name}</p> |
||
181 | <div class="info-compat message"> |
||
182 | <div class="icon-ok has-tooltip" title="<?php p($l->t('Compatible theme.')); ?>"></div> |
||
183 | <div> |
||
184 | <p class="note"><?php p($l->t('Custom theme')); ?></p> |
||
185 | </div> |
||
186 | </div> |
||
187 | </div> |
||
188 | <div class="action-sync icon-arrows-cw has-tooltip" data-placement="left" |
||
189 | title="<?php p($l->t('Reload custom theme')); ?>"> |
||
190 | <span class="hidden-visually"><?php p($l->t('Reload custom theme')); ?></span> |
||
191 | </div> |
||
192 | <div class="action-copy icon-docs has-tooltip" data-placement="left" |
||
193 | title="<?php p($l->t('Copy custom theme')); ?>"> |
||
194 | <span class="hidden-visually"><?php p($l->t('Copy custom theme')); ?></span> |
||
195 | </div> |
||
196 | <div class="action-delete icon-trash has-tooltip" data-placement="left" |
||
197 | title="<?php p($l->t('Delete custom theme')); ?>"> |
||
198 | <span class="hidden-visually"><?php p($l->t('Delete custom theme')); ?></span> |
||
199 | </div> |
||
200 | </div> |
||
201 | </script> |
||
202 | |||
203 | <script id="picocms-themes-template-new-item" type="text/template" |
||
204 | data-append-to="#picocms-themes > .app-content-list > .app-content-list-add select"> |
||
205 | <option name="{name}">{name}</option> |
||
206 | </script> |
||
207 | |||
208 | <script id="picocms-themes-template-copy-item" type="text/template"> |
||
209 | <form id="{id}" title="{title}" class="form"> |
||
210 | <fieldset> |
||
211 | <div class="label"> |
||
212 | <label for="picocms-themes-copy-base"><?php p($l->t('Base theme')); ?></label> |
||
213 | </div> |
||
214 | <div class="content"> |
||
215 | <span id="picocms-themes-copy-base" class="input">{source}</span> |
||
216 | </div> |
||
217 | </fieldset> |
||
218 | <fieldset> |
||
219 | <div class="label"> |
||
220 | <label for="picocms-themes-copy-name"><?php p($l->t('Theme name')); ?></label> |
||
221 | </div> |
||
222 | <div class="content"> |
||
223 | <input id="picocms-themes-copy-name" class="input input-name" type="text" name="name" |
||
224 | value="" placeholder="{source}" /> |
||
225 | </div> |
||
226 | </fieldset> |
||
227 | </form> |
||
228 | </script> |
||
229 | |||
230 | <script id="picocms-themes-template-loading" type="text/template" |
||
231 | data-replaces="#picocms-themes"> |
||
232 | <div class="app-content-loading message large"> |
||
233 | <div class="icon loading"></div> |
||
234 | <div> |
||
235 | <p><?php p($l->t('Loading themes…')); ?></p> |
||
236 | </div> |
||
237 | </div> |
||
238 | </script> |
||
239 | |||
240 | <script id="picocms-themes-template-error" type="text/template" |
||
241 | data-replaces="#picocms-themes"> |
||
242 | <div class="app-content-error message large"> |
||
243 | <div class="icon icon-attention-circled"></div> |
||
244 | <div> |
||
245 | <p><?php p($l->t( |
||
246 | 'An unexpected error occurred while performing this action. Please check Nextcloud\'s logs.' |
||
247 | )); ?></p> |
||
248 | <p class="error-details" style="display: none"> |
||
249 | <?php p($l->t('Error: {error}')); ?> |
||
250 | </p> |
||
251 | <p class="exception-details" style="display: none"> |
||
252 | <?php p($l->t('Encountered unexpected {exception}: {exceptionMessage}')); ?> |
||
253 | </p> |
||
254 | </div> |
||
255 | <div class="action action-reload icon-arrows-cw has-tooltip" data-placement="left" |
||
256 | title="<?php p($l->t('Reload themes list')); ?>"> |
||
257 | <span class="hidden-visually"><?php p($l->t('Reload themes list')); ?></span> |
||
258 | </div> |
||
259 | </div> |
||
260 | </script> |
||
261 | </article> |
||
262 | |||
263 | <article class="section"> |
||
264 | <h2><?php p($l->t('Custom plugins')); ?></h2> |
||
265 | <p class="settings-hint"><?php p($l->t( |
||
266 | 'Add custom plugins to reach for Pico\'s full potential.' |
||
267 | )); ?></p> |
||
268 | |||
269 | <div class="message large"> |
||
270 | <div class="icon icon-info"></div> |
||
271 | <div> |
||
272 | <p><?php p($l->t( |
||
273 | 'Pico CMS for Nextcloud allows you to add custom plugins to really utilize all of Pico\'s power. ' |
||
274 | . 'Plugins work on a global basis, i.e. adding a custom plugin will enable it for all of your ' |
||
275 | . 'users\' websites. Before adding a new custom plugin using the "Add custom plugin" button ' |
||
276 | . 'below, you must upload all of the plugin\'s files to the data folder of your Nextcloud ' |
||
277 | . 'instance. After uploading the plugin it will show up in the form below to actually enable ' |
||
278 | . 'it. If you want to update one of your previously added custom plugins, simply replace the ' |
||
279 | . 'plugin\'s files in Nextcloud\'s data folder. For the changes to take effect you must hit ' |
||
280 | . 'the "Reload custom plugin" button next to the updated plugin in the form below.' |
||
281 | )); ?></p> |
||
282 | <p><?php p($l->t( |
||
283 | 'Before adding a new custom plugin, upload all of the plugin\'s files to a new folder in the following ' |
||
284 | . 'directory. If you want to update one of your custom plugins, refer to this directory ' |
||
285 | . 'likewise. Please note that the name of a plugin\'s folder must strictly match the name of ' |
||
286 | . 'the plugin, otherwise Pico will refuse to enable the plugin.' |
||
287 | )); ?> |
||
288 | <p class="followup indent"><code><?php p($_['pluginsPath']); ?></code></p> |
||
289 | </div> |
||
290 | </div> |
||
291 | |||
292 | <section id="picocms-plugins" class="picocms-admin-list" |
||
293 | data-route="/apps/cms_pico/admin/plugins" |
||
294 | data-template="#picocms-plugins-template" |
||
295 | data-static-template="#picocms-plugins-template-static-items" |
||
296 | data-system-template="#picocms-plugins-template-system-item" |
||
297 | data-custom-template="#picocms-plugins-template-custom-item" |
||
298 | data-new-template="#picocms-plugins-template-new-item" |
||
299 | data-copy-template="#picocms-plugins-template-copy-item" |
||
300 | data-loading-template="#picocms-plugins-template-loading" |
||
301 | data-error-template="#picocms-plugins-template-error"> |
||
302 | <div class="app-content-loading message large"> |
||
303 | <div class="icon loading"></div> |
||
304 | <div> |
||
305 | <p><?php p($l->t('Loading plugins…')); ?></p> |
||
306 | </div> |
||
307 | </div> |
||
308 | </section> |
||
309 | |||
310 | <script id="picocms-plugins-template" type="text/template" |
||
311 | data-replaces="#picocms-plugins"> |
||
312 | <div class="app-content-list"> |
||
313 | <div class="app-content-list-item app-content-list-add"> |
||
314 | <div class="app-content-list-item-line-one"> |
||
315 | <select class="action-new-item"></select> |
||
316 | <button class="action-new has-tooltip" title="<?php p($l->t('Add custom plugin')); ?>"> |
||
317 | <span class="icon icon-plus"></span> |
||
318 | <span class="hidden-visually"><?php p($l->t('Add custom plugin')); ?></span> |
||
319 | </button> |
||
320 | </div> |
||
321 | <div class="action-reload icon-arrows-cw has-tooltip" data-placement="left" |
||
322 | title="<?php p($l->t('Reload plugins list')); ?>"> |
||
323 | <span class="hidden-visually"><?php p($l->t('Reload plugins list')); ?></span> |
||
324 | </div> |
||
325 | </div> |
||
326 | </div> |
||
327 | </script> |
||
328 | |||
329 | <script id="picocms-plugins-template-static-items" type="text/template" |
||
330 | data-append-to="#picocms-plugins > .app-content-list" |
||
331 | data-filter=".app-content-list-item-static"> |
||
332 | <div class="app-content-list-item app-content-list-item-static" |
||
333 | data-item-name="DummyPlugin"> |
||
334 | <div class="app-content-list-item-line-one"> |
||
335 | <p>{name}</p> |
||
336 | <div class="info-compat message"> |
||
337 | <div class="icon-checkmark has-tooltip" title="<?php p($l->t('Compatible plugin.')); ?>"></div> |
||
338 | <div> |
||
339 | <p class="note"><?php p($l->t('Example plugin')); ?></p> |
||
340 | </div> |
||
341 | </div> |
||
342 | </div> |
||
343 | <div class="action-copy icon-copy has-tooltip" data-placement="left" |
||
344 | title="<?php p($l->t('Copy example plugin')); ?>"> |
||
345 | <span class="hidden-visually"><?php p($l->t('Copy example plugin')); ?></span> |
||
346 | </div> |
||
347 | </div> |
||
348 | </script> |
||
349 | |||
350 | <script id="picocms-plugins-template-system-item" type="text/template" |
||
351 | data-append-to="#picocms-plugins > .app-content-list"> |
||
352 | <div class="app-content-list-item"> |
||
353 | <div class="app-content-list-item-line-one"> |
||
354 | <p>{name}</p> |
||
355 | <div class="info-compat message"> |
||
356 | <div class="icon-ok has-tooltip" title="<?php p($l->t('Compatible plugin.')); ?>"></div> |
||
357 | <div> |
||
358 | <p class="note"><?php p($l->t('System plugin')); ?></p> |
||
359 | </div> |
||
360 | </div> |
||
361 | </div> |
||
362 | </div> |
||
363 | </script> |
||
364 | |||
365 | <script id="picocms-plugins-template-custom-item" type="text/template" |
||
366 | data-append-to="#picocms-plugins > .app-content-list"> |
||
367 | <div class="app-content-list-item"> |
||
368 | <div class="app-content-list-item-line-one"> |
||
369 | <p>{name}</p> |
||
370 | <div class="info-compat message"> |
||
371 | <div class="icon-ok has-tooltip" title="<?php p($l->t('Compatible plugin.')); ?>"></div> |
||
372 | <div> |
||
373 | <p class="note"><?php p($l->t('Custom plugin')); ?></p> |
||
374 | </div> |
||
375 | </div> |
||
376 | </div> |
||
377 | <div class="action-sync icon-arrows-cw has-tooltip" data-placement="left" |
||
378 | title="<?php p($l->t('Reload custom plugin')); ?>"> |
||
379 | <span class="hidden-visually"><?php p($l->t('Reload custom plugin')); ?></span> |
||
380 | </div> |
||
381 | <div class="action-delete icon-trash has-tooltip" data-placement="left" |
||
382 | title="<?php p($l->t('Delete custom plugin')); ?>"> |
||
383 | <span class="hidden-visually"><?php p($l->t('Delete custom plugin')); ?></span> |
||
384 | </div> |
||
385 | </div> |
||
386 | </script> |
||
387 | |||
388 | <script id="picocms-plugins-template-new-item" type="text/template" |
||
389 | data-append-to="#picocms-plugins > .app-content-list > .app-content-list-add select"> |
||
390 | <option name="{name}">{name}</option> |
||
391 | </script> |
||
392 | |||
393 | <script id="picocms-plugins-template-copy-item" type="text/template"> |
||
394 | <form id="{id}" title="{title}" class="form"> |
||
395 | <fieldset> |
||
396 | <div class="label"> |
||
397 | <label for="picocms-plugins-copy-base"><?php p($l->t('Base plugin')); ?></label> |
||
398 | </div> |
||
399 | <div class="content"> |
||
400 | <span id="picocms-plugins-copy-base" class="input">{source}</span> |
||
401 | </div> |
||
402 | </fieldset> |
||
403 | <fieldset> |
||
404 | <div class="label"> |
||
405 | <label for="picocms-plugins-copy-name"><?php p($l->t('Plugin name')); ?></label> |
||
406 | </div> |
||
407 | <div class="content"> |
||
408 | <input id="picocms-plugins-copy-name" class="input input-name" type="text" name="name" |
||
409 | value="" placeholder="{source}" /> |
||
410 | </div> |
||
411 | </fieldset> |
||
412 | </form> |
||
413 | </script> |
||
414 | |||
415 | <script id="picocms-plugins-template-loading" type="text/template" |
||
416 | data-replaces="#picocms-plugins"> |
||
417 | <div class="app-content-loading message large"> |
||
418 | <div class="icon loading"></div> |
||
419 | <div> |
||
420 | <p><?php p($l->t('Loading plugins…')); ?></p> |
||
421 | </div> |
||
422 | </div> |
||
423 | </script> |
||
424 | |||
425 | <script id="picocms-plugins-template-error" type="text/template" |
||
426 | data-replaces="#picocms-plugins"> |
||
427 | <div class="app-content-error message large"> |
||
428 | <div class="icon icon-attention-circled"></div> |
||
429 | <div> |
||
430 | <p><?php p($l->t( |
||
431 | 'An unexpected error occurred while performing this action. Please check Nextcloud\'s logs.' |
||
432 | )); ?></p> |
||
433 | <p class="error-details" style="display: none"> |
||
434 | <?php p($l->t('Error: {error}')); ?> |
||
435 | </p> |
||
436 | <p class="exception-details" style="display: none"> |
||
437 | <?php p($l->t('Encountered unexpected {exception}: {exceptionMessage}')); ?> |
||
438 | </p> |
||
439 | </div> |
||
440 | <div class="action action-reload icon-arrows-cw has-tooltip" data-placement="left" |
||
441 | title="<?php p($l->t('Reload plugins list')); ?>"> |
||
442 | <span class="hidden-visually"><?php p($l->t('Reload plugins list')); ?></span> |
||
443 | </div> |
||
444 | </div> |
||
445 | </script> |
||
446 | </article> |
||
447 | |||
448 | <article class="section"> |
||
449 | <h2><?php p($l->t('Custom templates')); ?></h2> |
||
450 | <p class="settings-hint"><?php p($l->t( |
||
451 | 'Make it easier for users to create new websites.' |
||
452 | )); ?></p> |
||
453 | |||
454 | <div class="message large"> |
||
455 | <div class="icon icon-info"></div> |
||
456 | <div> |
||
457 | <p><?php p($l->t( |
||
458 | 'Creating new websites can be hard - where to even start? Custom templates act as a starting point for ' |
||
459 | . 'users to create a new website using Pico CMS for Nextcloud. Before adding a new custom ' |
||
460 | . 'template using the "Add custom template" button below, you must upload all of the ' |
||
461 | . 'template\'s files to the data folder of your Nextcloud instance. After uploading the ' |
||
462 | . 'template it will show up in the form below to actually add it to the "Create a new website" ' |
||
463 | . 'form of your users. If you want to modify one of your previously added custom templates, ' |
||
464 | . 'simply edit the corresponding files in Nextcloud\'s data folder.' |
||
465 | )); ?></p> |
||
466 | <p><?php p($l->t( |
||
467 | 'Before adding a new custom template, upload all of the template\'s files to a new folder in the ' |
||
468 | . 'following directory:' |
||
469 | )); ?> |
||
470 | <p class="followup indent"><code><?php p($_['templatesPath']); ?></code></p> |
||
471 | </div> |
||
472 | </div> |
||
473 | |||
474 | <section id="picocms-templates" class="picocms-admin-list" |
||
475 | data-route="/apps/cms_pico/admin/templates" |
||
476 | data-template="#picocms-templates-template" |
||
477 | data-system-template="#picocms-templates-template-system-item" |
||
478 | data-custom-template="#picocms-templates-template-custom-item" |
||
479 | data-new-template="#picocms-templates-template-new-item" |
||
480 | data-copy-template="#picocms-templates-template-copy-item" |
||
481 | data-loading-template="#picocms-templates-template-loading" |
||
482 | data-error-template="#picocms-templates-template-error"> |
||
483 | <div class="app-content-loading message large"> |
||
484 | <div class="icon loading"></div> |
||
485 | <div> |
||
486 | <p><?php p($l->t('Loading templates…')); ?></p> |
||
487 | </div> |
||
488 | </div> |
||
489 | </section> |
||
490 | |||
491 | <script id="picocms-templates-template" type="text/template" |
||
492 | data-replaces="#picocms-templates"> |
||
493 | <div class="app-content-list"> |
||
494 | <div class="app-content-list-item app-content-list-add"> |
||
495 | <div class="app-content-list-item-line-one"> |
||
496 | <select class="action-new-item"></select> |
||
497 | <button class="action-new has-tooltip" title="<?php p($l->t('Add custom template')); ?>"> |
||
498 | <span class="icon icon-plus"></span> |
||
499 | <span class="hidden-visually"><?php p($l->t('Add custom template')); ?></span> |
||
500 | </button> |
||
501 | </div> |
||
502 | <div class="action-reload icon-arrows-cw has-tooltip" data-placement="left" |
||
503 | title="<?php p($l->t('Reload templates list')); ?>"> |
||
504 | <span class="hidden-visually"><?php p($l->t('Reload templates list')); ?></span> |
||
505 | </div> |
||
506 | </div> |
||
507 | </div> |
||
508 | </script> |
||
509 | |||
510 | <script id="picocms-templates-template-system-item" type="text/template" |
||
511 | data-append-to="#picocms-templates > .app-content-list"> |
||
512 | <div class="app-content-list-item"> |
||
513 | <div class="app-content-list-item-line-one"> |
||
514 | <p>{name}</p> |
||
515 | <div class="info-compat message"> |
||
516 | <div class="icon-ok has-tooltip" title="<?php p($l->t('Compatible template.')); ?>"></div> |
||
517 | <div> |
||
518 | <p class="note"><?php p($l->t('System template')); ?></p> |
||
519 | </div> |
||
520 | </div> |
||
521 | </div> |
||
522 | <div class="action-copy icon-docs has-tooltip" data-placement="left" |
||
523 | title="<?php p($l->t('Copy system template')); ?>"> |
||
524 | <span class="hidden-visually"><?php p($l->t('Copy system template')); ?></span> |
||
525 | </div> |
||
526 | </div> |
||
527 | </script> |
||
528 | |||
529 | <script id="picocms-templates-template-custom-item" type="text/template" |
||
530 | data-append-to="#picocms-templates > .app-content-list"> |
||
531 | <div class="app-content-list-item"> |
||
532 | <div class="app-content-list-item-line-one"> |
||
533 | <p>{name}</p> |
||
534 | <div class="info-compat message"> |
||
535 | <div class="icon-ok has-tooltip" title="<?php p($l->t('Compatible template.')); ?>"></div> |
||
536 | <div> |
||
537 | <p class="note"><?php p($l->t('Custom template')); ?></p> |
||
538 | </div> |
||
539 | </div> |
||
540 | </div> |
||
541 | <div class="action-copy icon-docs has-tooltip" data-placement="left" |
||
542 | title="<?php p($l->t('Copy custom template')); ?>"> |
||
543 | <span class="hidden-visually"><?php p($l->t('Copy custom template')); ?></span> |
||
544 | </div> |
||
545 | <div class="action-delete icon-trash has-tooltip" data-placement="left" |
||
546 | title="<?php p($l->t('Delete custom template')); ?>"> |
||
547 | <span class="hidden-visually"><?php p($l->t('Delete custom template')); ?></span> |
||
548 | </div> |
||
549 | </div> |
||
550 | </script> |
||
551 | |||
552 | <script id="picocms-templates-template-new-item" type="text/template" |
||
553 | data-append-to="#picocms-templates > .app-content-list > .app-content-list-add select"> |
||
554 | <option name="{name}">{name}</option> |
||
555 | </script> |
||
556 | |||
557 | <script id="picocms-templates-template-copy-item" type="text/template"> |
||
558 | <form id="{id}" title="{title}" class="form"> |
||
559 | <fieldset> |
||
560 | <div class="label"> |
||
561 | <label for="picocms-templates-copy-base"><?php p($l->t('Base template')); ?></label> |
||
562 | </div> |
||
563 | <div class="content"> |
||
564 | <span id="picocms-templates-copy-base" class="input">{source}</span> |
||
565 | </div> |
||
566 | </fieldset> |
||
567 | <fieldset> |
||
568 | <div class="label"> |
||
569 | <label for="picocms-templates-copy-name"><?php p($l->t('Template name')); ?></label> |
||
570 | </div> |
||
571 | <div class="content"> |
||
572 | <input id="picocms-templates-copy-name" class="input input-name" type="text" name="name" |
||
573 | value="" placeholder="{source}" /> |
||
574 | </div> |
||
575 | </fieldset> |
||
576 | </form> |
||
577 | </script> |
||
578 | |||
579 | <script id="picocms-templates-template-loading" type="text/template" |
||
580 | data-replaces="#picocms-templates"> |
||
581 | <div class="app-content-loading message large"> |
||
582 | <div class="icon loading"></div> |
||
583 | <div> |
||
584 | <p><?php p($l->t('Loading templates…')); ?></p> |
||
585 | </div> |
||
586 | </div> |
||
587 | </script> |
||
588 | |||
589 | <script id="picocms-templates-template-error" type="text/template" |
||
590 | data-replaces="#picocms-templates"> |
||
591 | <div class="app-content-error message large"> |
||
592 | <div class="icon icon-attention-circled"></div> |
||
593 | <div> |
||
594 | <p><?php p($l->t( |
||
595 | 'An unexpected error occurred while performing this action. Please check Nextcloud\'s logs.' |
||
596 | )); ?></p> |
||
597 | <p class="error-details" style="display: none"> |
||
598 | <?php p($l->t('Error: {error}')); ?> |
||
599 | </p> |
||
600 | <p class="exception-details" style="display: none"> |
||
601 | <?php p($l->t('Encountered unexpected {exception}: {exceptionMessage}')); ?> |
||
602 | </p> |
||
603 | </div> |
||
604 | <div class="action action-reload icon-arrows-cw has-tooltip" data-placement="left" |
||
605 | title="<?php p($l->t('Reload templates list')); ?>"> |
||
606 | <span class="hidden-visually"><?php p($l->t('Reload templates list')); ?></span> |
||
607 | </div> |
||
608 | </div> |
||
609 | </script> |
||
610 | </article> |
||
611 | |||
612 | <article class="section"> |
||
613 | <h2><?php p($l->t('Configure your web server')); ?></h2> |
||
614 | <p class="settings-hint"><?php p($l->t( |
||
615 | 'Enable Pico CMS for Nextcloud\'s full potential by configuring your web server appropriately.' |
||
616 | )); ?></p> |
||
617 | |||
618 | <div class="message large"> |
||
619 | <div class="icon icon-info"></div> |
||
620 | <div> |
||
621 | <p><?php p($l->t( |
||
622 | 'Depending on your web server\'s configuration, users can access their websites using different URLs. ' |
||
623 | . 'By default, users can access their websites using Pico CMS for Nextcloud\'s full ' |
||
624 | . 'application URL. However, these URLs are pretty long and thus not very user-friendly. For ' |
||
625 | . 'this reason, Pico CMS for Nextcloud also supports shortened URLs utilizing the virtual ' |
||
626 | . '"sites/" folder. However, using this feature requires some additional web server ' |
||
627 | . 'configuration. If you\'re using the Apache web server, try one of the first two examples ' |
||
628 | . 'shown below. If you\'re rather using the nginx web server, try one of last two examples. If ' |
||
629 | . 'you do not really understand what\'s going on, contact your server administrator and send ' |
||
630 | . 'him the information below. If your server administrator tells you this isn\'t possible, ' |
||
631 | . 'do not despair - you can still use Pico CMS for Nextcloud\'s full application URLs, they ' |
||
632 | . 'always work out-of-the-box.' |
||
633 | )); ?></p> |
||
634 | </div> |
||
635 | </div> |
||
636 | |||
637 | <section class="lane"> |
||
638 | <?php $internalPathRegex = '^' . preg_quote($_['internalPath']) . '(.*)$'; ?> |
||
639 | <?php $internalPathReplacement = $_['internalFullUrl'] . '$1'; ?> |
||
640 | |||
641 | <header> |
||
642 | <h3><?php p($l->t('Enable short website URLs')); ?></h3> |
||
643 | </header> |
||
644 | <section> |
||
645 | <form id="picocms-link_mode" class="picocms-link_mode-form" |
||
646 | data-route="/apps/cms_pico/admin/link_mode"> |
||
647 | <p> |
||
648 | <input type="radio" id="picocms-link_mode_long" class="radio" |
||
649 | name="data[link_mode]" value="<?php p($_['linkModeLong']); ?>" |
||
650 | <?php if ($_['linkMode'] === $_['linkModeLong']) { ?>checked="checked"<?php } ?>> |
||
651 | <label for="picocms-link_mode_long"> |
||
652 | <?php p($l->t('Full application URLs')); ?> |
||
653 | <span class="note">– <a><?php p($_['exampleFullUrl']); ?></a></span> |
||
654 | </label> |
||
655 | </p> |
||
656 | <p> |
||
657 | <input type="radio" id="picocms-link_mode_short" class="radio" |
||
658 | name="data[link_mode]" value="<?php p($_['linkModeShort']); ?>" |
||
659 | <?php if ($_['linkMode'] === $_['linkModeShort']) { ?>checked="checked"<?php } ?>> |
||
660 | <label for="picocms-link_mode_short"> |
||
661 | <?php p($l->t('Short website URLs')); ?> |
||
662 | <span class="note">– <a><?php p($_['exampleProxyUrl']); ?></a></span> |
||
663 | </label> |
||
664 | </p> |
||
665 | <p class="note"><?php p($l->t( |
||
666 | 'After you have configured your web server to enable shortened URLs, you should select the ' |
||
667 | . 'corresponding option above to let your users know about this feature. Do not enable ' |
||
668 | . 'this option if you have not configured the virtual "sites/" folder yet using one of the ' |
||
669 | . 'configuration examples shown below.' |
||
670 | )); ?></p> |
||
671 | </form> |
||
672 | </section> |
||
673 | </section> |
||
674 | |||
675 | <section class="lane"> |
||
676 | <header> |
||
677 | <h3><?php p($l->t('Using Apache\'s mod_proxy')); ?></h3> |
||
678 | <p> |
||
679 | <?php p($l->t('Your users\' website URLs will look like the following:')); ?> |
||
680 | <a><?php p($_['exampleProxyUrl']); ?></a> |
||
681 | </p> |
||
682 | </header> |
||
683 | <section> |
||
684 | <p class="code"> |
||
685 | <code> |
||
686 | ProxyPass <?php p($_['internalPath']); ?> <?php p($_['internalProxyUrl']); ?><br/> |
||
687 | ProxyPassReverse <?php p($_['internalPath']); ?> <?php p($_['internalProxyUrl']); ?><br/> |
||
688 | <?php if (substr_compare($_['internalProxyUrl'], 'https', 0, 5) === 0) { ?> |
||
689 | SSLProxyEngine on<br/> |
||
690 | <?php } ?> |
||
691 | </code> |
||
692 | </p> |
||
693 | <p><?php p($l->t( |
||
694 | 'Copy the config snippet above to Nextcloud\'s <VirtualHost …> section of your apache.conf. Before ' |
||
695 | . 'doing so you must enable both Apache\'s mod_proxy and mod_proxy_http modules. Otherwise ' |
||
696 | . 'your web server will either refuse to (re)start or yield a 500 Internal Server Error.' |
||
697 | )); ?></p> |
||
698 | </section> |
||
699 | </section> |
||
700 | |||
701 | <section class="lane"> |
||
702 | <header> |
||
703 | <h3><?php p($l->t('Using Apache\'s mod_rewrite')); ?></h3> |
||
704 | <p> |
||
705 | <?php p($l->t('Your users\' website URLs will look like the following:')); ?> |
||
706 | <a><?php p($_['exampleFullUrl']); ?></a> |
||
707 | </p> |
||
708 | </header> |
||
709 | <section> |
||
710 | <p class="code"> |
||
711 | <code> |
||
712 | RewriteEngine On<br/> |
||
713 | RewriteRule <?php p($internalPathRegex); ?> <?php p($internalPathReplacement); ?> [QSA,L]<br/> |
||
714 | </code> |
||
715 | </p> |
||
716 | <p><?php p($l->t( |
||
717 | 'Before copying the config snippet above to Nextcloud\'s <VirtualHost …> section of your apache.conf, ' |
||
718 | . 'make sure to enable Apache\'s mod_rewrite module. Otherwise your web server will refuse to ' |
||
719 | . '(re)start or yield a 500 Internal Server Error. Please note that this config won\'t ' |
||
720 | . 'actually let you use shortened URLs, it just redirects users from shortened URLs to the ' |
||
721 | . 'site\'s full URL. Thus you should prefer the solution utilizing mod_proxy shown above.' |
||
722 | )); ?></p> |
||
723 | </section> |
||
724 | </section> |
||
725 | |||
726 | <section class="lane"> |
||
727 | <header> |
||
728 | <h3><?php p($l->t('Using nginx\'s proxy_pass')); ?></h3> |
||
729 | <p> |
||
730 | <?php p($l->t('Your users\' website URLs will look like the following:')); ?> |
||
731 | <a><?php p($_['exampleProxyUrl']); ?></a> |
||
732 | </p> |
||
733 | </header> |
||
734 | <section> |
||
735 | <p class="code"> |
||
736 | <code> |
||
737 | location ^~ <?php p($_['internalPath']); ?> {<br/> |
||
738 | proxy_set_header X-Forwarded-Host $host:$server_port;<br/> |
||
739 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br/> |
||
740 | proxy_set_header X-Forwarded-Server $host;<br/> |
||
741 | proxy_pass <?php p($_['internalProxyUrl']); ?>;<br/> |
||
742 | <?php if (substr_compare($_['internalProxyUrl'], 'https', 0, 5) === 0) { ?> |
||
743 | proxy_ssl_server_name on;<br/> |
||
744 | <?php } ?> |
||
745 | }<br/> |
||
746 | </code> |
||
747 | </p> |
||
748 | <p><?php p($l->t( |
||
749 | 'Copy the config snippet above to Nextcloud\'s server { … } section of your nginx.conf. Before doing ' |
||
750 | . 'doing so you must enable nginx\'s ngx_http_proxy_module module. Otherwise your web server ' |
||
751 | . 'will either refuse to (re)start or yield a 500 Internal Server Error.' |
||
752 | )); ?></p> |
||
753 | </section> |
||
754 | </section> |
||
755 | |||
756 | <section class="lane"> |
||
757 | <header> |
||
758 | <h3><?php p($l->t('Using nginx\'s rewrite')); ?></h3> |
||
759 | <p> |
||
760 | <?php p($l->t('Your users\' website URLs will look like the following:')); ?> |
||
761 | <a><?php p($_['exampleFullUrl']); ?></a> |
||
762 | </p> |
||
763 | </header> |
||
764 | <section> |
||
765 | <p class="code"> |
||
766 | <code> |
||
767 | rewrite <?php p($internalPathRegex); ?> <?php p($internalPathReplacement); ?> last;<br/> |
||
768 | </code> |
||
769 | </p> |
||
770 | <p><?php p($l->t( |
||
771 | 'Simply copy the config snippet above to Nextcloud\'s server { … } section of your nginx.conf. Please ' |
||
772 | . 'note that this config won\'t actually let you use shortened URLs, it just redirects users ' |
||
773 | . 'from shortened URLs to the site\'s full URL. Thus you should prefer the solution utilizing ' |
||
774 | . 'nginx\'s proxy_pass directive shown above.' |
||
775 | )); ?></p> |
||
776 | </section> |
||
777 | </section> |
||
778 | </article> |
||
779 | |||
780 | <article class="section"> |
||
781 | <h2><?php p($l->t('Version information')); ?></h2> |
||
782 | |||
783 | <p> |
||
784 | <strong>Pico CMS for Nextcloud <?php p($_['appVersion']); ?></strong> |
||
785 | – <a href="https://apps.nextcloud.com/apps/cms_pico">https://apps.nextcloud.com/apps/cms_pico</a><br> |
||
786 | <?php print_unescaped($l->t( |
||
787 | 'Pico CMS for Nextcloud was made by <a href="https://github.com/daita">Maxence Lange</a> and ' |
||
788 | . '<a href="https://daniel-rudolf.de/">Daniel Rudolf</a>.<br>It is free and open source software ' |
||
789 | . 'released under the <a href="https://github.com/nextcloud/cms_pico/blob/master/LICENSE">GNU ' |
||
790 | . 'Affero General Public License</a>.' |
||
791 | )); ?> |
||
792 | </p> |
||
793 | <p> |
||
794 | <strong>Pico <?php p($_['picoVersion']); ?></strong> |
||
795 | – <a href="http://picocms.org/">http://picocms.org/</a><br> |
||
796 | <?php print_unescaped($l->t( |
||
797 | 'Pico was made by <a href="https://gilbitron.me/">Gilbert Pellegrom</a> and ' |
||
798 | . '<a href="https://daniel-rudolf.de/">Daniel Rudolf</a> and is maintained by ' |
||
799 | . '<a href="https://github.com/picocms/Pico/graphs/contributors">The Pico Community</a>.<br>' |
||
800 | . 'It is free and open source software released under the ' |
||
801 | . '<a href="https://github.com/picocms/Pico/blob/master/LICENSE.md">MIT license</a>.' |
||
802 | )); ?> |
||
803 | </p> |
||
804 | </article> |
||
805 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.