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