From d45295b89f5a4b1a61679599266f4616c55a6344 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Tue, 11 Sep 2018 10:14:55 +0200 Subject: typos --- docs/tempaltes.md | 84 ------------------------------------------------------- docs/templates.md | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 84 deletions(-) delete mode 100644 docs/tempaltes.md create mode 100644 docs/templates.md (limited to 'docs') diff --git a/docs/tempaltes.md b/docs/tempaltes.md deleted file mode 100644 index 7b91d182..00000000 --- a/docs/tempaltes.md +++ /dev/null @@ -1,84 +0,0 @@ -# Templates - -Often users will use the same templates. This documents describes the flow and -API's that will eventually come into place. - -## Template location - -There are two kind of templates: - -1. system wide templates -2. user defined tempaltes - -Both should be simple template files and preview for them should be obtained using -the preview API. The richdocuments works as a preview provider so it should provide -proper previews to use. - -### System wide templates - -An admin can configure system wide templates. This can be done from the admin -settings. - -These templates are stored in the AppData. - -> Note: it might require some less pretty code to get the previews out of the -appdata. But since it will also work on 13 we have no real alternative. - -There are a few special templates that are shipped with the app. The empty -files. They should always be available. - -### User defined tempaltes - -In the Collabora user settings the user can select a folder from where to load -templates. This can be any folder the user has access to. So users can share template -folders among eachother. - -## API - -### Listing templates - -Send a GET to: - -`/ocs/v2.php/apps/richdocuemnts/api/v1/templates/` - -Here type can be: - -* docuemnt -* spreadsheet -* presentation - -This returns a list of templates with - -* id -* name -* link to preview -* extention - -### Template previews - -Send a GET to: - -`/apps/richdocuemnts/templates/` - -Where `id` is the id of the template obtained in the listing. This returns back -an image (jpeg or png). For displaying. - -### Creating document based on a template - -Send a POST to - -`/ocs/v2.php/apps/richdocuemnts/api/v1/templates/new` - -with: -* `path`: the full path relative to the user where to create the document -* `template`: the template id you want to create - -## Web frontend - -When clicking on a new document a selection popup appears listing the -available templates. - -The user can select a template, possible change the name and create it. - -This is similar to the current flow with the difference that the user can now -select a template. diff --git a/docs/templates.md b/docs/templates.md new file mode 100644 index 00000000..48479f1e --- /dev/null +++ b/docs/templates.md @@ -0,0 +1,84 @@ +# Templates + +Often users will use the same templates. This documents describes the flow and +APIs that will eventually come into place. + +## Template location + +There are two kind of templates: + +1. system wide templates +2. user defined templates + +Both should be simple template files and preview for them should be obtained using +the preview API. The richdocuments works as a preview provider so it should provide +proper previews to use. + +### System wide templates + +An admin can configure system wide templates. This can be done from the admin +settings. + +These templates are stored in the AppData. + +> Note: it might require some less pretty code to get the previews out of the +appdata. But since it will also work on 13 we have no real alternative. + +There are a few special templates that are shipped with the app. The empty +files. They should always be available. + +### User defined templates + +In the Collabora user settings the user can select a folder from where to load +templates. This can be any folder the user has access to. So users can share template +folders among each other. + +## API + +### Listing templates + +Send a GET to: + +`/ocs/v2.php/apps/richdocuments/api/v1/templates/` + +Here type can be: + +* document +* spreadsheet +* presentation + +This returns a list of templates with + +* id +* name +* link to preview +* extension + +### Template previews + +Send a GET to: + +`/apps/richdocuments/templates/` + +Where `id` is the id of the template obtained in the listing. This returns back +an image (jpeg or png). For displaying. + +### Creating document based on a template + +Send a POST to + +`/ocs/v2.php/apps/richdocuments/api/v1/templates/new` + +with: +* `path`: the full path relative to the user where to create the document, including new file name +* `template`: the template id you want to create + +## Web frontend + +When clicking on a new document a selection popup appears listing the +available templates. + +The user can select a template, possible change the name and create it. + +This is similar to the current flow with the difference that the user can now +select a template. -- cgit v1.2.3