diff --git a/app/views/issues/_hide_attachments.html.slim b/app/views/issues/_hide_attachments.html.slim index 2320cb47..8b190ec6 100644 --- a/app/views/issues/_hide_attachments.html.slim +++ b/app/views/issues/_hide_attachments.html.slim @@ -1,8 +1,9 @@ - if @issue.attachments.any? + - max_files = Additionals.setting :issue_hide_max_attachments - file_count = @issue.attachments.length - - if file_count > Additionals.setting(:issue_hide_max_attachments).to_i + - if max_files.present? && file_count > max_files.to_i fieldset.collapsible.collapsed.hide-attachments - legend onclick="toggleFieldset(this);" class="icon icon-collapsed" + legend.icon.icon-collapsed onclick='toggleFieldset(this);' strong = l :label_attachment_plural = " (#{file_count})" diff --git a/app/views/reports/_additionals_simple.html.slim b/app/views/reports/_additionals_simple.html.slim index 508490e8..0d107acd 100644 --- a/app/views/reports/_additionals_simple.html.slim +++ b/app/views/reports/_additionals_simple.html.slim @@ -1,7 +1,7 @@ ruby: case field_name when 'assigned_to_id' - rows = if Setting.issue_group_assignment? # rubocop: disable Lint/UselessAssignment + rows = if Setting.issue_group_assignment? # rubocop: disable Lint/UselessAssignment @project.visible_principals else @project.visible_users