You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

page_layout.html.erb 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <div class="contextual">
  2. <% if @block_options.present? %>
  3. <%= form_tag({:action => "add_block"}, :id => "block-form") do %>
  4. <%= label_tag('block-select', l(:label_my_page_block)) %>:
  5. <%= select_tag 'block',
  6. content_tag('option') + options_for_select(@block_options),
  7. :id => "block-select" %>
  8. <%= link_to l(:button_add), '#', :onclick => '$("#block-form").submit()', :class => 'icon icon-add' %>
  9. <% end %>
  10. <% end %>
  11. <%= link_to l(:button_back), {:action => 'page'}, :class => 'icon icon-cancel' %>
  12. </div>
  13. <h2><%=l(:label_my_page)%></h2>
  14. <div id="list-top" class="block-receiver">
  15. <% @blocks['top'].each do |b|
  16. next unless MyController::BLOCKS.keys.include? b %>
  17. <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
  18. <% end if @blocks['top'] %>
  19. </div>
  20. <div id="list-left" class="splitcontentleft block-receiver">
  21. <% @blocks['left'].each do |b|
  22. next unless MyController::BLOCKS.keys.include? b %>
  23. <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
  24. <% end if @blocks['left'] %>
  25. </div>
  26. <div id="list-right" class="splitcontentright block-receiver">
  27. <% @blocks['right'].each do |b|
  28. next unless MyController::BLOCKS.keys.include? b %>
  29. <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
  30. <% end if @blocks['right'] %>
  31. </div>
  32. <%= javascript_tag "initMyPageSortable('top', '#{ escape_javascript url_for(:action => "order_blocks", :group => "top") }');" %>
  33. <%= javascript_tag "initMyPageSortable('left', '#{ escape_javascript url_for(:action => "order_blocks", :group => "left") }');" %>
  34. <%= javascript_tag "initMyPageSortable('right', '#{ escape_javascript url_for(:action => "order_blocks", :group => "right") }');" %>
  35. <% html_title(l(:label_my_page)) -%>