mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19:42 +02:00
Allow inline doc title/desc editing
This commit is contained in:
parent
f950075593
commit
313ed7f90a
2 changed files with 9 additions and 2 deletions
|
@ -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) => {
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</div>
|
||||
|
||||
<div class="view-document">
|
||||
<div class="document-heading">
|
||||
<div class="document-heading {{if permissions.documentEdit 'cursor-pointer' ''}}" {{action 'onEditMeta'}}>
|
||||
<h1 class="doc-title">
|
||||
{{#if document.template}}
|
||||
<span class="bg-warning p-1 pr-2 pl-2">Template</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue