From f5f30d23229b2e39a902ebec8e7b7288c4c4614c Mon Sep 17 00:00:00 2001 From: Harvey Kandola Date: Tue, 3 Oct 2017 17:52:03 -0400 Subject: [PATCH] user/account store loading --- domain/account/mysql/store.go | 6 +- domain/permission/endpoint.go | 4 +- domain/permission/mysql/store.go | 4 +- domain/user/endpoint.go | 2 +- domain/user/mysql/store.go | 16 ++- gui/app/components/customize/user-admin.js | 35 ++--- ...-view-activity.js => document-activity.js} | 0 gui/app/components/document/document-index.js | 6 +- .../components/document/document-sidebar.js | 50 ++++++++ gui/app/components/folder/permission-admin.js | 4 +- gui/app/components/folder/space-view.js | 8 ++ gui/app/pods/customize/users/route.js | 12 +- gui/app/pods/document/index/controller.js | 7 +- gui/app/pods/document/index/template.hbs | 6 +- gui/app/pods/folder/index/route.js | 3 - gui/app/styles/app.scss | 1 - gui/app/styles/color.scss | 23 +++- gui/app/styles/view/document/activity.scss | 4 +- gui/app/styles/view/layout-navigation.scss | 121 ------------------ gui/app/styles/view/layout-sidebar.scss | 53 +++++++- .../components/customize/user-admin.hbs | 24 ++-- .../components/document/document-activity.hbs | 18 +++ .../components/document/document-index.hbs | 1 + .../components/document/document-sidebar.hbs | 27 ++++ .../components/document/document-toolbar.hbs | 7 - .../document/sidebar-view-activity.hbs | 16 --- .../components/layout/zone-sidebar.hbs | 1 + 27 files changed, 238 insertions(+), 221 deletions(-) rename gui/app/components/document/{sidebar-view-activity.js => document-activity.js} (100%) create mode 100644 gui/app/components/document/document-sidebar.js delete mode 100644 gui/app/styles/view/layout-navigation.scss create mode 100644 gui/app/templates/components/document/document-activity.hbs create mode 100644 gui/app/templates/components/document/document-sidebar.hbs delete mode 100644 gui/app/templates/components/document/sidebar-view-activity.hbs diff --git a/domain/account/mysql/store.go b/domain/account/mysql/store.go index 91281708..ead299c8 100644 --- a/domain/account/mysql/store.go +++ b/domain/account/mysql/store.go @@ -46,7 +46,7 @@ func (s Scope) Add(ctx domain.RequestContext, account account.Account) (err erro // GetUserAccount returns the database account record corresponding to the given userID, using the client's current organizaion. func (s Scope) GetUserAccount(ctx domain.RequestContext, userID string) (account account.Account, err error) { err = s.Runtime.Db.Get(&account, ` - SELECT a.id, a.refid, a.orgid, a.userid, a.editor, a.admin, a.active, a.created, a.revised, + SELECT a.id, a.refid, a.orgid, a.userid, a.editor, a.admin, a.users, a.active, a.created, a.revised, b.company, b.title, b.message, b.domain FROM account a, organization b WHERE b.refid=a.orgid AND a.orgid=? AND a.userid=?`, ctx.OrgID, userID) @@ -61,7 +61,7 @@ func (s Scope) GetUserAccount(ctx domain.RequestContext, userID string) (account // GetUserAccounts returns a slice of database account records, for all organizations that the userID is a member of, in organization title order. func (s Scope) GetUserAccounts(ctx domain.RequestContext, userID string) (t []account.Account, err error) { err = s.Runtime.Db.Select(&t, ` - SELECT a.id, a.refid, a.orgid, a.userid, a.editor, a.admin, a.active, a.created, a.revised, + SELECT a.id, a.refid, a.orgid, a.userid, a.editor, a.admin, a.users, a.active, a.created, a.revised, b.company, b.title, b.message, b.domain FROM account a, organization b WHERE a.userid=? AND a.orgid=b.refid AND a.active=1 ORDER BY b.title`, userID) @@ -76,7 +76,7 @@ func (s Scope) GetUserAccounts(ctx domain.RequestContext, userID string) (t []ac // GetAccountsByOrg returns a slice of database account records, for all users in the client's organization. func (s Scope) GetAccountsByOrg(ctx domain.RequestContext) (t []account.Account, err error) { err = s.Runtime.Db.Select(&t, - `SELECT a.id, a.refid, a.orgid, a.userid, a.editor, a.admin, a.active, a.created, a.revised, + `SELECT a.id, a.refid, a.orgid, a.userid, a.editor, a.admin, a.users, a.active, a.created, a.revised, b.company, b.title, b.message, b.domain FROM account a, organization b WHERE a.orgid=b.refid AND a.orgid=? AND a.active=1`, ctx.OrgID) diff --git a/domain/permission/endpoint.go b/domain/permission/endpoint.go index 4f653c6e..77264f81 100644 --- a/domain/permission/endpoint.go +++ b/domain/permission/endpoint.go @@ -136,7 +136,7 @@ func (h *Handler) SetSpacePermissions(w http.ResponseWriter, r *http.Request) { // Only persist if there is a role! if permission.HasAnyPermission(perm) { // identify publically shared spaces - if len(perm.UserID) == 0 { + if perm.UserID == "0" { hasEveryoneRole = true } @@ -156,7 +156,7 @@ func (h *Handler) SetSpacePermissions(w http.ResponseWriter, r *http.Request) { if _, isExisting := previousRoleUsers[perm.UserID]; !isExisting { // we skip 'everyone' (user id != empty string) - if len(perm.UserID) > 0 { + if perm.UserID != "0" { existingUser, err := h.Store.User.Get(ctx, perm.UserID) if err != nil { response.WriteServerError(w, method, err) diff --git a/domain/permission/mysql/store.go b/domain/permission/mysql/store.go index 7f900f09..f6d1ba30 100644 --- a/domain/permission/mysql/store.go +++ b/domain/permission/mysql/store.go @@ -59,11 +59,11 @@ func (s Scope) AddPermissions(ctx domain.RequestContext, r permission.Permission func (s Scope) GetUserSpacePermissions(ctx domain.RequestContext, spaceID string) (r []permission.Permission, err error) { err = s.Runtime.Db.Select(&r, ` SELECT id, orgid, who, whoid, action, scope, location, refid - FROM permission WHERE orgid=? AND location='space' AND refid=? AND who='user' AND (whoid=? OR whoid='') + FROM permission WHERE orgid=? AND location='space' AND refid=? AND who='user' AND (whoid=? OR whoid='0') UNION ALL SELECT p.id, p.orgid, p.who, p.whoid, p.action, p.scope, p.location, p.refid FROM permission p LEFT JOIN rolemember r ON p.whoid=r.roleid WHERE p.orgid=? AND p.location='space' AND refid=? - AND p.who='role' AND (r.userid=? OR r.userid='')`, + AND p.who='role' AND (r.userid=? OR r.userid='0')`, ctx.OrgID, spaceID, ctx.UserID, ctx.OrgID, spaceID, ctx.OrgID) if err == sql.ErrNoRows { diff --git a/domain/user/endpoint.go b/domain/user/endpoint.go index 48a626f0..622efe37 100644 --- a/domain/user/endpoint.go +++ b/domain/user/endpoint.go @@ -278,7 +278,6 @@ func (h *Handler) GetSpaceUsers(w http.ResponseWriter, r *http.Request) { } // Get user account as we need to know if user can see all users. - // account.users == false means we restrict viewing to just space users account, err := h.Store.Account.GetUserAccount(ctx, ctx.UserID) if err != nil && err != sql.ErrNoRows { response.WriteJSON(w, u) @@ -286,6 +285,7 @@ func (h *Handler) GetSpaceUsers(w http.ResponseWriter, r *http.Request) { return } + // account.users == false means we restrict viewing to just space users if account.Users { // can see all users u, err = h.Store.User.GetActiveUsersForOrganization(ctx) diff --git a/domain/user/mysql/store.go b/domain/user/mysql/store.go index fdebe71f..dd6efa82 100644 --- a/domain/user/mysql/store.go +++ b/domain/user/mysql/store.go @@ -109,9 +109,11 @@ func (s Scope) GetBySerial(ctx domain.RequestContext, serial string) (u user.Use // identified in the Persister. func (s Scope) GetActiveUsersForOrganization(ctx domain.RequestContext) (u []user.User, err error) { err = s.Runtime.Db.Select(&u, - `SELECT u.id, u.refid, u.firstname, u.lastname, u.email, u.initials, u.password, u.salt, u.reset, u.created, u.revised - FROM user u - WHERE u.refid IN (SELECT userid FROM account WHERE orgid = ? AND active=1) ORDER BY u.firstname,u.lastname`, + `SELECT u.id, u.refid, u.firstname, u.lastname, u.email, u.initials, u.password, u.salt, u.reset, u.created, u.revised, + u.global, a.active, a.editor, a.admin, a.users as viewusers + FROM user u, account a + WHERE u.refid=a.userid AND a.orgid=? AND a.active=1 + ORDER BY u.firstname,u.lastname`, ctx.OrgID) if err != nil { @@ -125,9 +127,11 @@ func (s Scope) GetActiveUsersForOrganization(ctx domain.RequestContext) (u []use // identified in the Persister. func (s Scope) GetUsersForOrganization(ctx domain.RequestContext) (u []user.User, err error) { err = s.Runtime.Db.Select(&u, - `SELECT id, refid, firstname, lastname, email, initials, password, salt, reset, created, revised - FROM user WHERE refid IN (SELECT userid FROM account where orgid = ?) - ORDER BY firstname,lastname`, ctx.OrgID) + `SELECT u.id, u.refid, u.firstname, u.lastname, u.email, u.initials, u.password, u.salt, u.reset, u.created, u.revised, + u.global, a.active, a.editor, a.admin, a.users as viewusers + FROM user u, account a + WHERE u.refid=a.userid AND a.orgid=? + ORDER BY u.firstname, u.lastname`, ctx.OrgID) if err != nil { err = errors.Wrap(err, fmt.Sprintf(" get users for org %s", ctx.OrgID)) diff --git a/gui/app/components/customize/user-admin.js b/gui/app/components/customize/user-admin.js index f3dcda82..20fbdaf0 100644 --- a/gui/app/components/customize/user-admin.js +++ b/gui/app/components/customize/user-admin.js @@ -11,11 +11,12 @@ import Ember from 'ember'; import AuthProvider from '../../mixins/auth'; +import DropdownMixin from '../../mixins/dropdown'; -export default Ember.Component.extend(AuthProvider, { +export default Ember.Component.extend(AuthProvider, DropdownMixin, { editUser: null, deleteUser: null, - drop: null, + dropdown: null, password: {}, filter: '', filteredUsers: [], @@ -23,20 +24,22 @@ export default Ember.Component.extend(AuthProvider, { hasSelectedUsers: false, didReceiveAttrs() { - this.users.forEach(user => { + this._super(...arguments); + + let users = this.get('users'); + + users.forEach(user => { user.set('me', user.get('id') === this.get('session.session.authenticated.user.id')); user.set('selected', false); }); - this.set('filteredUsers', this.users); + this.set('users', users); + this.set('filteredUsers', users); }, willDestroyElement() { - let drop = this.get('drop'); - - if (is.not.null(drop)) { - drop.destroy(); - } + this._super(...arguments); + this.destroyDropdown(); }, onKeywordChange: function () { @@ -109,6 +112,8 @@ export default Ember.Component.extend(AuthProvider, { $(".edit-user-dialog").css("display", "block"); $("input").removeClass("error"); + this.closeDropdown(); + let drop = new Drop({ target: $(".edit-button-" + id)[0], content: $(".edit-user-dialog")[0], @@ -122,7 +127,7 @@ export default Ember.Component.extend(AuthProvider, { remove: false }); - self.set('drop', drop); + self.set('dropdown', drop); drop.on('open', function () { self.$("#edit-firstname").focus(); @@ -134,6 +139,8 @@ export default Ember.Component.extend(AuthProvider, { this.set('deleteUser', user); $(".delete-user-dialog").css("display", "block"); + this.closeDropdown(); + let drop = new Drop({ target: $(".delete-button-" + id)[0], content: $(".delete-user-dialog")[0], @@ -147,12 +154,11 @@ export default Ember.Component.extend(AuthProvider, { remove: false }); - this.set('drop', drop); + this.set('dropdown', drop); }, cancel() { - let drop = this.get('drop'); - drop.close(); + this.closeDropdown(); }, save() { @@ -172,8 +178,7 @@ export default Ember.Component.extend(AuthProvider, { return; } - let drop = this.get('drop'); - drop.close(); + this.closeDropdown(); this.attrs.onSave(user); diff --git a/gui/app/components/document/sidebar-view-activity.js b/gui/app/components/document/document-activity.js similarity index 100% rename from gui/app/components/document/sidebar-view-activity.js rename to gui/app/components/document/document-activity.js diff --git a/gui/app/components/document/document-index.js b/gui/app/components/document/document-index.js index 9de277a8..31f14f6d 100644 --- a/gui/app/components/document/document-index.js +++ b/gui/app/components/document/document-index.js @@ -10,9 +10,9 @@ // https://documize.com import Ember from 'ember'; +import tocUtil from '../../utils/toc'; import NotifierMixin from '../../mixins/notifier'; import TooltipMixin from '../../mixins/tooltip'; -import tocUtil from '../../utils/toc'; export default Ember.Component.extend(NotifierMixin, TooltipMixin, { document: {}, @@ -30,7 +30,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { return this.get('pages.length') === 0; }), - didReceiveAttrs: function () { + didReceiveAttrs() { this._super(...arguments); this.set('showToc', is.not.undefined(this.get('pages')) && this.get('pages').get('length') > 0); @@ -40,7 +40,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { } }, - didRender: function () { + didRender() { this._super(...arguments); if (this.session.authenticated) { diff --git a/gui/app/components/document/document-sidebar.js b/gui/app/components/document/document-sidebar.js new file mode 100644 index 00000000..836a5e7a --- /dev/null +++ b/gui/app/components/document/document-sidebar.js @@ -0,0 +1,50 @@ +// Copyright 2016 Documize Inc. . 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 . +// +// https://documize.com + +import Ember from 'ember'; +import NotifierMixin from '../../mixins/notifier'; +import TooltipMixin from '../../mixins/tooltip'; + +export default Ember.Component.extend(NotifierMixin, TooltipMixin, { + tab: 'index', + + didRender() { + this._super(...arguments); + + if (this.get('permissions.documentEdit')) { + this.addTooltip(document.getElementById("document-index-button")); + this.addTooltip(document.getElementById("document-activity-button")); + } + }, + + willDestroyElement() { + this._super(...arguments); + this.destroyTooltips(); + }, + + actions: { + onTabSwitch(tab) { + this.set('tab', tab); + }, + + onPageSequenceChange(changes) { + this.attrs.onPageSequenceChange(changes); + }, + + onPageLevelChange(changes) { + this.attrs.onPageLevelChange(changes); + }, + + onGotoPage(id) { + this.attrs.onGotoPage(id); + } + } +}); diff --git a/gui/app/components/folder/permission-admin.js b/gui/app/components/folder/permission-admin.js index f0bdb9e1..95927425 100644 --- a/gui/app/components/folder/permission-admin.js +++ b/gui/app/components/folder/permission-admin.js @@ -54,7 +54,7 @@ export default Ember.Component.extend(NotifierMixin, { let u = { orgId: this.get('folder.orgId'), folderId: this.get('folder.id'), - userId: '', + userId: '0', fullname: ' Everyone', spaceView: false, spaceManage: false, @@ -95,7 +95,7 @@ export default Ember.Component.extend(NotifierMixin, { let payload = { Message: message, Permissions: permissions }; let hasEveryone = _.find(permissions, function (permission) { - return permission.get('userId') === "" && + return permission.get('userId') === "0" && (permission.get('spaceView') || permission.get('documentAdd') || permission.get('documentEdit') || permission.get('documentDelete') || permission.get('documentMove') || permission.get('documentCopy') || permission.get('documentTemplate')); }); diff --git a/gui/app/components/folder/space-view.js b/gui/app/components/folder/space-view.js index 9ac2684c..3143f504 100644 --- a/gui/app/components/folder/space-view.js +++ b/gui/app/components/folder/space-view.js @@ -39,6 +39,14 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, AuthMixin, { this.set('selectedDocuments', []); }, + didRender() { + this._super(...arguments); + + if (this.get('rootDocCount') > 0) { + this.addTooltip(document.getElementById("uncategorized-button")); + } + }, + willDestroyElement() { this._super(...arguments); diff --git a/gui/app/pods/customize/users/route.js b/gui/app/pods/customize/users/route.js index 43287bc1..40e8a88a 100644 --- a/gui/app/pods/customize/users/route.js +++ b/gui/app/pods/customize/users/route.js @@ -1,11 +1,11 @@ // Copyright 2016 Documize Inc. . All rights reserved. // -// This software (Documize Community Edition) is licensed under +// 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 . +// by contacting . // // https://documize.com @@ -18,7 +18,7 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, { global: Ember.inject.service('global'), appMeta: Ember.inject.service(), - beforeModel: function () { + beforeModel () { if (!this.session.isAdmin) { this.transitionTo('auth.login'); } @@ -33,14 +33,14 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, { }); }); } else { - this.get('userService').getComplete().then((users) =>{ + this.get('userService').getComplete().then((users) => { resolve(users); }); } }); }, - activate: function () { + activate() { document.title = "Users | Documize"; } -}); \ No newline at end of file +}); diff --git a/gui/app/pods/document/index/controller.js b/gui/app/pods/document/index/controller.js index 9a2e8eab..94bf21f5 100644 --- a/gui/app/pods/document/index/controller.js +++ b/gui/app/pods/document/index/controller.js @@ -11,8 +11,9 @@ import Ember from 'ember'; import NotifierMixin from '../../../mixins/notifier'; +import TooltipMixin from '../../../mixins/tooltip'; -export default Ember.Controller.extend(NotifierMixin, { +export default Ember.Controller.extend(NotifierMixin, TooltipMixin, { documentService: Ember.inject.service('document'), templateService: Ember.inject.service('template'), sectionService: Ember.inject.service('section'), @@ -25,10 +26,6 @@ export default Ember.Controller.extend(NotifierMixin, { tab: 'index', actions: { - toggleSidebar() { - this.set('toggled', !this.get('toggled')); - }, - onSaveDocument(doc) { this.get('documentService').save(doc); this.showNotification('Saved'); diff --git a/gui/app/pods/document/index/template.hbs b/gui/app/pods/document/index/template.hbs index 0d757871..ca0eced9 100644 --- a/gui/app/pods/document/index/template.hbs +++ b/gui/app/pods/document/index/template.hbs @@ -1,15 +1,15 @@ {{#layout/zone-container}} {{#layout/zone-sidebar}} - {{document/document-index + {{document/document-sidebar tab=tab document=model.document folder=model.folder pages=model.pages page=model.page permissions=model.permissions onPageSequenceChange=(action 'onPageSequenceChange') onPageLevelChange=(action 'onPageLevelChange') onGotoPage=(action 'onGotoPage')}} {{/layout/zone-sidebar}} {{#layout/zone-content}} -
+
{{document/space-category document=model.document folder=model.folder folders=model.folders permissions=model.permissions}} @@ -39,8 +39,8 @@ onSavePage=(action 'onSavePage') onInsertSection=(action 'onInsertSection') onSavePageAsBlock=(action 'onSavePageAsBlock') onDeleteBlock=(action 'onDeleteBlock') onGotoPage=(action 'onGotoPage') onCopyPage=(action 'onCopyPage') onMovePage=(action 'onMovePage') onDeletePage=(action 'onPageDeleted')}} -
+ {{/layout/zone-content}} {{/layout/zone-container}} diff --git a/gui/app/pods/folder/index/route.js b/gui/app/pods/folder/index/route.js index 91759c4e..ababe826 100644 --- a/gui/app/pods/folder/index/route.js +++ b/gui/app/pods/folder/index/route.js @@ -46,8 +46,5 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, { }); model.rootDocCount = rootDocCount; - - console.log('afterModel'); - } }); diff --git a/gui/app/styles/app.scss b/gui/app/styles/app.scss index 2d17b7d5..f0709074 100644 --- a/gui/app/styles/app.scss +++ b/gui/app/styles/app.scss @@ -13,7 +13,6 @@ @import "mixins.scss"; @import "base.scss"; @import "widget/widget.scss"; -@import "view/layout-navigation.scss"; @import "view/layout-sidebar.scss"; @import "view/page-search.scss"; @import "view/page-profile.scss"; diff --git a/gui/app/styles/color.scss b/gui/app/styles/color.scss index 16839c89..0a79d2be 100644 --- a/gui/app/styles/color.scss +++ b/gui/app/styles/color.scss @@ -38,15 +38,30 @@ $color-border: #f3f5f8; $color-checkbox: #0092d3; -// lightblue sidebar -$color-sidebar: #f2faff; -$color-sidebar-border: #dff0f9; +// gray sidebar +$color-sidebar: #f5f5f5; +$color-sidebar-border: #e1e1e1; $color-sidebar-text: $color-black; $color-sidebar-link: $color-link; -$color-nav-button: $color-sidebar; +$color-nav-button: #f2faff; $color-nav-button-text: #2667af; $color-nav-button-border: #dff0f9; $color-selected-item: $color-sidebar; +$color-sidebar-navigation: #f2faff; +$color-sidebar-navigation-border: #dff0f9; +$color-sidebar-toolbar: $color-sidebar-border; + +// lightblue sidebar +// $color-sidebar: #f2faff; +// $color-sidebar-border: #dff0f9; +// $color-sidebar-text: $color-black; +// $color-sidebar-link: $color-link; +// $color-nav-button: $color-sidebar; +// $color-nav-button-text: #2667af; +// $color-nav-button-border: #dff0f9; +// $color-selected-item: $color-sidebar; +// $color-sidebar-navigation: $color-gray; +// $color-sidebar-toolbar: $color-sidebar-border; // black sidebar // $color-sidebar: $color-off-black; diff --git a/gui/app/styles/view/document/activity.scss b/gui/app/styles/view/document/activity.scss index 9a87009e..074e27fa 100644 --- a/gui/app/styles/view/document/activity.scss +++ b/gui/app/styles/view/document/activity.scss @@ -20,7 +20,7 @@ font-size: 0.9rem; color: $color-gray; width: 200px; - @extend .truncate; + @extend .truncate; } > .detail { @@ -29,7 +29,7 @@ color: $color-off-black; margin-left: 50px; width: 200px; - @extend .truncate; + @extend .truncate; .viewed { color: $color-goldy; diff --git a/gui/app/styles/view/layout-navigation.scss b/gui/app/styles/view/layout-navigation.scss deleted file mode 100644 index afc9c4e4..00000000 --- a/gui/app/styles/view/layout-navigation.scss +++ /dev/null @@ -1,121 +0,0 @@ -.zone-navigation { - position: fixed; - top: 0; - right: 0; - width: 60px; - min-height: 100%; - height: 100%; - margin: 0; - padding: 0; - z-index: 999; - overflow-x: hidden; - background: $color-toolbar; - - > .bottom-zone, - > .top-zone { - position: absolute; - padding: 0; - width: 100%; - - > li { - cursor: pointer; - margin: 0; - padding: 10px 0; - width: 100%; - text-align: center; - } - - .round-button-mono { - > .material-icons { - color: $color-gray; - @include ease-in(); - } - - &:hover { - > .material-icons { - color: $color-link; - } - } - } - - .profile-link { - color: $color-primary; - text-align: center; - font-size: 1rem; - font-style: normal; - font-family: $font-regular; - vertical-align: top; - } - - .selected { - .round-button-mono { - background-color: $color-link !important; - border: 1px solid $color-link !important; - - > .material-icons { - color: $color-white !important; - } - - > a { - > .material-icons { - color: $color-white !important; - } - } - } - } - } - - > .top-zone { - top: 0; - padding-top: 30px; - } - - > .bottom-zone { - bottom: 0; - padding-bottom: 30px; - } - - .pinned-zone { - position: relative; - top: 200px; - padding: 0; - margin: 0; - width: 80px; - overflow-x: hidden; - overflow-y: scroll; - - > .pin { - cursor: pointer; - margin: 20px 0 20px 9px; - padding: 14px 3px; - height: 40px; - width: 40px; - text-align: center; - overflow: hidden; - @include ease-in(); - @include border-radius(3px); - font-family: $font-semibold; - font-size: 12px; - letter-spacing: -1px; - background-color: $color-gray; - color: $color-white; - - > .key { - width: 30px; - text-align: center; - display: inline-block; - overflow: hidden; - } - - &:hover { - background-color: $color-link; - color: $color-white; - } - } - - > .sortable-ghost { - background-color: $color-gray; - color: $color-off-white; - } - } -} diff --git a/gui/app/styles/view/layout-sidebar.scss b/gui/app/styles/view/layout-sidebar.scss index c069d19f..e8a2799a 100644 --- a/gui/app/styles/view/layout-sidebar.scss +++ b/gui/app/styles/view/layout-sidebar.scss @@ -98,15 +98,16 @@ $sidebar-width: 400px; > .title { color: $color-primary; - font-size: 1.1rem; - margin-bottom: 30px; + font-size: 1.2rem; + margin-bottom: 30px; + font-weight: bold; } .document-sidebar-form-wrapper { padding: 20px; border: 1px solid $color-stroke; - @include border-radius(3px); background-color: $color-white; + @include border-radius(3px); } } @@ -120,8 +121,11 @@ $sidebar-width: 400px; } .navigation { - margin: 15px 0 0 0; - text-align: center; + margin: 0 0 0 0; + padding: 10px 0; + text-align: center; + background-color: $color-sidebar-navigation; + border-bottom: 1px solid $color-sidebar-navigation-border; .round-button-mono { > .material-icons { @@ -145,3 +149,42 @@ $sidebar-width: 400px; vertical-align: top; } } + +.document-sidebar-toolbar { + margin: 10px 0 0 0; + padding: 10px 0; + text-align: center; + // background-color: $color-sidebar-toolbar; + + > .round-button-mono { + background-color: $color-white; + border-color: $color-sidebar-border; + + > .material-icons { + color: $color-gray; + @include ease-in(); + } + + &:hover { + > .material-icons { + color: $color-link; + } + } + } + + > .selected { + background-color: $color-primary; + border-color: $color-primary; + + > .material-icons { + color: $color-off-white; + @include ease-in(); + } + + &:hover { + > .material-icons { + color: $color-white; + } + } + } +} diff --git a/gui/app/templates/components/customize/user-admin.hbs b/gui/app/templates/components/customize/user-admin.hbs index 1f1c8bcb..6c81906c 100644 --- a/gui/app/templates/components/customize/user-admin.hbs +++ b/gui/app/templates/components/customize/user-admin.hbs @@ -29,34 +29,30 @@ - {{#each filteredUsers as |user|}} + {{#each users as |user|}}
- {{#unless user.me}} - {{#if user.selected}} - check_box - {{else}} - check_box_outline_blank - {{/if}} - {{/unless}} + {{#if user.selected}} + check_box + {{else if user.me}} + check_box_outline_blank + {{else}} + check_box_outline_blank + {{/if}}
{{ user.fullname }}
- {{#if user.me}} - check_box - {{else if user.editor}} + {{#if user.editor}} check_box {{else}} check_box_outline_blank {{/if}} - {{#if user.me}} - check_box - {{else if user.viewUsers}} + {{#if user.viewUsers}} check_box {{else}} check_box_outline_blank diff --git a/gui/app/templates/components/document/document-activity.hbs b/gui/app/templates/components/document/document-activity.hbs new file mode 100644 index 00000000..53180d75 --- /dev/null +++ b/gui/app/templates/components/document/document-activity.hbs @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/gui/app/templates/components/document/document-index.hbs b/gui/app/templates/components/document/document-index.hbs index 3c65420f..445ba594 100644 --- a/gui/app/templates/components/document/document-index.hbs +++ b/gui/app/templates/components/document/document-index.hbs @@ -1,5 +1,6 @@