listHeader.jade 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. template(name="listHeader")
  2. .list-header.js-list-header.nodragscroll(
  3. class="{{#if limitToShowCardsCount}}list-header-card-count{{/if}}"
  4. class=colorClass)
  5. +inlinedForm
  6. +editListTitleForm
  7. else
  8. if isMiniScreen
  9. if currentList
  10. a.list-header-left-icon.js-unselect-list
  11. | ◀️
  12. else
  13. if collapsed
  14. if showCardsCountForList cards.length
  15. br
  16. span.cardCount {{cardsCount}}
  17. if isMiniScreen
  18. h2.list-header-name(
  19. title="{{ moment modifiedAt 'LLL' }}"
  20. class="{{#if currentUser.isBoardMember}}{{#unless currentUser.isCommentOnly}}{{#unless currentUser.isWorker}}js-open-inlined-form is-editable{{/unless}}{{/unless}}{{/if}}")
  21. +viewer
  22. = title
  23. if wipLimit.enabled
  24. | (
  25. span(class="{{#if exceededWipLimit}}highlight{{/if}}") {{cards.length}}
  26. |/#{wipLimit.value})
  27. if showCardsCountForList cards.length
  28. span.cardCount {{cardsCount}} {{cardsCountForListIsOne cards.length}}
  29. else
  30. if collapsed
  31. a.js-collapse(title="{{_ 'uncollapse'}}")
  32. | ⬅️
  33. | ➡️
  34. div(class="{{#if collapsed}}list-rotated{{/if}}")
  35. h2.list-header-name(
  36. title="{{ moment modifiedAt 'LLL' }}"
  37. class="{{#if currentUser.isBoardMember}}{{#unless currentUser.isCommentOnly}}{{#unless currentUser.isWorker}}js-open-inlined-form is-editable{{/unless}}{{/unless}}{{/if}}")
  38. +viewer
  39. = title
  40. if wipLimit.enabled
  41. | (
  42. span(class="{{#if exceededWipLimit}}highlight{{/if}}") {{cards.length}}
  43. |/#{wipLimit.value})
  44. unless collapsed
  45. if showCardsCountForList cards.length
  46. span.cardCount {{cardsCount}} {{cardsCountForListIsOne cards.length}}
  47. if isMiniScreen
  48. if currentList
  49. if isWatching
  50. i.list-header-watch-icon | 👁️
  51. div.list-header-menu
  52. unless currentUser.isCommentOnly
  53. if canSeeAddCard
  54. a.js-add-card.list-header-plus-top(title="{{_ 'add-card-to-top-of-list'}}") ➕
  55. a.js-open-list-menu(title="{{_ 'listActionPopup-title'}}") ☰
  56. else
  57. a.list-header-menu-icon.js-select-list ▶️
  58. a.list-header-handle.handle.js-list-handle ↕️
  59. else if currentUser.isBoardMember
  60. if isWatching
  61. i.list-header-watch-icon | 👁️
  62. unless collapsed
  63. div.list-header-menu
  64. unless currentUser.isCommentOnly
  65. //if isBoardAdmin
  66. // a.fa.js-list-star.list-header-plus-top(class="fa-star{{#unless starred}}-o{{/unless}}")
  67. if canSeeAddCard
  68. a.js-add-card.list-header-plus-top(title="{{_ 'add-card-to-top-of-list'}}") ➕
  69. a.js-collapse(title="{{_ 'collapse'}}")
  70. | ⬅️
  71. | ➡️
  72. a.js-open-list-menu(title="{{_ 'listActionPopup-title'}}") ☰
  73. if currentUser.isBoardMember
  74. unless currentUser.isCommentOnly
  75. a.list-header-handle.handle.js-list-handle ↕️
  76. template(name="editListTitleForm")
  77. .list-composer
  78. input.list-name-input.full-line(type="text" value=title autofocus)
  79. .edit-controls.clearfix
  80. button.primary.confirm(type="submit") {{_ 'save'}}
  81. a.js-close-inlined-form
  82. | ❌
  83. template(name="listActionPopup")
  84. ul.pop-over-list
  85. li
  86. a.js-add-card.list-header-plus-bottom
  87. | ➕
  88. | ⬇️
  89. | {{_ 'add-card-to-bottom-of-list'}}
  90. hr
  91. ul.pop-over-list
  92. li
  93. a.js-set-list-width
  94. | ↔️
  95. | {{_ 'set-list-width'}}
  96. ul.pop-over-list
  97. li
  98. a.js-toggle-watch-list
  99. if isWatching
  100. | 👁️
  101. | {{_ 'unwatch'}}
  102. else
  103. | 🙈
  104. | {{_ 'watch'}}
  105. unless currentUser.isCommentOnly
  106. unless currentUser.isWorker
  107. ul.pop-over-list
  108. li
  109. a.js-set-color-list
  110. | 🎨
  111. | {{_ 'set-color-list'}}
  112. ul.pop-over-list
  113. if cards.length
  114. li
  115. a.js-select-cards
  116. | ☑️
  117. | {{_ 'list-select-cards'}}
  118. if currentUser.isBoardAdmin
  119. ul.pop-over-list
  120. li
  121. a.js-set-wip-limit
  122. | 🚫
  123. | {{#if isWipLimitEnabled }}{{_ 'edit-wip-limit'}}{{else}}{{_ 'setWipLimitPopup-title'}}{{/if}}
  124. unless currentUser.isWorker
  125. hr
  126. ul.pop-over-list
  127. li
  128. a.js-close-list
  129. | ➡️
  130. | 📦
  131. | {{_ 'archive-list'}}
  132. hr
  133. ul.pop-over-list
  134. li
  135. a.js-more
  136. | 🔗
  137. | {{_ 'listMorePopup-title'}}
  138. template(name="boardLists")
  139. ul.pop-over-list
  140. each currentBoard.lists
  141. li
  142. if($eq ../_id _id)
  143. a.disabled {{title}} ({{_ 'current'}})
  144. else
  145. a.js-select-list= title
  146. template(name="listMorePopup")
  147. p.quiet
  148. span.clearfix
  149. span {{_ 'link-list'}}
  150. = ' '
  151. | {{#if board.isPublic}}🌐{{else}}🔒{{/if}}
  152. input.inline-input(type="text" readonly value="{{ rootUrl }}")
  153. | {{_ 'added'}}
  154. span.date(title=list.createdAt) {{ moment createdAt 'LLL' }}
  155. //unless currentUser.isWorker
  156. // if currentUser.isBoardAdmin
  157. // a.js-delete {{_ 'delete'}}
  158. template(name="listDeletePopup")
  159. p {{_ "list-delete-pop"}}
  160. unless archived
  161. p {{_ "list-delete-suggest-archive"}}
  162. button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
  163. template(name="setWipLimitPopup")
  164. #js-wip-limit-edit
  165. label {{_ 'set-wip-limit-value'}}
  166. ul.pop-over-list
  167. li: a.js-enable-wip-limit {{_ 'enable-wip-limit'}}
  168. if isWipLimitEnabled
  169. | ✅
  170. if isWipLimitEnabled
  171. p
  172. input.wip-limit-value(type="number" value="{{ wipLimitValue }}" min="1" max="99")
  173. input.wip-limit-apply(type="submit" value="{{_ 'apply'}}")
  174. input.wip-limit-error
  175. p
  176. .soft-wip-limit
  177. .materialCheckBox(class="{{#if isWipLimitSoft}}is-checked{{/if}}")
  178. label {{_ 'soft-wip-limit'}}
  179. template(name="wipLimitErrorPopup")
  180. .wip-limit-invalid
  181. p {{_ 'wipLimitErrorPopup-dialog-pt1'}}
  182. p {{_ 'wipLimitErrorPopup-dialog-pt2'}}
  183. button.full.js-back-view(type="submit") {{_ 'cancel'}}
  184. template(name="setListWidthPopup")
  185. #js-list-width-edit
  186. label {{_ 'set-list-width-value'}}
  187. p
  188. input.list-width-value(type="number" value="{{ listWidthValue }}" min="100")
  189. input.list-constraint-value(type="number" value="{{ listConstraintValue }}" min="100")
  190. input.list-width-apply(type="submit" value="{{_ 'apply'}}")
  191. input.list-width-error
  192. br
  193. a.js-auto-width-board(
  194. title="{{#if isAutoWidth}}{{_ 'click-to-disable-auto-width'}}{{else}}{{_ 'click-to-enable-auto-width'}}{{/if}}")
  195. | {{#if isAutoWidth}}🗜️{{else}}📏{{/if}}
  196. span {{_ 'auto-list-width'}}
  197. template(name="listWidthErrorPopup")
  198. .list-width-invalid
  199. p {{_ 'list-width-error-message'}} '>=100'
  200. button.full.js-back-view(type="submit") {{_ 'cancel'}}
  201. template(name="setListColorPopup")
  202. form.edit-label
  203. .palette-colors: each colors
  204. // note: we use the swimlane palette to have more than just the border
  205. span.card-label.palette-color.js-palette-color(class="card-details-{{color}}")
  206. if(isSelected color)
  207. | ✅
  208. button.primary.confirm.js-submit {{_ 'save'}}
  209. button.js-remove-color.negate.wide.right {{_ 'unset-color'}}