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

17 lines
588 B
Plaintext

<% fieldname_p = fieldname.pluralize %>
<%= f.label "fieldname", t('admin.'+fieldname) %>
<ul>
<% object.send(fieldname_p).each do |t| %>
<li class="r_destroy r_snapshot"> <%= t.file_filename %>
<%=fields_for "design["+(fieldname_p)+"][]",t,:index=>nil do |f| %>
<%= f.hidden_field :id %>
<%= f.hidden_field :to_destroy %>
<%end%>
<a class="remove_mark" href="#">Del</a>
</li>
<% end %>
</ul>
<%= fields_for "design["+(fieldname_p)+"][]", object, :index => nil do |f| %>
<%= f.file_field :file ,{:class=>"multi_files",:rtype=>rtype}%>
<% end %>