From 3e03f0c9e159f0a7ce02292039065b94c8cc1a9d Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Tue, 28 Feb 2017 15:42:13 +0100 Subject: [PATCH] Folder links to project folders errors fix --- app/views/dmsf/_dir.html.erb | 8 +++++--- app/views/dmsf/_dir_trash.html.erb | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/views/dmsf/_dir.html.erb b/app/views/dmsf/_dir.html.erb index 7285a11e..123bd82a 100644 --- a/app/views/dmsf/_dir.html.erb +++ b/app/views/dmsf/_dir.html.erb @@ -87,10 +87,10 @@ <% if @folder_manipulation_allowed %> <% unless locked_for_user %> - <%= link_to(image_tag('edit.png'), - edit_dmsf_path(:id => project, :folder_id => subfolder), - :title => l(:link_edit, :title => subfolder ? h(subfolder.title) : project.name)) %> <% if subfolder %> + <%= link_to(image_tag('edit.png'), + edit_dmsf_path(:id => project, :folder_id => subfolder), + :title => l(:link_edit, :title => subfolder ? h(subfolder.title) : project.name)) %> <% if locked %> <% if subfolder.unlockable? %> <%= link_to(image_tag('unlock.png', :plugin => 'redmine_dmsf'), @@ -105,6 +105,8 @@ :title => l(:title_lock_file)) %> <% end %> <% else %> + <%= link_to(image_tag('edit.png'), edit_root_dmsf_path(:id => @project), + :title => l(:link_edit, :title => l(:link_documents))) %> <% end %> <% if (subfolder && subfolder.notification) || (!subfolder && project.dmsf_notification) %> diff --git a/app/views/dmsf/_dir_trash.html.erb b/app/views/dmsf/_dir_trash.html.erb index eb5cb81a..3d16d0f7 100644 --- a/app/views/dmsf/_dir_trash.html.erb +++ b/app/views/dmsf/_dir_trash.html.erb @@ -55,13 +55,13 @@ <% end %> <% if DmsfFolder.is_column_on?('author') %> - <%= h(subfolder.user) %> + <%= h(subfolder.user) if subfolder %> <% end %> <% cfs = CustomField.where(:type => 'DmsfFileRevisionCustomField').order(:position) %> <% cfs.each do |c| %> <% if DmsfFolder.is_column_on?(c.name) %> - <%= subfolder.custom_value(c) %> + <%= subfolder.custom_value(c) if subfolder %> <% end %> <% end %>