import.jade 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. p.import-members-map-note
  23. | {{_ 'import-members-map-note' }}
  24. .mapping-list
  25. each members
  26. a.mapping-item.js-select-member(class="{{#if wekanId}}filled{{/if}}")
  27. .profile-source
  28. .full-name= fullName
  29. .username
  30. | ({{username}})
  31. .wekan
  32. if wekanId
  33. +userAvatar(userId=wekanId)
  34. else
  35. a.member.add-member
  36. i.fa.fa-plus
  37. //-
  38. Due to the way the flewbox layout is working, we need to set some
  39. invisible items so that the last row items have a consistent width.
  40. See http://jsfiddle.net/Ln4h3c4n/ for an minimal example of the issue.
  41. .mapping-item.ghost-item
  42. .mapping-item.ghost-item
  43. .mapping-item.ghost-item
  44. .mapping-item.ghost-item
  45. .mapping-item.ghost-item
  46. form
  47. input.primary.wide(type="submit" value="{{_ 'done'}}")
  48. else
  49. +spinner
  50. template(name="importMapMembersAddPopup")
  51. .select-member
  52. p
  53. | {{_ 'import-user-select'}}
  54. .js-map-member
  55. +EasySearch.Input(index=searchIndex)
  56. ul.pop-over-list
  57. +EasySearch.Each(index=searchIndex)
  58. li.item.js-member-item
  59. a.name.js-select-import(title="{{profile.fullname}} ({{username}})" data-id="{{__originalId}}")
  60. +userAvatar(userId=__originalId)
  61. span.full-name
  62. = profile.fullname
  63. | (<span class="username">{{username}}</span>)
  64. +EasySearch.IfSearching(index=searchIndex)
  65. +spinner
  66. +EasySearch.IfNoResults(index=searchIndex)
  67. .manage-member-section
  68. p.quiet {{_ 'no-results'}}