2011-09-08 10:12:04 +00:00
|
|
|
<%= f.label "field_name", t('admin.' + field_name) %>
|
2011-07-20 06:04:16 +00:00
|
|
|
<ul>
|
2011-09-08 10:12:04 +00:00
|
|
|
<% object.send(field_name).each do |t| %>
|
2012-01-24 03:36:24 +00:00
|
|
|
<li class="<%= classes %>" <%="path='#{t.file.url}' filename='#{t.file_identifier}'" %> >
|
|
|
|
<%= t.file_identifier %>
|
2011-09-08 10:12:04 +00:00
|
|
|
<% if classes.include?('r_destroy') %>
|
|
|
|
<%= fields_for "design[" + field_name + "][]", t, :index => nil do |f| %>
|
2011-07-26 10:22:17 +00:00
|
|
|
<%= f.hidden_field :id %>
|
2011-09-08 10:12:04 +00:00
|
|
|
<%= f.hidden_field :file %>
|
2011-07-26 10:22:17 +00:00
|
|
|
<%= f.hidden_field :to_destroy %>
|
2011-09-08 10:12:04 +00:00
|
|
|
<% end %>
|
2011-07-26 10:22:17 +00:00
|
|
|
<a class="remove_mark" href="#"><%= t('Delete') %></a>
|
2011-09-08 10:12:04 +00:00
|
|
|
<% end %>
|
2011-09-09 05:44:43 +00:00
|
|
|
<% if classes.include?('r_edit') %>
|
2011-07-26 10:22:17 +00:00
|
|
|
<a class="edit_mark" href="#"><%= t('Edit') %></a>
|
|
|
|
<% end %>
|
2011-07-20 06:04:16 +00:00
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
2011-07-26 10:22:17 +00:00
|
|
|
<p class="new_file">
|
2011-12-23 10:34:21 +00:00
|
|
|
<%= fields_for "design[new_files][" + field_name + "][]", object.send(field_name).build, :index => nil do |f| %>
|
2011-09-08 10:12:04 +00:00
|
|
|
<%= f.file_field :file, :class => "multi_files" %>
|
2011-07-26 10:22:17 +00:00
|
|
|
</p>
|
2011-09-08 10:12:04 +00:00
|
|
|
<% end %>
|