summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2018-04-20 23:52:13 -0300
committerAndrés Manelli <andresmanelli@gmail.com>2018-08-11 00:15:13 +0200
commitf0597ef0c496352cb102d85227a46831a8b04c57 (patch)
treeef43bd7b39f8bb33f965144f849be1127ecdfd78
parent10aab8a7336ff9a6c313eb34b22771b70b3df5d0 (diff)
downloadwekan-f0597ef0c496352cb102d85227a46831a8b04c57.tar.gz
wekan-f0597ef0c496352cb102d85227a46831a8b04c57.tar.bz2
wekan-f0597ef0c496352cb102d85227a46831a8b04c57.zip
Indicate board or card through icons. Indicate if archived
-rw-r--r--client/components/cards/cardDetails.jade7
-rw-r--r--client/components/cards/minicard.jade11
-rw-r--r--client/components/cards/minicard.js11
-rw-r--r--client/components/cards/minicard.styl2
-rw-r--r--i18n/en.i18n.json1
-rw-r--r--models/cards.js12
6 files changed, 40 insertions, 4 deletions
diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade
index 71b3bce4..d8efc7a6 100644
--- a/client/components/cards/cardDetails.jade
+++ b/client/components/cards/cardDetails.jade
@@ -20,8 +20,11 @@ template(name="cardDetails")
// else
{{_ 'top-level-card'}}
- if archived
- p.warning {{_ 'card-archived'}}
+ if getArchived
+ if isImportedBoard
+ p.warning {{_ 'board-archived'}}
+ else
+ p.warning {{_ 'card-archived'}}
.card-details-items
.card-details-item.card-details-item-received
diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade
index e7e38e7a..450af3c6 100644
--- a/client/components/cards/minicard.jade
+++ b/client/components/cards/minicard.jade
@@ -15,8 +15,15 @@ template(name="minicard")
if $eq 'prefix-with-parent' currentBoard.presentParentTask
.parent-prefix
| {{ parentCardName }}
- if isImported
- span.imported-icon.fa.fa-share-alt
+ if isImportedBoard
+ a.js-imported-link
+ span.imported-icon.fa.fa-folder
+ else if isImportedCard
+ a.js-imported-link
+ span.imported-icon.fa.fa-id-card
+ if getArchived
+ span.imported-icon.imported-archived.fa.fa-archive
+
+viewer
= getTitle
if $eq 'subtext-with-full-path' currentBoard.presentParentTask
diff --git a/client/components/cards/minicard.js b/client/components/cards/minicard.js
index a98b5730..e81705a9 100644
--- a/client/components/cards/minicard.js
+++ b/client/components/cards/minicard.js
@@ -6,4 +6,15 @@ BlazeComponent.extendComponent({
template() {
return 'minicard';
},
+
+ events() {
+ return [{
+ 'click .js-imported-link' (evt) {
+ if (this.data().isImportedCard())
+ Utils.goCardId(this.data().importedId);
+ else if (this.data().isImportedBoard())
+ Utils.goBoardId(this.data().importedId);
+ },
+ }];
+ },
}).register('minicard');
diff --git a/client/components/cards/minicard.styl b/client/components/cards/minicard.styl
index f593c342..89beb1c2 100644
--- a/client/components/cards/minicard.styl
+++ b/client/components/cards/minicard.styl
@@ -51,6 +51,8 @@
margin-right: 11px
vertical-align: baseline
font-size: 0.9em
+ .imported-archived
+ color: #937760
.is-selected &
transform: translateX(11px)
diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json
index 08fc129f..bd9780a7 100644
--- a/i18n/en.i18n.json
+++ b/i18n/en.i18n.json
@@ -109,6 +109,7 @@
"bucket-example": "Like “Bucket List” for example",
"cancel": "Cancel",
"card-archived": "This card is moved to Recycle Bin.",
+ "board-archived": "This board is moved to Recycle Bin.",
"card-comments-title": "This card has %s comment.",
"card-delete-notice": "Deleting is permanent. You will lose all actions associated with this card.",
"card-delete-pop": "All actions will be removed from the activity feed and you won't be able to re-open the card. There is no undo.",
diff --git a/models/cards.js b/models/cards.js
index 8e1ffcaa..987ce330 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -721,6 +721,18 @@ Cards.helpers({
);
}
},
+
+ getArchived() {
+ if (this.isImportedCard()) {
+ const card = Cards.findOne({ _id: this.importedId });
+ return card.archived;
+ } else if (this.isImportedBoard()) {
+ const board = Boards.findOne({ _id: this.importedId});
+ return board.archived;
+ } else {
+ return this.archived;
+ }
+ },
});
Cards.mutations({