Patch #15689 » 15689-theme_favicon.patch
| app/helpers/application_helper.rb | ||
|---|---|---|
|
end
|
||
|
def favicon
|
||
|
"<link rel='shortcut icon' href='#{image_path('/favicon.ico')}' />".html_safe
|
||
|
fav_path = (current_theme && current_theme.favicon?) ? current_theme.favicon_path : '/favicon.ico'
|
||
|
"<link rel='shortcut icon' href='#{image_path(fav_path)}' />".html_safe
|
||
|
end
|
||
|
def robot_exclusion_tag
|
||
| lib/redmine/themes.rb | ||
|---|---|---|
|
@javascripts ||= assets("javascripts", "js")
|
||
|
end
|
||
|
def favicon
|
||
|
# we need to cache the array as [].first is nil and wouldn't be cached
|
||
|
(@favicons ||= assets("favicon")).first
|
||
|
end
|
||
|
def favicon?
|
||
|
favicon.present?
|
||
|
end
|
||
|
def stylesheet_path(source)
|
||
|
"/themes/#{dir}/stylesheets/#{source}"
|
||
|
end
|
||
| ... | ... | |
|
"/themes/#{dir}/javascripts/#{source}"
|
||
|
end
|
||
|
def favicon_path
|
||
|
"/themes/#{dir}/favicon/#{favicon}"
|
||
|
end
|
||
|
private
|
||
|
def assets(dir, ext=nil)
|
||