diff options
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | Gemfile.lock | 10 | ||||
-rw-r--r-- | app/helpers/application_helper.rb | 6 | ||||
-rw-r--r-- | app/views/layouts/default.rhtml | 4 |
4 files changed, 15 insertions, 7 deletions
@@ -49,5 +49,7 @@ end group :develop do gem 'ruby-debug', :platforms => :ruby_18 gem 'ruby-debug19', :platforms => :ruby_19 + gem 'bootstrap-sass' + gem 'compass' gem 'annotate' end diff --git a/Gemfile.lock b/Gemfile.lock index 0969c5794..1d7ff9a08 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -13,16 +13,23 @@ GEM activesupport (2.3.14) annotate (2.4.0) archive-tar-minitar (0.5.2) + bootstrap-sass (2.1.1.0) capistrano (2.13.4) highline net-scp (>= 1.0.0) net-sftp (>= 2.0.0) net-ssh (>= 2.0.14) net-ssh-gateway (>= 1.1.0) + chunky_png (1.2.6) columnize (0.3.6) + compass (0.12.2) + chunky_png (~> 1.2) + fssm (>= 0.2.7) + sass (~> 3.1) fakeweb (1.3.0) fast_gettext (0.6.8) fastercsv (1.5.5) + fssm (0.2.9) gettext (2.3.3) locale gettext_i18n_rails (0.7.1) @@ -87,6 +94,7 @@ GEM ruby-ole (1.2.11.3) ruby_core_source (0.1.5) archive-tar-minitar (>= 0.5.2) + sass (3.2.1) syslog_protocol (0.9.2) test-unit (1.2.3) hoe (>= 1.5.1) @@ -101,7 +109,9 @@ PLATFORMS DEPENDENCIES annotate + bootstrap-sass capistrano + compass fakeweb fast_gettext (>= 0.6.0) fastercsv (>= 1.5.5) 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 7b4c0f6a1..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 %> @@ -41,7 +41,7 @@ <%= render :partial => 'general/before_head_end' %> </head> - <body class="<%= 'admin' if is_admin? %> <%= 'front' if params[:action] == 'frontpage' %>"> + <body class="<%= 'front' if params[:action] == 'frontpage' %>"> <% if Configuration::force_registration_on_new_request && !@user %> <%= javascript_include_tag 'jquery.fancybox-1.3.4.pack' %> <script type="text/javascript"> |