From 21d25d954d4c592e34e03226b83157d9ca108835 Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Mon, 25 Sep 2017 09:28:18 +0200 Subject: [PATCH] If the project doesn't exist --- app/views/my/blocks/_locked_documents.html.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/my/blocks/_locked_documents.html.erb b/app/views/my/blocks/_locked_documents.html.erb index ebcb81d2..ec136a30 100644 --- a/app/views/my/blocks/_locked_documents.html.erb +++ b/app/views/my/blocks/_locked_documents.html.erb @@ -65,7 +65,7 @@ <% files.each do |file| %> - <%= link_to_project(file.project) %> + <%= link_to_project(file.project) if file.project %> <%= link_to(h(file.title), @@ -77,7 +77,8 @@ <%= link_to(h(file.dmsf_folder.title), {:controller => 'dmsf', :action => 'show', :id => file.project, :folder_id => file.dmsf_folder}) %> <% else %> - <%= link_to(l(:link_documents), {:controller => 'dmsf', :action => 'show', :id=> file.project }) %> + <%= link_to_if(file.project, l(:link_documents), {:controller => 'dmsf', :action => 'show', + :id=> file.project }) %> <% end %>