mirror of
https://github.com/wekan/wekan.git
synced 2025-12-21 01:40:13 +01:00
Display start and due dates in minicards.
This commit is contained in:
parent
d4497d7aeb
commit
80b93ce711
3 changed files with 28 additions and 7 deletions
|
|
@ -158,8 +158,7 @@ const CardDate = BlazeComponent.extendComponent({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// cardStartDate
|
class CardStartDate extends CardDate {
|
||||||
(class extends CardDate {
|
|
||||||
onCreated() {
|
onCreated() {
|
||||||
super();
|
super();
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
@ -173,10 +172,10 @@ const CardDate = BlazeComponent.extendComponent({
|
||||||
'click .js-edit-date': Popup.open('editCardStartDate'),
|
'click .js-edit-date': Popup.open('editCardStartDate'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).register('cardStartDate');
|
}
|
||||||
|
CardStartDate.register('cardStartDate');
|
||||||
|
|
||||||
// cardDueDate
|
class CardDueDate extends CardDate {
|
||||||
(class extends CardDate {
|
|
||||||
onCreated() {
|
onCreated() {
|
||||||
super();
|
super();
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
@ -190,4 +189,17 @@ const CardDate = BlazeComponent.extendComponent({
|
||||||
'click .js-edit-date': Popup.open('editCardDueDate'),
|
'click .js-edit-date': Popup.open('editCardDueDate'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).register('cardDueDate');
|
}
|
||||||
|
CardDueDate.register('cardDueDate');
|
||||||
|
|
||||||
|
(class extends CardStartDate {
|
||||||
|
showDate() {
|
||||||
|
return this.date.get().format('l');
|
||||||
|
}
|
||||||
|
}).register('minicardStartDate');
|
||||||
|
|
||||||
|
(class extends CardDueDate {
|
||||||
|
showDate() {
|
||||||
|
return this.date.get().format('l');
|
||||||
|
}
|
||||||
|
}).register('minicardDueDate');
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,9 @@ template(name="minicard")
|
||||||
.badge
|
.badge
|
||||||
span.badge-icon.fa.fa-paperclip
|
span.badge-icon.fa.fa-paperclip
|
||||||
span.badge-text= attachments.count
|
span.badge-text= attachments.count
|
||||||
|
if startAt
|
||||||
|
.badge
|
||||||
|
+minicardStartDate
|
||||||
|
if dueAt
|
||||||
|
.badge
|
||||||
|
+minicardDueDate
|
||||||
|
|
|
||||||
|
|
@ -92,9 +92,12 @@
|
||||||
margin-bottom: 3px
|
margin-bottom: 3px
|
||||||
font-size: 0.9em
|
font-size: 0.9em
|
||||||
|
|
||||||
|
&:last-of-type
|
||||||
|
margin-right: 0
|
||||||
|
|
||||||
.badge-icon,
|
.badge-icon,
|
||||||
.badge-text
|
.badge-text
|
||||||
vertical-align: top
|
vertical-align: middle
|
||||||
|
|
||||||
.badge-text
|
.badge-text
|
||||||
font-size: 0.9em
|
font-size: 0.9em
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue