If the project doesn't exist

This commit is contained in:
Karel Picman 2017-09-25 09:28:18 +02:00
parent f9af351672
commit 21d25d954d

View File

@ -65,7 +65,7 @@
<% files.each do |file| %> <% files.each do |file| %>
<tr id="file-<%= file.id %>"> <tr id="file-<%= file.id %>">
<td class="project"> <td class="project">
<%= link_to_project(file.project) %> <%= link_to_project(file.project) if file.project %>
</td> </td>
<td class="title"> <td class="title">
<%= link_to(h(file.title), <%= link_to(h(file.title),
@ -77,7 +77,8 @@
<%= link_to(h(file.dmsf_folder.title), <%= link_to(h(file.dmsf_folder.title),
{:controller => 'dmsf', :action => 'show', :id => file.project, :folder_id => file.dmsf_folder}) %> {:controller => 'dmsf', :action => 'show', :id => file.project, :folder_id => file.dmsf_folder}) %>
<% else %> <% 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 %> <% end %>
</td> </td>
</tr> </tr>