sidebar.jade 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. template(name="sidebar")
  2. .board-sidebar.sidebar(class="{{#if isOpen}}is-open{{/if}}")
  3. a.sidebar-tongue.js-toggle-sidebar(
  4. class="{{#if isTongueHidden}}is-hidden{{/if}}")
  5. i.fa.fa-angle-left
  6. .sidebar-content.js-board-sidebar-content.js-perfect-scrollbar
  7. a.hide-btn.js-hide-sidebar
  8. i.fa.fa-angle-right
  9. unless isDefaultView
  10. h2
  11. a.fa.fa-chevron-left.js-back-home
  12. = getViewTitle
  13. +Template.dynamic(template=getViewTemplate)
  14. template(name='homeSidebar')
  15. +membersWidget
  16. hr
  17. +labelsWidget
  18. hr
  19. h3
  20. i.fa.fa-comments-o
  21. | {{_ 'activities'}}
  22. +activities(mode="board")
  23. template(name="membersWidget")
  24. .board-widget.board-widget-members
  25. h3
  26. i.fa.fa-user
  27. | {{_ 'members'}}
  28. .board-widget-content
  29. each currentBoard.activeMembers
  30. +userAvatar(userId=this.userId showStatus=true)
  31. if isSandstorm
  32. if currentUser.isBoardMember
  33. a.member.add-member.sandstorm-powerbox-request-identity
  34. i.fa.fa-plus
  35. else if currentUser.isBoardAdmin
  36. a.member.add-member.js-manage-board-members
  37. i.fa.fa-plus
  38. .clearfix
  39. if isInvited
  40. hr
  41. p
  42. i.fa.fa-exclamation-circle
  43. | {{_ 'just-invited'}}
  44. button.js-member-invite-accept.primary {{_ 'accept'}}
  45. button.js-member-invite-decline {{_ 'decline'}}
  46. template(name="labelsWidget")
  47. .board-widget.board-widget-labels
  48. h3
  49. i.fa.fa-tags
  50. | {{_ 'labels'}}
  51. .board-widget-content
  52. each currentBoard.labels
  53. a.card-label(class="card-label-{{color}}"
  54. class="{{#if currentUser.isBoardMember}}js-label{{/if}}")
  55. span.card-label-name= name
  56. if currentUser.isBoardAdmin
  57. a.card-label.add-label.js-add-label
  58. i.fa.fa-plus
  59. template(name="memberPopup")
  60. .board-member-menu
  61. .miniprofile-header
  62. +userAvatar(userId=user._id showEdit=true)
  63. .info
  64. h3
  65. .js-profile= user.profile.fullname
  66. p.quiet @#{user.username}
  67. if isInvited
  68. p
  69. i.fa.fa-exclamation-circle
  70. | {{_ 'not-accepted-yet'}}
  71. ul.pop-over-list
  72. li
  73. a.js-filter-member {{_ 'filter-cards'}}
  74. if currentUser.isBoardAdmin
  75. unless isSandstorm
  76. li
  77. a.js-change-role
  78. | {{_ 'change-permissions'}}
  79. span.quiet (#{memberType})
  80. li
  81. if $eq currentUser._id userId
  82. a.js-leave-member {{_ 'leave-board'}}
  83. else
  84. a.js-remove-member {{_ 'remove-from-board'}}
  85. template(name="removeMemberPopup")
  86. p {{_ 'remove-member-pop' name=user.profile.fullname username=user.username boardTitle=board.title}}
  87. button.js-confirm.negate.full(type="submit") {{_ 'remove-member'}}
  88. template(name="addMemberPopup")
  89. .js-search-member
  90. +esInput(index="users")
  91. if loading.get
  92. +spinner
  93. else if error.get
  94. .warning {{_ error.get}}
  95. else
  96. ul.pop-over-list
  97. +esEach(index="users")
  98. li.item.js-member-item(class="{{#if isBoardMember}}disabled{{/if}}")
  99. a.name.js-select-member(title="{{profile.fullname}} ({{username}})")
  100. +userAvatar(userId=_id esSearch=true)
  101. span.full-name
  102. = profile.fullname
  103. | (<span class="username">{{username}}</span>)
  104. if isBoardMember
  105. .quiet ({{_ 'joined'}})
  106. +ifEsIsSearching(index='users')
  107. +spinner
  108. +ifEsHasNoResults(index="users")
  109. .manage-member-section
  110. p.quiet {{_ 'no-results'}}
  111. button.js-email-invite.primary.full {{_ 'email-invite'}}
  112. template(name="changePermissionsPopup")
  113. ul.pop-over-list
  114. li
  115. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-admin{{/if}}")
  116. | {{_ 'admin'}}
  117. if isAdmin
  118. i.fa.fa-check
  119. span.sub-name {{_ 'admin-desc'}}
  120. li
  121. a(class="{{#if isLastAdmin}}disabled{{else}}js-set-normal{{/if}}")
  122. | {{_ 'normal'}}
  123. unless isAdmin
  124. i.fa.fa-check
  125. span.sub-name {{_ 'normal-desc'}}
  126. if isLastAdmin
  127. hr
  128. p.quiet.bottom {{_ 'last-admin-desc'}}