fixed search_bar placeholder

This commit is contained in:
Rueshyna 2012-12-27 10:38:27 +08:00
parent 81b0e3c38f
commit 177a409508
1 changed files with 78 additions and 78 deletions

View File

@ -1,83 +1,83 @@
<header id="orbit-bar" class="navbar"> <header id="orbit-bar" class="navbar">
<div class="navbar-inner"> <div class="navbar-inner">
<div class="container clear"> <div class="container clear">
<div class="dropdown orbit-logo pull-left"> <div class="dropdown orbit-logo pull-left">
<% if !current_user.nil? %> <% if !current_user.nil? %>
<%= render :partial=>"layouts/member_orbit_menu"%> <%= render :partial=>"layouts/member_orbit_menu"%>
<% else %> <% else %>
<%= render :partial=>"layouts/guest_orbit_menu"%> <%= render :partial=>"layouts/guest_orbit_menu"%>
<% end -%> <% end -%>
</div> </div>
<ul class="nav"> <ul class="nav">
<li><%= link_to '', root_path, {'data-icon' => 'house'} %></li> <li><%= link_to '', root_path, {'data-icon' => 'house'} %></li>
<!-- <li><%= link_to '', desktop_path, {'data-icon' => 'desktop'} %></li> --> <!-- <li><%= link_to '', desktop_path, {'data-icon' => 'desktop'} %></li> -->
</ul> </ul>
<ul class="nav pull-right"> <ul class="nav pull-right">
<li class="dropdown language"> <li class="dropdown language">
<a class="dropdown-toggle" href="#" data-toggle="dropdown" data-icon="earth"></a> <a class="dropdown-toggle" href="#" data-toggle="dropdown" data-icon="earth"></a>
<ul class="dropdown-menu language-menu"> <ul class="dropdown-menu language-menu">
<% @site_in_use_locales.each do |locale| %> <% @site_in_use_locales.each do |locale| %>
<%= content_tag :li, (link_to t(:_locale, :locale => locale), add_locale(remove_locale((referer rescue request.fullpath)), locale)), :class => (I18n.locale.eql?(locale.to_sym) ? 'active' : nil) %> <%= content_tag :li, (link_to t(:_locale, :locale => locale), add_locale(remove_locale((referer rescue request.fullpath)), locale)), :class => (I18n.locale.eql?(locale.to_sym) ? 'active' : nil) %>
<% end %> <% end %>
</ul> </ul>
</li>
<li class="search clear" title="<%= t :search_google %>">
<a class="orbit-bar-search" href="#" data-icon="search"></a>
<form class="navbar-search" method="get" action="http://www.google.com/custom">
<input type="hidden" name="client" value="pub-&amp" />
<input type="hidden" name="ie" id="ie" value="utf-8" />
<input type="hidden" name="oe" id="oe" value="utf-8" />
<input type="hidden" name="cof" id="cof" value="AH:center;AWFID:03de271f1940eea3;" />
<input type='hidden' name='domains' value='<%= @site.search["domains"] rescue ''%>'>
<input type='hidden' name='sitesearch' value='<%= @site.search["sitesearch"] rescue '' %>'>
<%= text_field_tag 'q','',{:class => "search-query span3",:placeholder=> t(:search_google) ,:disabled=> ((@site.search["sitesearch"] || @site.search["domains"] ).blank? rescue true)}%>
</form>
</li>
<% if user_signed_in? %>
<li class="dropdown active">
<a class="orbit-bar-account" href="#" data-toggle="dropdown">
<img class="member-img" src="/assets/person.png" />
<%#= image_tag current_user.avatar.thumb.url, :class => 'member-img' %>
<span class="member-name"><%= current_user.name %></span>
</a>
<ul class="dropdown-menu account-menu">
<!-- <li><%= link_to content_tag(:i, nil, :class => 'icons-tools') + ' ' + t(:account_setting), desktop_path+"#settings-account" %></li> -->
<!-- <li><%= link_to content_tag(:i, nil, :class => 'icons-desktop') + ' ' + t(:desktop), desktop_path %></li> -->
<li><%= link_to content_tag(:i, nil, :class => 'icons-outlog') + ' ' + t(:logout), destroy_user_session_path %></li>
<li class="divider"></li>
<li>
<a href="#">
<i class="icons-help"></i>
<%= t(:help) %>
</a>
</li>
</ul>
</li> </li>
<li class="search clear" title="<%= t :search_google %>"> <% else %>
<a class="orbit-bar-search" href="#" data-icon="search"></a> <li class="dropdown bar-login">
<form class="navbar-search" method="get" action="http://www.google.com/custom"> <a class="dropdown-toggle orbit-bar-member" href="#" data-icon="inlog"></a>
<input type="hidden" name="client" value="pub-&amp" /> <div class="dropdown-menu">
<input type="hidden" name="ie" id="ie" value="utf-8" /> <ul class="log">
<input type="hidden" name="oe" id="oe" value="utf-8" /> <li class="title hide"></li>
<input type="hidden" name="cof" id="cof" value="AH:center;AWFID:03de271f1940eea3;" />
<input type='hidden' name='domains' value='<%= @site.search["domains"] rescue ''%>'> <%= form_for :user, :url => user_session_path do |f| %>
<input type='hidden' name='sitesearch' value='<%= @site.search["sitesearch"] rescue '' %>'> <li>
<%= text_field_tag 'q','',{:class => "search-query span3",:placeholder=> t(:search_nccu) ,:disabled=> ((@site.search["sitesearch"] || @site.search["domains"] ).blank? rescue true)}%> <div class="input-prepend">
</form> <span class="add-on"><i class="icon-user"></i></span>
</li> <%= f.text_field :email, :class => 'span2', :placeholder => t(:email), :size => 16 %>
<% if user_signed_in? %> </div>
<li class="dropdown active"> </li>
<a class="orbit-bar-account" href="#" data-toggle="dropdown"> <li>
<img class="member-img" src="/assets/person.png" /> <div class="input-prepend">
<%#= image_tag current_user.avatar.thumb.url, :class => 'member-img' %> <span class="add-on"><i class="icon-lock"></i></span>
<span class="member-name"><%= current_user.name %></span> <%= f.password_field :password, :class => 'span2', :placeholder => t(:password), :size => 16 %>
</a> </div>
<ul class="dropdown-menu account-menu"> </li>
<!-- <li><%= link_to content_tag(:i, nil, :class => 'icons-tools') + ' ' + t(:account_setting), desktop_path+"#settings-account" %></li> --> <li class="clear hide">
<!-- <li><%= link_to content_tag(:i, nil, :class => 'icons-desktop') + ' ' + t(:desktop), desktop_path %></li> --> <%= link_to t(:forgot_password), new_user_password_path, :class => 'forgot' %>
<li><%= link_to content_tag(:i, nil, :class => 'icons-outlog') + ' ' + t(:logout), destroy_user_session_path %></li> </li>
<li class="divider"></li> <li>
<li> <%= content_tag :button, t(:login), :type => :submit, :class => 'btn btn-primary' %>
<a href="#">
<i class="icons-help"></i>
<%= t(:help) %>
</a>
</li>
</ul>
</li>
<% else %>
<li class="dropdown bar-login">
<a class="dropdown-toggle orbit-bar-member" href="#" data-icon="inlog"></a>
<div class="dropdown-menu">
<ul class="log">
<li class="title hide"></li>
<%= form_for :user, :url => user_session_path do |f| %>
<li>
<div class="input-prepend">
<span class="add-on"><i class="icon-user"></i></span>
<%= f.text_field :email, :class => 'span2', :placeholder => t(:email), :size => 16 %>
</div>
</li>
<li>
<div class="input-prepend">
<span class="add-on"><i class="icon-lock"></i></span>
<%= f.password_field :password, :class => 'span2', :placeholder => t(:password), :size => 16 %>
</div>
</li>
<li class="clear hide">
<%= link_to t(:forgot_password), new_user_password_path, :class => 'forgot' %>
</li>
<li>
<%= content_tag :button, t(:login), :type => :submit, :class => 'btn btn-primary' %>
</li> </li>
<li class="divider hide"><span><%= t(:or_lower) %></span></li> <li class="divider hide"><span><%= t(:or_lower) %></span></li>