sidebarCustomFields.jade 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. div.js-field-settings.js-field-settings-dropdown(class="{{#if isTypeNotSelected 'dropdown'}}hide{{/if}}")
  43. label
  44. | {{_ 'custom-field-dropdown-options'}}
  45. each dropdownItems.get
  46. input.js-dropdown-item(type="text" value=name placeholder="")
  47. input.js-dropdown-item.last(type="text" value="" placeholder="{{_ 'custom-field-dropdown-options-placeholder'}}")
  48. div.js-field-settings.js-field-settings-stringtemplate(class="{{#if isTypeNotSelected 'stringtemplate'}}hide{{/if}}")
  49. label
  50. | {{_ 'custom-field-stringtemplate-format'}}
  51. input.js-field-stringtemplate-format(type="text" value=getStringtemplateFormat)
  52. label
  53. | {{_ 'custom-field-stringtemplate-separator'}}
  54. input.js-field-stringtemplate-separator(type="text" value=getStringtemplateSeparator)
  55. a.flex.js-field-show-on-card(class="{{#if showOnCard}}is-checked{{/if}}")
  56. .materialCheckBox(class="{{#if showOnCard}}is-checked{{/if}}")
  57. span {{_ 'show-field-on-card'}}
  58. a.flex.js-field-automatically-on-card(class="{{#if automaticallyOnCard}}is-checked{{/if}}")
  59. .materialCheckBox(class="{{#if automaticallyOnCard}}is-checked{{/if}}")
  60. span {{_ 'automatically-field-on-card'}}
  61. a.flex.js-field-always-on-card(class="{{#if alwaysOnCard}}is-checked{{/if}}")
  62. .materialCheckBox(class="{{#if alwaysOnCard}}is-checked{{/if}}")
  63. span {{_ 'always-field-on-card'}}
  64. a.flex.js-field-showLabel-on-card(class="{{#if showLabelOnMiniCard}}is-checked{{/if}}")
  65. .materialCheckBox(class="{{#if showLabelOnMiniCard}}is-checked{{/if}}")
  66. span {{_ 'showLabel-field-on-card'}}
  67. button.primary.wide.left(type="button")
  68. | {{_ 'save'}}
  69. if _id
  70. button.negate.wide.right.js-delete-custom-field(type="button")
  71. | {{_ 'delete'}}
  72. template(name="deleteCustomFieldPopup")
  73. p {{_ "custom-field-delete-pop"}}
  74. button.js-confirm.negate.full(type="submit") {{_ 'delete'}}