import.jade 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. form
  13. p: label(for='import-textarea') {{_ instruction}}
  14. textarea.js-import-json(placeholder="{{_ 'import-json-placeholder'}}" autofocus)
  15. | {{jsonText}}
  16. if isSandstorm
  17. p.warning {{_ 'import-sandstorm-warning'}}
  18. input.primary.wide(type="submit" value="{{_ 'import'}}")
  19. template(name="importMapMembers")
  20. h2 {{_ 'import-map-members'}}
  21. .map-members
  22. p {{_ 'import-members-map'}}
  23. .mapping-list
  24. each members
  25. a.mapping-item.js-select-member(class="{{#if wekanId}}filled{{/if}}")
  26. .profile-source
  27. .full-name= fullName
  28. .username
  29. | ({{username}})
  30. .wekan
  31. if wekanId
  32. +userAvatar(userId=wekanId)
  33. else
  34. a.member.add-member
  35. i.fa.fa-plus
  36. //-
  37. Due to the way the flewbox layout is working, we need to set some
  38. invisible items so that the last row items have a consistent width.
  39. See http://jsfiddle.net/Ln4h3c4n/ for an minimal example of the issue.
  40. .mapping-item.ghost-item
  41. .mapping-item.ghost-item
  42. .mapping-item.ghost-item
  43. .mapping-item.ghost-item
  44. .mapping-item.ghost-item
  45. form
  46. input.primary.wide(type="submit" value="{{_ 'done'}}")
  47. template(name="importMapMembersAddPopup")
  48. .select-member
  49. p
  50. | {{_ 'import-user-select'}}
  51. .js-map-member
  52. +esInput(index="users")
  53. ul.pop-over-list
  54. +esEach(index="users")
  55. li.item.js-member-item
  56. a.name.js-select-import(title="{{profile.fullname}} ({{username}})" data-id="{{_id}}")
  57. +userAvatar(userId=_id esSearch=true)
  58. span.full-name
  59. = profile.fullname
  60. | (<span class="username">{{username}}</span>)
  61. +ifEsIsSearching(index='users')
  62. +spinner
  63. +ifEsHasNoResults(index="users")
  64. .manage-member-section
  65. p.quiet {{_ 'no-results'}}