sidebarCustomFields.jade 4.2 KB

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