mirror of
https://github.com/wekan/wekan.git
synced 2026-02-11 02:34:20 +01:00
Added option to show/hide some badges on minicard
This commit is contained in:
parent
7df32ff4ac
commit
f3ebc4a28e
6 changed files with 94 additions and 6 deletions
|
|
@ -132,9 +132,10 @@ template(name="minicard")
|
|||
if expiredPoker
|
||||
span.badge-text {{ getPokerEstimation }}
|
||||
if attachments.length
|
||||
.badge
|
||||
span.badge-icon.fa.fa-paperclip
|
||||
span.badge-text= attachments.length
|
||||
if currentBoard.allowsBadgeAttachmentOnMinicard
|
||||
.badge
|
||||
span.badge-icon.fa.fa-paperclip
|
||||
span.badge-text= attachments.length
|
||||
if checklists.count
|
||||
.badge(class="{{#if checklistFinished}}is-finished{{/if}}")
|
||||
span.badge-icon.fa.fa-check-square-o
|
||||
|
|
@ -145,9 +146,10 @@ template(name="minicard")
|
|||
span.badge-text.check-list-text {{subtasksFinishedCount}}/{{allSubtasksCount}}
|
||||
//{{subtasksFinishedCount}}/{{subtasksCount}} does not work because when a subtaks is archived, the count goes down
|
||||
if currentBoard.allowsCardSortingByNumber
|
||||
.badge
|
||||
span.badge-icon.fa.fa-sort
|
||||
span.badge-text.check-list-sort {{ sort }}
|
||||
if currentBoard.allowsCardSortingByNumberOnMinicard
|
||||
.badge
|
||||
span.badge-icon.fa.fa-sort
|
||||
span.badge-text.check-list-sort {{ sort }}
|
||||
if currentBoard.allowsDescriptionTextOnMinicard
|
||||
if getDescription
|
||||
.minicard-description
|
||||
|
|
|
|||
|
|
@ -308,6 +308,18 @@ template(name="boardMinicardSettingsPopup")
|
|||
span
|
||||
i.fa.fa-paperclip
|
||||
| {{_ 'cover-attachment-on-minicard'}}
|
||||
div.check-div
|
||||
a.flex.js-field-has-badge-attachment-on-minicard(class="{{#if allowsBadgeAttachmentOnMinicard}}is-checked{{/if}}")
|
||||
.materialCheckBox(class="{{#if allowsBadgeAttachmentOnMinicard}}is-checked{{/if}}")
|
||||
span
|
||||
i.fa.fa-paperclip
|
||||
| {{_ 'badge-attachment-on-minicard'}}
|
||||
div.check-div
|
||||
a.flex.js-field-has-card-sorting-by-number-on-minicard(class="{{#if allowsCardSortingByNumberOnMinicard}}is-checked{{/if}}")
|
||||
.materialCheckBox(class="{{#if allowsCardSortingByNumberOnMinicard}}is-checked{{/if}}")
|
||||
span
|
||||
i.fa.fa-sort
|
||||
| {{_ 'card-sorting-by-number-on-minicard'}}
|
||||
|
||||
template(name="boardSubtaskSettingsPopup")
|
||||
form.board-subtask-settings
|
||||
|
|
|
|||
|
|
@ -1330,6 +1330,14 @@ BlazeComponent.extendComponent({
|
|||
return this.currentBoard.allowsCoverAttachmentOnMinicard;
|
||||
},
|
||||
|
||||
allowsBadgeAttachmentOnMinicard() {
|
||||
return this.currentBoard.allowsBadgeAttachmentOnMinicard;
|
||||
},
|
||||
|
||||
allowsCardSortingByNumberOnMinicard() {
|
||||
return this.currentBoard.allowsCardSortingByNumberOnMinicard;
|
||||
},
|
||||
|
||||
lists() {
|
||||
return Lists.find(
|
||||
{
|
||||
|
|
@ -1387,6 +1395,38 @@ BlazeComponent.extendComponent({
|
|||
this.currentBoard.allowsCoverAttachmentOnMinicard,
|
||||
);
|
||||
},
|
||||
'click .js-field-has-badge-attachment-on-minicard'(evt) {
|
||||
evt.preventDefault();
|
||||
this.currentBoard.allowsBadgeAttachmentOnMinicard = !this.currentBoard
|
||||
.allowsBadgeAttachmentOnMinicard;
|
||||
this.currentBoard.setallowsBadgeAttachmentOnMinicard(
|
||||
this.currentBoard.allowsBadgeAttachmentOnMinicard,
|
||||
);
|
||||
$(`.js-field-has-badge-attachment-on-minicard ${MCB}`).toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsBadgeAttachmentOnMinicard,
|
||||
);
|
||||
$('.js-field-has-badge-attachment-on-minicard').toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsBadgeAttachmentOnMinicard,
|
||||
);
|
||||
},
|
||||
'click .js-field-has-card-sorting-by-number-on-minicard'(evt) {
|
||||
evt.preventDefault();
|
||||
this.currentBoard.allowsCardSortingByNumberOnMinicard = !this.currentBoard
|
||||
.allowsCardSortingByNumberOnMinicard;
|
||||
this.currentBoard.setallowsCardSortingByNumberOnMinicard(
|
||||
this.currentBoard.allowsCardSortingByNumberOnMinicard,
|
||||
);
|
||||
$(`.js-field-has-card-sorting-by-number-on-minicard ${MCB}`).toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsCardSortingByNumberOnMinicard,
|
||||
);
|
||||
$('.js-field-has-card-sorting-by-number-on-minicard').toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsCardSortingByNumberOnMinicard,
|
||||
);
|
||||
},
|
||||
},
|
||||
];
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue