summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-10-19 10:51:53 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-10-19 10:51:53 +0000
commitdaa18f5c381b6ecf2df674f7de2733ea9a3a31e7 (patch)
treedc6ec86f544a086edc593bf84acf2162c51ec53c /app
parent42762a3f3cd3b67d5062cf7208441f46e6b4c2de (diff)
downloadredmine-daa18f5c381b6ecf2df674f7de2733ea9a3a31e7.tar.gz
redmine-daa18f5c381b6ecf2df674f7de2733ea9a3a31e7.zip
Fixes rubocop offenses (#23980).
git-svn-id: https://svn.redmine.org/redmine/trunk@23147 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/helpers/icons_helper.rb21
1 files changed, 10 insertions, 11 deletions
diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb
index 28661fbea..5654f3a2f 100644
--- a/app/helpers/icons_helper.rb
+++ b/app/helpers/icons_helper.rb
@@ -20,7 +20,7 @@
module IconsHelper
DEFAULT_ICON_SIZE = "18"
DEFAULT_SPRITE = "icons"
-
+
def sprite_icon(icon_name, label = nil, icon_only: false, size: DEFAULT_ICON_SIZE, css_class: nil, sprite: DEFAULT_SPRITE, plugin: nil)
sprite = plugin ? "plugin_assets/#{plugin}/#{sprite}.svg" : "#{sprite}.svg"
@@ -36,7 +36,6 @@ module IconsHelper
end
end
- #
def file_icon(entry, name, size: DEFAULT_ICON_SIZE, css_class: nil)
if entry.is_dir?
sprite_icon("folder", name, size: size, css_class: css_class)
@@ -52,15 +51,15 @@ module IconsHelper
def activity_event_type_icon(event_type, size: DEFAULT_ICON_SIZE, css_class: nil)
icon_name = case event_type
- when 'reply'
- 'comments'
- when 'time-entry'
- 'time'
- when 'message'
- 'comment'
- else
- event_type
- end
+ when 'reply'
+ 'comments'
+ when 'time-entry'
+ 'time'
+ when 'message'
+ 'comment'
+ else
+ event_type
+ end
sprite_icon(icon_name, size: size, css_class: css_class)
end