parent
b2dc77e1e6
commit
0b420d0308
3 changed files with 9 additions and 1 deletions
|
|
@ -81,6 +81,8 @@
|
|||
<li class="user-menu-item"><a href="/help">{{t "header.help"}}</a></li>
|
||||
{{#if current_user.admin}}
|
||||
<li class="user-menu-item"><a href="/admins/user_search">{{t "header.admin"}}</a></li>
|
||||
{{else if current_user.moderator}}
|
||||
<li class="user-menu-item"><a href="/report">{{t "header.moderator"}}</a></li>
|
||||
{{/if}}
|
||||
<li class="user-menu-item"><a href="/users/sign_out" data-method="delete">{{t "header.log_out"}}</a></li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ class UserPresenter
|
|||
{ :notifications_count => notifications_count,
|
||||
:unread_messages_count => unread_messages_count,
|
||||
:admin => admin,
|
||||
:moderator => moderator,
|
||||
:aspects => aspects,
|
||||
:services => services,
|
||||
:following_count => self.user.contacts.receiving.count,
|
||||
|
|
@ -46,4 +47,8 @@ class UserPresenter
|
|||
def admin
|
||||
user.admin?
|
||||
end
|
||||
|
||||
def moderator
|
||||
user.moderator?
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
.container
|
||||
%div
|
||||
= render :partial => 'admins/admin_bar'
|
||||
- if current_user.admin?
|
||||
= render :partial => 'admins/admin_bar'
|
||||
|
||||
%div.row
|
||||
%div.span12
|
||||
|
|
|
|||
Loading…
Reference in a new issue