2012-02-13 05:02:52 +00:00
|
|
|
<header id="orbit-bar" class="navbar">
|
2012-12-27 02:38:27 +00:00
|
|
|
<div class="navbar-inner">
|
|
|
|
<div class="container clear">
|
|
|
|
<div class="dropdown orbit-logo pull-left">
|
|
|
|
<% if !current_user.nil? %>
|
|
|
|
<%= render :partial=>"layouts/member_orbit_menu"%>
|
|
|
|
<% else %>
|
|
|
|
<%= render :partial=>"layouts/guest_orbit_menu"%>
|
|
|
|
<% end -%>
|
|
|
|
</div>
|
|
|
|
<ul class="nav">
|
2013-01-11 10:34:20 +00:00
|
|
|
<li><a href="<%= root_path %>" data-icons=""></a></li>
|
2013-01-22 04:19:32 +00:00
|
|
|
<li><a href="<%= desktop_path %>" data-icons=""></a></li>
|
2012-12-27 02:38:27 +00:00
|
|
|
</ul>
|
|
|
|
<ul class="nav pull-right">
|
2013-01-22 04:19:32 +00:00
|
|
|
<!--
|
2013-01-09 13:16:29 +00:00
|
|
|
<li class="dropdown">
|
2013-01-11 10:34:20 +00:00
|
|
|
<a class="dropdown-toggle" data-icons="" href="#" data-toggle="dropdown"></a>
|
2013-01-09 13:16:29 +00:00
|
|
|
<ul class="dropdown-menu">
|
2013-01-22 04:19:32 +00:00
|
|
|
<% #t('ntu.site_names').each do |site| %>
|
|
|
|
<li><%#= link_to site[1], get_link(site[0]) %></li>
|
|
|
|
<%# end %>
|
2013-01-09 13:16:29 +00:00
|
|
|
</ul>
|
|
|
|
</li>
|
2013-01-22 04:19:32 +00:00
|
|
|
-->
|
2012-12-27 02:38:27 +00:00
|
|
|
<li class="search clear" title="<%= t :search_google %>">
|
2013-01-11 10:34:20 +00:00
|
|
|
<a class="orbit-bar-search" href="#" data-icons=""></a>
|
2012-12-27 02:38:27 +00:00
|
|
|
<form class="navbar-search" method="get" action="http://www.google.com/custom">
|
|
|
|
<input type="hidden" name="client" value="pub-&" />
|
|
|
|
<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>
|
2013-01-22 04:19:32 +00:00
|
|
|
<li class="dropdown language">
|
|
|
|
<a class="dropdown-toggle orbit-bar-language" href="#" data-toggle="dropdown" data-icons=""></a>
|
|
|
|
<ul class="dropdown-menu language-menu">
|
2013-04-23 10:48:18 +00:00
|
|
|
<% @site_in_use_locales.compact.each do |locale| %>
|
2013-01-22 04:19:32 +00:00
|
|
|
<%= 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 %>
|
|
|
|
</ul>
|
|
|
|
</li>
|
2012-12-27 02:38:27 +00:00
|
|
|
<% 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> -->
|
2013-01-09 07:57:31 +00:00
|
|
|
<!-- <li><%= link_to content_tag(:i, nil, :class => 'icons-screen') + ' ' + t(:desktop), desktop_path %></li> -->
|
|
|
|
<li><%= link_to content_tag(:i, nil, :class => 'icons-logout') + ' ' + t(:logout), destroy_user_session_path %></li>
|
2012-12-27 02:38:27 +00:00
|
|
|
<li class="divider"></li>
|
|
|
|
<li>
|
|
|
|
<a href="#">
|
|
|
|
<i class="icons-help"></i>
|
|
|
|
<%= t(:help) %>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
2012-02-28 20:21:56 +00:00
|
|
|
</li>
|
2012-12-27 02:38:27 +00:00
|
|
|
<% else %>
|
|
|
|
<li class="dropdown bar-login">
|
2013-01-11 10:34:20 +00:00
|
|
|
<a class="dropdown-toggle orbit-bar-member" href="#" data-icons=""></a>
|
2012-12-27 02:38:27 +00:00
|
|
|
<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>
|
2013-04-26 02:43:58 +00:00
|
|
|
<%= f.text_field :user_id, :class => 'span2', :placeholder => t("users.user_id"), :size => 16 %>
|
2012-12-27 02:38:27 +00:00
|
|
|
</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' %>
|
2012-07-03 07:59:25 +00:00
|
|
|
|
2012-11-28 15:44:43 +00:00
|
|
|
</li>
|
|
|
|
<li class="divider hide"><span><%= t(:or_lower) %></span></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<%#= link_to t(:register), new_user_registration_path, :class => 'btn btn-danger register' %>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</header>
|