summaryrefslogtreecommitdiffstats
path: root/client/components/cards
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2020-01-03 06:49:35 +0200
committerLauri Ojansivu <x@xet7.org>2020-01-03 06:49:35 +0200
commit2bf004120d5a43cd3c3c060fc7c0c30d1b01f220 (patch)
treea37e06277fa2ce240c06023d679c5fbef001e7a4 /client/components/cards
parent0709b5abc84714e8c87ef27f5f0841c2a38e6d68 (diff)
downloadwekan-2bf004120d5a43cd3c3c060fc7c0c30d1b01f220.tar.gz
wekan-2bf004120d5a43cd3c3c060fc7c0c30d1b01f220.tar.bz2
wekan-2bf004120d5a43cd3c3c060fc7c0c30d1b01f220.zip
Add Worker role.
Add more Font Awesome icons. Fix browser console errors when editing user profile name etc. Thanks to xet7 ! Closes #2788
Diffstat (limited to 'client/components/cards')
-rw-r--r--client/components/cards/attachments.jade26
-rw-r--r--client/components/cards/cardDate.js3
-rw-r--r--client/components/cards/cardDetails.jade283
-rw-r--r--client/components/cards/cardDetails.js46
-rw-r--r--client/components/cards/checklists.jade4
-rw-r--r--client/components/cards/checklists.js9
-rw-r--r--client/components/cards/minicard.js16
-rw-r--r--client/components/cards/subtasks.jade4
-rw-r--r--client/components/cards/subtasks.js9
9 files changed, 271 insertions, 129 deletions
diff --git a/client/components/cards/attachments.jade b/client/components/cards/attachments.jade
index 2a96f4f4..10b767f4 100644
--- a/client/components/cards/attachments.jade
+++ b/client/components/cards/attachments.jade
@@ -38,18 +38,20 @@ template(name="attachmentsGalery")
| {{_ 'download'}}
if currentUser.isBoardMember
unless currentUser.isCommentOnly
- if isImage
- a(class="{{#if $eq ../coverId _id}}js-remove-cover{{else}}js-add-cover{{/if}}")
- i.fa.fa-thumb-tack
- if($eq ../coverId _id)
- | {{_ 'remove-cover'}}
- else
- | {{_ 'add-cover'}}
- a.js-confirm-delete
- i.fa.fa-close
- | {{_ 'delete'}}
+ unless currentUser.isWorker
+ if isImage
+ a(class="{{#if $eq ../coverId _id}}js-remove-cover{{else}}js-add-cover{{/if}}")
+ i.fa.fa-thumb-tack
+ if($eq ../coverId _id)
+ | {{_ 'remove-cover'}}
+ else
+ | {{_ 'add-cover'}}
+ a.js-confirm-delete
+ i.fa.fa-close
+ | {{_ 'delete'}}
if currentUser.isBoardMember
unless currentUser.isCommentOnly
- li.attachment-item.add-attachment
- a.js-add-attachment {{_ 'add-attachment' }}
+ unless currentUser.isWorker
+ li.attachment-item.add-attachment
+ a.js-add-attachment {{_ 'add-attachment' }}
diff --git a/client/components/cards/cardDate.js b/client/components/cards/cardDate.js
index cb54b033..c4b5c6d8 100644
--- a/client/components/cards/cardDate.js
+++ b/client/components/cards/cardDate.js
@@ -97,7 +97,8 @@ Template.dateBadge.helpers({
return (
Meteor.user() &&
Meteor.user().isBoardMember() &&
- !Meteor.user().isCommentOnly()
+ !Meteor.user().isCommentOnly() &&
+ !Meteor.user().isWorker()
);
},
});
diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade
index 2b4f44b9..a7aa64ce 100644
--- a/client/components/cards/cardDetails.jade
+++ b/client/components/cards/cardDetails.jade
@@ -1,7 +1,7 @@
template(name="cardDetails")
section.card-details.js-card-details.js-perfect-scrollbar: .card-details-canvas
.card-details-header(class='{{#if colorClass}}card-details-{{colorClass}}{{/if}}')
- +inlinedForm(classNames="js-card-details-title")
+ +inlinedForm(classNames="{{#if canModifyCardWorker}}js-card-details-title{{/if}}")
+editCardTitleForm
else
unless isMiniScreen
@@ -13,11 +13,11 @@ template(name="cardDetails")
if currentUser.isBoardMember
a.fa.fa-navicon.card-details-menu-mobile-web.js-open-card-details-menu
h2.card-details-title.js-card-title(
- class="{{#if canModifyCard}}js-open-inlined-form is-editable{{/if}}")
+ class="{{#if canModifyCardWorker}}js-open-inlined-form is-editable{{/if}}")
+viewer
= getTitle
- if isWatching
- i.fa.fa-eye.card-details-watch
+ if isWatching
+ i.card-details-watch.fa.fa-eye
.card-details-path
each parentList
| &nbsp; &gt; &nbsp;
@@ -37,49 +37,66 @@ template(name="cardDetails")
.card-details-items
.card-details-item.card-details-item-received
- h3.card-details-item-title {{_ 'card-received'}}
+ h3
+ i.fa.fa-sign-out
+ card-details-item-title {{_ 'card-received'}}
if getReceived
+cardReceivedDate
else
if canModifyCard
- a.js-received-date {{_ 'add'}}
+ unless currentUser.isWorker
+ a.js-received-date {{_ 'add'}}
.card-details-item.card-details-item-start
- h3.card-details-item-title {{_ 'card-start'}}
+ h3
+ i.fa.fa-hourglass-start
+ card-details-item-title {{_ 'card-start'}}
if getStart
+cardStartDate
else
if canModifyCard
- a.js-start-date {{_ 'add'}}
+ unless currentUser.isWorker
+ a.js-start-date {{_ 'add'}}
.card-details-item.card-details-item-due
- h3.card-details-item-title {{_ 'card-due'}}
+ h3
+ i.fa.fa-sign-in
+ card-details-item-title {{_ 'card-due'}}
if getDue
+cardDueDate
else
if canModifyCard
- a.js-due-date {{_ 'add'}}
+ unless currentUser.isWorker
+ a.js-due-date {{_ 'add'}}
.card-details-item.card-details-item-end
- h3.card-details-item-title {{_ 'card-end'}}
+ h3
+ i.fa.fa-hourglass-end
+ card-details-item-title {{_ 'card-end'}}
if getEnd
+cardEndDate
else
if canModifyCard
- a.js-end-date {{_ 'add'}}
+ unless currentUser.isWorker
+ a.js-end-date {{_ 'add'}}
.card-details-items
.card-details-item.card-details-item-members
- h3.card-details-item-title {{_ 'members'}}
+ h3
+ i.fa.fa-users
+ card-details-item-title {{_ 'members'}}
each getMembers
+userAvatar(userId=this cardId=../_id)
| {{! XXX Hack to hide syntaxic coloration /// }}
if canModifyCard
- a.member.add-member.card-details-item-add-button.js-add-members(title="{{_ 'card-members-title'}}")
- i.fa.fa-plus
+ unless currentUser.isWorker
+ a.member.add-member.card-details-item-add-button.js-add-members(title="{{_ 'card-members-title'}}")
+ i.fa.fa-plus
.card-details-item.card-details-item-assignees
- h3.card-details-item-title {{_ 'assignee'}}
+ h3
+ i.fa.fa-user
+ card-details-item-title {{_ 'assignee'}}
each getAssignees
+userAvatarAssignee(userId=this cardId=../_id)
| {{! XXX Hack to hide syntaxic coloration /// }}
@@ -89,15 +106,18 @@ template(name="cardDetails")
i.fa.fa-plus
.card-details-item.card-details-item-labels
- h3.card-details-item-title {{_ 'labels'}}
+ h3
+ i.fa.fa-tags
+ card-details-item-title {{_ 'labels'}}
a(class="{{#if canModifyCard}}js-add-labels{{else}}is-disabled{{/if}}" title="{{_ 'card-labels-title'}}")
each labels
span.card-label(class="card-label-{{color}}" title=name)
+viewer
= name
if canModifyCard
- a.card-label.add-label.js-add-labels(title="{{_ 'card-labels-title'}}")
- i.fa.fa-plus
+ unless currentUser.isWorker
+ a.card-label.add-label.js-add-labels(title="{{_ 'card-labels-title'}}")
+ i.fa.fa-plus
.card-details-items
each customFieldsWD
@@ -118,26 +138,29 @@ template(name="cardDetails")
//- XXX We should use "editable" to avoid repetiting ourselves
if canModifyCard
- h3.card-details-item-title {{_ 'description'}}
- +inlinedCardDescription(classNames="card-description js-card-description")
- +editor(autofocus=true)
- | {{getUnsavedValue 'cardDescription' _id getDescription}}
- .edit-controls.clearfix
- button.primary(type="submit") {{_ 'save'}}
- a.fa.fa-times-thin.js-close-inlined-form
- else
- a.js-open-inlined-form
- if getDescription
- +viewer
- = getDescription
- else
- | {{_ 'edit'}}
- if (hasUnsavedValue 'cardDescription' _id)
- p.quiet
- | {{_ 'unsaved-description'}}
- a.js-open-inlined-form {{_ 'view-it'}}
- = ' - '
- a.js-close-inlined-form {{_ 'discard'}}
+ unless currentUser.isWorker
+ h3
+ i.fa.fa-align-left
+ card-details-item-title {{_ 'description'}}
+ +inlinedCardDescription(classNames="card-description js-card-description")
+ +editor(autofocus=true)
+ | {{getUnsavedValue 'cardDescription' _id getDescription}}
+ .edit-controls.clearfix
+ button.primary(type="submit") {{_ 'save'}}
+ a.fa.fa-times-thin.js-close-inlined-form
+ else
+ a.js-open-inlined-form
+ if getDescription
+ +viewer
+ = getDescription
+ else
+ | {{_ 'edit'}}
+ if (hasUnsavedValue 'cardDescription' _id)
+ p.quiet
+ | {{_ 'unsaved-description'}}
+ a.js-open-inlined-form {{_ 'view-it'}}
+ = ' - '
+ a.js-close-inlined-form {{_ 'discard'}}
else if getDescription
h3.card-details-item-title {{_ 'description'}}
+viewer
@@ -145,33 +168,39 @@ template(name="cardDetails")
.card-details-items
.card-details-item.card-details-item-name
- h3.card-details-item-title {{_ 'requested-by'}}
+ h3
+ i.fa.fa-shopping-cart
+ card-details-item-title {{_ 'requested-by'}}
if canModifyCard
- +inlinedForm(classNames="js-card-details-requester")
- +editCardRequesterForm
- else
- a.js-open-inlined-form
- if getRequestedBy
- +viewer
- = getRequestedBy
- else
- | {{_ 'add'}}
+ unless currentUser.isWorker
+ +inlinedForm(classNames="js-card-details-requester")
+ +editCardRequesterForm
+ else
+ a.js-open-inlined-form
+ if getRequestedBy
+ +viewer
+ = getRequestedBy
+ else
+ | {{_ 'add'}}
else if getRequestedBy
+viewer
= getRequestedBy
.card-details-item.card-details-item-name
- h3.card-details-item-title {{_ 'assigned-by'}}
+ h3
+ i.fa.fa-user-plus
+ card-details-item-title {{_ 'assigned-by'}}
if canModifyCard
- +inlinedForm(classNames="js-card-details-assigner")
- +editCardAssignerForm
- else
- a.js-open-inlined-form
- if getAssignedBy
- +viewer
- = getAssignedBy
- else
- | {{_ 'add'}}
+ unless currentUser.isWorker
+ +inlinedForm(classNames="js-card-details-assigner")
+ +editCardAssignerForm
+ else
+ a.js-open-inlined-form
+ if getAssignedBy
+ +viewer
+ = getAssignedBy
+ else
+ | {{_ 'add'}}
else if getRequestedBy
+viewer
= getAssignedBy
@@ -193,7 +222,9 @@ template(name="cardDetails")
hr
unless currentUser.isNoComments
.activity-title
- h3 {{ _ 'activity'}}
+ h3
+ i.fa.fa-history
+ | {{ _ 'activity'}}
if currentUser.isBoardMember
.material-toggle-switch
span.toggle-switch-title {{_ 'hide-system-messages'}}
@@ -235,32 +266,79 @@ template(name="editCardAssignerForm")
template(name="cardDetailsActionsPopup")
ul.pop-over-list
- li: a.js-toggle-watch-card {{#if isWatching}}{{_ 'unwatch'}}{{else}}{{_ 'watch'}}{{/if}}
+ li
+ a.js-toggle-watch-card
+ if isWatching
+ i.fa.fa-eye
+ | {{_ 'unwatch'}}
+ else
+ i.fa.fa-eye-slash
+ | {{_ 'watch'}}
if canModifyCard
- hr
- ul.pop-over-list
- //li: a.js-members {{_ 'card-edit-members'}}
- //li: a.js-labels {{_ 'card-edit-labels'}}
- //li: a.js-attachments {{_ 'card-edit-attachments'}}
- li: a.js-custom-fields {{_ 'card-edit-custom-fields'}}
- //li: a.js-received-date {{_ 'editCardReceivedDatePopup-title'}}
- //li: a.js-start-date {{_ 'editCardStartDatePopup-title'}}
- //li: a.js-due-date {{_ 'editCardDueDatePopup-title'}}
- //li: a.js-end-date {{_ 'editCardEndDatePopup-title'}}
- li: a.js-spent-time {{_ 'editCardSpentTimePopup-title'}}
- li: a.js-set-card-color {{_ 'setCardColorPopup-title'}}
- hr
- ul.pop-over-list
- li: a.js-move-card-to-top {{_ 'moveCardToTop-title'}}
- li: a.js-move-card-to-bottom {{_ 'moveCardToBottom-title'}}
- hr
+ unless currentUser.isWorker
+ hr
+ ul.pop-over-list
+ //li: a.js-members {{_ 'card-edit-members'}}
+ //li: a.js-labels {{_ 'card-edit-labels'}}
+ //li: a.js-attachments {{_ 'card-edit-attachments'}}
+ li
+ a.js-custom-fields
+ i.fa.fa-list-alt
+ | {{_ 'card-edit-custom-fields'}}
+ //li: a.js-received-date {{_ 'editCardReceivedDatePopup-title'}}
+ //li: a.js-start-date {{_ 'editCardStartDatePopup-title'}}
+ //li: a.js-due-date {{_ 'editCardDueDatePopup-title'}}
+ //li: a.js-end-date {{_ 'editCardEndDatePopup-title'}}
+ li
+ a.js-spent-time
+ i.fa.fa-clock-o
+ | {{_ 'editCardSpentTimePopup-title'}}
+ li
+ a.js-set-card-color
+ i.fa.fa-paint-brush
+ | {{_ 'setCardColorPopup-title'}}
+ hr
ul.pop-over-list
- li: a.js-move-card {{_ 'moveCardPopup-title'}}
- li: a.js-copy-card {{_ 'copyCardPopup-title'}}
- li: a.js-copy-checklist-cards {{_ 'copyChecklistToManyCardsPopup-title'}}
+ li
+ a.js-move-card-to-top
+ i.fa.fa-arrow-up
+ | {{_ 'moveCardToTop-title'}}
+ li
+ a.js-move-card-to-bottom
+ i.fa.fa-arrow-down
+ | {{_ 'moveCardToBottom-title'}}
+ unless currentUser.isWorker
+ hr
+ ul.pop-over-list
+ li
+ a.js-move-card
+ i.fa.fa-arrow-right
+ | {{_ 'moveCardPopup-title'}}
+ li
+ a.js-copy-card
+ i.fa.fa-copy
+ | {{_ 'copyCardPopup-title'}}
+ hr
+ ul.pop-over-list
+ li
+ a.js-copy-checklist-cards
+ i.fa.fa-list
+ i.fa.fa-copy
+ | {{_ 'copyChecklistToManyCardsPopup-title'}}
unless archived
- li: a.js-archive {{_ 'archive-card'}}
- li: a.js-more {{_ 'cardMorePopup-title'}}
+ hr
+ ul.pop-over-list
+ li
+ a.js-archive
+ i.fa.fa-arrow-right
+ i.fa.fa-archive
+ | {{_ 'archive-card'}}
+ hr
+ ul.pop-over-list
+ li
+ a.js-more
+ i.fa.fa-link
+ | {{_ 'cardMorePopup-title'}}
template(name="moveCardPopup")
+boardsAndLists
@@ -312,16 +390,27 @@ template(name="cardMembersPopup")
i.fa.fa-check
template(name="cardAssigneesPopup")
- ul.pop-over-list.js-card-assignee-list
- each board.activeMembers
- li.item(class="{{#if isCardAssignee}}active{{/if}}")
- a.name.js-select-assignee(href="#")
- +userAvatar(userId=user._id)
- span.full-name
- = user.profile.fullname
- | (<span class="username">{{ user.username }}</span>)
- if isCardAssignee
- i.fa.fa-check
+ unless currentUser.isWorker
+ ul.pop-over-list.js-card-assignee-list
+ each board.activeMembers
+ li.item(class="{{#if isCardAssignee}}active{{/if}}")
+ a.name.js-select-assignee(href="#")
+ +userAvatar(userId=user._id)
+ span.full-name
+ = user.profile.fullname
+ | (<span class="username">{{ user.username }}</span>)
+ if isCardAssignee
+ i.fa.fa-check
+ if currentUser.isWorker
+ ul.pop-over-list.js-card-assignee-list
+ li.item(class="{{#if currentUser.isCardAssignee}}active{{/if}}")
+ a.name.js-select-assigneeWorker(href="#")
+ +userAvatar(userId=currentUser._id)
+ span.full-name
+ = currentUser.profile.fullname
+ | (<span class="username">{{ currentUser.username }}</span>)
+ if currentUser.isCardAssignee
+ i.fa.fa-check
template(name="userAvatarAssignee")
a.assignee.js-assignee(title="{{userData.profile.fullname}} ({{userData.username}})")
@@ -349,11 +438,13 @@ template(name="cardAssigneePopup")
p.quiet @{{ user.username }}
ul.pop-over-list
if currentUser.isNotCommentOnly
+ unless currentUser.isWorker
li: a.js-remove-assignee {{_ 'remove-member-from-card'}}
- if $eq currentUser._id user._id
- with currentUser
- li: a.js-edit-profile {{_ 'edit-profile'}}
+ unless currentUser.isWorker
+ if $eq currentUser._id user._id
+ with currentUser
+ li: a.js-edit-profile {{_ 'edit-profile'}}
template(name="userAvatarAssigneeInitials")
svg.avatar.avatar-assignee-initials(viewBox="0 0 {{viewPortWidth}} 15")
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index 67120043..f0317e6a 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -26,6 +26,7 @@ BlazeComponent.extendComponent({
onCreated() {
this.currentBoard = Boards.findOne(Session.get('currentBoard'));
+ this.currentUser = Meteor.user();
this.isLoaded = new ReactiveVar(false);
const boardBody = this.parentComponent().parentComponent();
//in Miniview parent is Board, not BoardBody.
@@ -55,6 +56,15 @@ BlazeComponent.extendComponent({
);
},
+ canModifyCardWorker() {
+ return (
+ Meteor.user() &&
+ Meteor.user().isBoardMember() &&
+ !Meteor.user().isCommentOnly() &&
+ !Meteor.user().isWorker()
+ );
+ },
+
scrollParentContainer() {
const cardPanelWidth = 510;
const bodyBoardComponent = this.parentComponent().parentComponent();
@@ -322,7 +332,12 @@ BlazeComponent.extendComponent({
'click .js-assignee': Popup.open('cardAssignee'),
'click .js-add-assignees': Popup.open('cardAssignees'),
'click .js-add-labels': Popup.open('cardLabels'),
- 'click .js-received-date': Popup.open('editCardReceivedDate'),
+ 'click .js-received-date'(event) {
+ event.preventDefault();
+ if (!Meteor.user().isWorker) {
+ Popup.open('editCardReceivedDate');
+ }
+ },
'click .js-start-date': Popup.open('editCardStartDate'),
'click .js-due-date': Popup.open('editCardDueDate'),
'click .js-end-date': Popup.open('editCardEndDate'),
@@ -383,6 +398,13 @@ Template.cardDetails.helpers({
return user && user.isBoardAdmin() ? 'admin' : 'normal';
},
+ isWorker() {
+ const currentBoard = Boards.findOne(Session.get('currentBoard'));
+ return (
+ !currentBoard.hasAdmin(this.userId) && currentBoard.hasWorker(this.userId)
+ );
+ },
+
presenceStatusClassName() {
const user = Users.findOne(this.userId);
const userPresence = presences.findOne({ userId: this.userId });
@@ -459,6 +481,15 @@ Template.cardDetailsActionsPopup.helpers({
!Meteor.user().isCommentOnly()
);
},
+
+ canModifyCardWorker() {
+ return (
+ Meteor.user() &&
+ Meteor.user().isBoardMember() &&
+ !Meteor.user().isCommentOnly() &&
+ !Meteor.user().isWorker()
+ );
+ },
});
Template.cardDetailsActionsPopup.events({
@@ -467,7 +498,12 @@ Template.cardDetailsActionsPopup.events({
'click .js-labels': Popup.open('cardLabels'),
'click .js-attachments': Popup.open('cardAttachments'),
'click .js-custom-fields': Popup.open('cardCustomFields'),
- 'click .js-received-date': Popup.open('editCardReceivedDate'),
+ 'click .js-received-date'(event) {
+ event.preventDefault();
+ if (!Meteor.user().isWorker) {
+ Popup.open('editCardReceivedDate');
+ }
+ },
'click .js-start-date': Popup.open('editCardStartDate'),
'click .js-due-date': Popup.open('editCardDueDate'),
'click .js-end-date': Popup.open('editCardEndDate'),
@@ -879,6 +915,12 @@ Template.cardAssigneesPopup.events({
card.toggleAssignee(assigneeId);
event.preventDefault();
},
+ 'click .js-select-assigneeWorker'(event) {
+ const card = Cards.findOne(Session.get('currentCard'));
+ const assigneeId = currentUser._id;
+ card.toggleAssignee(assigneeId);
+ event.preventDefault();
+ },
});
Template.cardAssigneesPopup.helpers({
diff --git a/client/components/cards/checklists.jade b/client/components/cards/checklists.jade
index 279d3671..391769e9 100644
--- a/client/components/cards/checklists.jade
+++ b/client/components/cards/checklists.jade
@@ -1,5 +1,7 @@
template(name="checklists")
- h3 {{_ 'checklists'}}
+ h3
+ i.fa.fa-check
+ | {{_ 'checklists'}}
if toggleDeleteDialog.get
.board-overlay#card-details-overlay
+checklistDeleteDialog(checklist = checklistToDelete)
diff --git a/client/components/cards/checklists.js b/client/components/cards/checklists.js
index 57939eb8..27d1b1c9 100644
--- a/client/components/cards/checklists.js
+++ b/client/components/cards/checklists.js
@@ -67,7 +67,8 @@ BlazeComponent.extendComponent({
return (
Meteor.user() &&
Meteor.user().isBoardMember() &&
- !Meteor.user().isCommentOnly()
+ !Meteor.user().isCommentOnly() &&
+ !Meteor.user().isWorker()
);
},
}).register('checklistDetail');
@@ -120,7 +121,8 @@ BlazeComponent.extendComponent({
return (
Meteor.user() &&
Meteor.user().isBoardMember() &&
- !Meteor.user().isCommentOnly()
+ !Meteor.user().isCommentOnly() &&
+ !Meteor.user().isWorker()
);
},
@@ -228,7 +230,8 @@ Template.checklistItemDetail.helpers({
return (
Meteor.user() &&
Meteor.user().isBoardMember() &&
- !Meteor.user().isCommentOnly()
+ !Meteor.user().isCommentOnly() &&
+ !Meteor.user().isWorker()
);
},
});
diff --git a/client/components/cards/minicard.js b/client/components/cards/minicard.js
index 1ea608f5..da36b87f 100644
--- a/client/components/cards/minicard.js
+++ b/client/components/cards/minicard.js
@@ -36,24 +36,20 @@ Template.minicard.helpers({
currentUser = Meteor.user();
if (currentUser) {
return (currentUser.profile || {}).showDesktopDragHandles;
+ } else if (cookies.has('showDesktopDragHandles')) {
+ return true;
} else {
- if (cookies.has('showDesktopDragHandles')) {
- return true;
- } else {
- return false;
- }
+ return false;
}
},
hiddenMinicardLabelText() {
currentUser = Meteor.user();
if (currentUser) {
return (currentUser.profile || {}).hiddenMinicardLabelText;
+ } else if (cookies.has('hiddenMinicardLabelText')) {
+ return true;
} else {
- if (cookies.has('hiddenMinicardLabelText')) {
- return true;
- } else {
- return false;
- }
+ return false;
}
},
});
diff --git a/client/components/cards/subtasks.jade b/client/components/cards/subtasks.jade
index 7e64e23f..df35bed3 100644
--- a/client/components/cards/subtasks.jade
+++ b/client/components/cards/subtasks.jade
@@ -1,5 +1,7 @@
template(name="subtasks")
- h3 {{_ 'subtasks'}}
+ h3
+ i.fa.fa-sitemap
+ | {{_ 'subtasks'}}
if toggleDeleteDialog.get
.board-overlay#card-details-overlay
+subtaskDeleteDialog(subtask = subtaskToDelete)
diff --git a/client/components/cards/subtasks.js b/client/components/cards/subtasks.js
index fab860bb..34348fe1 100644
--- a/client/components/cards/subtasks.js
+++ b/client/components/cards/subtasks.js
@@ -3,7 +3,8 @@ BlazeComponent.extendComponent({
return (
Meteor.user() &&
Meteor.user().isBoardMember() &&
- !Meteor.user().isCommentOnly()
+ !Meteor.user().isCommentOnly() &&
+ !Meteor.user().isWorker()
);
},
}).register('subtaskDetail');
@@ -55,7 +56,8 @@ BlazeComponent.extendComponent({
return (
Meteor.user() &&
Meteor.user().isBoardMember() &&
- !Meteor.user().isCommentOnly()
+ !Meteor.user().isCommentOnly() &&
+ !Meteor.user().isWorker()
);
},
@@ -154,7 +156,8 @@ Template.subtaskItemDetail.helpers({
return (
Meteor.user() &&
Meteor.user().isBoardMember() &&
- !Meteor.user().isCommentOnly()
+ !Meteor.user().isCommentOnly() &&
+ !Meteor.user().isWorker()
);
},
});