orbit-basic/app/views/admin/designs/_design_file.html.erb

24 lines
919 B
Plaintext
Raw Normal View History

<%= f.label "field_name", t('admin.' + field_name) %>
2011-07-20 06:04:16 +00:00
<ul>
<% object.send(field_name).each do |t| %>
<li class="<%= classes %>" <%="path='#{t.file.url}' filename='#{t.file_identifier}'" %> >
<%= t.file_identifier %>
<% 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 %>
<%= f.hidden_field :file %>
2011-07-26 10:22:17 +00:00
<%= f.hidden_field :to_destroy %>
<% end %>
2011-07-26 10:22:17 +00:00
<a class="remove_mark" href="#"><%= t('Delete') %></a>
<% end %>
<% 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| %>
<%= f.file_field :file, :class => "multi_files" %>
2011-07-26 10:22:17 +00:00
</p>
<% end %>