summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorshoetten <simon@hoetten.org>2016-02-05 21:01:43 +0100
committershoetten <simon@hoetten.org>2016-11-22 21:28:31 +0100
commit80b93ce7117326464b55a76a9efbeeff36f28248 (patch)
tree83f884f557f26ca43a9c7d7bf682ad1582199267 /client
parentd4497d7aeb968dbb9f8c4b84fbcc0f7cc3668167 (diff)
downloadwekan-80b93ce7117326464b55a76a9efbeeff36f28248.tar.gz
wekan-80b93ce7117326464b55a76a9efbeeff36f28248.tar.bz2
wekan-80b93ce7117326464b55a76a9efbeeff36f28248.zip
Display start and due dates in minicards.
Diffstat (limited to 'client')
-rw-r--r--client/components/cards/cardDate.js24
-rw-r--r--client/components/cards/minicard.jade6
-rw-r--r--client/components/cards/minicard.styl5
3 files changed, 28 insertions, 7 deletions
diff --git a/client/components/cards/cardDate.js b/client/components/cards/cardDate.js
index 4a24941d..4152d618 100644
--- a/client/components/cards/cardDate.js
+++ b/client/components/cards/cardDate.js
@@ -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');
diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade
index 1dfd2f8e..edc7d2d3 100644
--- a/client/components/cards/minicard.jade
+++ b/client/components/cards/minicard.jade
@@ -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
diff --git a/client/components/cards/minicard.styl b/client/components/cards/minicard.styl
index 0f6f8ad2..a61f6067 100644
--- a/client/components/cards/minicard.styl
+++ b/client/components/cards/minicard.styl
@@ -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