Commit bc63865f82546fd7c1be86dd9574648922a9abb3

Authored by AntonioTerceiro
1 parent 94b55416

ActionItem296: removing sideboxes from header/footer edit

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2358 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/controllers/application.rb
... ... @@ -17,7 +17,7 @@ class ApplicationController < ActionController::Base
17 17 !@no_design_blocks
18 18 end
19 19 def uses_design_blocks?
20   - self.class.uses_design_blocks?
  20 + !@no_design_blocks && self.class.uses_design_blocks?
21 21 end
22 22 module UsesDesignBlocksHelper
23 23 def uses_design_blocks?
... ...
app/controllers/my_profile/profile_editor_controller.rb
... ... @@ -50,6 +50,7 @@ class ProfileEditorController < MyProfileController
50 50 end
51 51  
52 52 def header_footer
  53 + @no_design_blocks = true
53 54 if request.post?
54 55 @profile.update_attributes!(:custom_footer => params[:custom_footer], :custom_header => params[:custom_header])
55 56 redirect_to :action => 'index'
... ...
app/views/profile_editor/header_footer.rhtml
... ... @@ -4,8 +4,10 @@
4 4  
5 5 <% form_tag do %>
6 6 <div style='width: 90%; margin: auto;'>
7   - <%= labelled_form_field(_('Content for header '), text_area_tag(:custom_header, @header, :style => 'width: 100%; height: 150px;')) %>
8   - <%= labelled_form_field(_('Content for footer'), text_area_tag(:custom_footer, @footer, :style => 'width: 100%; height: 150px;')) %>
  7 + <h2><%= _('Content for header ') %></h2>
  8 + <%= text_area_tag(:custom_header, @header, :style => 'width: 100%; height: 150px;') %>
  9 + <h2><%= _('Content for footer') %></h2>
  10 + <%= text_area_tag(:custom_footer, @footer, :style => 'width: 100%; height: 150px;') %>
9 11 <% button_bar do %>
10 12 <%= submit_button(:save, _('Save')) %>
11 13 <%= button(:cancel, _('Cancel'), :action => 'index') %>
... ...