socialforge/app/views/users/resource_preview.js.erb

5 lines
181 B
Plaintext
Raw Normal View History

2015-08-18 09:31:03 +08:00
<% if @preview_able %>
top.location.href = '<%=download_named_attachment_path(@file.id, @file.filename, preview: true) %>'
2015-08-18 15:25:36 +08:00
<% else %>
window.alert('该资源不可预览')
2015-08-18 09:31:03 +08:00
<% end %>