There is currently no way for an external tool to provide a custom icon for the top nav bar. https://sourceforge.net/p/allura/chat/2013/02/27/ provides a thorough explanation of the problem. Fix this so that a custom tool can provide it's own icons without needing to modify the theme (which is impractical).
allura:tv/6942
To test manually you can set your theme to allura and note that the nav icons are still visible (except for any that may be sftheme-specific).
To see how this works with an external tool, pull
forgepastebin:tv/6942
.Run
paster set-tool-access production.ini myproject Projects beta
and observe that the pastebin icons show up properly in the web ui.A few opportunities to make it better:
ui-icon-admin
andui-icon-tool-*
CSS classes are unused now except fortemplates/widgets/project_summary.html
which is used in the[[projects]]
macro (FYI: they don't seem to work there in the sftheme, but do in allura theme)top_nav.html
.ui-icon-tool-{{s.tool_name}} { background-image: url({{ g.theme.app_icon_url((s.tool_name or 'admin').lower(), 32) }} }
for each tool? maybe need the pixel size (32) in the class name too?icon_url()
didn't have to be overridden in each app that isn't in Allura core. It's not doing anything particular special, just boilerplate to useg.forge_static
; theicons
dict ideally is all each app should have to specify. Not sure what it'd take to do that though. Change core apps to use icon paths more in line with how pastebin does now?allura:tv/6942 (force-pushed)
sftheme:tv/6942
forge-classic:tv/6942
Very very nice. Minor remaining issues:
build_key
config value could work (if deploy processes properly update that). But for development that doesn't get changed. Would an md5 of the CSS make sense?def icon_url
from forgepastebin, and _icons.scss from sftheme, and its working fine.Fixed on allura:tv/6942