import.jade 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. template(name="importHeaderBar")
  2. h1
  3. a.back-btn(href="{{pathFor 'home'}}")
  4. i.fa.fa-chevron-left
  5. | {{_ title}}
  6. template(name="import")
  7. .wrapper
  8. if error.get
  9. .warning {{_ error.get}}
  10. +Template.dynamic(template=currentTemplate)
  11. template(name="importTextarea")
  12. unless isSandstorm
  13. form
  14. p: label(for='import-textarea') {{_ instruction}}
  15. textarea.js-import-json(placeholder="{{_ 'import-json-placeholder'}}" autofocus)
  16. | {{jsonText}}
  17. if isSandstorm
  18. p.warning {{_ 'import-sandstorm-warning'}}
  19. input.primary.wide(type="submit" value="{{_ 'import'}}")
  20. if isSandstorm
  21. p.warning 'Import disabled because of data loss bug https://github.com/wekan/wekan/issues/1430'
  22. template(name="importMapMembers")
  23. h2 {{_ 'import-map-members'}}
  24. .map-members
  25. p {{_ 'import-members-map'}}
  26. .mapping-list
  27. each members
  28. a.mapping-item.js-select-member(class="{{#if wekanId}}filled{{/if}}")
  29. .profile-source
  30. .full-name= fullName
  31. .username
  32. | ({{username}})
  33. .wekan
  34. if wekanId
  35. +userAvatar(userId=wekanId)
  36. else
  37. a.member.add-member
  38. i.fa.fa-plus
  39. //-
  40. Due to the way the flewbox layout is working, we need to set some
  41. invisible items so that the last row items have a consistent width.
  42. See http://jsfiddle.net/Ln4h3c4n/ for an minimal example of the issue.
  43. .mapping-item.ghost-item
  44. .mapping-item.ghost-item
  45. .mapping-item.ghost-item
  46. .mapping-item.ghost-item
  47. .mapping-item.ghost-item
  48. form
  49. input.primary.wide(type="submit" value="{{_ 'done'}}")
  50. template(name="importMapMembersAddPopup")
  51. .select-member
  52. p
  53. | {{_ 'import-user-select'}}
  54. .js-map-member
  55. +esInput(index="users")
  56. ul.pop-over-list
  57. +esEach(index="users")
  58. li.item.js-member-item
  59. a.name.js-select-import(title="{{profile.fullname}} ({{username}})" data-id="{{_id}}")
  60. +userAvatar(userId=_id esSearch=true)
  61. span.full-name
  62. = profile.fullname
  63. | (<span class="username">{{username}}</span>)
  64. +ifEsIsSearching(index='users')
  65. +spinner
  66. +ifEsHasNoResults(index="users")
  67. .manage-member-section
  68. p.quiet {{_ 'no-results'}}