summaryrefslogtreecommitdiff
path: root/app/views/layouts/_navbar.html.haml
blob: d9dd99074461747bcbbe5ad665458c5859dfffa0 (plain)
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
.navbar.navbar-inverse.navbar-fixed-top
  .navbar-inner
    .container
      %a.brand{:href => (current_user.nil? ? '/' : tenant_path(current_user.current_tenant))}
        Gemeinschaft 5

      %a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"}
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar   

      - if current_user && current_user.sip_accounts.any?
        .nav-collapse.collapse
          %ul.nav
            %li
              %a{:href => sip_account_call_histories_path(current_user.sip_accounts.first)}
                %i.icon-list-alt.icon-white
                =t("call_histories.index.page_title")
            %li
              %a{:href => sip_account_voicemail_messages_path(current_user.sip_accounts.first)}
                %i.icon-volume-up.icon-white
                =t("voicemail_messages.index.page_title")

      - if current_user
        %ul.nav.pull-right
          %li
            - if current_user.image?
              =image_tag(current_user.image_url(:mini).to_s, :class => 'img-rounded')
            - else
              - if current_user.male?
                = image_tag 'icons/user-male-16x.png', :class => 'img-rounded'
              - else
                = image_tag 'icons/user-female-16x.png', :class => 'img-rounded'

          - if current_page?(tenant_user_path(current_user.current_tenant, current_user))
            %li.active
              %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} 
                = current_user
          - else
            %li
              %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} 
                = current_user

          %li
            %a.navbar-link{:href => log_out_path} 
              %i.icon-off.icon-white