mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
parent
99a5418dba
commit
8baad7e2f0
22 changed files with 229 additions and 102 deletions
|
@ -18,17 +18,23 @@ export default Component.extend({
|
|||
editMode: false,
|
||||
editPage: null,
|
||||
editMeta: null,
|
||||
expanded: true,
|
||||
|
||||
didReceiveAttrs() {
|
||||
this._super(...arguments);
|
||||
|
||||
if (this.get('isDestroyed') || this.get('isDestroying')) return;
|
||||
|
||||
let pageId = this.get('page.id');
|
||||
|
||||
if (this.get('session.authenticated')) {
|
||||
this.workflow();
|
||||
}
|
||||
|
||||
if (this.get('toEdit') === this.get('page.id') && this.get('permissions.documentEdit')) this.send('onEdit');
|
||||
if (this.get('toEdit') === pageId && this.get('permissions.documentEdit')) this.send('onEdit');
|
||||
|
||||
// Work out if this section is expanded by default (state stored in browser local storage).
|
||||
this.set('expanded', !_.includes(this.get('expandState'), pageId));
|
||||
},
|
||||
|
||||
workflow() {
|
||||
|
|
|
@ -38,6 +38,7 @@ export default Component.extend(Notifier, {
|
|||
didReceiveAttrs() {
|
||||
this._super(...arguments);
|
||||
|
||||
// Show/allow liking if space allows it and document is published.
|
||||
this.set('showLikes', this.get('folder.allowLikes') && this.get('document.isLive'));
|
||||
},
|
||||
|
||||
|
|
17
gui/app/components/layout/grid/sidebar-custom-action.js
Normal file
17
gui/app/components/layout/grid/sidebar-custom-action.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||
//
|
||||
// This software (Documize Community Edition) is licensed under
|
||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
||||
//
|
||||
// You can operate outside the AGPL restrictions by purchasing
|
||||
// Documize Enterprise Edition and obtaining a commercial license
|
||||
// by contacting <sales@documize.com>.
|
||||
//
|
||||
// https://documize.com
|
||||
|
||||
import Component from '@ember/component';
|
||||
|
||||
export default Component.extend({
|
||||
tagName: 'div',
|
||||
classNames: ['custom-action'],
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue