block rails3

This commit is contained in:
Espen Antonsen 2010-09-17 18:53:40 +02:00
parent 14169b1770
commit 9ddc6b98d6
3 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@
<%= form.label :albums %><br /> <%= form.label :albums %><br />
<div id="collection_albums"> <div id="collection_albums">
<% for album in @collection.albums %> <% for album in @collection.albums %>
<% form.fields_for :album_list do |album_fields| %> <%= form.fields_for :album_list do |album_fields| %>
<span> <span>
<img src="/images/delete-24x24.png" border="" class="delete" /> <img src="/images/delete-24x24.png" border="" class="delete" />
<% if album.photos.empty? %> <% if album.photos.empty? %>

View file

@ -1,7 +1,7 @@
<%= form_for :photos, :url => update_multiple_photos_path, :html => { :method => :put } do |f| %> <%= form_for :photos, :url => update_multiple_photos_path, :html => { :method => :put } do |f| %>
<% for photo in @photos %> <% for photo in @photos %>
<p> <p>
<% f.fields_for photo, :index => photo.id do |p|%> <%= f.fields_for photo, :index => photo.id do |p|%>
<%= p.check_box :_delete %> <%= p.check_box :_delete %>
<%= render :partial => "photos/thumb", :locals => {:photo => photo } %> <%= render :partial => "photos/thumb", :locals => {:photo => photo } %>
<%= p.text_field :title %> <%= p.text_field :title %>

View file

@ -1,7 +1,7 @@
<%= form_for :photos, :url => update_multiple_photos_path, :html => { :method => :put } do |f| %> <%= form_for :photos, :url => update_multiple_photos_path, :html => { :method => :put } do |f| %>
<% for photo in @photos %> <% for photo in @photos %>
<p> <p>
<% f.fields_for photo do |p|%> <%= f.fields_for photo do |p|%>
<%= render :partial => "photos/thumb", :locals => {:photo => photo } %> <%= render :partial => "photos/thumb", :locals => {:photo => photo } %>
<%= p.text_field :title, :index => photo.id %> <%= p.text_field :title, :index => photo.id %>
<%= p.text_field :tags, :index => photo.id, :value => photo.tag_list %> <%= p.text_field :tags, :index => photo.id, :value => photo.tag_list %>