Sha256: b1a9c2582ae4294da8f94ca3496eed361222794d74e33d1294dad6b7ec8dce4e

Contents?: true

Size: 873 Bytes

Versions: 8

Compression:

Stored size: 873 Bytes

Contents

<% div_for area do %>
  <% fields_for 'design[area_attributes][]', area do |naf| %>
		<%= naf.text_field :name, :index => nil %> 
		<% if area.new_record? %>
			<%= link_to_function "Remove", "$(this).up('.area').remove()", :class => 'button' %><br/>
		<% else %>
			<%= link_to_function "Remove", "$(this).next('.should_destroy').value = 1; $(this).hide();"+
			    "$('area_restore_#{area.id}').show()", :class => 'button', 
			    :id =>  "area_remove_#{area.id}" %>
			<%= link_to_function "Restore", "$(this).next('.should_destroy').value = 0; $(this).hide();"+
			    "$('area_remove_#{area.id}').show()", :class => 'button', 
			    :id =>  "area_restore_#{area.id}", :style => 'display:none' %><br/>
			<%= naf.hidden_field :id, :index => nil %>
			<%= naf.hidden_field :should_destroy, :index => nil, :class => 'should_destroy' %>
		<% end %>
	<% end %>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
newsletter-3.2.22.0 app/views/newsletter/designs/_newsletter_area.html.erb
newsletter-3.2.7 app/views/newsletter/designs/_newsletter_area.html.erb
newsletter-3.2.6 app/views/newsletter/designs/_newsletter_area.html.erb
newsletter-3.2.5 app/views/newsletter/designs/_newsletter_area.html.erb
newsletter-3.2.4 app/views/newsletter/designs/_newsletter_area.html.erb
newsletter-3.2.2 app/views/newsletter/designs/_newsletter_area.html.erb
newsletter-3.2.1 app/views/newsletter/designs/_newsletter_area.html.erb
newsletter-3.2.0 app/views/newsletter/designs/_newsletter_area.html.erb