diff --git a/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb b/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb index 769abfe9..31c68084 100644 --- a/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb +++ b/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb @@ -170,7 +170,7 @@ module RedmineDmsf links = get_links(container) if links.present? if defined?(EasyExtensions) - attachment_rows(links, container, controller, attachments) + attachment_rows(links, container, controller) else controller.send(:render_to_string, {:partial => 'dmsf_files/links', :locals => {:links => links, :thumbnails => Setting.thumbnails_enabled?}}) @@ -178,12 +178,9 @@ module RedmineDmsf end end - def attachment_rows(links, issue, controller, attachments) + def attachment_rows(links, issue, controller) if links.any? - html = '' - if attachments.any? - html << "#{l(:label_dmsf_attachments)} (#{links.count})" - end + html = "#{l(:label_dmsf_attachments)} (#{links.count})" links.each do |dmsf_file, link, create_at| html << attachment_row(dmsf_file, link, issue, controller) end