Chris@1296:
Chris@1296: <% if @block_options.present? %> Chris@1296: <%= form_tag({:action => "add_block"}, :id => "block-form") do %> Chris@1296: <%= label_tag('block-select', l(:label_my_page_block)) %>: Chris@1296: <%= select_tag 'block', Chris@1296: content_tag('option') + options_for_select(@block_options), Chris@1296: :id => "block-select" %> Chris@1296: <%= link_to l(:button_add), '#', :onclick => '$("#block-form").submit()', :class => 'icon icon-add' %> Chris@1296: <% end %> Chris@1296: <% end %> Chris@1296: <%= link_to l(:button_back), {:action => 'page'}, :class => 'icon icon-cancel' %> Chris@1296:
Chris@1296: Chris@1296:

<%=l(:label_my_page)%>

Chris@1296: Chris@1296:
Chris@1296: <% @blocks['top'].each do |b| Chris@1296: next unless MyController::BLOCKS.keys.include? b %> Chris@1296: <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %> Chris@1296: <% end if @blocks['top'] %> Chris@1296:
Chris@1296: Chris@1296:
Chris@1296: <% @blocks['left'].each do |b| Chris@1296: next unless MyController::BLOCKS.keys.include? b %> Chris@1296: <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %> Chris@1296: <% end if @blocks['left'] %> Chris@1296:
Chris@1296: Chris@1296:
Chris@1296: <% @blocks['right'].each do |b| Chris@1296: next unless MyController::BLOCKS.keys.include? b %> Chris@1296: <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %> Chris@1296: <% end if @blocks['right'] %> Chris@1296:
Chris@1296: Chris@1296: <%= javascript_tag "initMyPageSortable('top', '#{ escape_javascript url_for(:action => "order_blocks", :group => "top") }');" %> Chris@1296: <%= javascript_tag "initMyPageSortable('left', '#{ escape_javascript url_for(:action => "order_blocks", :group => "left") }');" %> Chris@1296: <%= javascript_tag "initMyPageSortable('right', '#{ escape_javascript url_for(:action => "order_blocks", :group => "right") }');" %> Chris@1296: Chris@1296: <% html_title(l(:label_my_page)) -%>