listHeader.jade 7.6 KB

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