cardDetails.jade 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959
  1. template(name="cardDetailsPopup")
  2. +cardDetails(popupCard)
  3. template(name="cardDetails")
  4. +attachmentViewer
  5. section.card-details.js-card-details(class='{{#if cardMaximized}}card-details-maximized{{/if}}' class='{{#if isPopup}}card-details-popup{{/if}}'): .card-details-canvas
  6. .card-details-header(class='{{#if colorClass}}card-details-{{colorClass}}{{/if}}')
  7. +inlinedForm(classNames="js-card-details-title")
  8. +editCardTitleForm
  9. else
  10. unless isMiniScreen
  11. unless isPopup
  12. a.fa.fa-times-thin.close-card-details.js-close-card-details(title="{{_ 'close-card'}}")
  13. if cardMaximized
  14. a.fa.fa-window-minimize.minimize-card-details.js-minimize-card-details(title="{{_ 'minimize-card'}}")
  15. else
  16. a.fa.fa-window-maximize.maximize-card-details.js-maximize-card-details(title="{{_ 'maximize-card'}}")
  17. if currentUser.isBoardMember
  18. a.fa.fa-navicon.card-details-menu.js-open-card-details-menu(title="{{_ 'cardDetailsActionsPopup-title'}}")
  19. a.fa.fa-link.card-copy-button.js-copy-link(
  20. id="cardURL_copy"
  21. class="fa-link"
  22. title="{{_ 'copy-card-link-to-clipboard'}}"
  23. href="{{ originRelativeUrl }}"
  24. )
  25. span.copied-tooltip {{_ 'copied'}}
  26. else
  27. unless isPopup
  28. a.fa.fa-times-thin.close-card-details.js-close-card-details(title="{{_ 'close-card'}}")
  29. if currentUser.isBoardMember
  30. a.fa.fa-navicon.card-details-menu-mobile-web.js-open-card-details-menu(title="{{_ 'cardDetailsActionsPopup-title'}}")
  31. a.fa.fa-link.card-copy-mobile-button.js-copy-link(
  32. id="cardURL_copy"
  33. class="fa-link"
  34. title="{{_ 'copy-card-link-to-clipboard'}}"
  35. href="{{ originRelativeUrl }}"
  36. )
  37. span.copied-tooltip {{_ 'copied'}}
  38. h2.card-details-title.js-card-title(
  39. class="{{#if canModifyCard}}js-open-inlined-form is-editable{{/if}}")
  40. +viewer
  41. if currentBoard.allowsCardNumber
  42. span.card-number
  43. | ##{getCardNumber}
  44. = getTitle
  45. if isWatching
  46. i.card-details-watch.fa.fa-eye
  47. .card-details-path
  48. each parentList
  49. |   >  
  50. a.js-parent-card(href=linkForCard) {{title}}
  51. // else
  52. {{_ 'top-level-card'}}
  53. if isLinkedCard
  54. a.linked-card-location.js-go-to-linked-card
  55. +viewer
  56. | {{getBoardTitle}} > {{getTitle}}
  57. if getArchived
  58. if isLinkedBoard
  59. p.warning {{_ 'board-archived'}}
  60. else
  61. p.warning {{_ 'card-archived'}}
  62. .card-details-left
  63. .card-details-items
  64. if currentBoard.allowsLabels
  65. .card-details-item.card-details-item-labels
  66. h3.card-details-item-title
  67. i.fa.fa-tags
  68. | {{_ 'labels'}}
  69. a(class="{{#if canModifyCard}}js-add-labels{{else}}is-disabled{{/if}}" title="{{_ 'card-labels-title'}}")
  70. each labels
  71. span.card-label(class="card-label-{{color}}" title=name)
  72. +viewer
  73. = name
  74. if canModifyCard
  75. unless currentUser.isWorker
  76. a.card-label.add-label.js-add-labels(title="{{_ 'card-labels-title'}}")
  77. i.fa.fa-plus
  78. if currentBoard.hasAnyAllowsDate
  79. hr
  80. if currentBoard.allowsReceivedDate
  81. .card-details-item.card-details-item-received
  82. h3.card-details-item-title
  83. i.fa.fa-sign-out
  84. | {{_ 'card-received'}}
  85. if getReceived
  86. +cardReceivedDate
  87. else
  88. if canModifyCard
  89. unless currentUser.isWorker
  90. a.card-label.add-label.js-received-date
  91. i.fa.fa-plus
  92. if currentBoard.allowsStartDate
  93. .card-details-item.card-details-item-start
  94. h3.card-details-item-title
  95. i.fa.fa-hourglass-start
  96. | {{_ 'card-start'}}
  97. if getStart
  98. +cardStartDate
  99. else
  100. if canModifyCard
  101. unless currentUser.isWorker
  102. a.card-label.add-label.js-start-date
  103. i.fa.fa-plus
  104. if currentBoard.allowsDueDate
  105. .card-details-item.card-details-item-due
  106. h3.card-details-item-title
  107. i.fa.fa-sign-in
  108. | {{_ 'card-due'}}
  109. if getDue
  110. +cardDueDate
  111. else
  112. if canModifyCard
  113. unless currentUser.isWorker
  114. a.card-label.add-label.js-due-date
  115. i.fa.fa-plus
  116. if currentBoard.allowsEndDate
  117. .card-details-item.card-details-item-end
  118. h3.card-details-item-title
  119. i.fa.fa-hourglass-end
  120. | {{_ 'card-end'}}
  121. if getEnd
  122. +cardEndDate
  123. else
  124. if canModifyCard
  125. unless currentUser.isWorker
  126. a.card-label.add-label.js-end-date
  127. i.fa.fa-plus
  128. if currentBoard.hasAnyAllowsUser
  129. hr
  130. if currentBoard.allowsCreator
  131. .card-details-item.card-details-item-creator
  132. h3.card-details-item-title
  133. i.fa.fa-user
  134. | {{_ 'creator'}}
  135. +userAvatar(userId=userId noRemove=true)
  136. | {{! XXX Hack to hide syntaxic coloration /// }}
  137. //.card-details-items
  138. if currentBoard.allowsMembers
  139. .card-details-item.card-details-item-members
  140. h3.card-details-item-title
  141. i.fa.fa-users
  142. | {{_ 'members'}}
  143. each userId in getMembers
  144. +userAvatar(userId=userId cardId=_id)
  145. | {{! XXX Hack to hide syntaxic coloration /// }}
  146. if canModifyCard
  147. unless currentUser.isWorker
  148. a.member.add-member.card-details-item-add-button.js-add-members(title="{{_ 'card-members-title'}}")
  149. i.fa.fa-plus
  150. //if assigneeSelected
  151. if currentBoard.allowsAssignee
  152. .card-details-item.card-details-item-assignees
  153. h3.card-details-item-title
  154. i.fa.fa-user
  155. | {{_ 'assignee'}}
  156. each userId in getAssignees
  157. +userAvatar(userId=userId cardId=_id assignee=true)
  158. | {{! XXX Hack to hide syntaxic coloration /// }}
  159. if canModifyCard
  160. a.assignee.add-assignee.card-details-item-add-button.js-add-assignees(title="{{_ 'assignee'}}")
  161. i.fa.fa-plus
  162. if currentUser.isWorker
  163. unless assigneeSelected
  164. a.assignee.add-assignee.card-details-item-add-button.js-add-assignees(title="{{_ 'assignee'}}")
  165. i.fa.fa-plus
  166. //.card-details-items
  167. if currentBoard.allowsRequestedBy
  168. .card-details-item.card-details-item-name
  169. h3.card-details-item-title
  170. i.fa.fa-shopping-cart
  171. | {{_ 'requested-by'}}
  172. if canModifyCard
  173. unless currentUser.isWorker
  174. +inlinedForm(classNames="js-card-details-requester")
  175. +editCardRequesterForm
  176. else
  177. a.js-open-inlined-form
  178. if getRequestedBy
  179. +viewer
  180. = getRequestedBy
  181. else
  182. | {{_ 'add'}}
  183. else if getRequestedBy
  184. +viewer
  185. = getRequestedBy
  186. if currentBoard.allowsAssignedBy
  187. .card-details-item.card-details-item-name
  188. h3.card-details-item-title
  189. i.fa.fa-user-plus
  190. | {{_ 'assigned-by'}}
  191. if canModifyCard
  192. unless currentUser.isWorker
  193. +inlinedForm(classNames="js-card-details-assigner")
  194. +editCardAssignerForm
  195. else
  196. a.js-open-inlined-form
  197. if getAssignedBy
  198. +viewer
  199. = getAssignedBy
  200. else
  201. | {{_ 'add'}}
  202. else if getRequestedBy
  203. +viewer
  204. = getAssignedBy
  205. if $or currentBoard.allowsCardSortingByNumber getSpentTime
  206. hr
  207. if currentBoard.allowsCardSortingByNumber
  208. .card-details-item.card-details-sort-order
  209. h3.card-details-item-title
  210. i.fa.fa-sort
  211. | {{_ 'sort'}}
  212. if canModifyCard
  213. +inlinedForm(classNames="js-card-details-sort")
  214. +editCardSortOrderForm
  215. else
  216. a.js-open-inlined-form
  217. +viewer
  218. = sort
  219. if currentBoard.allowsShowLists
  220. .card-details-item.card-details-show-lists
  221. h3.card-details-item-title
  222. i.fa.fa-list
  223. | {{_ 'list'}}
  224. select.js-select-card-details-lists(disabled="{{#unless canModifyCard}}disabled{{/unless}}")
  225. each currentBoard.lists
  226. option(value="{{_id}}" selected="{{#if isCurrentListId _id}}selected{{/if}}") {{title}}
  227. //.card-details-items
  228. if getSpentTime
  229. .card-details-item.card-details-item-spent
  230. if getIsOvertime
  231. h3.card-details-item-title
  232. | {{_ 'overtime-hours'}}
  233. else
  234. h3.card-details-item-title
  235. | {{_ 'spent-time-hours'}}
  236. +cardSpentTime
  237. //.card-details-items
  238. if customFieldsWD
  239. unless customFieldsGrid
  240. hr
  241. each customFieldsWD
  242. if customFieldsGrid
  243. hr
  244. .card-details-item.card-details-item-customfield
  245. h3.card-details-item-title
  246. i.fa.fa-list-alt
  247. = definition.name
  248. +cardCustomField
  249. if $gt customFieldsWD.length 1
  250. .material-toggle-switch(title="{{_ 'change'}} {{_ 'custom-fields'}} {{_ 'layout'}}")
  251. if customFieldsGrid
  252. input.toggle-switch(type="checkbox" id="toggleCustomFieldsGridButton" checked="checked")
  253. else
  254. input.toggle-switch(type="checkbox" id="toggleCustomFieldsGridButton")
  255. label.toggle-label(for="toggleCustomFieldsGridButton")
  256. a.fa.fa-plus.js-custom-fields.card-details-item.custom-fields(title="{{_ 'custom-fields'}}")
  257. if getVoteQuestion
  258. hr
  259. .vote-title
  260. div.flex
  261. h3
  262. i.fa.fa-thumbs-up
  263. | {{_ 'vote-question'}}
  264. if getVoteEnd
  265. +voteEndDate
  266. .vote-result
  267. if votePublic
  268. a.card-label.card-label-green.js-show-positive-votes {{ voteCountPositive }}
  269. a.card-label.card-label-red.js-show-negative-votes {{ voteCountNegative }}
  270. else
  271. .card-label.card-label-green {{ voteCountPositive }}
  272. .card-label.card-label-red {{ voteCountNegative }}
  273. unless ($and currentBoard.isPublic voteAllowNonBoardMembers )
  274. .card-label.card-label-gray {{ voteCount }} {{_ 'r-of' }} {{ currentBoard.activeMembers.length }}
  275. +viewer
  276. = getVoteQuestion
  277. if showVotingButtons
  278. button.card-details-green.js-vote.js-vote-positive(class="{{#if voteState}}voted{{/if}}")
  279. if voteState
  280. i.fa.fa-thumbs-up
  281. | {{_ 'vote-for-it'}}
  282. button.card-details-red.js-vote.js-vote-negative(class="{{#if $eq voteState false}}voted{{/if}}")
  283. if $eq voteState false
  284. i.fa.fa-thumbs-down
  285. | {{_ 'vote-against'}}
  286. if getPokerQuestion
  287. hr
  288. .poker-title
  289. div.flex
  290. h3
  291. i.fa.fa-thumbs-up
  292. | {{_ 'poker-question'}}
  293. if getPokerEnd
  294. +pokerEndDate
  295. div.flex
  296. .poker-result
  297. if expiredPoker
  298. unless ($and currentBoard.isPublic pokerAllowNonBoardMembers )
  299. .card-label.card-label-gray {{ pokerCount }} {{_ 'r-of' }} {{ currentBoard.activeMembers.length }}
  300. if showPlanningPokerButtons
  301. .poker-result
  302. .poker-deck
  303. .poker-card
  304. span.inner.js-poker.js-poker-vote-one(class="{{#if $eq pokerState 'one'}}poker-voted{{/if}}") {{_ 'poker-one'}}
  305. if $eq pokerState "one"
  306. i.fa.fa-check
  307. .poker-deck
  308. .poker-card
  309. span.inner.js-poker.js-poker-vote-two(class="{{#if $eq pokerState 'two'}}poker-voted{{/if}}") {{_ 'poker-two'}}
  310. if $eq pokerState "two"
  311. i.fa.fa-check
  312. .poker-deck
  313. .poker-card
  314. span.inner.js-poker.js-poker-vote-three(class="{{#if $eq pokerState 'three'}}poker-voted{{/if}}") {{_ 'poker-three'}}
  315. if $eq pokerState "three"
  316. i.fa.fa-check
  317. .poker-deck
  318. .poker-card
  319. span.inner.js-poker.js-poker-vote-five(class="{{#if $eq pokerState 'five'}}poker-voted{{/if}}") {{_ 'poker-five'}}
  320. if $eq pokerState "five"
  321. i.fa.fa-check
  322. .poker-deck
  323. .poker-card
  324. span.inner.js-poker.js-poker-vote-eight(class="{{#if $eq pokerState 'eight'}}poker-voted{{/if}}") {{_ 'poker-eight'}}
  325. if $eq pokerState "eight"
  326. i.fa.fa-check
  327. .poker-deck
  328. .poker-card
  329. span.inner.js-poker.js-poker-vote-thirteen(class="{{#if $eq pokerState 'thirteen'}}poker-voted{{/if}}") {{_ 'poker-thirteen'}}
  330. if $eq pokerState "thirteen"
  331. i.fa.fa-check
  332. .poker-deck
  333. .poker-card
  334. span.inner.js-poker.js-poker-vote-twenty(class="{{#if $eq pokerState 'twenty'}}poker-voted{{/if}}") {{_ 'poker-twenty'}}
  335. if $eq pokerState "twenty"
  336. i.fa.fa-check
  337. .poker-deck
  338. .poker-card
  339. span.inner.js-poker.js-poker-vote-forty(class="{{#if $eq pokerState 'forty'}}poker-voted{{/if}}") {{_ 'poker-forty'}}
  340. if $eq pokerState "forty"
  341. i.fa.fa-check
  342. .poker-deck
  343. .poker-card
  344. span.inner.js-poker.js-poker-vote-one-hundred(class="{{#if $eq pokerState 'oneHundred'}}poker-voted{{/if}}") {{_ 'poker-oneHundred'}}
  345. if $eq pokerState "oneHundred"
  346. i.fa.fa-check
  347. .poker-deck
  348. .poker-card
  349. span.inner.js-poker.js-poker-vote-unsure(class="{{#if $eq pokerState 'unsure'}}poker-voted{{/if}}") {{_ 'poker-unsure'}}
  350. if $eq pokerState "unsure"
  351. i.fa.fa-check
  352. if currentUser.isBoardAdmin
  353. button.card-details-blue.js-poker-finish(class="{{#if $eq voteState false}}poker-voted{{/if}}") {{_ 'poker-finish'}}
  354. if expiredPoker
  355. .poker-table
  356. .poker-table-side-left
  357. .poker-table-heading-left
  358. .poker-table-row
  359. .poker-table-cell
  360. .poker-table-cell
  361. | {{_ 'poker-result-votes' }}
  362. .poker-table-cell.poker-table-cell-who
  363. | {{_ 'poker-result-who' }}
  364. .poker-table-body
  365. .poker-table-row
  366. .poker-table-cell
  367. button.card-details-gray.js-poker.poker-card-result(class="{{#if $eq pokerWinner 1}}winner{{else}}loser{{/if}}") {{_ 'poker-one'}}
  368. .poker-table-cell {{ pokerCountOne }}
  369. .poker-table-cell.poker-table-cell-who
  370. .poker-result
  371. each m in pokerMemberOne
  372. a.name
  373. +userAvatar(userId=m._id noRemove=true)
  374. .poker-table-row
  375. .poker-table-cell
  376. button.card-details-gray.js-poker.poker-card-result(class="{{#if $eq pokerWinner 2}}winner{{else}}loser{{/if}}") {{_ 'poker-two'}}
  377. .poker-table-cell {{ pokerCountTwo }}
  378. .poker-table-cell.poker-table-cell-who
  379. .poker-result
  380. each m in pokerMemberTwo
  381. a.name
  382. +userAvatar(userId=m._id noRemove=true)
  383. .poker-table-row
  384. .poker-table-cell
  385. button.card-details-gray.js-poker.poker-card-result(class="{{#if $eq pokerWinner 3}}winner{{else}}loser{{/if}}") {{_ 'poker-three'}}
  386. .poker-table-cell {{ pokerCountThree }}
  387. .poker-table-cell.poker-table-cell-who
  388. .poker-result
  389. each m in pokerMemberThree
  390. a.name
  391. +userAvatar(userId=m._id noRemove=true)
  392. .poker-table-row
  393. .poker-table-cell
  394. button.card-details-gray.js-poker.poker-card-result(class="{{#if $eq pokerWinner 5}}winner{{else}}loser{{/if}}") {{_ 'poker-five'}}
  395. .poker-table-cell {{ pokerCountFive }}
  396. .poker-table-cell.poker-table-cell-who
  397. .poker-result
  398. each m in pokerMemberFive
  399. a.name
  400. +userAvatar(userId=m._id noRemove=true)
  401. .poker-table-row
  402. .poker-table-cell
  403. button.card-details-gray.js-poker.poker-card-result(class="{{#if $eq pokerWinner 8}}winner{{else}}loser{{/if}}") {{_ 'poker-eight'}}
  404. .poker-table-cell {{ pokerCountEight }}
  405. .poker-table-cell.poker-table-cell-who
  406. .poker-result
  407. each m in pokerMemberEight
  408. a.name
  409. +userAvatar(userId=m._id noRemove=true)
  410. .poker-table-side-right
  411. .poker-table-heading-right
  412. .poker-table-row
  413. .poker-table-cell
  414. .poker-table-cell
  415. | {{_ 'poker-result-votes' }}
  416. .poker-table-cell.poker-table-cell-who
  417. | {{_ 'poker-result-who' }}
  418. .poker-table-body
  419. .poker-table-row
  420. .poker-table-cell
  421. button.card-details-gray.js-poker.poker-card-result(class="{{#if $eq pokerWinner 13}}winner{{else}}loser{{/if}}") {{_ 'poker-thirteen'}}
  422. .poker-table-cell {{ pokerCountThirteen }}
  423. .poker-table-cell.poker-table-cell-who
  424. .poker-result
  425. each m in pokerMemberThirteen
  426. a.name
  427. +userAvatar(userId=m._id noRemove=true)
  428. .poker-table-row
  429. .poker-table-cell
  430. button.card-details-gray.js-poker.poker-card-result(class="{{#if $eq pokerWinner 20}}winner{{else}}loser{{/if}}") {{_ 'poker-twenty'}}
  431. .poker-table-cell {{ pokerCountTwenty }}
  432. .poker-table-cell.poker-table-cell-who
  433. .poker-result
  434. each m in pokerMemberTwenty
  435. a.name
  436. +userAvatar(userId=m._id noRemove=true)
  437. .poker-table-row
  438. .poker-table-cell
  439. button.card-details-gray.js-poker.poker-card-result(class="{{#if $eq pokerWinner 40}}winner{{else}}loser{{/if}}") {{_ 'poker-forty'}}
  440. .poker-table-cell {{ pokerCountForty }}
  441. .poker-table-cell.poker-table-cell-who
  442. .poker-result
  443. each m in pokerMemberForty
  444. a.name
  445. +userAvatar(userId=m._id noRemove=true)
  446. .poker-table-row
  447. .poker-table-cell
  448. button.card-details-gray.js-poker.poker-card-result(class="{{#if $eq pokerWinner 100}}winner{{else}}loser{{/if}}") {{_ 'poker-oneHundred'}}
  449. .poker-table-cell {{ pokerCountOneHundred }}
  450. .poker-table-cell.poker-table-cell-who
  451. .poker-result
  452. each m in pokerMemberOneHundred
  453. a.name
  454. +userAvatar(userId=m._id noRemove=true)
  455. .poker-table-row
  456. .poker-table-cell
  457. button.card-details-gray.js-poker.poker-card-result(class="{{#if $eq pokerWinner 'unsure'}}winner{{else}}loser{{/if}}") {{_ 'poker-unsure'}}
  458. .poker-table-cell {{ pokerCountUnsure }}
  459. .poker-table-cell.poker-table-cell-who
  460. .poker-result
  461. each m in pokerMemberUnsure
  462. a.name
  463. +userAvatar(userId=m._id noRemove=true)
  464. if currentUser.isBoardAdmin
  465. div.estimation-add
  466. button.card-details-red.js-poker-replay(class="{{#if $eq voteState false}}voted{{/if}}") {{_ 'poker-replay'}}
  467. div.estimation-add
  468. button.js-poker-estimation
  469. i.fa.fa-plus
  470. | {{_ 'set-estimation'}}
  471. input(type=text,autofocus value=getPokerEstimation,id="pokerEstimation")
  472. //- XXX We should use "editable" to avoid repetiting ourselves
  473. if canModifyCard
  474. unless currentUser.isWorker
  475. if currentBoard.allowsDescriptionTitle
  476. hr
  477. h3.card-details-item-title
  478. i.fa.fa-align-left
  479. | {{_ 'description'}}
  480. if currentBoard.allowsDescriptionText
  481. +inlinedCardDescription(classNames="card-description js-card-description")
  482. +descriptionForm
  483. .edit-controls.clearfix
  484. button.primary(type="submit") {{_ 'save'}}
  485. a.fa.fa-times-thin.js-close-inlined-form
  486. else
  487. if currentBoard.allowsDescriptionText
  488. a.js-open-inlined-form
  489. if getDescription
  490. +viewer
  491. = getDescription
  492. else
  493. | {{_ 'edit'}}
  494. if (hasUnsavedValue 'cardDescription' _id)
  495. p.quiet
  496. | {{_ 'unsaved-description'}}
  497. a.js-open-inlined-form {{_ 'view-it'}}
  498. = ' - '
  499. a.js-close-inlined-form {{_ 'discard'}}
  500. else if getDescription
  501. if currentBoard.allowsDescriptionTitle
  502. hr
  503. h3.card-details-item-title {{_ 'description'}}
  504. if currentBoard.allowsDescriptionText
  505. +viewer
  506. = getDescription
  507. .card-checklist-attachmentGalleries
  508. .card-checklist-attachmentGallery.card-checklists
  509. if currentBoard.allowsChecklists
  510. hr
  511. +checklists(cardId = _id)
  512. if currentBoard.allowsSubtasks
  513. hr
  514. +subtasks(cardId = _id)
  515. if currentBoard.allowsAttachments
  516. hr
  517. h3.card-details-item-title
  518. i.fa.fa-paperclip
  519. | {{_ 'attachments'}}
  520. if Meteor.settings.public.attachmentsUploadMaxSize
  521. | {{_ 'max-upload-filesize'}} {{Meteor.settings.public.attachmentsUploadMaxSize}}
  522. br
  523. if Meteor.settings.public.attachmentsUploadMimeTypes
  524. | {{_ 'allowed-upload-filetypes'}} {{Meteor.settings.public.attachmentsUploadMimeTypes}}
  525. br
  526. | {{_ 'invalid-file'}}
  527. .card-checklist-attachmentGallery.card-attachmentGallery
  528. +attachmentGallery
  529. hr
  530. .card-details-right
  531. unless currentUser.isNoComments
  532. .activity-title
  533. h3.card-details-item-title
  534. i.fa.fa-history
  535. | {{ _ 'activity'}}
  536. if currentUser.isBoardMember
  537. .material-toggle-switch(title="{{_ 'hide-system-messages'}}")
  538. //span.toggle-switch-title
  539. if hiddenSystemMessages
  540. input.toggle-switch(type="checkbox" id="toggleButton" checked="checked")
  541. else
  542. input.toggle-switch(type="checkbox" id="toggleButton")
  543. label.toggle-label(for="toggleButton")
  544. if currentBoard.allowsComments
  545. if currentUser.isBoardMember
  546. unless currentUser.isNoComments
  547. +commentForm
  548. unless currentUser.isNoComments
  549. if isLoaded.get
  550. if isLinkedCard
  551. +activities(card=this mode="linkedcard")
  552. else if isLinkedBoard
  553. +activities(card=this mode="linkedboard")
  554. else
  555. +activities(card=this mode="card")
  556. template(name="editCardTitleForm")
  557. a.fa.fa-copy(title="{{_ 'copy-text-to-clipboard'}}")
  558. span.copied-tooltip {{_ 'copied'}}
  559. textarea.js-edit-card-title(rows='1' autofocus dir="auto")
  560. = getTitle
  561. .edit-controls.clearfix
  562. button.primary.confirm.js-submit-edit-card-title-form(type="submit") {{_ 'save'}}
  563. a.fa.fa-times-thin.js-close-inlined-form
  564. template(name="editCardRequesterForm")
  565. input.js-edit-card-requester(type='text' autofocus value=getRequestedBy dir="auto")
  566. .edit-controls.clearfix
  567. button.primary.confirm.js-submit-edit-card-requester-form(type="submit") {{_ 'save'}}
  568. a.fa.fa-times-thin.js-close-inlined-form
  569. template(name="editCardAssignerForm")
  570. input.js-edit-card-assigner(type='text' autofocus value=getAssignedBy dir="auto")
  571. .edit-controls.clearfix
  572. button.primary.confirm.js-submit-edit-card-assigner-form(type="submit") {{_ 'save'}}
  573. a.fa.fa-times-thin.js-close-inlined-form
  574. template(name="editCardSortOrderForm")
  575. input.js-edit-card-sort(type='text' autofocus value=sort dir="auto")
  576. .edit-controls.clearfix
  577. button.primary.confirm.js-submit-edit-card-sort-form(type="submit") {{_ 'save'}}
  578. a.fa.fa-times-thin.js-close-inlined-form
  579. template(name="cardDetailsActionsPopup")
  580. ul.pop-over-list
  581. li
  582. a.js-toggle-watch-card
  583. if isWatching
  584. i.fa.fa-eye
  585. | {{_ 'unwatch'}}
  586. else
  587. i.fa.fa-eye-slash
  588. | {{_ 'watch'}}
  589. hr
  590. if canModifyCard
  591. unless currentUser.isWorker
  592. ul.pop-over-list
  593. //li: a.js-members {{_ 'card-edit-members'}}
  594. //li: a.js-labels {{_ 'card-edit-labels'}}
  595. //li: a.js-attachments {{_ 'card-edit-attachments'}}
  596. li
  597. a.js-start-voting
  598. i.fa.fa-thumbs-up
  599. | {{_ 'card-edit-voting'}}
  600. li
  601. a.js-start-planning-poker
  602. i.fa.fa-thumbs-up
  603. | {{_ 'card-edit-planning-poker'}}
  604. if currentUser.isBoardAdmin
  605. li
  606. a.js-custom-fields
  607. i.fa.fa-list-alt
  608. | {{_ 'card-edit-custom-fields'}}
  609. //li: a.js-received-date {{_ 'editCardReceivedDatePopup-title'}}
  610. //li: a.js-start-date {{_ 'editCardStartDatePopup-title'}}
  611. //li: a.js-due-date {{_ 'editCardDueDatePopup-title'}}
  612. //li: a.js-end-date {{_ 'editCardEndDatePopup-title'}}
  613. li
  614. a.js-spent-time
  615. i.fa.fa-clock-o
  616. | {{_ 'editCardSpentTimePopup-title'}}
  617. li
  618. a.js-set-card-color
  619. i.fa.fa-paint-brush
  620. | {{_ 'setCardColorPopup-title'}}
  621. hr
  622. ul.pop-over-list
  623. li
  624. a.js-export-card
  625. i.fa.fa-share-alt
  626. | {{_ 'export-card'}}
  627. hr
  628. ul.pop-over-list
  629. li
  630. a.js-move-card-to-top
  631. i.fa.fa-arrow-up
  632. | {{_ 'moveCardToTop-title'}}
  633. li
  634. a.js-move-card-to-bottom
  635. i.fa.fa-arrow-down
  636. | {{_ 'moveCardToBottom-title'}}
  637. hr
  638. ul.pop-over-list
  639. if currentUser.isBoardAdmin
  640. li
  641. a.js-move-card
  642. i.fa.fa-arrow-right
  643. | {{_ 'moveCardPopup-title'}}
  644. unless currentUser.isWorker
  645. li
  646. a.js-copy-card
  647. i.fa.fa-copy
  648. | {{_ 'copyCardPopup-title'}}
  649. unless currentUser.isWorker
  650. ul.pop-over-list
  651. li
  652. a.js-copy-checklist-cards
  653. i.fa.fa-copy
  654. i.fa.fa-copy
  655. | {{_ 'copyManyCardsPopup-title'}}
  656. unless archived
  657. hr
  658. ul.pop-over-list
  659. li
  660. a.js-archive
  661. i.fa.fa-arrow-right
  662. i.fa.fa-archive
  663. | {{_ 'archive-card'}}
  664. hr
  665. ul.pop-over-list
  666. li
  667. a.js-more
  668. i.fa.fa-link
  669. | {{_ 'cardMorePopup-title'}}
  670. template(name="exportCardPopup")
  671. ul.pop-over-list
  672. li
  673. a(href="{{exportUrlCardPDF}}",, download="{{exportFilenameCardPDF}}")
  674. i.fa.fa-share-alt
  675. | {{_ 'export-card-pdf'}}
  676. template(name="moveCardPopup")
  677. +copyAndMoveCard
  678. template(name="copyCardPopup")
  679. label(for='copy-card-title') {{_ 'title'}}:
  680. textarea#copy-card-title.minicard-composer-textarea.js-card-title(autofocus)
  681. = getTitle
  682. +copyAndMoveCard
  683. template(name="copyManyCardsPopup")
  684. label(for='copy-checklist-cards-title') {{_ 'copyManyCardsPopup-instructions'}}:
  685. textarea#copy-card-title.minicard-composer-textarea.js-card-title(autofocus)
  686. | {{_ 'copyManyCardsPopup-format'}}
  687. +copyAndMoveCard
  688. template(name="convertChecklistItemToCardPopup")
  689. label(for='convert-checklist-item-to-card-title') {{_ 'title'}}:
  690. textarea#copy-card-title.minicard-composer-textarea.js-card-title(autofocus)
  691. = item.title
  692. +copyAndMoveCard
  693. template(name="copyAndMoveCard")
  694. unless currentUser.isWorker
  695. label {{_ 'boards'}}:
  696. select.js-select-boards(autofocus)
  697. each boards
  698. option(value="{{_id}}" selected="{{#if isDialogOptionBoardId _id}}selected{{/if}}") {{title}}
  699. label {{_ 'swimlanes'}}:
  700. select.js-select-swimlanes
  701. each swimlanes
  702. option(value="{{_id}}" selected="{{#if isDialogOptionSwimlaneId _id}}selected{{/if}}") {{title}}
  703. label {{_ 'lists'}}:
  704. select.js-select-lists
  705. each lists
  706. option(value="{{_id}}" selected="{{#if isDialogOptionListId _id}}selected{{/if}}") {{title}}
  707. .edit-controls.clearfix
  708. button.primary.confirm.js-done {{_ 'done'}}
  709. template(name="cardMembersPopup")
  710. input.card-members-filter(type="text" placeholder="{{_ 'search'}}")
  711. ul.pop-over-list.js-card-member-list
  712. each members
  713. li.item(class="{{#if isCardMember}}active{{/if}}")
  714. a.name.js-select-member(href="#")
  715. +userAvatar(userId=user._id)
  716. span.full-name
  717. = user.profile.fullname
  718. | (<span class="username">{{ user.username }}</span>)
  719. if isCardMember
  720. i.fa.fa-check
  721. template(name="cardAssigneesPopup")
  722. input.card-assignees-filter(type="text" placeholder="{{_ 'search'}}")
  723. unless currentUser.isWorker
  724. ul.pop-over-list.js-card-assignee-list
  725. each members
  726. li.item(class="{{#if isCardAssignee}}active{{/if}}")
  727. a.name.js-select-assignee(href="#")
  728. +userAvatar(userId=user._id)
  729. span.full-name
  730. = user.profile.fullname
  731. | (<span class="username">{{ user.username }}</span>)
  732. if isCardAssignee
  733. i.fa.fa-check
  734. if currentUser.isWorker
  735. ul.pop-over-list.js-card-assignee-list
  736. li.item(class="{{#if currentUser.isCardAssignee}}active{{/if}}")
  737. a.name.js-select-assignee(href="#")
  738. +userAvatar(userId=currentUser._id)
  739. span.full-name
  740. = currentUser.profile.fullname
  741. | (<span class="username">{{ currentUser.username }}</span>)
  742. if currentUser.isCardAssignee
  743. i.fa.fa-check
  744. template(name="cardAssigneePopup")
  745. .board-assignee-menu
  746. .mini-profile-info
  747. +userAvatar(userId=user._id showEdit=true)
  748. .info
  749. h3= user.profile.fullname
  750. p.quiet @{{ user.username }}
  751. ul.pop-over-list
  752. if currentUser.isNotCommentOnly
  753. unless currentUser.isWorker
  754. li: a.js-remove-assignee {{_ 'remove-member-from-card'}}
  755. unless currentUser.isWorker
  756. if $eq currentUser._id user._id
  757. with currentUser
  758. li: a.js-edit-profile {{_ 'edit-profile'}}
  759. template(name="cardMorePopup")
  760. p.quiet
  761. span.clearfix
  762. span {{_ 'link-card'}}
  763. = ' '
  764. i.fa.colorful(class="{{#if board.isPublic}}fa-globe{{else}}fa-lock{{/if}}")
  765. input.inline-input(type="text" id="cardURL" readonly value="{{ originRelativeUrl }}" autofocus="autofocus")
  766. button.js-copy-card-link-to-clipboard(class="btn" id="clipboard") {{_ 'copy-card-link-to-clipboard'}}
  767. .copied-tooltip {{_ 'copied'}}
  768. span.clearfix
  769. br
  770. h2 {{_ 'change-card-parent'}}
  771. label {{_ 'source-board'}}:
  772. select.js-field-parent-board
  773. if isTopLevel
  774. option(value="none" selected) {{_ 'custom-field-dropdown-none'}}
  775. else
  776. option(value="none") {{_ 'custom-field-dropdown-none'}}
  777. each boards
  778. if isParentBoard
  779. option(value="{{_id}}" selected) {{title}}
  780. else
  781. option(value="{{_id}}") {{title}}
  782. label {{_ 'parent-card'}}:
  783. select.js-field-parent-card
  784. if isTopLevel
  785. option(value="none" selected) {{_ 'custom-field-dropdown-none'}}
  786. else
  787. option(value="none") {{_ 'custom-field-dropdown-none'}}
  788. each cards
  789. if isParentCard
  790. option(value="{{_id}}" selected) {{title}}
  791. else
  792. option(value="{{_id}}") {{title}}
  793. br
  794. | {{_ 'added'}}
  795. span.date(title=card.createdAt) {{ moment createdAt 'LLL' }}
  796. if currentUser.isBoardAdmin
  797. a.js-delete(title="{{_ 'card-delete-notice'}}") {{_ 'delete'}}
  798. template(name="setCardColorPopup")
  799. form.edit-label
  800. .palette-colors: each colors
  801. unless $eq color 'white'
  802. span.card-label.palette-color.js-palette-color(class="card-details-{{color}}")
  803. if(isSelected color)
  804. i.fa.fa-check
  805. button.primary.confirm.js-submit {{_ 'save'}}
  806. button.js-remove-color.negate.wide.right {{_ 'unset-color'}}
  807. template(name="cardDeletePopup")
  808. p {{_ "card-delete-pop"}}
  809. unless archived
  810. p {{_ "card-delete-suggest-archive"}}
  811. button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
  812. template(name="cardArchivePopup")
  813. p {{_ "card-archive-pop"}}
  814. unless archived
  815. p {{_ "card-archive-suggest-cancel"}}
  816. button.js-confirm.negate.full(type="submit") {{_ 'archive'}}
  817. template(name="deleteVotePopup")
  818. p {{_ "vote-delete-pop"}}
  819. button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
  820. template(name="cardStartVotingPopup")
  821. form.edit-vote-question
  822. .fields
  823. label(for="vote") {{_ 'vote-question'}}
  824. input.js-vote-field#vote(type="text" name="vote" value="{{getVoteQuestion}}" autofocus disabled="{{#if getVoteQuestion}}disabled{{/if}}")
  825. .check-div
  826. a.flex(class="{{#if getVoteQuestion}}is-disabled{{else}}js-toggle-vote-allow-non-members{{/if}}")
  827. .materialCheckBox#vote-allow-non-members(name="vote-allow-non-members" class="{{#if voteAllowNonBoardMembers}}is-checked{{/if}}")
  828. span {{_ 'allowNonBoardMembers'}}
  829. .check-div
  830. a.flex(class="{{#if getVoteQuestion}}is-disabled{{else}}js-toggle-vote-public{{/if}}")
  831. .materialCheckBox#vote-public(name="vote-public" class="{{#if votePublic}}is-checked{{/if}}")
  832. span {{_ 'vote-public'}}
  833. .check-div.flex
  834. i.fa.fa-hourglass-end
  835. a.js-end-date
  836. span
  837. | {{_ 'card-end'}}
  838. unless getVoteEnd
  839. i.fa.fa-plus
  840. if getVoteEnd
  841. +voteEndDate
  842. button.primary.js-submit {{_ 'save'}}
  843. if getVoteQuestion
  844. if currentUser.isBoardAdmin
  845. button.js-remove-vote.negate.wide.right {{_ 'delete'}}
  846. template(name="positiveVoteMembersPopup")
  847. ul.pop-over-list.js-card-member-list
  848. each m in voteMemberPositive
  849. li.item
  850. a.name
  851. +userAvatar(userId=m._id)
  852. span.full-name
  853. = m.profile.fullname
  854. | (<span class="username">{{ m.username }}</span>)
  855. template(name="negativeVoteMembersPopup")
  856. ul.pop-over-list.js-card-member-list
  857. each m in voteMemberNegative
  858. li.item
  859. a.name
  860. +userAvatar(userId=m._id)
  861. span.full-name
  862. = m.profile.fullname
  863. | (<span class="username">{{ m.username }}</span>)
  864. template(name="deletePokerPopup")
  865. p {{_ "poker-delete-pop"}}
  866. button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
  867. template(name="cardStartPlanningPokerPopup")
  868. form.edit-poker-question
  869. .fields
  870. .check-div
  871. a.flex(class="{{#if getPokerQuestion}}is-disabled{{else}}js-toggle-poker-allow-non-members{{/if}}")
  872. .materialCheckBox#poker-allow-non-members(name="poker-allow-non-members" class="{{#if pokerAllowNonBoardMembers}}is-checked{{/if}}")
  873. span {{_ 'allowNonBoardMembers'}}
  874. .check-div.flex
  875. i.fa.fa-hourglass-end
  876. a.js-end-date
  877. span
  878. | {{_ 'card-end'}}
  879. unless getPokerEnd
  880. i.fa.fa-plus
  881. if getPokerEnd
  882. +pokerEndDate
  883. button.primary.js-submit {{_ 'save'}}
  884. if getPokerQuestion
  885. if currentUser.isBoardAdmin
  886. button.js-remove-poker.negate.wide.right {{_ 'delete'}}