listHeader.jade 7.5 KB

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