diff --git a/app/controllers/box_organizer_controller.rb b/app/controllers/box_organizer_controller.rb index c563801..254582f 100644 --- a/app/controllers/box_organizer_controller.rb +++ b/app/controllers/box_organizer_controller.rb @@ -68,7 +68,8 @@ class BoxOrganizerController < ApplicationController raise ArgumentError.new("Type %s is not allowed. Go away." % type) end else - @block_types = available_blocks + @center_block_types = Box.acceptable_center_blocks & available_blocks + @side_block_types = Box.acceptable_side_blocks & available_blocks @boxes = boxes_holder.boxes render :action => 'add_block', :layout => false end diff --git a/app/views/box_organizer/_block_types.rhtml b/app/views/box_organizer/_block_types.rhtml new file mode 100644 index 0000000..b8f9b83 --- /dev/null +++ b/app/views/box_organizer/_block_types.rhtml @@ -0,0 +1,12 @@ +<% block_types.in_groups_of(2) do |block1, block2| %> +
<%= _('In what area do you want to put your new block?') %>
- <%# FIXME hardcoded stuff %> - <%= select_tag('box_id', options_for_select(@boxes.select { |item| item.position != 1 }.map {|item| [ _("Area %d") % item.position, item.id]})) %> - -<%= _('Select the type of block you want to add to your page.') %>
- - <% @block_types.in_groups_of(2) do |block1, block2| %> -<%= _('Select the type of block you want to add to your page.') %>
+ +