cardCustomFields.jade 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. template(name="cardCustomFieldsPopup")
  2. ul.pop-over-list
  3. each board.customFields
  4. li.item(class="")
  5. a.name.js-select-field(href="#")
  6. span.full-name
  7. +viewer
  8. = name
  9. if hasCustomField
  10. i.fa.fa-check
  11. hr
  12. a.quiet-button.full.js-settings
  13. i.fa.fa-cog
  14. span {{_ 'settings'}}
  15. template(name="cardCustomField")
  16. +Template.dynamic(template=getTemplate)
  17. template(name="cardCustomField-text")
  18. if canModifyCard
  19. +inlinedForm(classNames="js-card-customfield-text")
  20. +editor(autofocus=true)
  21. = value
  22. .edit-controls.clearfix
  23. button.primary(type="submit") {{_ 'save'}}
  24. a.fa.fa-times-thin.js-close-inlined-form
  25. else
  26. a.js-open-inlined-form
  27. if value
  28. +viewer
  29. = value
  30. else
  31. | {{_ 'edit'}}
  32. else
  33. +viewer
  34. = value
  35. template(name="cardCustomField-number")
  36. if canModifyCard
  37. +inlinedForm(classNames="js-card-customfield-number")
  38. input(type="number" value=data.value)
  39. .edit-controls.clearfix
  40. button.primary(type="submit") {{_ 'save'}}
  41. a.fa.fa-times-thin.js-close-inlined-form
  42. else
  43. a.js-open-inlined-form
  44. if value
  45. = value
  46. else
  47. | {{_ 'edit'}}
  48. else
  49. if value
  50. = value
  51. template(name="cardCustomField-currency")
  52. if canModifyCard
  53. +inlinedForm(classNames="js-card-customfield-currency")
  54. input(type="text" value=data.value)
  55. .edit-controls.clearfix
  56. button.primary(type="submit") {{_ 'save'}}
  57. a.fa.fa-times-thin.js-close-inlined-form
  58. else
  59. a.js-open-inlined-form
  60. if value
  61. = formattedValue
  62. else
  63. | {{_ 'edit'}}
  64. else
  65. if value
  66. = formattedValue
  67. template(name="cardCustomField-date")
  68. if canModifyCard
  69. a.js-edit-date(title="{{showTitle}}" class="{{classes}}")
  70. if value
  71. div.card-date
  72. time(datetime="{{showISODate}}")
  73. | {{showDate}}
  74. else
  75. | {{_ 'edit'}}
  76. else
  77. if value
  78. div.card-date
  79. time(datetime="{{showISODate}}")
  80. | {{showDate}}
  81. template(name="cardCustomField-dropdown")
  82. if canModifyCard
  83. +inlinedForm(classNames="js-card-customfield-dropdown")
  84. select.inline
  85. each items
  86. if($eq data.value this._id)
  87. option(value=_id selected="selected")
  88. +viewer
  89. = name
  90. else
  91. option(value=_id)
  92. +viewer
  93. = name
  94. .edit-controls.clearfix
  95. button.primary(type="submit") {{_ 'save'}}
  96. a.fa.fa-times-thin.js-close-inlined-form
  97. else
  98. a.js-open-inlined-form
  99. if value
  100. +viewer
  101. = selectedItem
  102. else
  103. | {{_ 'edit'}}
  104. else
  105. if value
  106. +viewer
  107. = selectedItem