Skip to content

Commit

Permalink
Only hide attachments if settings found
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermeindl committed Dec 5, 2023
1 parent 7adb114 commit 1c0bd1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/views/issues/_hide_attachments.html.slim
Original file line number Diff line number Diff line change
@@ -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})"
Expand Down
2 changes: 1 addition & 1 deletion app/views/reports/_additionals_simple.html.slim
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 1c0bd1a

Please sign in to comment.