Don't show the search field when it's not needed #979

Contributed by Harald Klimach
This commit is contained in:
Felix Schäfer 2012-07-09 18:11:04 +02:00 committed by Kolan Sh
parent f0f0171a59
commit 037bb192ac
1 changed files with 2 additions and 0 deletions

View File

@ -35,9 +35,11 @@
<div id="header"> <div id="header">
<div id="logo"><%= link_to(h(Setting.app_title), home_path) %></div> <div id="logo"><%= link_to(h(Setting.app_title), home_path) %></div>
<div id="top-menu-items"> <div id="top-menu-items">
<% if User.current.logged? || !Setting.login_required? %>
<div id="search"> <div id="search">
<%= render :partial => 'search/quick_search', :locals => {:search_term => @question} %> <%= render :partial => 'search/quick_search', :locals => {:search_term => @question} %>
</div> </div>
<% end %>
<ul id="account-nav"> <ul id="account-nav">
<% if User.current.logged? || !Setting.login_required? %> <% if User.current.logged? || !Setting.login_required? %>