2007-03-12 20:59:02 +03:00
|
|
|
<div class="contextual">
|
2012-07-18 22:26:10 +04:00
|
|
|
<% if @block_options.present? %>
|
|
|
|
<%= form_tag({:action => "add_block"}, :id => "block-form") do %>
|
|
|
|
<%= label_tag('block-select', l(:label_my_page_block)) %>:
|
|
|
|
<%= select_tag 'block',
|
|
|
|
content_tag('option') + options_for_select(@block_options),
|
|
|
|
:id => "block-select" %>
|
2012-07-22 17:29:26 +04:00
|
|
|
<%= link_to l(:button_add), '#', :onclick => '$("#block-form").submit()', :class => 'icon icon-add' %>
|
2012-07-18 22:26:10 +04:00
|
|
|
<% end %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<% end %>
|
2009-12-19 16:32:21 +03:00
|
|
|
<%= link_to l(:button_back), {:action => 'page'}, :class => 'icon icon-cancel' %>
|
2007-03-12 20:59:02 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<h2><%=l(:label_my_page)%></h2>
|
|
|
|
|
|
|
|
<div id="list-top" class="block-receiver">
|
2011-09-17 14:01:14 +04:00
|
|
|
<% @blocks['top'].each do |b|
|
|
|
|
next unless MyController::BLOCKS.keys.include? b %>
|
|
|
|
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
|
|
|
|
<% end if @blocks['top'] %>
|
2007-03-12 20:59:02 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="list-left" class="splitcontentleft block-receiver">
|
2011-09-17 14:01:14 +04:00
|
|
|
<% @blocks['left'].each do |b|
|
|
|
|
next unless MyController::BLOCKS.keys.include? b %>
|
|
|
|
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
|
|
|
|
<% end if @blocks['left'] %>
|
2007-03-12 20:59:02 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="list-right" class="splitcontentright block-receiver">
|
2011-09-17 14:01:14 +04:00
|
|
|
<% @blocks['right'].each do |b|
|
|
|
|
next unless MyController::BLOCKS.keys.include? b %>
|
|
|
|
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
|
|
|
|
<% end if @blocks['right'] %>
|
2007-03-12 20:59:02 +03:00
|
|
|
</div>
|
|
|
|
|
2012-07-22 17:29:26 +04:00
|
|
|
<%= javascript_tag "initMyPageSortable('top', '#{ escape_javascript url_for(:action => "order_blocks", :group => "top") }');" %>
|
|
|
|
<%= javascript_tag "initMyPageSortable('left', '#{ escape_javascript url_for(:action => "order_blocks", :group => "left") }');" %>
|
|
|
|
<%= javascript_tag "initMyPageSortable('right', '#{ escape_javascript url_for(:action => "order_blocks", :group => "right") }');" %>
|
2011-09-17 08:02:49 +04:00
|
|
|
|
2010-05-27 01:52:03 +04:00
|
|
|
<% html_title(l(:label_my_page)) -%>
|