Browse Source
Skip template picker if none available
Skip template picker if none available
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>pull/25090/head
committed by
Julius Härtl
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
14 changed files with 294 additions and 104 deletions
-
12apps/files/lib/Controller/TemplateController.php
-
2apps/files/lib/Controller/ViewController.php
-
45apps/files/src/components/TemplatePreview.vue
-
29apps/files/src/services/Templates.js
-
91apps/files/src/templates.js
-
18apps/files/src/utils/davUtils.js
-
72apps/files/src/views/TemplatePicker.vue
-
3core/css/css-variables.scss
-
1core/css/icons.scss
-
1core/img/actions/template-add.svg
-
95lib/private/Files/Template/TemplateManager.php
-
6lib/private/legacy/OC_Util.php
-
4lib/public/Files/Template/ITemplateManager.php
-
19lib/public/Files/Template/TemplateFileCreator.php
@ -0,0 +1,29 @@ |
|||
/** |
|||
* @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com> |
|||
* |
|||
* @author John Molakvoæ <skjnldsv@protonmail.com> |
|||
* |
|||
* @license GNU AGPL version 3 or any later version |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Affero General Public License as |
|||
* published by the Free Software Foundation, either version 3 of the |
|||
* License, or (at your option) any later version. |
|||
* |
|||
* This program 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 program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
*/ |
|||
|
|||
import { generateOcsUrl } from '@nextcloud/router' |
|||
import axios from '@nextcloud/axios' |
|||
|
|||
export const getTemplates = async function() { |
|||
const response = await axios.get(generateOcsUrl('apps/files/api/v1', 2) + 'templates') |
|||
return response.data.ocs.data |
|||
} |
|||
@ -0,0 +1 @@ |
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21.33 21.33" width="16" height="16"><path fill="none" d="M0 0h24v24H0z"/><path d="M15.33 18h-12V6H10V4H3.33a2 2 0 00-2 2v12c0 1.1.9 2 2 2h12a2 2 0 002-2v-6.67h-2zM17.33 1.33h-2V4h-2.66v2h2.66v2.67h2V6H20V4h-2.67z"/><path d="M5.33 14.33h8v2h-8zm8-1.33v-2h-8v2zm-8-5.33h8v2h-8z"/></svg> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue