sidebarCustomFields.jade 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. template(name="customFieldsSidebar")
  2. ul.sidebar-list
  3. each customFields
  4. li
  5. div.minicard-wrapper.js-minicard
  6. div.minicard
  7. a.js-edit-custom-field.minicard-edit-button
  8. | ✏️
  9. div.minicard-title
  10. +viewer
  11. =name
  12. | ({{ type }})
  13. if currentUser.isBoardMember
  14. hr
  15. a.sidebar-btn.js-open-create-custom-field
  16. | ➕
  17. span {{_ 'createCustomField'}}
  18. template(name="createCustomFieldPopup")
  19. form
  20. label
  21. | {{_ 'name'}}
  22. unless _id
  23. input.js-field-name(type="text" autofocus)
  24. else
  25. input.js-field-name(type="text" value=name)
  26. label
  27. | {{_ 'type'}}
  28. select.js-field-type(disabled="{{#if _id}}disabled{{/if}}")
  29. each types
  30. if selected
  31. option(value=value selected="selected") {{name}}
  32. else
  33. option(value=value) {{name}}
  34. div.js-field-settings.js-field-settings-currency(class="{{#if isTypeNotSelected 'currency'}}hide{{/if}}")
  35. label
  36. | {{_ 'custom-field-currency-option'}}
  37. select.js-field-currency
  38. each getCurrencyCodes
  39. if selected
  40. option(value=value selected="selected") {{name}}
  41. else
  42. option(value=value) {{name}}
  43. a.flex.js-field-show-sum-at-top-of-list(class="{{#if showSumAtTopOfList}}is-checked{{/if}}")
  44. .materialCheckBox(class="{{#if showSumAtTopOfList}}is-checked{{/if}}")
  45. span {{_ 'showSum-field-on-list'}}
  46. div.js-field-settings.js-field-settings-currency(class="{{#if isTypeNotSelected 'number'}}hide{{/if}}")
  47. a.flex.js-field-show-sum-at-top-of-list(class="{{#if showSumAtTopOfList}}is-checked{{/if}}")
  48. .materialCheckBox(class="{{#if showSumAtTopOfList}}is-checked{{/if}}")
  49. span {{_ 'showSum-field-on-list'}}
  50. div.js-field-settings.js-field-settings-dropdown(class="{{#if isTypeNotSelected 'dropdown'}}hide{{/if}}")
  51. label
  52. | {{_ 'custom-field-dropdown-options'}}
  53. each dropdownItems.get
  54. input.js-dropdown-item(type="text" value=name placeholder="")
  55. input.js-dropdown-item.last(type="text" value="" placeholder="{{_ 'custom-field-dropdown-options-placeholder'}}")
  56. div.js-field-settings.js-field-settings-stringtemplate(class="{{#if isTypeNotSelected 'stringtemplate'}}hide{{/if}}")
  57. label
  58. | {{_ 'custom-field-stringtemplate-format'}}
  59. input.js-field-stringtemplate-format(type="text" value=getStringtemplateFormat)
  60. label
  61. | {{_ 'custom-field-stringtemplate-separator'}}
  62. input.js-field-stringtemplate-separator(type="text" value=getStringtemplateSeparator)
  63. a.flex.js-field-show-on-card(class="{{#if showOnCard}}is-checked{{/if}}")
  64. .materialCheckBox(class="{{#if showOnCard}}is-checked{{/if}}")
  65. span {{_ 'show-field-on-card'}}
  66. a.flex.js-field-automatically-on-card(class="{{#if automaticallyOnCard}}is-checked{{/if}}")
  67. .materialCheckBox(class="{{#if automaticallyOnCard}}is-checked{{/if}}")
  68. span {{_ 'automatically-field-on-card'}}
  69. a.flex.js-field-always-on-card(class="{{#if alwaysOnCard}}is-checked{{/if}}")
  70. .materialCheckBox(class="{{#if alwaysOnCard}}is-checked{{/if}}")
  71. span {{_ 'always-field-on-card'}}
  72. a.flex.js-field-showLabel-on-card(class="{{#if showLabelOnMiniCard}}is-checked{{/if}}")
  73. .materialCheckBox(class="{{#if showLabelOnMiniCard}}is-checked{{/if}}")
  74. span {{_ 'showLabel-field-on-card'}}
  75. button.primary.wide.left(type="button")
  76. | {{_ 'save'}}
  77. if _id
  78. button.negate.wide.right.js-delete-custom-field(type="button")
  79. | {{_ 'delete'}}
  80. template(name="deleteCustomFieldPopup")
  81. p {{_ "custom-field-delete-pop"}}
  82. button.js-confirm.negate.full(type="submit") {{_ 'delete'}}