mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
Merge pull request #4454 from helioguardabaxo/master
Show description text on minicard
This commit is contained in:
commit
4534177f47
8 changed files with 76 additions and 2 deletions
|
@ -114,8 +114,9 @@ template(name="minicard")
|
|||
//span.badge-comment.badge-text
|
||||
//| {{_ 'comment'}}
|
||||
if getDescription
|
||||
.badge.badge-state-image-only(title=getDescription)
|
||||
span.badge-icon.fa.fa-align-left
|
||||
unless currentBoard.allowsDescriptionTextOnMinicard
|
||||
.badge.badge-state-image-only(title=getDescription)
|
||||
span.badge-icon.fa.fa-align-left
|
||||
if getVoteQuestion
|
||||
.badge.badge-state-image-only(title=getVoteQuestion)
|
||||
span.badge-icon.fa.fa-thumbs-up(class="{{#if voteState}}text-green{{/if}}")
|
||||
|
@ -144,6 +145,10 @@ template(name="minicard")
|
|||
.badge
|
||||
span.badge-icon.fa.fa-sort
|
||||
span.badge-text.check-list-sort {{ sort }}
|
||||
if currentBoard.allowsDescriptionTextOnMinicard
|
||||
if getDescription
|
||||
.minicard-description
|
||||
| {{ getDescription }}
|
||||
|
||||
template(name="editCardSortOrderPopup")
|
||||
input.js-edit-card-sort-popup(type='text' autofocus value=sort dir="auto")
|
||||
|
|
|
@ -201,6 +201,16 @@
|
|||
.minicard-assignees:empty
|
||||
display: none
|
||||
|
||||
.minicard-description {
|
||||
padding: 6px 0 6px 8px
|
||||
background-color: #eee
|
||||
width: 100%
|
||||
margin-bottom: 2px
|
||||
margin-left: -4px
|
||||
border-radius: 3px
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
&.minicard-composer
|
||||
margin-bottom: 10px
|
||||
|
||||
|
|
|
@ -236,6 +236,12 @@ template(name="boardCardSettingsPopup")
|
|||
i.fa.fa-align-left
|
||||
| {{_ 'description'}}
|
||||
| {{_ 'custom-field-text'}}
|
||||
div.check-div
|
||||
a.flex.js-field-has-description-text-on-minicard(class="{{#if allowsDescriptionTextOnMinicard}}is-checked{{/if}}")
|
||||
.materialCheckBox(class="{{#if allowsDescriptionTextOnMinicard}}is-checked{{/if}}")
|
||||
span
|
||||
i.fa.fa-align-left
|
||||
| {{_ 'description-on-minicard'}}
|
||||
div.check-div
|
||||
a.flex.js-field-has-checklists(class="{{#if allowsChecklists}}is-checked{{/if}}")
|
||||
.materialCheckBox(class="{{#if allowsChecklists}}is-checked{{/if}}")
|
||||
|
|
|
@ -859,6 +859,10 @@ BlazeComponent.extendComponent({
|
|||
return this.currentBoard.allowsDescriptionText;
|
||||
},
|
||||
|
||||
allowsDescriptionTextOnMinicard() {
|
||||
return this.currentBoard.allowsDescriptionTextOnMinicard;
|
||||
},
|
||||
|
||||
isBoardSelected() {
|
||||
return this.currentBoard.dateSettingsDefaultBoardID;
|
||||
},
|
||||
|
@ -1142,6 +1146,22 @@ BlazeComponent.extendComponent({
|
|||
this.currentBoard.allowsDescriptionText,
|
||||
);
|
||||
},
|
||||
'click .js-field-has-description-text-on-minicard'(evt) {
|
||||
evt.preventDefault();
|
||||
this.currentBoard.allowsDescriptionTextOnMinicard = !this.currentBoard
|
||||
.allowsDescriptionTextOnMinicard;
|
||||
this.currentBoard.setallowsDescriptionTextOnMinicard(
|
||||
this.currentBoard.allowsDescriptionTextOnMinicard,
|
||||
);
|
||||
$(`.js-field-has-description-text-on-minicard ${MCB}`).toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsDescriptionTextOnMinicard,
|
||||
);
|
||||
$('.js-field-has-description-text-on-minicard').toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsDescriptionTextOnMinicard,
|
||||
);
|
||||
},
|
||||
'click .js-field-has-checklists'(evt) {
|
||||
evt.preventDefault();
|
||||
this.currentBoard.allowsChecklists = !this.currentBoard
|
||||
|
|
|
@ -706,6 +706,7 @@
|
|||
"deposit-subtasks-board": "Deposit subtasks to this board:",
|
||||
"deposit-subtasks-list": "Landing list for subtasks deposited here:",
|
||||
"show-parent-in-minicard": "Show parent in minicard:",
|
||||
"description-on-minicard": "Description on minicard",
|
||||
"prefix-with-full-path": "Prefix with full path",
|
||||
"prefix-with-parent": "Prefix with parent",
|
||||
"subtext-with-full-path": "Subtext with full path",
|
||||
|
|
|
@ -376,6 +376,13 @@ Boards.attachSchema(
|
|||
type: Boolean,
|
||||
defaultValue: true,
|
||||
},
|
||||
allowsDescriptionTextOnMinicard: {
|
||||
/**
|
||||
* Does the board allows description text on minicard?
|
||||
*/
|
||||
type: Boolean,
|
||||
defaultValue: false,
|
||||
},
|
||||
|
||||
allowsCardNumber: {
|
||||
/**
|
||||
|
@ -1415,6 +1422,10 @@ Boards.mutations({
|
|||
return { $set: { allowsDescriptionText } };
|
||||
},
|
||||
|
||||
setallowsDescriptionTextOnMinicard(allowsDescriptionTextOnMinicard) {
|
||||
return { $set: { allowsDescriptionTextOnMinicard } };
|
||||
},
|
||||
|
||||
setAllowsActivities(allowsActivities) {
|
||||
return { $set: { allowsActivities } };
|
||||
},
|
||||
|
|
|
@ -2840,6 +2840,10 @@ definitions:
|
|||
description: |
|
||||
Does the board allows description text?
|
||||
type: boolean
|
||||
allowsDescriptionTextOnMinicard:
|
||||
description: |
|
||||
Does the board allows description text on minicard?
|
||||
type: boolean
|
||||
allowsCardNumber:
|
||||
description: |
|
||||
Does the board allows card numbers?
|
||||
|
@ -2971,6 +2975,7 @@ definitions:
|
|||
- allowsComments
|
||||
- allowsDescriptionTitle
|
||||
- allowsDescriptionText
|
||||
- allowsDescriptionTextOnMinicard
|
||||
- allowsCardNumber
|
||||
- allowsActivities
|
||||
- allowsLabels
|
||||
|
|
|
@ -1034,6 +1034,22 @@ Migrations.add('add-description-text-allowed', () => {
|
|||
);
|
||||
});
|
||||
|
||||
Migrations.add('add-description-text-allowed-on-minicard', () => {
|
||||
Boards.update(
|
||||
{
|
||||
allowsDescriptionTextOnMinicard: {
|
||||
$exists: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
allowsDescriptionTextOnMinicard: true,
|
||||
},
|
||||
},
|
||||
noValidateMulti,
|
||||
);
|
||||
});
|
||||
|
||||
Migrations.add('add-sort-field-to-boards', () => {
|
||||
Boards.find().forEach((board, index) => {
|
||||
if (!board.hasOwnProperty('sort')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue