Actions
Feature #43087
openAllow to change icons sprites from theme
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Description
Allow to change icons sprites from themes¶
It will be great to have a option to replace sprites icons.svg from active theme
module IconsHelper
# ...
include Redmine::Themes::Helper
def sprite_source(sprite: DEFAULT_SPRITE, plugin: nil)
if plugin
"plugin_assets/#{plugin}/#{sprite}.svg"
elsif current_theme && current_theme.images.include?("#{sprite}.svg")
current_theme.image_path("#{sprite}.svg")
else
"#{sprite}.svg"
end
end
def sprite_icon(icon_name, label = nil, icon_only: false, size: DEFAULT_ICON_SIZE, style: :outline, css_class: nil, sprite: DEFAULT_SPRITE, plugin: nil, rtl: false)
sprite = sprite_source(sprite: sprite, plugin: plugin)
# ...
end
# ...
end
Files
Updated by Go MAEDA 6 months ago
- File 43087.patch 43087.patch added
Here is a patch generated from icons_helper.rb.
Updated by Marius BĂLTEANU 7 days ago
- Target version set to 6.1.2
This is useful for plugins developer, let’s discuss it for 6.1.2.
Actions