From b087f7075f670e33895433c2cca86f681bedeee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=BE=D0=BC=D0=B0=D0=BD=20=D0=91=D0=B5=D0=BB=D1=8F?= =?UTF-8?q?=D0=BA=D0=BE=D0=B2=D1=81=D0=BA=D0=B8=D0=B8=CC=86?= Date: Mon, 11 Aug 2014 11:29:44 +0400 Subject: [PATCH] changed default link from download to view and set target to blank --- app/views/dmsf/_file.html.erb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/dmsf/_file.html.erb b/app/views/dmsf/_file.html.erb index fc698207..d15f6b3d 100644 --- a/app/views/dmsf/_file.html.erb +++ b/app/views/dmsf/_file.html.erb @@ -25,12 +25,13 @@ <%= check_box_tag(name, id, false, :title => l(:title_check_for_zip_download_or_email)) %> - <% file_download_url = url_for({:only_path => false, :controller => :dmsf_files, :action => 'show', :id => file, :download => ''}) %> + <% file_view_url = url_for({:only_path => false, :controller => :dmsf_files, :action => 'view', :id => file}) %> <%= link_to(h(title), - file_download_url, + file_view_url, + :target => "_blank", :class => "icon icon-file #{DmsfHelper.filetype_css(file.name)}", :title => l(:title_title_version_version_download, :title => h(file.title), :version => file.version), - 'data-downloadurl' => "#{file.last_revision.detect_content_type}:#{h(file.name)}:#{file_download_url}") %> + 'data-downloadurl' => "#{file.last_revision.detect_content_type}:#{h(file.name)}:#{file_view_url}") %>
<%= h(link ? link.path : file.display_name) %>
<%= number_to_human_size(file.last_revision.size) %>