summaryrefslogtreecommitdiffstats
path: root/client/components/boards
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2017-11-21 10:03:02 +0200
committerLauri Ojansivu <x@xet7.org>2017-11-21 10:03:02 +0200
commite162fe3c0fc425efe925dd15f55771f9a3ee60f3 (patch)
treeb2015f2a7b8d099aa554027e482c8f9676a960d3 /client/components/boards
parentf3e7646cfa065ceea0cf1aaff1f5adbde457a32a (diff)
parent6dba4ccd4d0c8d7443e7d9c39ddafed2b8f1b6ca (diff)
downloadwekan-e162fe3c0fc425efe925dd15f55771f9a3ee60f3.tar.gz
wekan-e162fe3c0fc425efe925dd15f55771f9a3ee60f3.tar.bz2
wekan-e162fe3c0fc425efe925dd15f55771f9a3ee60f3.zip
Merge branch 'card-spent-time' of https://github.com/thuanpq/wekan into thuanpq-card-spent-time
Diffstat (limited to 'client/components/boards')
-rw-r--r--client/components/boards/boardsList.jade6
-rw-r--r--client/components/boards/boardsList.js12
-rw-r--r--client/components/boards/boardsList.styl17
3 files changed, 35 insertions, 0 deletions
diff --git a/client/components/boards/boardsList.jade b/client/components/boards/boardsList.jade
index ae82dfa9..95ce3678 100644
--- a/client/components/boards/boardsList.jade
+++ b/client/components/boards/boardsList.jade
@@ -20,6 +20,12 @@ template(name="boardList")
i.fa.js-star-board(
class="fa-star{{#if isStarred}} is-star-active{{else}}-o{{/if}}"
title="{{_ 'star-board-title'}}")
+
+ if hasSpentTimeCards
+ i.fa.js-has-spenttime-cards(
+ class="fa-circle{{#if hasOvertimeCards}} has-overtime-card-active{{else}} no-overtime-card-active{{/if}}"
+ title="{{#if hasOvertimeCards}}{{_ 'has-overtime-cards'}}{{else}}{{_ 'has-spenttime-cards'}}{{/if}}")
+
p.board-list-item-desc= description
li.js-add-board
a.board-list-item.label {{_ 'add-board'}}
diff --git a/client/components/boards/boardsList.js b/client/components/boards/boardsList.js
index e4bb050e..4ec4b534 100644
--- a/client/components/boards/boardsList.js
+++ b/client/components/boards/boardsList.js
@@ -1,3 +1,5 @@
+const subManager = new SubsManager();
+
BlazeComponent.extendComponent({
boards() {
return Boards.find({
@@ -13,6 +15,16 @@ BlazeComponent.extendComponent({
return user && user.hasStarred(this.currentData()._id);
},
+ hasOvertimeCards() {
+ subManager.subscribe('board', this.currentData()._id);
+ return this.currentData().hasOvertimeCards();
+ },
+
+ hasSpentTimeCards() {
+ subManager.subscribe('board', this.currentData()._id);
+ return this.currentData().hasSpentTimeCards();
+ },
+
isInvited() {
const user = Meteor.user();
return user && user.isInvitedTo(this.currentData()._id);
diff --git a/client/components/boards/boardsList.styl b/client/components/boards/boardsList.styl
index b4d21df6..6318ea94 100644
--- a/client/components/boards/boardsList.styl
+++ b/client/components/boards/boardsList.styl
@@ -74,6 +74,23 @@ $spaceBetweenTiles = 16px
transition-duration: .15s
transition-property: color, font-size, background
+ .fa-circle
+ bottom: 0;
+ font-size: 10px;
+ height: 10px;
+ line-height: 10px;
+ padding: 9px 9px;
+ position: absolute;
+ right: 0;
+ transition-duration: .15s
+ transition-property: color, font-size, background
+
+ .has-overtime-card-active
+ color: #eb4646 !important
+
+ .no-overtime-card-active
+ color: #3cb500 !important
+
.is-star-active
color: white