_attachment.html.erb
上传用户:netsea168
上传日期:2022-07-22
资源大小:4652k
文件大小:1k
- <li id="attachment_<%= attachment_num -%>"<% if hidden %> style="display: none;"<% end %>>
- <%= file_field 'attachments', "filename_#{attachment_num}" -%>
- <%= link_to_function(_("Remove"),
- update_page do |page|
- page << "if (confirm(_('Really delete attachment') +' #{attachment_num}?')){"
- page.visual_effect(:toggle_appear, "attachment_#{attachment_num}", :afterFinish => "function(obj){Element.remove(obj.element);}")
- page << "}"
- end) -%>
- </li>
- <li id="attachment_add_<%= attachment_num.succ %>">
- <%= link_to_remote _('Add Another Attachment'),
- :url => { :action => "attachment_box_add", :id => attachment_num.succ },
- :asynchronus => false -%>
- </li>
- <% if @article and @article.id %>
- <li id="resources">
- <% if @article.resources.count > 0 %>
- <h3><%= _("Currently this article has the following resources")%></h3>
- <% for resource in @article.resources %>
- <%= link_to_remote "- #{resource.filename}", :url => { :action => "resource_remove", :id => @article.id, :resource_id => resource.id}, :update => 'resources' %><br/>
- <% end %>
- <% end %>
-
- <h3><%= _("You can associate the following resources")%></h3>
- <% for resource in @resources - @article.resources %>
- <%= link_to_remote "+ #{resource.filename}", :url => { :action => "resource_add", :id => @article.id, :resource_id => resource.id}, :update => 'resources' %><br />
- <% end %>
- </li>
- <% end %>