cardDetails.jade 37 KB

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