mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
Move space deletion & archived docs into Space settings
This commit is contained in:
parent
b37f9d601f
commit
7e959b448c
17 changed files with 98 additions and 169 deletions
|
@ -1,17 +0,0 @@
|
|||
// 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 Controller from '@ember/controller';
|
||||
|
||||
export default Controller.extend({
|
||||
actions: {
|
||||
}
|
||||
});
|
|
@ -1,25 +0,0 @@
|
|||
// 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 Route from '@ember/routing/route';
|
||||
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
||||
|
||||
export default Route.extend(AuthenticatedRouteMixin, {
|
||||
beforeModel() {
|
||||
if (!this.session.isAdmin) {
|
||||
this.transitionTo('auth.login');
|
||||
}
|
||||
},
|
||||
|
||||
activate() {
|
||||
this.get('browser').setTitle('Archive');
|
||||
}
|
||||
});
|
|
@ -1 +0,0 @@
|
|||
{{customize/archive-admin}}
|
|
@ -37,9 +37,6 @@
|
|||
{{#link-to 'customize.audit' activeClass='selected' class="tab tab-vertical" tagName="li" }}Audit{{/link-to}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if (eq appMeta.edition constants.Product.EnterpriseEdition)}}
|
||||
{{#link-to 'customize.archive' activeClass='selected' class="tab tab-vertical" tagName="li" }}Archive{{/link-to}}
|
||||
{{/if}}
|
||||
</ul>
|
||||
|
||||
<div class="mt-4" />
|
||||
|
|
|
@ -25,13 +25,6 @@ export default Controller.extend(NotifierMixin, {
|
|||
filteredDocs: null,
|
||||
|
||||
actions: {
|
||||
onDeleteSpace(id) {
|
||||
this.get('folderService').delete(id).then(() => { /* jshint ignore:line */
|
||||
this.get('localStorage').clearSessionItem('folder');
|
||||
this.transitionToRoute('folders');
|
||||
});
|
||||
},
|
||||
|
||||
onRefresh() {
|
||||
this.get('target._routerMicrolib').refresh();
|
||||
},
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
category=category
|
||||
categories=model.categories
|
||||
documents=filteredDocs
|
||||
onRefresh=(action 'onRefresh')
|
||||
onDeleteSpace=(action 'onDeleteSpace')}}
|
||||
onRefresh=(action 'onRefresh')}}
|
||||
|
||||
{{folder/documents-list
|
||||
documents=filteredDocs
|
||||
|
|
|
@ -17,6 +17,7 @@ export default Controller.extend(NotifierMixin, {
|
|||
router: service(),
|
||||
folderService: service('folder'),
|
||||
localStorage: service('localStorage'),
|
||||
appMeta: service(),
|
||||
queryParams: ['tab'],
|
||||
tab: 'general',
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
// https://documize.com
|
||||
|
||||
import { hash } from 'rsvp';
|
||||
// import { inject as service } from '@ember/service';
|
||||
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
|
|
|
@ -29,20 +29,48 @@
|
|||
{{folder/settings-blocks permissions=model.permissions space=model.folder}}
|
||||
{{/if}}
|
||||
|
||||
{{#if (eq appMeta.edition constants.Product.EnterpriseEdition)}}
|
||||
{{#if (eq tab 'archived')}}
|
||||
{{enterprise/space-archived permissions=model.permissions spaces=model.folder space=model.folder}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if (eq tab 'categories')}}
|
||||
{{folder/settings-category permissions=model.permissions spaces=model.folder space=model.folder}}
|
||||
{{/if}}
|
||||
|
||||
{{#if (eq tab 'deletion')}}
|
||||
{{folder/settings-delete permissions=model.permissions spaces=model.folder space=model.folder}}
|
||||
{{/if}}
|
||||
{{/layout/middle-zone-content}}
|
||||
|
||||
{{#layout/middle-zone-sidebar}}
|
||||
<div id="sidebar" class="sidebar">
|
||||
<ul class="tabnav-control tabnav-control-centered w-75">
|
||||
<li class="tab tab-vertical {{if (eq tab 'general') 'selected'}}" {{action 'onTab' 'general'}}>Options</li>
|
||||
<li class="tab tab-vertical {{if (eq tab 'general') 'selected'}}" {{action 'onTab' 'general'}}>General</li>
|
||||
<li class="tab tab-vertical {{if (eq tab 'permissions') 'selected'}}" {{action 'onTab' 'permissions'}}>User Permissions</li>
|
||||
<li class="tab tab-vertical {{if (eq tab 'templates') 'selected'}}" {{action 'onTab' 'templates'}}>Document Templates</li>
|
||||
<li class="tab tab-vertical {{if (eq tab 'blocks') 'selected'}}" {{action 'onTab' 'blocks'}}>Content Blocks</li>
|
||||
</ul>
|
||||
|
||||
<div class="mt-4" />
|
||||
<ul class="tabnav-control tabnav-control-centered w-75">
|
||||
<li class="tab tab-vertical {{if (eq tab 'categories') 'selected'}}" {{action 'onTab' 'categories'}}>Categories</li>
|
||||
</ul>
|
||||
|
||||
<div class="mt-4" />
|
||||
<ul class="tabnav-control tabnav-control-centered w-75">
|
||||
<li class="tab tab-vertical {{if (eq tab 'templates') 'selected'}}" {{action 'onTab' 'templates'}}>Document Templates</li>
|
||||
<li class="tab tab-vertical {{if (eq tab 'blocks') 'selected'}}" {{action 'onTab' 'blocks'}}>Content Blocks</li>
|
||||
{{#if (eq appMeta.edition constants.Product.EnterpriseEdition)}}
|
||||
<li class="tab tab-vertical {{if (eq tab 'archived') 'selected'}}" {{action 'onTab' 'archived'}}>Archived</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
|
||||
{{#if model.permissions.spaceOwner}}
|
||||
<div class="mt-4" />
|
||||
<ul class="tabnav-control tabnav-control-centered w-75">
|
||||
<li class="tab tab-vertical {{if (eq tab 'deletion') 'selected'}}" {{action 'onTab' 'deletion'}}>Delete</li>
|
||||
</ul>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/layout/middle-zone-sidebar}}
|
||||
{{/layout/middle-zone}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue