This repository has been archived by the owner on Apr 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
_header.html.haml
67 lines (66 loc) · 3.74 KB
/
_header.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.navbar.navbar-fixed-top.navbar-inverse#main-navbar
.navbar-inner
%div{ data: { barberpole: true } }
.container
%a.brand{href: root_path}<
%span= configatron.app_name
%ul.nav
= content_tag_with_path_checking(:li, controller: 'dashboards', action: 'show') do |path|
%a{href: path, title: s_('Tooltip|Your dashboard'), :'data-placement' => 'bottom'}
%i.fa.fa-dashboard
%span= _('Dashboard')
- if can?(:create, Idea)
= content_tag_with_path_checking(:li, action: 'new') do |path|
%a{href: path, title: s_('Tooltip|Follow this link to submit a new idea'), :'data-placement' => 'bottom'}
%i.fa.fa-edit
%span= _('Submit')
= content_tag_with_path_checking(:li, angle: 'discussable') do |path|
%a{href: path, title: s_('Tooltip|Show stories currently being discussed'), :'data-placement' => 'bottom'}
%i.fa.fa-comments-o
%span= _('All ideas')
= content_tag_with_path_checking(:li, angle: 'followed') do |path|
%a{href: path, title: s_('Tooltip|Show stories you are following'), :'data-placement' => 'bottom'}
%i.fa.fa-bookmark-o
%span= _('Bookmarks')
%li= render 'search'
%ul.nav.pull-right#current_user
- if current_account
= content_tag_with_path_checking(:li, controller: 'accounts', html: { class:'dropdown' }) do
%a.dropdown-toggle#account-dropdown{ role:'button', :'data-toggle' => 'dropdown', :'data-target' =>'#', href:'#' }
%span.team-name= current_account.name
%i.fa.fa-group
%ul.dropdown-menu#account-menu
%li
= link_to current_account do
%i.fa.fa-user
= _('View team details')
- if login_other_accounts.any?
%li.divider
%li
%a.disabled= _('Switch to another team:')
- login_other_accounts.each do |account|
%li
= link_to session_path(account_id:account), method:'put' do
%i.fa.fa-group
= account.name
%li.divider
%li
= link_to new_account_path do
= _('Create new team')
- if current_user
= content_tag_with_path_checking(:li, controller: 'users', action: 'show', id:current_user.to_param, html: { class:'name' }) do |path|
= link_to path, title: s_('Tooltip|This is you!<br/>Click here to see or edit your profile.<br/>The number next to your name shows the "karma" points you can spend to vote on ideas. Gain more points as you participate!'), :'data-placement' => 'bottom' do
%span.first-name= current_login.first_name
%span.karma
= surround '(', ')' do
%span.figure= number_with_delimiter current_user.karma
= user_karma_symbol
= content_tag_with_path_checking(:li, controller: 'notifications', action: 'index', html: { class:'inbox', title: s_('Tooltip|Your number of unread notifications. Click to view them'), :'data-placement' => 'left' }) do |path|
= link_to path, class: 'notifications' do
- count = current_user.notifications.unread.count
%span.figure= number_with_delimiter(count) if count > 0
%i.fa.fa-inbox
- if current_login
%li.sign-out
= link_to destroy_login_session_path, method: :delete, title: s_('Tooltip|Sign out'), :'data-placement' => 'left' do
%i.fa.fa-eject<>