diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-11-01 12:37:26 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-11-01 12:37:26 +0000 |
commit | 3093f5d97d89dfa3518babe00d3aefea9cde15ad (patch) | |
tree | 23b67876b678c4e9810e0704f63b1203e59b5b4f | |
parent | 856b6aada749426a15b378ffe09e2a378a7b0b6b (diff) |
Only reference the admin stylesheet if we're actually going to show the admin navbar.
-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 %> |