Chris@909: Chris@909: Chris@909:
Chris@909: <% form_tag({:action => "add_block"}, :id => "block-form") do %> Chris@909: <%= label_tag('block-select', l(:label_my_page_block)) %>: Chris@909: <%= select_tag 'block', "" + options_for_select(@block_options), :id => "block-select" %> Chris@909: <%= link_to_remote l(:button_add), Chris@909: {:url => { :action => "add_block" }, Chris@909: :with => "Form.serialize('block-form')", Chris@909: :update => "list-top", Chris@909: :position => :top, Chris@909: :complete => "afterAddBlock();" Chris@909: }, :class => 'icon icon-add' Chris@909: %> Chris@909: <% end %> Chris@909: <%= link_to l(:button_back), {:action => 'page'}, :class => 'icon icon-cancel' %> Chris@909:
Chris@909: Chris@909:

<%=l(:label_my_page)%>

Chris@909: Chris@909:
Chris@909: <% @blocks['top'].each do |b| Chris@909: next unless MyController::BLOCKS.keys.include? b %> Chris@909: <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %> Chris@909: <% end if @blocks['top'] %> Chris@909:
Chris@909: Chris@909:
Chris@909: <% @blocks['left'].each do |b| Chris@909: next unless MyController::BLOCKS.keys.include? b %> Chris@909: <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %> Chris@909: <% end if @blocks['left'] %> Chris@909:
Chris@909: Chris@909:
Chris@909: <% @blocks['right'].each do |b| Chris@909: next unless MyController::BLOCKS.keys.include? b %> Chris@909: <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %> Chris@909: <% end if @blocks['right'] %> Chris@909:
Chris@909: Chris@909: <%= sortable_element 'list-top', Chris@909: :tag => 'div', Chris@909: :only => 'mypage-box', Chris@909: :handle => "handle", Chris@909: :dropOnEmpty => true, Chris@909: :containment => ['list-top', 'list-left', 'list-right'], Chris@909: :constraint => false, Chris@909: :url => { :action => "order_blocks", :group => "top" } Chris@909: %> Chris@909: Chris@909: <%= sortable_element 'list-left', Chris@909: :tag => 'div', Chris@909: :only => 'mypage-box', Chris@909: :handle => "handle", Chris@909: :dropOnEmpty => true, Chris@909: :containment => ['list-top', 'list-left', 'list-right'], Chris@909: :constraint => false, Chris@909: :url => { :action => "order_blocks", :group => "left" } Chris@909: %> Chris@909: Chris@909: <%= sortable_element 'list-right', Chris@909: :tag => 'div', Chris@909: :only => 'mypage-box', Chris@909: :handle => "handle", Chris@909: :dropOnEmpty => true, Chris@909: :containment => ['list-top', 'list-left', 'list-right'], Chris@909: :constraint => false, Chris@909: :url => { :action => "order_blocks", :group => "right" } Chris@909: %> Chris@909: Chris@909: <%= javascript_tag "updateSelect()" %> Chris@909: <% html_title(l(:label_my_page)) -%>