templates.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <template name="boardActivities">
  2. {{# each currentBoard.activities }}
  3. <div class="phenom phenom-action clearfix phenom-other">
  4. {{> userAvatar user=user size="extra-small" class="creator js-show-mem-menu" }}
  5. <div class="phenom-desc">
  6. {{ > memberName user=user }}
  7. {{# if $eq activityType 'createBoard' }}
  8. {{_ 'activity-created' boardLabel}}.
  9. {{ /if }}
  10. {{# if $eq activityType 'createList' }}
  11. {{_ 'activity-added' list.title boardLabel}}.
  12. {{ /if }}
  13. {{# if $eq activityType 'archivedList' }}
  14. {{_ 'activity-archived' list.title}}.
  15. {{ /if }}
  16. {{# if $eq activityType 'createCard' }}
  17. {{{_ 'activity-added' cardLink boardLabel}}}.
  18. {{ /if }}
  19. {{# if $eq activityType 'archivedCard' }}
  20. {{{_ 'activity-archived' cardLink}}}.
  21. {{ /if }}
  22. {{# if $eq activityType 'restoredCard' }}
  23. {{{_ 'activity-sent' cardLink boardLabel}}}.
  24. {{ /if }}
  25. {{# if $eq activityType 'moveCard' }}
  26. {{{_ 'activity-moved' cardLink oldList.title list.title}}}.
  27. {{ /if }}
  28. {{# if $eq activityType 'addBoardMember' }}
  29. {{{_ 'activity-added' memberLink boardLabel}}}.
  30. {{ /if }}
  31. {{# if $eq activityType 'removeBoardMember' }}
  32. {{{_ 'activity-excluded' memberLink boardLabel}}}.
  33. {{ /if }}
  34. {{# if $eq activityType 'joinMember' }}
  35. {{# if $eq currentUser._id member._id }}
  36. {{{_ 'activity-joined' cardLink}}}.
  37. {{ else }}
  38. {{{_ 'activity-added' memberLink cardLink}}}.
  39. {{/if}}
  40. {{ /if }}
  41. {{# if $eq activityType 'unjoinMember' }}
  42. {{# if $eq currentUser._id member._id }}
  43. {{{_ 'activity-unjoined' cardLink}}}.
  44. {{ else }}
  45. {{{_ 'activity-removed' memberLink cardLink}}}.
  46. {{/if}}
  47. {{ /if }}
  48. {{# if $eq activityType 'addComment' }}
  49. <div class="phenom-desc">
  50. {{{_ 'activity-on' cardLink}}}
  51. <div class="action-comment markeddown">
  52. <a href="{{ card.absoluteUrl }}" class="current-comment show tdn">
  53. <p>{{#viewer}}{{ comment.text }}{{/viewer}}</p>
  54. </a>
  55. </div>
  56. </div>
  57. {{ /if }}
  58. {{# if $eq activityType 'addAttachment' }}
  59. <div class="phenom-desc">
  60. {{{_ 'activity-attached' attachmentLink cardLink}}}.
  61. </div>
  62. {{ /if }}
  63. </div>
  64. <p class="phenom-meta quiet">
  65. <span class="date js-hide-on-sending">
  66. {{ moment createdAt }}
  67. </span>
  68. </p>
  69. </div>
  70. {{ /each }}
  71. </template>
  72. <template name="cardActivities">
  73. {{# each currentCard.comments }}
  74. <div class="phenom phenom-action clearfix phenom-comment">
  75. {{> userAvatar user=user size="small" class="creator js-show-mem-menu" }}
  76. <form>
  77. <div class="phenom-desc">
  78. {{ > memberName user=user }}
  79. <div class="action-comment markeddown">
  80. <div class="current-comment">
  81. {{#viewer}}{{ text }}{{/viewer}}
  82. </div>
  83. <textarea class="js-text" tabindex="1">{{ text }}</textarea>
  84. </div>
  85. </div>
  86. <div class="edit-controls clearfix">
  87. <input type="submit" class="primary confirm js-save-edit" value="{{_ 'save'}}" tabindex="2">
  88. </div>
  89. </form>
  90. <p class="phenom-meta quiet">
  91. <span class="date js-hide-on-sending">{{ moment createdAt }}</span>
  92. {{# if currentUser }}
  93. <span class="js-hide-on-sending">
  94. - <a href="#" class="js-edit-action">{{_ "edit"}}</a>
  95. - <a href="#" class="js-confirm-delete-action">{{_ "delete"}}</a>
  96. </span>
  97. {{/ if }}
  98. </p>
  99. </div>
  100. {{/each}}
  101. {{# each currentCard.activities }}
  102. <div class="phenom phenom-action clearfix phenom-other">
  103. {{> userAvatar user=user size="extra-small" class="creator js-show-mem-menu" }}
  104. {{ > memberName user=user }}
  105. {{# if $eq activityType 'createCard' }}
  106. {{_ 'activity-added' cardLabel list.title}}.
  107. {{ /if }}
  108. {{# if $eq activityType 'joinMember' }}
  109. {{# if $eq currentUser._id member._id }}
  110. {{_ 'activity-joined' cardLabel}}.
  111. {{ else }}
  112. {{{_ 'activity-added' cardLabel memberLink}}}.
  113. {{/if}}
  114. {{/if}}
  115. {{# if $eq activityType 'unjoinMember' }}
  116. {{# if $eq currentUser._id member._id }}
  117. {{_ 'activity-unjoined' cardLabel}}.
  118. {{ else }}
  119. {{{_ 'activity-removed' cardLabel memberLink}}}.
  120. {{/if}}
  121. {{ /if }}
  122. {{# if $eq activityType 'archivedCard' }}
  123. {{_ 'activity-archived' cardLabel}}.
  124. {{ /if }}
  125. {{# if $eq activityType 'restoredCard' }}
  126. {{_ 'activity-sent' cardLabel boardLabel}}.
  127. {{/ if }}
  128. {{# if $eq activityType 'moveCard' }}
  129. {{_ 'activity-moved' cardLabel oldList.title list.title}}.
  130. {{/ if }}
  131. {{# if $eq activityType 'addAttachment' }}
  132. {{{_ 'activity-attached' attachmentLink cardLabel}}}.
  133. {{# if attachment.isImage }}
  134. <img src="{{ attachment.url }}" class="attachment-image-preview">
  135. {{/if}}
  136. {{/ if}}
  137. </div>
  138. {{/each}}
  139. </template>