From bcb9a1cd3347031884474cf8c5de153e43964a9e Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Mon, 2 Sep 2024 20:47:55 +0000 Subject: Replaces icon-folder and icon-folder-open in repository view with SVG icons (#23980). git-svn-id: https://svn.redmine.org/redmine/trunk@23010 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/icons_helper.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/helpers') diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index d82a74611..b9b25c0ba 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -25,6 +25,12 @@ module IconsHelper sprite_icon(icon_name) + content_tag(:span, label_text, class: "icon-label") end + def icon_for_file(entry, label_text) + if entry.is_dir? + icon_with_label("folder", label_text) + end + end + def sprite_icon(icon_name, size: DEFAULT_ICON_SIZE, sprite: DEFAULT_SPRITE) sprite_path = "#{sprite}.svg" -- cgit v1.2.3