From 051b16529863dffe6ab9ba01ac0ee20217e33e9b Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 20 Oct 2014 19:50:16 +0800 Subject: [PATCH] fixed orbit bar lanugage and menu --- app/helpers/orbit_helper.rb | 4 ++++ app/views/orbit_bar/index.html.erb | 16 ++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/helpers/orbit_helper.rb b/app/helpers/orbit_helper.rb index c11e63c..e87e788 100644 --- a/app/helpers/orbit_helper.rb +++ b/app/helpers/orbit_helper.rb @@ -300,6 +300,10 @@ module OrbitHelper else res << "
  • #{params[:type].underscore.humanize.capitalize} #{t(:authorization_)}
  • " end + when 'images' + id = AlbumImage.find(params[:id]).album.id.to_s rescue "" + res << "
  • #{t('module_name.'+@module_app.key)}#{divider}
  • " + res << "
  • #{t(:theater)}
  • " when 'categories' if @module_app.key!='category' res << "
  • #{t('module_name.'+@module_app.key)}#{divider}
  • " diff --git a/app/views/orbit_bar/index.html.erb b/app/views/orbit_bar/index.html.erb index 9c5ff83..dbefefb 100644 --- a/app/views/orbit_bar/index.html.erb +++ b/app/views/orbit_bar/index.html.erb @@ -56,12 +56,14 @@ <%= t(:member_) %> -
  • -
  • - - <%= t(:settings) %> - -
  • + <% if current_user.is_admin? %> +
  • +
  • + + <%= t(:settings) %> + +
  • + <% end %> <% end %> @@ -104,6 +106,7 @@ <% end %>
  • + <% if @site_in_use_locales.count > 1 %> <% locale = session[:zh_cn] ? :zh_cn : I18n.locale %> <%= t((locale==:zh_tw ? :zh_tw_ : locale.to_s)) %> + <% end %>
  • <% if !current_user.nil? %>