mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 08:20:12 +01:00
Added hide/show to show counters and members on All Boards (Admin Panel)
This commit is contained in:
parent
c307aa6354
commit
9dff09fbcf
10 changed files with 160 additions and 27 deletions
|
|
@ -94,11 +94,13 @@ template(name="boardList")
|
||||||
span.board-list-item-name(title="{{_ 'board-drag-drop-reorder-or-click-open'}}")
|
span.board-list-item-name(title="{{_ 'board-drag-drop-reorder-or-click-open'}}")
|
||||||
+viewer
|
+viewer
|
||||||
= title
|
= title
|
||||||
|
unless currentSetting.hideBoardMemberList
|
||||||
if allowsBoardMemberList
|
if allowsBoardMemberList
|
||||||
.minicard-members
|
.minicard-members
|
||||||
each member in boardMembers _id
|
each member in boardMembers _id
|
||||||
a.name
|
a.name
|
||||||
+userAvatar(userId=member noRemove=true)
|
+userAvatar(userId=member noRemove=true)
|
||||||
|
unless currentSetting.hideCardCounterList
|
||||||
if allowsCardCounterList
|
if allowsCardCounterList
|
||||||
.minicard-lists.flex.flex-wrap
|
.minicard-lists.flex.flex-wrap
|
||||||
each list in boardLists _id
|
each list in boardLists _id
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,18 @@ import { TAPi18n } from '/imports/i18n';
|
||||||
|
|
||||||
const subManager = new SubsManager();
|
const subManager = new SubsManager();
|
||||||
|
|
||||||
|
Template.boardList.helpers({
|
||||||
|
currentSetting() {
|
||||||
|
return Settings.findOne();
|
||||||
|
},
|
||||||
|
hideCardCounterList() {
|
||||||
|
return Utils.isMiniScreen() && Session.get('currentBoard');
|
||||||
|
},
|
||||||
|
hideBoardMemberList() {
|
||||||
|
return Utils.isMiniScreen() && Session.get('currentBoard');
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
Template.boardListHeaderBar.events({
|
Template.boardListHeaderBar.events({
|
||||||
'click .js-open-archived-board'() {
|
'click .js-open-archived-board'() {
|
||||||
Modal.open('archivedBoards');
|
Modal.open('archivedBoards');
|
||||||
|
|
|
||||||
|
|
@ -253,6 +253,20 @@ template(name='layoutSettings')
|
||||||
.title {{_ 'automatic-linked-url-schemes'}}
|
.title {{_ 'automatic-linked-url-schemes'}}
|
||||||
.form-group
|
.form-group
|
||||||
textarea#automatic-linked-url-schemes.wekan-form-control= currentSetting.automaticLinkedUrlSchemes
|
textarea#automatic-linked-url-schemes.wekan-form-control= currentSetting.automaticLinkedUrlSchemes
|
||||||
|
li.layout-form
|
||||||
|
.title {{_ 'hide-card-counter-list'}}
|
||||||
|
.form-group.flex
|
||||||
|
input.wekan-form-control#hide-card-counter-list(type="radio" name="hideCardCounterList" value="true" checked="{{#if currentSetting.hideCardCounterList}}checked{{/if}}")
|
||||||
|
span {{_ 'yes'}}
|
||||||
|
input.wekan-form-control#hide-card-counter-list(type="radio" name="hideCardCounterList" value="false" checked="{{#unless currentSetting.hideCardCounterList}}checked{{/unless}}")
|
||||||
|
span {{_ 'no'}}
|
||||||
|
li.layout-form
|
||||||
|
.title {{_ 'hide-board-member-list'}}
|
||||||
|
.form-group.flex
|
||||||
|
input.wekan-form-control#hide-board-member-list(type="radio" name="hideBoardMemberList" value="true" checked="{{#if currentSetting.hideBoardMemberList}}checked{{/if}}")
|
||||||
|
span {{_ 'yes'}}
|
||||||
|
input.wekan-form-control#hide-board-member-list(type="radio" name="hideBoardMemberList" value="false" checked="{{#unless currentSetting.hideBoardMemberList}}checked{{/unless}}")
|
||||||
|
span {{_ 'no'}}
|
||||||
li
|
li
|
||||||
button.js-save-layout.primary {{_ 'save'}}
|
button.js-save-layout.primary {{_ 'save'}}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,12 @@ BlazeComponent.extendComponent({
|
||||||
toggleHideLogo() {
|
toggleHideLogo() {
|
||||||
$('#hide-logo').toggleClass('is-checked');
|
$('#hide-logo').toggleClass('is-checked');
|
||||||
},
|
},
|
||||||
|
toggleHideCardCounterList() {
|
||||||
|
$('#hide-card-counter-list').toggleClass('is-checked');
|
||||||
|
},
|
||||||
|
toggleHideBoardMemberList() {
|
||||||
|
$('#hide-board-member-list').toggleClass('is-checked');
|
||||||
|
},
|
||||||
toggleDisplayAuthenticationMethod() {
|
toggleDisplayAuthenticationMethod() {
|
||||||
$('#display-authentication-method').toggleClass('is-checked');
|
$('#display-authentication-method').toggleClass('is-checked');
|
||||||
},
|
},
|
||||||
|
|
@ -230,6 +236,8 @@ BlazeComponent.extendComponent({
|
||||||
.val()
|
.val()
|
||||||
.trim();
|
.trim();
|
||||||
const hideLogoChange = $('input[name=hideLogo]:checked').val() === 'true';
|
const hideLogoChange = $('input[name=hideLogo]:checked').val() === 'true';
|
||||||
|
const hideCardCounterListChange = $('input[name=hideCardCounterList]:checked').val() === 'true';
|
||||||
|
const hideBoardMemberListChange = $('input[name=hideBoardMemberList]:checked').val() === 'true';
|
||||||
const displayAuthenticationMethod =
|
const displayAuthenticationMethod =
|
||||||
$('input[name=displayAuthenticationMethod]:checked').val() === 'true';
|
$('input[name=displayAuthenticationMethod]:checked').val() === 'true';
|
||||||
const defaultAuthenticationMethod = $('#defaultAuthenticationMethod').val();
|
const defaultAuthenticationMethod = $('#defaultAuthenticationMethod').val();
|
||||||
|
|
@ -241,6 +249,8 @@ BlazeComponent.extendComponent({
|
||||||
$set: {
|
$set: {
|
||||||
productName,
|
productName,
|
||||||
hideLogo: hideLogoChange,
|
hideLogo: hideLogoChange,
|
||||||
|
hideCardCounterList: hideCardCounterListChange,
|
||||||
|
hideBoardMemberList: hideBoardMemberListChange,
|
||||||
customLoginLogoImageUrl,
|
customLoginLogoImageUrl,
|
||||||
customLoginLogoLinkUrl,
|
customLoginLogoLinkUrl,
|
||||||
customHelpLinkUrl,
|
customHelpLinkUrl,
|
||||||
|
|
@ -291,6 +301,8 @@ BlazeComponent.extendComponent({
|
||||||
'click button.js-save': this.saveMailServerInfo,
|
'click button.js-save': this.saveMailServerInfo,
|
||||||
'click button.js-send-smtp-test-email': this.sendSMTPTestEmail,
|
'click button.js-send-smtp-test-email': this.sendSMTPTestEmail,
|
||||||
'click a.js-toggle-hide-logo': this.toggleHideLogo,
|
'click a.js-toggle-hide-logo': this.toggleHideLogo,
|
||||||
|
'click a.js-toggle-hide-card-counter-list': this.toggleHideCardCounterList,
|
||||||
|
'click a.js-toggle-hide-board-member-list': this.toggleHideBoardMemberList,
|
||||||
'click button.js-save-layout': this.saveLayout,
|
'click button.js-save-layout': this.saveLayout,
|
||||||
'click a.js-toggle-display-authentication-method': this
|
'click a.js-toggle-display-authentication-method': this
|
||||||
.toggleDisplayAuthenticationMethod,
|
.toggleDisplayAuthenticationMethod,
|
||||||
|
|
|
||||||
|
|
@ -140,12 +140,14 @@ template(name="boardChangeColorPopup")
|
||||||
template(name="boardInfoOnMyBoardsPopup")
|
template(name="boardInfoOnMyBoardsPopup")
|
||||||
form.board-info-on-my-boards
|
form.board-info-on-my-boards
|
||||||
h3 {{_ 'show-at-all-boards-page'}}
|
h3 {{_ 'show-at-all-boards-page'}}
|
||||||
|
unless currentSetting.hideCardCounterList
|
||||||
div.check-div
|
div.check-div
|
||||||
a.flex.js-field-has-cardcounterlist(class="{{#if allowsCardCounterList}}is-checked{{/if}}")
|
a.flex.js-field-has-cardcounterlist(class="{{#if allowsCardCounterList}}is-checked{{/if}}")
|
||||||
.materialCheckBox(class="{{#if allowsCardCounterList}}is-checked{{/if}}")
|
.materialCheckBox(class="{{#if allowsCardCounterList}}is-checked{{/if}}")
|
||||||
span
|
span
|
||||||
i.fa.fa-sign-out
|
i.fa.fa-sign-out
|
||||||
| {{_ 'show-card-counter-per-list'}}
|
| {{_ 'show-card-counter-per-list'}}
|
||||||
|
unless currentSetting.hideBoardMemberList
|
||||||
div.check-div
|
div.check-div
|
||||||
a.flex.js-field-has-boardmemberlist(class="{{#if allowsBoardMemberList}}is-checked{{/if}}")
|
a.flex.js-field-has-boardmemberlist(class="{{#if allowsBoardMemberList}}is-checked{{/if}}")
|
||||||
.materialCheckBox(class="{{#if allowsBoardMemberList}}is-checked{{/if}}")
|
.materialCheckBox(class="{{#if allowsBoardMemberList}}is-checked{{/if}}")
|
||||||
|
|
@ -407,6 +409,8 @@ template(name="boardMenuPopup")
|
||||||
i.fa.fa-paint-brush
|
i.fa.fa-paint-brush
|
||||||
| {{_ 'board-change-color'}}
|
| {{_ 'board-change-color'}}
|
||||||
if currentUser.isBoardAdmin
|
if currentUser.isBoardAdmin
|
||||||
|
unless currentSetting.hideBoardMemberList
|
||||||
|
unless currentSetting.hideCardCounterList
|
||||||
li
|
li
|
||||||
a.js-board-info-on-my-boards(title="{{_ 'board-info-on-my-boards'}}")
|
a.js-board-info-on-my-boards(title="{{_ 'board-info-on-my-boards'}}")
|
||||||
i.fa.fa-id-card-o
|
i.fa.fa-id-card-o
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,8 @@ BlazeComponent.extendComponent({
|
||||||
onCreated() {
|
onCreated() {
|
||||||
this._isOpen = new ReactiveVar(false);
|
this._isOpen = new ReactiveVar(false);
|
||||||
this._view = new ReactiveVar(defaultView);
|
this._view = new ReactiveVar(defaultView);
|
||||||
|
this._hideCardCounterList = new ReactiveVar(false);
|
||||||
|
this._hideBoardMemberList = new ReactiveVar(false);
|
||||||
Sidebar = this;
|
Sidebar = this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -143,6 +145,18 @@ Template.homeSidebar.helpers({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Template.boardInfoOnMyBoardsPopup.helpers({
|
||||||
|
currentSetting() {
|
||||||
|
return Settings.findOne();
|
||||||
|
},
|
||||||
|
hideCardCounterList() {
|
||||||
|
return Utils.isMiniScreen() && Session.get('currentBoard');
|
||||||
|
},
|
||||||
|
hideBoardMemberList() {
|
||||||
|
return Utils.isMiniScreen() && Session.get('currentBoard');
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
EscapeActions.register(
|
EscapeActions.register(
|
||||||
'sidebarView',
|
'sidebarView',
|
||||||
() => {
|
() => {
|
||||||
|
|
|
||||||
|
|
@ -854,7 +854,8 @@
|
||||||
"custom-product-name": "Custom Product Name",
|
"custom-product-name": "Custom Product Name",
|
||||||
"layout": "Layout",
|
"layout": "Layout",
|
||||||
"hide-logo": "Hide Logo",
|
"hide-logo": "Hide Logo",
|
||||||
"hide-logo2": "Hide Logo2",
|
"hide-card-counter-list": "Hide card counter list on All Boards",
|
||||||
|
"hide-board-member-list": "Hide board member list on All Boards",
|
||||||
"add-custom-html-after-body-start": "Add Custom HTML after <body> start",
|
"add-custom-html-after-body-start": "Add Custom HTML after <body> start",
|
||||||
"add-custom-html-before-body-end": "Add Custom HTML before </body> end",
|
"add-custom-html-before-body-end": "Add Custom HTML before </body> end",
|
||||||
"error-undefined": "Something went wrong",
|
"error-undefined": "Something went wrong",
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,14 @@ Settings.attachSchema(
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
|
hideCardCounterList: {
|
||||||
|
type: Boolean,
|
||||||
|
optional: true,
|
||||||
|
},
|
||||||
|
hideBoardMemberList: {
|
||||||
|
type: Boolean,
|
||||||
|
optional: true,
|
||||||
|
},
|
||||||
customLoginLogoImageUrl: {
|
customLoginLogoImageUrl: {
|
||||||
type: String,
|
type: String,
|
||||||
optional: true,
|
optional: true,
|
||||||
|
|
|
||||||
|
|
@ -509,6 +509,38 @@ Migrations.add('add-hide-logo', () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Migrations.add('add-hide-card-counter-list', () => {
|
||||||
|
Settings.update(
|
||||||
|
{
|
||||||
|
hideCardCounterList: {
|
||||||
|
$exists: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
$set: {
|
||||||
|
hideCardCounterList: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
noValidateMulti,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
Migrations.add('add-hide-board-member-list', () => {
|
||||||
|
Settings.update(
|
||||||
|
{
|
||||||
|
hideBoardMemberList: {
|
||||||
|
$exists: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
$set: {
|
||||||
|
hideBoardMemberList: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
noValidateMulti,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
Migrations.add('add-displayAuthenticationMethod', () => {
|
Migrations.add('add-displayAuthenticationMethod', () => {
|
||||||
Settings.update(
|
Settings.update(
|
||||||
{
|
{
|
||||||
|
|
@ -1126,6 +1158,38 @@ Migrations.add('add-hide-logo-by-default', () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Migrations.add('add-hide-card-counter-list-by-default', () => {
|
||||||
|
Settings.update(
|
||||||
|
{
|
||||||
|
hideCardCounterList: {
|
||||||
|
hideCardCounterList: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
$set: {
|
||||||
|
hideCardCounterList: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
noValidateMulti,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
Migrations.add('add-hide-board-member-list-by-default', () => {
|
||||||
|
Settings.update(
|
||||||
|
{
|
||||||
|
hideBoardMemberList: {
|
||||||
|
hideBoardMember: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
$set: {
|
||||||
|
hideBoardMemberList: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
noValidateMulti,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
Migrations.add('add-card-number-allowed', () => {
|
Migrations.add('add-card-number-allowed', () => {
|
||||||
Boards.update(
|
Boards.update(
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ Meteor.publish('setting', () => {
|
||||||
disableForgotPassword: 1,
|
disableForgotPassword: 1,
|
||||||
productName: 1,
|
productName: 1,
|
||||||
hideLogo: 1,
|
hideLogo: 1,
|
||||||
|
hideCardCounterList: 1,
|
||||||
|
hideBoardMemberList: 1,
|
||||||
customLoginLogoImageUrl: 1,
|
customLoginLogoImageUrl: 1,
|
||||||
customLoginLogoLinkUrl: 1,
|
customLoginLogoLinkUrl: 1,
|
||||||
customHelpLinkUrl: 1,
|
customHelpLinkUrl: 1,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue