This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/views/admin/designs/_design_file.html.erb

24 lines
915 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_filename}'" %> >
2011-07-26 10:22:17 +00:00
<%= t.file_filename %>
<% 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-22 07:43:38 +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 %>