swimlaneHeader.jade 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. template(name="swimlaneHeader")
  2. .swimlane-header-wrap.js-swimlane-header(class=colorClass title="{{_ 'rename'}}")
  3. if this.isTemplateContainer
  4. +swimlaneFixedHeader(this)
  5. else
  6. +inlinedForm
  7. +editSwimlaneTitleForm
  8. else
  9. +swimlaneFixedHeader(this)
  10. template(name="swimlaneFixedHeader")
  11. .swimlane-header(
  12. class="{{#if currentUser.isBoardMember}}js-open-inlined-form is-editable{{/if}}")
  13. if $eq title 'Card Templates'
  14. | {{_ 'card-templates-swimlane'}}
  15. else if $eq title 'List Templates'
  16. | {{_ 'list-templates-swimlane'}}
  17. else if $eq title 'Board Templates'
  18. | {{_ 'board-templates-swimlane'}}
  19. else if $eq title 'Default'
  20. | {{_ 'defaultdefault'}}
  21. else
  22. +viewer
  23. | {{isTitleDefault title}}
  24. .swimlane-header-menu
  25. if currentUser
  26. unless currentUser.isCommentOnly
  27. a.js-open-add-swimlane-menu.swimlane-header-plus-icon(title="{{_ 'add-swimlane'}}")
  28. | ➕
  29. a.js-open-swimlane-menu(title="{{_ 'swimlaneActionPopup-title'}}")
  30. | ☰
  31. //// TODO: Collapse Swimlane: make button working, etc.
  32. //unless collapsed
  33. // a.js-collapse-swimlane(title="{{_ 'collapse'}}")
  34. // i.fa.fa-arrow-down.swimlane-header-collapse-down
  35. // ⬆️.swimlane-header-collapse-up
  36. //if collapsed
  37. // a.js-collapse-swimlane(title="{{_ 'uncollapse'}}")
  38. // ⬆️.swimlane-header-collapse-up
  39. // i.fa.fa-arrow-down.swimlane-header-collapse-down
  40. unless isTouchScreen
  41. a.swimlane-header-handle.handle.js-swimlane-header-handle
  42. | ↕️
  43. if isTouchScreen
  44. a.swimlane-header-miniscreen-handle.handle.js-swimlane-header-handle
  45. | ↕️
  46. template(name="editSwimlaneTitleForm")
  47. .list-composer
  48. input.list-name-input.full-line(type="text" value="{{isTitleDefault title}}" autofocus)
  49. .edit-controls.clearfix
  50. button.primary.confirm(type="submit") {{_ 'save'}}
  51. a.js-close-inlined-form
  52. | ❌
  53. template(name="swimlaneActionPopup")
  54. if currentUser
  55. unless currentUser.isCommentOnly
  56. ul.pop-over-list
  57. if currentUser.isBoardAdmin
  58. li: a.js-set-swimlane-color
  59. | 🎨
  60. | {{_ 'select-color'}}
  61. li: a.js-set-swimlane-height
  62. | ↕️
  63. | {{_ 'set-swimlane-height'}}
  64. if currentUser.isBoardAdmin
  65. unless this.isTemplateContainer
  66. hr
  67. ul.pop-over-list
  68. li: a.js-close-swimlane
  69. | ▶️
  70. | 📦
  71. | {{_ 'archive-swimlane'}}
  72. ul.pop-over-list
  73. li: a.js-copy-swimlane
  74. | 📋
  75. | {{_ 'copy-swimlane'}}
  76. ul.pop-over-list
  77. li: a.js-move-swimlane
  78. | ⬆️
  79. | {{_ 'move-swimlane'}}
  80. template(name="swimlaneAddPopup")
  81. if currentUser
  82. unless currentUser.isCommentOnly
  83. form
  84. input.swimlane-name-input.full-line(type="text" placeholder="{{_ 'add-swimlane'}}"
  85. autocomplete="off" autofocus)
  86. .edit-controls.clearfix
  87. button.primary.confirm(type="submit") {{_ 'add'}}
  88. unless currentBoard.isTemplatesBoard
  89. unless currentBoard.isTemplateBoard
  90. span.quiet
  91. | {{_ 'or'}}
  92. a.js-swimlane-template {{_ 'template'}}
  93. template(name="setSwimlaneColorPopup")
  94. form.edit-label.swimlane-color-popup
  95. // Align content to left and remove default gutter
  96. .flush-left
  97. .palette-colors(style="margin-left:0; padding-left:0; justify-content:flex-start;")
  98. each colors
  99. span.card-label.palette-color.js-palette-color(class="card-details-{{color}}")
  100. if(isSelected color)
  101. | ✅
  102. // Buttons aligned left too
  103. .flush-left
  104. button.primary.confirm.js-submit(style="margin-left:0") {{_ 'save'}}
  105. button.js-remove-color.negate.wide.right(style="margin-left:8px") {{_ 'unset-color'}}
  106. template(name="setSwimlaneHeightPopup")
  107. .flush-left.swimlane-height-popup
  108. #js-swimlane-height-edit
  109. label a) {{_ 'set-swimlane-height-value'}}
  110. label b) -1
  111. p
  112. input.swimlane-height-value(type="number" value="{{ swimlaneHeightValue }}" min="100")
  113. input.swimlane-height-apply(type="submit" value="{{_ 'apply'}}")
  114. input.swimlane-height-error
  115. template(name="swimlaneHeightErrorPopup")
  116. .swimlane-height-invalid
  117. p {{_ 'swimlane-height-error-message'}} '>=100'
  118. button.full.js-back-view(type="submit") {{_ 'cancel'}}
  119. template(name="swimlaneDeletePopup")
  120. p {{_ "swimlane-delete-pop"}}
  121. button.js-confirm.negate.full(type="submit") {{_ 'delete'}}