diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index fdcec12..04dda8d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -163,7 +163,7 @@ module ApplicationHelper # should be a current profile (i.e. while viewing some profile's pages, or the # profile info, etc), because if there is no profile an exception is thrown. def profile - @controller.send(:profile) + controller.send(:profile) end def category_color @@ -290,7 +290,7 @@ module ApplicationHelper def partial_for_class(klass, suffix=nil) raise ArgumentError, 'No partial for object. Is there a partial for any class in the inheritance hierarchy?' if klass.nil? name = klass.name.underscore - @controller.view_paths.each do |view_path| + controller.view_paths.each do |view_path| partial = partial_for_class_in_view_path(klass, view_path, suffix) return partial if partial end @@ -310,7 +310,7 @@ module ApplicationHelper end def user - @controller.send(:user) + controller.send(:user) end # DEPRECATED. Do not use this. @@ -433,7 +433,7 @@ module ApplicationHelper end def is_testing_theme - !@controller.session[:theme].nil? + !controller.session[:theme].nil? end def theme_owner @@ -939,7 +939,7 @@ module ApplicationHelper (@topic ? @topic.title + ' - ' : '') + (@section ? @section.title + ' - ' : '') + (@toc ? _('Online Manual') + ' - ' : '') + - (@controller.controller_name == 'chat' ? _('Chat') + ' - ' : '') + + (controller.controller_name == 'chat' ? _('Chat') + ' - ' : '') + environment.name + (@category ? " - #{@category.full_name}" : '') end @@ -963,7 +963,7 @@ module ApplicationHelper # DEPRECATED. Do not use thisĀ· def import_controller_stylesheets(options = {}) - stylesheet_import( "controller_"+ @controller.controller_name(), options ) + stylesheet_import( "controller_"+ controller.controller_name(), options ) end def pngfix_stylesheet_path @@ -1125,7 +1125,7 @@ module ApplicationHelper def render_environment_features(folder) result = '' environment.enabled_features.keys.each do |feature| - file = File.join(@controller.view_paths.last, 'shared', folder.to_s, "#{feature}.rhtml") + file = File.join(controller.view_paths.last, 'shared', folder.to_s, "#{feature}.rhtml") if File.exists?(file) result << render(:file => file, :use_full_path => false) end diff --git a/app/helpers/boxes_helper.rb b/app/helpers/boxes_helper.rb index db9dee7..b4cb507 100644 --- a/app/helpers/boxes_helper.rb +++ b/app/helpers/boxes_helper.rb @@ -1,12 +1,12 @@ module BoxesHelper def insert_boxes(content) - if @controller.send(:boxes_editor?) && @controller.send(:uses_design_blocks?) - content + display_boxes_editor(@controller.boxes_holder) + if controller.send(:boxes_editor?) && @controller.send(:uses_design_blocks?) + content + display_boxes_editor(controller.boxes_holder) else - maybe_display_custom_element(@controller.boxes_holder, :custom_header_expanded, :id => 'profile-header') + - if @controller.send(:uses_design_blocks?) - display_boxes(@controller.boxes_holder, content) + maybe_display_custom_element(controller.boxes_holder, :custom_header_expanded, :id => 'profile-header') + + if controller.send(:uses_design_blocks?) + display_boxes(controller.boxes_holder, content) else content_tag('div', content_tag('div', @@ -16,7 +16,7 @@ module BoxesHelper :class => 'no-boxes' ) end + - maybe_display_custom_element(@controller.boxes_holder, :custom_footer_expanded, :id => 'profile-footer') + maybe_display_custom_element(controller.boxes_holder, :custom_footer_expanded, :id => 'profile-footer') end end @@ -99,7 +99,7 @@ module BoxesHelper unless block.visible? options[:title] = _("This block is invisible. Your visitors will not see it.") end - @controller.send(:content_editor?) || @plugins.each do |plugin| + controller.send(:content_editor?) || @plugins.each do |plugin| result = plugin.parse_content(result) end box_decorator.block_target(block.box, block) + @@ -220,7 +220,7 @@ module BoxesHelper end def current_blocks - @controller.boxes_holder.boxes.map(&:blocks).inject([]){|ac, a| ac + a} + controller.boxes_holder.boxes.map(&:blocks).inject([]){|ac, a| ac + a} end # DEPRECATED. Do not use this. diff --git a/app/views/layouts/application-ng.html.erb b/app/views/layouts/application-ng.html.erb index 480e3f9..e785ce3 100644 --- a/app/views/layouts/application-ng.html.erb +++ b/app/views/layouts/application-ng.html.erb @@ -33,8 +33,8 @@ " > diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 29f69d6..6f34e78 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -33,8 +33,8 @@