<% @attachment_histories.each do |history| %> <%#= link_to( '删除资源', attachment_path(history.attachment, :history_id => history, :type => "history"), # :remote => true, # :data => {:confirm => l(:text_are_you_sure)}, # :method => :delete, # :class => "postOptionLink", :class => "btn") if allow_to_delete_attachment(history) %> <% end %>
资源名称 下载数 引用数 版本号
当前版本 <%= @attachment.downloads %> <%= @attachment.try(:quotes).to_i %> <%= format_time(@attachment.created_on) %>
<%= history.downloads %> <%= history.try(:quotes).to_i %> <%= format_time(history.created_on) %>
<%= form_tag(upload_attachment_version_path, :multipart => true,:remote => !ie8?,:name=>"upload_form",:id=>'upload_form') do %> <%= hidden_field_tag :old_attachment_id,@attachment.id %>
<%= render :partial => 'attachments/upload_attachment_new_version' %>
取消 <%#= submit_tag '确定', :onclick => 'upload_attachment_version(event);', :onfocus => 'this.blur()', :id => 'upload_files_submit_btn', :class => 'btn btn-blue fr mr5' %> 确定
<% end %>