Commit c8c723cd8372307ff056013b4de78fb5fd75f747

Authored by AntonioTerceiro
1 parent 2ad2ff83

ActionItem672: not allowing users to move blocks to the center

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/branches/0.11.x@2495 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/helpers/boxes_helper.rb
... ... @@ -114,6 +114,9 @@ module BoxesHelper
114 114 #
115 115 # +box+ is always needed
116 116 def block_target(box, block = nil)
  117 + # FIXME hardcoded
  118 + return '' if box.position == 1
  119 +
117 120 id =
118 121 if block.nil?
119 122 "end-of-box-#{box.id}"
... ...
app/views/box_organizer/add_block.rhtml
1 1 <% form_tag do %>
2 2  
3 3 <p><%= _('In what area do you want to put your new block?') %></p>
4   -
5   - <%= select_tag('box_id', options_for_select(@boxes.map {|item| [ _("Area %d") % item.position, item.id]})) %>
  4 +
  5 + <%# FIXME hardcoded stuff %>
  6 + <%= select_tag('box_id', options_for_select(@boxes.select { |item| item.position != 1 }.map {|item| [ _("Area %d") % item.position, item.id]})) %>
6 7  
7 8 <p><%= _('Select the type of block you want to add to your page.') %></p>
8 9  
... ...