app/views/my/page_layout.html.erb
<%= stylesheet_link_tag 'my_page_queries', plugin: 'redmine_my_page_queries' %>
<%= javascript_include_tag 'my_page_queries', plugin: 'redmine_my_page_queries' %>
<div class="contextual">
<% 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', block_options_for_select, id: 'block-select' %>
<%= link_to l(:button_add), '#', onclick: '$("#block-form").submit()', class: 'icon icon-add' %>
<% end %>
<% end %>
<%= link_to l(:button_save), { action: 'page' }, class: 'icon icon-save' %>
<%= form_tag({ action: 'default_layout' }, id: 'default-layout-form') do %>
<%= link_to l(:button_default_layout), '#', onclick: '$("#default-layout-form").submit()', class: 'icon icon-reload' %>
<% end %>
</div>
<h2><%= l(:label_my_page) %></h2>
<div id="list-top" class="block-receiver">
<% @blocks['top'].each do |b|
next unless block_exists?(@user, b) %>
<%= render 'block', user: @user, block_name: b %>
<% end if @blocks['top'] %>
</div>
<div id="list-left" class="splitcontentleft block-receiver">
<% @blocks['left'].each do |b|
next unless block_exists?(@user, b) %>
<%= render 'block', user: @user, block_name: b %>
<% end if @blocks['left'] %>
</div>
<div id="list-right" class="splitcontentright block-receiver">
<% @blocks['right'].each do |b|
next unless block_exists?(@user, b) %>
<%= render 'block', user: @user, block_name: b %>
<% end if @blocks['right'] %>
</div>
<%= 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') }');" %>
<% html_title(l(:label_my_page)) -%>
<%= javascript_tag do %>
var myPageTextModal = '<%= escape_javascript render('my/my_page_text_modal') %>';
<% end %>