<%#-- copyright OpenProject is a project management system. Copyright (C) 2012-2013 the OpenProject Team This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3. See doc/COPYRIGHT.rdoc for more details. ++#%> <% field_list = ['top', 'left', 'right', 'hidden'] %>
<%= form_tag({:action => "add_block"}, :id => "block-form") do %> <%= select_tag 'block', ("" + options_for_select(block_options)).html_safe, :id => "block-select", :onChange => "addBlock();" %> <% end %> <%= link_to l(:button_back), {:action => 'index'}, :class => 'icon icon-cancel' %>

<%=l(:label_overview)%>

<%=l(:label_visible_elements) %>

<% (field_list - ['hidden']).each do |f| %>
<% blocks[f].each do |b| %> <% if MyProjectsOverviewsController.available_blocks.keys.include? b %> <%= render(:partial => 'block', :locals => { :block_name => b }) %> <% elsif b.respond_to? :to_ary %> <%= render(:partial => 'block_textilizable', :locals => {:block_name => b.first, :block_title => b[1], :textile => b.last}) %> <% end %> <% end %>
<% end %>

<%=l(:label_hidden_elements) %>

<% blocks['hidden'].each do |b| %> <% if MyProjectsOverviewsController.available_blocks.keys.include? b %> <%= render(:partial => 'block', :locals => {:block_name => b}) %> <% elsif b.respond_to? :to_ary %> <%= render(:partial => 'block_textilizable', :locals => {:block_name => b.first, :block_title => b[1], :textile => b.last}) %> <% end %> <% end %>

<%= l(:label_file_plural) %>

<%= render(:partial => "page_layout_attachments") %>
<% field_list.each do |f| %> <%= sortable_element "list-#{f}", :tag => 'div', :only => 'mypage-box', :handle => "handle", :dropOnEmpty => true, :containment => field_list.collect {|x| "list-#{x}" }, :constraint => false, :url => { :action => "order_blocks", :group => f } %> <% end %> <%= javascript_tag "updateSelect()" %> <% content_for :header_tags do %> <%= javascript_include_tag "my_project_page/my_project_page", :plugin => 'chiliproject_my_project_page' %> <%= stylesheet_link_tag "my_project_page/my_projects_overview", :plugin => "chiliproject_my_project_page", :media => 'all' %> <% heads_for_wiki_formatter %> <% end %> <% html_title(l(:label_overview)) -%>