|
|
|
@ -108,71 +108,42 @@ function addBlock() { |
|
|
|
|
//]]> |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<% content_for :action_menu_specific do %> |
|
|
|
|
<% content_for :toolbar do %> |
|
|
|
|
<li> |
|
|
|
|
<%= form_tag({:action => "add_block"}, :id => "block-form") do %> |
|
|
|
|
<%= select_tag 'block', |
|
|
|
|
<%= styled_form_tag({:action => "add_block"}, :id => "block-form") do %> |
|
|
|
|
<%= styled_select_tag 'block', |
|
|
|
|
("<option>--#{t(:button_add)}--</option>" + options_for_select(block_options)).html_safe, |
|
|
|
|
:id => "block-select", |
|
|
|
|
:onChange => "addBlock();", |
|
|
|
|
class: 'form--select -small' |
|
|
|
|
class: 'form--select' |
|
|
|
|
%> |
|
|
|
|
<% end %> |
|
|
|
|
</li> |
|
|
|
|
<li><%= link_to l(:button_back), {:action => 'index'}, :class => 'icon icon-cancel' %></li> |
|
|
|
|
<li><%= link_to l(:button_back), {:action => 'index'}, :class => 'button' %></li> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<h2><%=l(:label_overview)%></h2> |
|
|
|
|
|
|
|
|
|
<%= render :partial => 'layouts/action_menu_specific' %> |
|
|
|
|
<%= render :partial => 'layouts/toolbar' %> |
|
|
|
|
|
|
|
|
|
<h4><%=l(:label_visible_elements) %></h4> |
|
|
|
|
<div id="visible-grid"> |
|
|
|
|
<div class="grid-block"> |
|
|
|
|
<% top_fields.each do |f| %> |
|
|
|
|
<div id="list-<%= f %>" class="grid-content block-receiver"> |
|
|
|
|
<% 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 %> |
|
|
|
|
</div> |
|
|
|
|
<%= grid_field f %> |
|
|
|
|
<% end %> |
|
|
|
|
</div> |
|
|
|
|
<div class="grid-block"> |
|
|
|
|
<% middle_fields.each do |f| %> |
|
|
|
|
<div id="list-<%= f %>" class="block-receiver <%= 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 %> |
|
|
|
|
</div> |
|
|
|
|
<%= grid_field f %> |
|
|
|
|
<% end %> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<h4><%=l(:label_hidden_elements) %></h4> |
|
|
|
|
<div id="list-hidden" class="block-receiver"> |
|
|
|
|
<% 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 %> |
|
|
|
|
<div id="list-hidden"> |
|
|
|
|
<% hidden_fields.each do |f| %> |
|
|
|
|
<%= grid_field f %> |
|
|
|
|
<% end %> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|