mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
Show jump list to other space documents
Closes #219 Jump to documents within space when viewing a document.
This commit is contained in:
parent
bc9dab72f2
commit
c65eb97948
26 changed files with 341 additions and 235 deletions
|
@ -18,6 +18,10 @@ export default Controller.extend(Notifier, {
|
|||
sectionSvc: service('section'),
|
||||
|
||||
actions: {
|
||||
onBack() {
|
||||
this.get('router').transitionTo('folder.settings');
|
||||
},
|
||||
|
||||
onCancel( /*page*/ ) {
|
||||
this.get('router').transitionTo('folder.settings', {queryParams: {tab: 'blocks'}});
|
||||
},
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<Layout::MasterNavigation />
|
||||
<Layout::MasterToolbar>
|
||||
<div class="zone-1">
|
||||
{{#link-to "folder.settings"}}
|
||||
{{ui/ui-button color=constants.Color.Gray outline=true uppercase=false icon=constants.Icon.ArrowLeft label=model.folder.name}}
|
||||
{{/link-to}}
|
||||
{{#ui/ui-toolbar dark=false light=false raised=false large=false bordered=false}}
|
||||
{{ui/ui-toolbar-button themed=true uppercase=false
|
||||
icon=constants.Icon.ArrowLeft label=model.space.name onClick=(action "onBack")}}
|
||||
{{/ui/ui-toolbar}}
|
||||
</div>
|
||||
</Layout::MasterToolbar>
|
||||
|
||||
|
@ -12,7 +13,7 @@
|
|||
<div class="sidebar-content">
|
||||
<div class="section">
|
||||
<div class="title">about</div>
|
||||
<div class="text"></div>
|
||||
<div class="text">Manage reusable snippets of content for this space</div>
|
||||
</div>
|
||||
</div>
|
||||
</Layout::Grid::Sidebar>
|
||||
|
@ -23,7 +24,7 @@
|
|||
desc="Content blocks provide re-usable content that can be inserted into any document"
|
||||
icon=constants.Icon.Integrations}}
|
||||
|
||||
{{document/block-editor document=model.document folder=model.folder block=model.block
|
||||
{{document/block-editor document=model.document folder=model.space block=model.block
|
||||
onCancel=(action "onCancel") onAction=(action "onAction")}}
|
||||
</Layout::Grid::Content>
|
||||
</Layout::Grid::Container>
|
||||
|
|
|
@ -15,6 +15,7 @@ import NotifierMixin from '../../../mixins/notifier';
|
|||
import Controller from '@ember/controller';
|
||||
|
||||
export default Controller.extend(NotifierMixin, {
|
||||
router: service(),
|
||||
documentService: service('document'),
|
||||
folderService: service('folder'),
|
||||
localStorage: service('localStorage'),
|
||||
|
@ -25,7 +26,7 @@ export default Controller.extend(NotifierMixin, {
|
|||
filteredDocs: null,
|
||||
// eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
|
||||
sortBy: {
|
||||
name: true,
|
||||
name: true,
|
||||
created: false,
|
||||
updated: false,
|
||||
asc: true,
|
||||
|
@ -33,6 +34,10 @@ export default Controller.extend(NotifierMixin, {
|
|||
},
|
||||
|
||||
actions: {
|
||||
onBack() {
|
||||
this.get('router').transitionTo('folders');
|
||||
},
|
||||
|
||||
onRefresh() {
|
||||
this.get('target._routerMicrolib').refresh();
|
||||
},
|
||||
|
@ -93,25 +98,25 @@ export default Controller.extend(NotifierMixin, {
|
|||
|
||||
if (_.isNull(docs)) return;
|
||||
|
||||
if (sortBy.name) {
|
||||
if (sortBy.name) {
|
||||
docs = docs.sortBy('name');
|
||||
ls.storeSessionItem('space.sortBy', 'name');
|
||||
}
|
||||
if (sortBy.created) {
|
||||
if (sortBy.created) {
|
||||
docs = docs.sortBy('created');
|
||||
ls.storeSessionItem('space.sortBy', 'created');
|
||||
}
|
||||
if (sortBy.updated) {
|
||||
if (sortBy.updated) {
|
||||
docs = docs.sortBy('revised');
|
||||
ls.storeSessionItem('space.sortBy', 'updated');
|
||||
}
|
||||
if (sortBy.desc) {
|
||||
if (sortBy.desc) {
|
||||
docs = docs.reverseObjects();
|
||||
ls.storeSessionItem('space.sortOrder', 'desc');
|
||||
} else {
|
||||
ls.storeSessionItem('space.sortOrder', 'asc');
|
||||
}
|
||||
|
||||
|
||||
this.set('filteredDocs', docs);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<Layout::MasterNavigation />
|
||||
<Layout::MasterToolbar>
|
||||
<div class="zone-1">
|
||||
{{#link-to "folders"}}
|
||||
{{ui/ui-button themed=true uppercase=true icon=constants.Icon.ArrowLeft label=constants.Label.Spaces}}
|
||||
{{/link-to}}
|
||||
{{#ui/ui-toolbar dark=false light=false raised=false large=false bordered=false}}
|
||||
{{ui/ui-toolbar-button themed=true uppercase=true
|
||||
icon=constants.Icon.ArrowLeft label=constants.Label.Spaces onClick=(action "onBack")}}
|
||||
{{/ui/ui-toolbar}}
|
||||
</div>
|
||||
<div class="zone-2" />
|
||||
<div class="zone-3">
|
||||
|
|
|
@ -22,6 +22,10 @@ export default Controller.extend(NotifierMixin, {
|
|||
tab: 'general',
|
||||
|
||||
actions: {
|
||||
onBack() {
|
||||
this.get('router').transitionTo('folder.index');
|
||||
},
|
||||
|
||||
onTab(view) {
|
||||
this.set('tab', view);
|
||||
},
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<Layout::MasterNavigation />
|
||||
<Layout::MasterToolbar>
|
||||
<div class="zone-1">
|
||||
{{#link-to "folder.index"}}
|
||||
{{ui/ui-button themed=true uppercase=false icon=constants.Icon.ArrowLeft label=model.folder.name}}
|
||||
{{/link-to}}
|
||||
{{#ui/ui-toolbar dark=false light=false raised=false large=false bordered=false}}
|
||||
{{ui/ui-toolbar-button themed=true uppercase=false
|
||||
icon=constants.Icon.ArrowLeft label=model.folder.name onClick=(action "onBack")}}
|
||||
{{/ui/ui-toolbar}}
|
||||
</div>
|
||||
</Layout::MasterToolbar>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue