import.jade 2.2 KB

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