summaryrefslogtreecommitdiff
path: root/app/views/layouts/_navbar.html.haml
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-26 16:17:06 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-26 16:17:06 +0100
commitdf0bc9db9cdbf9bfbc92a5f1f00e57fc0e7d7792 (patch)
tree564867b6d12e5cc4ca03d37cf64ea381d3eba967 /app/views/layouts/_navbar.html.haml
parent36919fb419a40688daa97e36734f579488cb56e2 (diff)
Search box in the top navigation bar.
Diffstat (limited to 'app/views/layouts/_navbar.html.haml')
-rw-r--r--app/views/layouts/_navbar.html.haml27
1 files changed, 14 insertions, 13 deletions
diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml
index 8e09859..a7f47cf 100644
--- a/app/views/layouts/_navbar.html.haml
+++ b/app/views/layouts/_navbar.html.haml
@@ -1,13 +1,9 @@
.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
+ %span.hidden-phone
+ %a.brand{:href => (current_user.nil? ? '/' : tenant_path(current_user.current_tenant))}
+ Gemeinschaft 5
.nav-collapse.collapse
%ul.nav
@@ -29,13 +25,14 @@
- if current_user
%ul.nav.pull-right
%li.display
- - 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'
+ %span.hidden-phone
+ - if current_user.image?
+ = image_tag(current_user.image_url(:mini).to_s, :class => 'img-rounded')
- else
- = image_tag 'icons/user-female-16x.png', :class => 'img-rounded'
+ - 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
@@ -51,3 +48,7 @@
%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'}
+