| Module | Admin::PhotosHelper |
| In: |
app/helpers/admin/photos_helper.rb
|
# File app/helpers/admin/photos_helper.rb, line 3
3: def available_albums_as_options_for(photo)
4: # "<option value=''>Añadir al álbum...</option>" + # options_for_select((Album.find(:all, :order => "title_es") - photo.albums).collect {|a| [a.title, a.id]})
5:
6: xx = content_tag(:option, :value => "") {"Añadir al album..."}
7: Album.find(:all, :order => "title_es").each do |album|
8: if photo.album_ids.include?(album.id)
9: xx << content_tag(:option, :value => album.id, :disabled => true) {album.title}
10: else
11: xx << content_tag(:option, :value => album.id) {album.title}
12: end
13: end
14: return xx
15: end