diff --git a/gui/app/pods/document/index/controller.js b/gui/app/pods/document/index/controller.js index 79b8953b..021cdd22 100644 --- a/gui/app/pods/document/index/controller.js +++ b/gui/app/pods/document/index/controller.js @@ -21,8 +21,9 @@ export default Controller.extend(Tooltips, Notifier, { templateService: service('template'), sectionService: service('section'), linkService: service('link'), + router: service(), tab: 'content', - queryParams: ['currentPageId'], + queryParams: ['currentPageId', 'source'], showRevisions: computed('permissions', 'document.protection', function() { if (!this.get('session.viewUsers')) return false; if (this.get('document.protection') === this.get('constants').ProtectionType.None) return true; @@ -237,6 +238,12 @@ export default Controller.extend(Tooltips, Notifier, { }); }, + onEditMeta() { + if (!this.get('permissions.documentEdit')) return; + + this.get('router').transitionTo('document.settings', {queryParams: {tab: 'general'}}); + }, + refresh(reloadPage) { return new EmberPromise((resolve) => { this.get('documentService').fetchDocumentData(this.get('document.id')).then((data) => { diff --git a/gui/app/pods/document/index/template.hbs b/gui/app/pods/document/index/template.hbs index fa203386..3d82d00e 100644 --- a/gui/app/pods/document/index/template.hbs +++ b/gui/app/pods/document/index/template.hbs @@ -40,7 +40,7 @@
-
+

{{#if document.template}} Template