mirror of
https://github.com/wekan/wekan.git
synced 2025-04-20 12:07:11 -04: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 extends CardDate {
|
||||
class CardStartDate extends CardDate {
|
||||
onCreated() {
|
||||
super();
|
||||
let self = this;
|
||||
|
@ -173,10 +172,10 @@ const CardDate = BlazeComponent.extendComponent({
|
|||
'click .js-edit-date': Popup.open('editCardStartDate'),
|
||||
});
|
||||
}
|
||||
}).register('cardStartDate');
|
||||
}
|
||||
CardStartDate.register('cardStartDate');
|
||||
|
||||
// cardDueDate
|
||||
(class extends CardDate {
|
||||
class CardDueDate extends CardDate {
|
||||
onCreated() {
|
||||
super();
|
||||
let self = this;
|
||||
|
@ -190,4 +189,17 @@ const CardDate = BlazeComponent.extendComponent({
|
|||
'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
|
||||
span.badge-icon.fa.fa-paperclip
|
||||
span.badge-text= attachments.count
|
||||
if startAt
|
||||
.badge
|
||||
+minicardStartDate
|
||||
if dueAt
|
||||
.badge
|
||||
+minicardDueDate
|
||||
|
|
|
@ -91,10 +91,13 @@
|
|||
margin-right: 11px
|
||||
margin-bottom: 3px
|
||||
font-size: 0.9em
|
||||
|
||||
&:last-of-type
|
||||
margin-right: 0
|
||||
|
||||
.badge-icon,
|
||||
.badge-text
|
||||
vertical-align: top
|
||||
vertical-align: middle
|
||||
|
||||
.badge-text
|
||||
font-size: 0.9em
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue