summaryrefslogtreecommitdiff
path: root/app/views/layouts/_navbar.html.haml
blob: 70840901532d28342e1b7aac7acad1f6accd3472 (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
48
49
50
51
52
53
.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

      .nav-collapse.collapse
        %ul.nav
          - if current_user && GemeinschaftSetup.any? && current_user.admin?
            - if current_page?(page_help_path)
              %li.active
                =link_to t('navigation.admin_docu'), page_help_path
            - else
              %li
                =link_to t('navigation.admin_docu'), page_help_path
          - if current_user && current_user.sip_accounts.any?
            %li
              %a{:href => sip_account_call_histories_path(current_user.sip_accounts.first)}
                =t("call_histories.index.page_title")
            %li
              %a{:href => sip_account_voicemail_messages_path(current_user.sip_accounts.first)}
                =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

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