Actions
Feature #18966
openMake it easier to add OS-specific icons
Status:
New
Priority:
Low
Assignee:
-
Category:
Web Interface
Target version:
-
Description
Hard-coding the list of OS icons just means that the Foreman project becomes responsible for handling every single operating system beneath the sun, which isn't going to look nice on the operatingsystems_helper.rb file after a while.
Perhaps something as simple as;
--- a/app/helpers/operatingsystems_helper.rb +++ b/app/helpers/operatingsystems_helper.rb @@ -3,7 +3,8 @@ module OperatingsystemsHelper def icon(record, opts = {}) return "" if record.blank? || record.name.blank? - family = case record.name + family = record.name if Rails.application.assets.find_asset record.name+'.png' + family ||= case record.name when /fedora/i "Fedora" when /ubuntu/i
Though the asset pipeline might get in the way for people wanting to do lots of icon changes.
No data to display
Actions