listHeader.jade 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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. unless currentUser.isWorker
  59. a.list-header-handle.handle.js-list-handle ↕️
  60. else if currentUser.isBoardMember
  61. if isWatching
  62. i.list-header-watch-icon | 👁️
  63. unless collapsed
  64. div.list-header-menu
  65. unless currentUser.isCommentOnly
  66. //if isBoardAdmin
  67. // a.fa.js-list-star.list-header-plus-top(class="fa-star{{#unless starred}}-o{{/unless}}")
  68. if canSeeAddCard
  69. a.js-add-card.list-header-plus-top(title="{{_ 'add-card-to-top-of-list'}}") ➕
  70. a.js-collapse(title="{{_ 'collapse'}}")
  71. | ⬅️
  72. | ➡️
  73. a.js-open-list-menu(title="{{_ 'listActionPopup-title'}}") ☰
  74. if currentUser.isBoardMember
  75. unless currentUser.isCommentOnly
  76. unless currentUser.isWorker
  77. a.list-header-handle.handle.js-list-handle ↕️
  78. template(name="editListTitleForm")
  79. .list-composer
  80. input.list-name-input.full-line(type="text" value=title autofocus)
  81. .edit-controls.clearfix
  82. button.primary.confirm(type="submit") {{_ 'save'}}
  83. a.js-close-inlined-form
  84. | ❌
  85. template(name="listActionPopup")
  86. ul.pop-over-list
  87. li
  88. a.js-add-card.list-header-plus-bottom
  89. | ➕
  90. | ⬇️
  91. | {{_ 'add-card-to-bottom-of-list'}}
  92. hr
  93. ul.pop-over-list
  94. li
  95. a.js-set-list-width
  96. | ↔️
  97. | {{_ 'set-list-width'}}
  98. ul.pop-over-list
  99. li
  100. a.js-toggle-watch-list
  101. if isWatching
  102. | 👁️
  103. | {{_ 'unwatch'}}
  104. else
  105. | 🙈
  106. | {{_ 'watch'}}
  107. unless currentUser.isCommentOnly
  108. unless currentUser.isWorker
  109. ul.pop-over-list
  110. li
  111. a.js-set-color-list
  112. | 🎨
  113. | {{_ 'set-color-list'}}
  114. ul.pop-over-list
  115. if cards.length
  116. li
  117. a.js-select-cards
  118. | ☑️
  119. | {{_ 'list-select-cards'}}
  120. if currentUser.isBoardAdmin
  121. ul.pop-over-list
  122. li
  123. a.js-set-wip-limit
  124. | 🚫
  125. | {{#if isWipLimitEnabled }}{{_ 'edit-wip-limit'}}{{else}}{{_ 'setWipLimitPopup-title'}}{{/if}}
  126. unless currentUser.isWorker
  127. hr
  128. ul.pop-over-list
  129. li
  130. a.js-close-list
  131. | ➡️
  132. | 📦
  133. | {{_ 'archive-list'}}
  134. hr
  135. ul.pop-over-list
  136. li
  137. a.js-more
  138. | 🔗
  139. | {{_ 'listMorePopup-title'}}
  140. template(name="boardLists")
  141. ul.pop-over-list
  142. each currentBoard.lists
  143. li
  144. if($eq ../_id _id)
  145. a.disabled {{title}} ({{_ 'current'}})
  146. else
  147. a.js-select-list= title
  148. template(name="listMorePopup")
  149. p.quiet
  150. span.clearfix
  151. span {{_ 'link-list'}}
  152. = ' '
  153. | {{#if board.isPublic}}🌐{{else}}🔒{{/if}}
  154. input.inline-input(type="text" readonly value="{{ rootUrl }}")
  155. | {{_ 'added'}}
  156. span.date(title=list.createdAt) {{ moment createdAt 'LLL' }}
  157. //unless currentUser.isWorker
  158. // if currentUser.isBoardAdmin
  159. // a.js-delete {{_ 'delete'}}
  160. template(name="listDeletePopup")
  161. p {{_ "list-delete-pop"}}
  162. unless archived
  163. p {{_ "list-delete-suggest-archive"}}
  164. button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
  165. template(name="setWipLimitPopup")
  166. #js-wip-limit-edit
  167. label {{_ 'set-wip-limit-value'}}
  168. ul.pop-over-list
  169. li: a.js-enable-wip-limit {{_ 'enable-wip-limit'}}
  170. if isWipLimitEnabled
  171. | ✅
  172. if isWipLimitEnabled
  173. p
  174. input.wip-limit-value(type="number" value="{{ wipLimitValue }}" min="1" max="99")
  175. input.wip-limit-apply(type="submit" value="{{_ 'apply'}}")
  176. input.wip-limit-error
  177. p
  178. .soft-wip-limit
  179. .materialCheckBox(class="{{#if isWipLimitSoft}}is-checked{{/if}}")
  180. label {{_ 'soft-wip-limit'}}
  181. template(name="wipLimitErrorPopup")
  182. .wip-limit-invalid
  183. p {{_ 'wipLimitErrorPopup-dialog-pt1'}}
  184. p {{_ 'wipLimitErrorPopup-dialog-pt2'}}
  185. button.full.js-back-view(type="submit") {{_ 'cancel'}}
  186. template(name="setListWidthPopup")
  187. #js-list-width-edit
  188. label {{_ 'set-list-width-value'}}
  189. p
  190. input.list-width-value(type="number" value="{{ listWidthValue }}" min="100")
  191. input.list-constraint-value(type="number" value="{{ listConstraintValue }}" min="100")
  192. input.list-width-apply(type="submit" value="{{_ 'apply'}}")
  193. input.list-width-error
  194. br
  195. a.js-auto-width-board(
  196. title="{{#if isAutoWidth}}{{_ 'click-to-disable-auto-width'}}{{else}}{{_ 'click-to-enable-auto-width'}}{{/if}}")
  197. | {{#if isAutoWidth}}🗜️{{else}}📏{{/if}}
  198. span {{_ 'auto-list-width'}}
  199. template(name="listWidthErrorPopup")
  200. .list-width-invalid
  201. p {{_ 'list-width-error-message'}} '>=100'
  202. button.full.js-back-view(type="submit") {{_ 'cancel'}}
  203. template(name="setListColorPopup")
  204. form.edit-label
  205. .palette-colors: each colors
  206. // note: we use the swimlane palette to have more than just the border
  207. span.card-label.palette-color.js-palette-color(class="card-details-{{color}}")
  208. if(isSelected color)
  209. | ✅
  210. button.primary.confirm.js-submit {{_ 'save'}}
  211. button.js-remove-color.negate.wide.right {{_ 'unset-color'}}