1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-25 08:09:43 +02:00

Per space label, icon, description

Labels introduce visual grouping and filtering of spaces.
This commit is contained in:
McMatts 2019-01-04 16:33:30 +00:00
parent fe8068965c
commit a211ba051a
106 changed files with 3280 additions and 1008 deletions

View file

@ -1,6 +1,6 @@
{{layout/logo-heading
title="Spaces"
desc="Delete spaces, take ownership of shared and orphaned spaces"
icon=constants.Icon.Grid1}}
icon=constants.Icon.Grid}}
{{customize/space-admin}}

View file

@ -0,0 +1,47 @@
// 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 { inject as service } from '@ember/service';
import Notifier from '../../../mixins/notifier';
import Controller from '@ember/controller';
export default Controller.extend(Notifier, {
labelSvc: service('label'),
load() {
this.get('labelSvc').getAll().then((labels) => {
this.set('model', labels);
});
},
actions: {
onAdd(label) {
this.get('labelSvc').add(label).then(() => {
this.load();
this.notifySuccess('Label added');
});
},
onDelete(id) {
this.get('labelSvc').delete(id).then(() => {
this.load();
this.notifySuccess('Label deleted');
});
},
onUpdate(label) {
this.get('labelSvc').update(label).then(() => {
this.load();
this.notifySuccess('Label saved');
});
}
}
});

View file

@ -0,0 +1,34 @@
// 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 { inject as service } from '@ember/service';
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
import Route from '@ember/routing/route';
export default Route.extend(AuthenticatedRouteMixin, {
labelSvc: service('label'),
appMeta: service(),
session: service(),
beforeModel() {
if (!this.get("session.isAdmin")) {
this.transitionTo('auth.login');
}
},
model() {
return this.get('labelSvc').getAll();
},
activate() {
this.get('browser').setTitle('Space Labels');
}
});

View file

@ -0,0 +1,10 @@
{{layout/logo-heading
title="Labels"
desc="Group and navigate spaces with visual labels"
icon=constants.Icon.Checkbox}}
{{customize/space-labels
labels=model
onAdd=(action "onAdd")
onDelete=(action "onDelete")
onUpdate=(action "onUpdate")}}

View file

@ -8,6 +8,22 @@
<i class={{concat "dicon " constants.Icon.Settings}} />
<div class="name">General</div>
{{/link-to}}
{{#link-to "customize.labels" activeClass="selected" class="item" tagName="div"}}
<i class={{concat "dicon " constants.Icon.Checkbox}} />
<div class="name">Labels</div>
{{/link-to}}
{{#link-to "customize.folders" activeClass="selected" class="item" tagName="div"}}
<i class={{concat "dicon " constants.Icon.Grid}} />
<div class="name">Spaces</div>
{{/link-to}}
{{#link-to "customize.users" activeClass="selected" class="item" tagName="div"}}
<i class={{concat "dicon " constants.Icon.Person}} />
<div class="name">User Management</div>
{{/link-to}}
{{#link-to "customize.groups" activeClass="selected" class="item" tagName="div"}}
<i class={{concat "dicon " constants.Icon.People}} />
<div class="name">User Groups</div>
{{/link-to}}
{{#link-to "customize.integrations" activeClass="selected" class="item" tagName="div"}}
<i class={{concat "dicon " constants.Icon.Integrations}} />
<div class="name">Integrations</div>
@ -17,26 +33,10 @@
<i class={{concat "dicon " constants.Icon.Send}} />
<div class="name">Mail Server</div>
{{/link-to}}
{{/if}}
{{#link-to "customize.users" activeClass="selected" class="item" tagName="div"}}
<i class={{concat "dicon " constants.Icon.Person}} />
<div class="name">User Management</div>
{{/link-to}}
{{#link-to "customize.groups" activeClass="selected" class="item" tagName="div"}}
<i class={{concat "dicon " constants.Icon.People}} />
<div class="name">User Groups</div>
{{/link-to}}
{{#if session.isGlobalAdmin}}
{{#link-to "customize.auth" activeClass="selected" class="item" tagName="div"}}
<i class={{concat "dicon " constants.Icon.Locked}} />
<div class="name">Authentication</div>
{{/link-to}}
{{/if}}
{{#link-to "customize.folders" activeClass="selected" class="item" tagName="div"}}
<i class={{concat "dicon " constants.Icon.Grid1}} />
<div class="name">Spaces</div>
{{/link-to}}
{{#if session.isGlobalAdmin}}
{{#link-to "customize.search" activeClass="selected" class="item" tagName="div"}}
<i class={{concat "dicon " constants.Icon.Search}} />
<div class="name">Search</div>
@ -60,7 +60,7 @@
{{/if}}
{{#link-to "customize.product" activeClass="selected" class="item" tagName="div"}}
<i class={{concat "dicon " constants.Icon.Announce}} />
<div class="name">Documize Changelog</div>
<div class="name">Changelog</div>
{{/link-to}}
</div>
</div>