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

      .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.display
            %span.hidden-phone
              - 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

        - if GuiFunction.display?('search_field_in_top_navigation_bar', current_user)
          = form_tag search_path, :method => :post, :class => 'navbar-search pull-right' do
            %input.text{:placeholder => 'Suchen ...', :name => 'q', :class => 'search-query span2'}