2015-06-12 13:59:39 +02:00
|
|
|
template(name="commentForm")
|
|
|
|
|
.new-comment.js-new-comment(
|
|
|
|
|
class="{{#if commentFormIsOpen}}is-open{{/if}}")
|
2021-04-01 23:40:07 +02:00
|
|
|
+userAvatar(userId=currentUser._id noRemove=true)
|
2015-06-12 13:59:39 +02:00
|
|
|
form.js-new-comment-form
|
|
|
|
|
+editor(class="js-new-comment-input")
|
2015-08-31 15:09:53 +02:00
|
|
|
| {{getUnsavedValue 'cardComment' currentCard._id}}
|
2015-06-12 13:59:39 +02:00
|
|
|
.add-controls
|
|
|
|
|
button.primary.confirm.clear.js-add-comment(type="submit") {{_ 'comment'}}
|
2023-03-17 21:26:40 +01:00
|
|
|
|
|
|
|
|
template(name="comments")
|
|
|
|
|
.comments
|
|
|
|
|
each commentData in getComments
|
|
|
|
|
+comment(commentData)
|
|
|
|
|
|
|
|
|
|
template(name="comment")
|
|
|
|
|
.comment
|
|
|
|
|
+userAvatar(userId=userId)
|
|
|
|
|
p.comment-desc
|
|
|
|
|
span.comment-member
|
|
|
|
|
+memberName(user=user)
|
|
|
|
|
|
|
|
|
|
+inlinedForm(classNames='js-edit-comment')
|
|
|
|
|
+editor(autofocus=true)
|
|
|
|
|
= text
|
|
|
|
|
.edit-controls
|
|
|
|
|
button.primary(type="submit") {{_ 'edit'}}
|
|
|
|
|
.fa.fa-times-thin.js-close-inlined-form
|
|
|
|
|
else
|
|
|
|
|
.comment-text
|
|
|
|
|
+viewer
|
|
|
|
|
= text
|
|
|
|
|
+commentReactions(reactions=reactions commentId=_id)
|
|
|
|
|
span(title=createdAt).comment-meta {{ moment createdAt }}
|
|
|
|
|
if($eq currentUser._id userId)
|
|
|
|
|
+editOrDeleteComment
|
|
|
|
|
else if currentUser.isBoardAdmin
|
|
|
|
|
+editOrDeleteComment
|
|
|
|
|
|
|
|
|
|
template(name="editOrDeleteComment")
|
|
|
|
|
= ' - '
|
|
|
|
|
a.js-open-inlined-form {{_ "edit"}}
|
|
|
|
|
= ' - '
|
|
|
|
|
a.js-delete-comment {{_ "delete"}}
|
|
|
|
|
|
|
|
|
|
template(name="deleteCommentPopup")
|
|
|
|
|
p {{_ "comment-delete"}}
|
|
|
|
|
button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
|
|
|
|
|
|
|
|
|
|
template(name="commentReactions")
|
|
|
|
|
.reactions
|
|
|
|
|
each reaction in reactions
|
|
|
|
|
span.reaction(class="{{#if isSelected reaction.userIds}}selected{{/if}}" data-codepoint="#{reaction.reactionCodepoint}" title="{{userNames reaction.userIds}}")
|
|
|
|
|
span.reaction-codepoint !{reaction.reactionCodepoint}
|
|
|
|
|
span.reaction-count #{reaction.userIds.length}
|
|
|
|
|
if (currentUser.isBoardMember)
|
|
|
|
|
a.open-comment-reaction-popup(title="{{_ 'addReactionPopup-title'}}")
|
|
|
|
|
i.fa.fa-smile-o
|
|
|
|
|
i.fa.fa-plus
|
|
|
|
|
|
|
|
|
|
template(name="addReactionPopup")
|
|
|
|
|
.reactions-popup
|
|
|
|
|
each codepoint in codepoints
|
|
|
|
|
span.add-comment-reaction(data-codepoint="#{codepoint}") !{codepoint}
|
|
|
|
|
|