page_layout.html.erb
41 lines
| 1.8 KiB
| text/plain
|
TextLexer
|
r330 | <div class="contextual"> | ||
|
r9850 | <% 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" %> | ||||
|
r9885 | <%= link_to l(:button_add), '#', :onclick => '$("#block-form").submit()', :class => 'icon icon-add' %> | ||
|
r9850 | <% end %> | ||
|
r330 | <% end %> | ||
|
r3080 | <%= link_to l(:button_back), {:action => 'page'}, :class => 'icon icon-cancel' %> | ||
|
r330 | </div> | ||
<h2><%=l(:label_my_page)%></h2> | ||||
<div id="list-top" class="block-receiver"> | ||||
|
r7206 | <% @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'] %> | ||||
|
r330 | </div> | ||
<div id="list-left" class="splitcontentleft block-receiver"> | ||||
|
r7206 | <% @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'] %> | ||||
|
r330 | </div> | ||
<div id="list-right" class="splitcontentright block-receiver"> | ||||
|
r7206 | <% @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'] %> | ||||
|
r330 | </div> | ||
|
r9885 | <%= 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") }');" %> | ||||
|
r7161 | |||
|
r3641 | <% html_title(l(:label_my_page)) -%> | ||