Folder links to project folders errors fix

This commit is contained in:
Karel Picman 2017-02-28 15:42:13 +01:00
parent 1ba0442513
commit 3e03f0c9e1
2 changed files with 7 additions and 5 deletions

View File

@ -87,10 +87,10 @@
<td class="dmsf_buttons">
<% 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))) %>
<span class="icon"></span>
<% end %>
<% if (subfolder && subfolder.notification) || (!subfolder && project.dmsf_notification) %>

View File

@ -55,13 +55,13 @@
<td class="dmsf_workflow"></td>
<% end %>
<% if DmsfFolder.is_column_on?('author') %>
<td class="dmsf_author"><%= h(subfolder.user) %></td>
<td class="dmsf_author"><%= h(subfolder.user) if subfolder %></td>
<% end %>
<% cfs = CustomField.where(:type => 'DmsfFileRevisionCustomField').order(:position) %>
<% cfs.each do |c| %>
<% if DmsfFolder.is_column_on?(c.name) %>
<td class="dmsf_cf">
<%= subfolder.custom_value(c) %>
<%= subfolder.custom_value(c) if subfolder %>
</td>
<% end %>
<% end %>