mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
document attachments view
This commit is contained in:
parent
6cc78f76da
commit
486b5983d9
11 changed files with 65 additions and 130 deletions
|
@ -26,9 +26,13 @@ export default Controller.extend(NotifierMixin, TooltipMixin, {
|
|||
toggled: false,
|
||||
queryParams: ['pageId', 'tab'],
|
||||
pageId: '',
|
||||
tab: 'index',
|
||||
tab: 'content',
|
||||
|
||||
actions: {
|
||||
onTabChange(tab) {
|
||||
this.set('tab', tab);
|
||||
},
|
||||
|
||||
onSaveDocument(doc) {
|
||||
this.get('documentService').save(doc);
|
||||
|
||||
|
|
|
@ -8,18 +8,24 @@
|
|||
{{document/document-meta document=model.document folder=model.folder folders=model.folders permissions=model.permissions onSaveDocument=(action 'onSaveDocument')}}
|
||||
|
||||
<ul class="tabnav-control">
|
||||
<li class="tab selected">Content</li>
|
||||
<li class="tab {{if contentSelected 'selected'}}">Attachments</li>
|
||||
<li class="tab {{if contentSelected 'selected'}}">Activity</li>
|
||||
<li class="tab {{if contentSelected 'selected'}}">Revisions</li>
|
||||
<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</li>
|
||||
<li class="tab {{if (eq tab 'activity') 'selected'}}" {{action 'onTabChange' 'activity'}}>Activity</li>
|
||||
<li class="tab {{if (eq tab 'revision') 'selected'}}" {{action 'onTabChange' 'revision'}}>Revisions</li>
|
||||
</ul>
|
||||
|
||||
{{document/document-view
|
||||
document=model.document links=model.links pages=model.pages
|
||||
folder=model.folder folders=model.folders sections=model.sections permissions=model.permissions pageId=pageId
|
||||
onSavePage=(action 'onSavePage') onInsertSection=(action 'onInsertSection')
|
||||
onSavePageAsBlock=(action 'onSavePageAsBlock') onDeleteBlock=(action 'onDeleteBlock') onGotoPage=(action 'onGotoPage')
|
||||
onCopyPage=(action 'onCopyPage') onMovePage=(action 'onMovePage') onDeletePage=(action 'onPageDeleted')}}
|
||||
{{#if (eq tab 'content')}}
|
||||
{{document/view-content
|
||||
document=model.document links=model.links pages=model.pages
|
||||
folder=model.folder folders=model.folders sections=model.sections permissions=model.permissions pageId=pageId
|
||||
onSavePage=(action 'onSavePage') onInsertSection=(action 'onInsertSection')
|
||||
onSavePageAsBlock=(action 'onSavePageAsBlock') onDeleteBlock=(action 'onDeleteBlock') onGotoPage=(action 'onGotoPage')
|
||||
onCopyPage=(action 'onCopyPage') onMovePage=(action 'onMovePage') onDeletePage=(action 'onPageDeleted')}}
|
||||
{{/if}}
|
||||
|
||||
{{#if (eq tab 'attachment')}}
|
||||
{{document/view-attachment document=model.document permissions=model.permissions}}
|
||||
{{/if}}
|
||||
|
||||
<div id="zone-document-content" class="zone-document-content">
|
||||
{{document/document-sidebar tab=tab
|
||||
|
@ -28,4 +34,4 @@
|
|||
onGotoPage=(action 'onGotoPage')}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue