mirror of
https://github.com/wekan/wekan.git
synced 2026-01-06 01:28:49 +01:00
Merge pull request #31 from mario-orlicky/show-cards-count
New option to set up minimum limit to show cards count for each list …
This commit is contained in:
commit
e41eeae09f
7 changed files with 52 additions and 0 deletions
|
|
@ -6,6 +6,10 @@ template(name="listHeader")
|
|||
h2.list-header-name(
|
||||
class="{{#if currentUser.isBoardMember}}js-open-inlined-form is-editable{{/if}}")
|
||||
= title
|
||||
if showCardsCountForList cards.count
|
||||
= cards.count
|
||||
span.lowercase
|
||||
| {{_ 'cards'}}
|
||||
if currentUser.isBoardMember
|
||||
if isWatching
|
||||
i.list-header-watch-icon.fa.fa-eye
|
||||
|
|
|
|||
|
|
@ -13,6 +13,14 @@ BlazeComponent.extendComponent({
|
|||
return list.findWatcher(Meteor.userId());
|
||||
},
|
||||
|
||||
limitToShowCardsCount() {
|
||||
return Meteor.user().getLimitToShowCardsCount();
|
||||
},
|
||||
|
||||
showCardsCountForList(count) {
|
||||
return count > this.limitToShowCardsCount();
|
||||
},
|
||||
|
||||
events() {
|
||||
return [{
|
||||
'click .js-open-list-menu': Popup.open('listAction'),
|
||||
|
|
|
|||
|
|
@ -374,3 +374,8 @@ a
|
|||
.wrapper
|
||||
height: 100%
|
||||
margin: 0px
|
||||
|
||||
.inline-input
|
||||
height: 37px
|
||||
margin: 8px 10px 0 0
|
||||
width: 50px
|
||||
|
|
|
|||
|
|
@ -72,3 +72,8 @@ template(name="changeSettingsPopup")
|
|||
| {{_ 'hide-system-messages'}}
|
||||
if hiddenSystemMessages
|
||||
i.fa.fa-check
|
||||
li
|
||||
label.bold
|
||||
| {{_ 'show-cards-minimum-count'}}
|
||||
input#show-cards-count-at.inline-input.left(type="number" value="#{showCardsCountAt}" min="1" max="99" onkeydown="return false")
|
||||
input.js-apply-show-cards-at.left(type="submit" value="{{_ 'apply'}}")
|
||||
|
|
|
|||
|
|
@ -95,10 +95,21 @@ Template.changeSettingsPopup.helpers({
|
|||
hiddenSystemMessages() {
|
||||
return Meteor.user().hasHiddenSystemMessages();
|
||||
},
|
||||
showCardsCountAt() {
|
||||
return Meteor.user().getLimitToShowCardsCount();
|
||||
},
|
||||
});
|
||||
|
||||
Template.changeSettingsPopup.events({
|
||||
'click .js-toggle-system-messages'() {
|
||||
Meteor.call('toggleSystemMessages');
|
||||
},
|
||||
'click .js-apply-show-cards-at'(evt, tpl) {
|
||||
evt.preventDefault();
|
||||
const minLimit = parseInt(tpl.$('#show-cards-count-at').val(), 10);
|
||||
if (!isNaN(minLimit)) {
|
||||
Meteor.call('changeLimitToShowCardsCount', minLimit);
|
||||
Popup.back();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue