mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
Move attachments into meta zone
This commit is contained in:
parent
c5561491a2
commit
c7cc36b307
12 changed files with 77 additions and 80 deletions
|
@ -20,9 +20,7 @@ export default Controller.extend(Tooltips, Notifier, {
|
|||
templateService: service('template'),
|
||||
sectionService: service('section'),
|
||||
linkService: service('link'),
|
||||
// currentPageId: '',
|
||||
tab: 'content',
|
||||
tabCount: 0, // how many items inside the tab?
|
||||
queryParams: ['currentPageId'],
|
||||
|
||||
actions: {
|
||||
|
@ -246,9 +244,5 @@ export default Controller.extend(Tooltips, Notifier, {
|
|||
});
|
||||
});
|
||||
},
|
||||
|
||||
onReady(count) {
|
||||
this.set('tabCount', count);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -27,6 +27,15 @@
|
|||
onSaveDocument=(action 'onSaveDocument')
|
||||
refresh=(action 'refresh')}}
|
||||
|
||||
<div class="text-center non-printable document-tabnav">
|
||||
<ul class="tabnav-control">
|
||||
<li class="tab {{if (eq tab 'content') 'selected'}}" {{action 'onTabChange' 'content'}}>Content</li>
|
||||
{{#if session.authenticated}}
|
||||
<li class="tab {{if (eq tab 'revision') 'selected'}}" {{action 'onTabChange' 'revision'}}>Revisions</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{{document/document-heading
|
||||
document=document
|
||||
permissions=permissions
|
||||
|
@ -42,19 +51,6 @@
|
|||
versions=versions
|
||||
onSaveDocument=(action 'onSaveDocument')}}
|
||||
|
||||
<div class="text-center non-printable document-tabnav">
|
||||
<ul class="tabnav-control">
|
||||
<li class="tab {{if (eq tab 'content') 'selected'}}" {{action 'onTabChange' 'content'}}>Content</li>
|
||||
<li class="tab {{if (eq tab 'attachment') 'selected'}}" {{action 'onTabChange' 'attachment'}}>
|
||||
Attachments
|
||||
({{tabCount}})
|
||||
</li>
|
||||
{{#if session.authenticated}}
|
||||
<li class="tab {{if (eq tab 'revision') 'selected'}}" {{action 'onTabChange' 'revision'}}>Revisions</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{{#if (eq tab 'content')}}
|
||||
{{document/view-content
|
||||
document=document links=links pages=pages blocks=blocks currentPageId=currentPageId
|
||||
|
@ -64,9 +60,6 @@
|
|||
onCopyPage=(action 'onCopyPage') onMovePage=(action 'onMovePage') onDeletePage=(action 'onPageDeleted')
|
||||
refresh=(action 'refresh')}}
|
||||
{{/if}}
|
||||
{{#if (eq tab 'attachment')}}
|
||||
{{document/view-attachment document=document permissions=permissions onReady=(action 'onReady')}}
|
||||
{{/if}}
|
||||
{{#if (eq tab 'revision')}}
|
||||
{{document/view-revision document=document folder=folder pages=pages permissions=permissions onRollback=(action 'onRollback')}}
|
||||
{{/if}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue