sidebarCustomFields.jade 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. | {{ name }} ({{ type }})
  10. if currentUser.isBoardMember
  11. hr
  12. a.sidebar-btn.js-open-create-custom-field
  13. i.fa.fa-plus
  14. span {{_ 'createCustomField'}}
  15. template(name="createCustomFieldPopup")
  16. form
  17. label
  18. | {{_ 'name'}}
  19. unless _id
  20. input.js-field-name(type="text" autofocus)
  21. else
  22. input.js-field-name(type="text" value=name)
  23. label
  24. | {{_ 'type'}}
  25. select.js-field-type(disabled="{{#if _id}}disabled{{/if}}")
  26. each types
  27. if selected
  28. option(value=value selected="selected") {{name}}
  29. else
  30. option(value=value) {{name}}
  31. div.js-field-settings.js-field-settings-dropdown(class="{{#if isTypeNotSelected 'dropdown'}}hide{{/if}}")
  32. label
  33. | {{_ 'custom-field-dropdown-options'}}
  34. each dropdownItems.get
  35. input.js-dropdown-item(type="text" value=name placeholder="")
  36. input.js-dropdown-item.last(type="text" value="" placeholder="{{_ 'custom-field-dropdown-options-placeholder'}}")
  37. a.flex.js-field-show-on-card(class="{{#if showOnCard}}is-checked{{/if}}")
  38. .materialCheckBox(class="{{#if showOnCard}}is-checked{{/if}}")
  39. span {{_ 'show-field-on-card'}}
  40. a.flex.js-field-automatically-on-card(class="{{#if automaticallyOnCard}}is-checked{{/if}}")
  41. .materialCheckBox(class="{{#if automaticallyOnCard}}is-checked{{/if}}")
  42. span {{_ 'automatically-field-on-card'}}
  43. a.flex.js-field-showLabel-on-card(class="{{#if showLabelOnMiniCard}}is-checked{{/if}}")
  44. .materialCheckBox(class="{{#if showLabelOnMiniCard}}is-checked{{/if}}")
  45. span {{_ 'showLabel-field-on-card'}}
  46. button.primary.wide.left(type="button")
  47. | {{_ 'save'}}
  48. if _id
  49. button.negate.wide.right.js-delete-custom-field(type="button")
  50. | {{_ 'delete'}}
  51. template(name="deleteCustomFieldPopup")
  52. p {{_ "custom-field-delete-pop"}}
  53. button.js-confirm.negate.full(type="submit") {{_ 'delete'}}