Fix orbit bar language change
This commit is contained in:
parent
ff59feb2e7
commit
af98f8efce
|
@ -87,7 +87,8 @@ class PagesController < ApplicationController
|
|||
end
|
||||
|
||||
def load_orbit_bar
|
||||
render :partial => 'layouts/orbit_bar', :locals => {:referer => request.referer}
|
||||
@referer = request.referer
|
||||
render partial: 'layouts/orbit_bar'
|
||||
end
|
||||
|
||||
protected
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<header id="orbit-bar" class="orbit-bar navbar">
|
||||
<div class="navbar-inner">
|
||||
<%= render :partial => "layouts/left_menu" %>
|
||||
<%= render :partial => "layouts/right_menu" %>
|
||||
<%= render "layouts/left_menu" %>
|
||||
<%= render "layouts/right_menu" %>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown"><%= t(:_locale, :locale => I18n.locale) %></a>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="orbit-language">
|
||||
<% @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), tabindex: "-1" %>
|
||||
<%= content_tag :li, (link_to t(:_locale, :locale => locale), add_locale(remove_locale((@referer || request.fullpath)), locale)), :class => (I18n.locale.eql?(locale.to_sym) ? 'active' : nil), tabindex: "-1" %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
Reference in New Issue