diff options
-rw-r--r-- | app/helpers/application_helper.rb | 6 | ||||
-rw-r--r-- | app/views/layouts/default.rhtml | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 090359f1f..b58297094 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -108,7 +108,7 @@ module ApplicationHelper end def form_tag_id(object_name, method_name, locale=nil) - if locale.nil? + if locale.nil? return "#{sanitized_object_name(object_name.to_s)}_#{sanitized_method_name(method_name.to_s)}" else return "#{sanitized_object_name(object_name.to_s)}_#{sanitized_method_name(method_name.to_s)}__#{locale.to_s}" @@ -131,9 +131,5 @@ module ApplicationHelper return "#{exact_date} (#{ago_text})" end - def is_admin? - return !session[:using_admin].nil? || (!@user.nil? && @user.admin_level == "super") - end - end diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml index 94ca2f8a5..3dd5a2749 100644 --- a/app/views/layouts/default.rhtml +++ b/app/views/layouts/default.rhtml @@ -12,7 +12,7 @@ <link rel="shortcut icon" href="/favicon.ico"> <%= render :partial => 'general/stylesheet_includes' %> - <% if is_admin? %> + <% if session[:using_admin] %> <%= stylesheet_link_tag "/adminbootstraptheme/stylesheets/admin", :title => "Main", :rel => "stylesheet" %> <% end %> |