summaryrefslogtreecommitdiffstats
path: root/lib/redmine/themes.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-01-11 11:22:46 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-01-11 11:22:46 +0000
commit8b999962dec50fc4599f77c1a23fbdc7b43dab21 (patch)
treebb9f2f7ea5bffa7f50779af1e129f4ed787f3944 /lib/redmine/themes.rb
parent2db3338ab22ffbccb69b51c97baeba51646ac1e3 (diff)
downloadredmine-8b999962dec50fc4599f77c1a23fbdc7b43dab21.tar.gz
redmine-8b999962dec50fc4599f77c1a23fbdc7b43dab21.zip
Make favicon themeable (#15689).
Patch by Felix Schäfer modified by Jean-Philippe Lang. git-svn-id: http://svn.redmine.org/redmine/trunk@12646 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/themes.rb')
-rw-r--r--lib/redmine/themes.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/redmine/themes.rb b/lib/redmine/themes.rb
index eb2ba9151..c69244f7e 100644
--- a/lib/redmine/themes.rb
+++ b/lib/redmine/themes.rb
@@ -75,6 +75,18 @@ module Redmine
@javascripts ||= assets("javascripts", "js")
end
+ def favicons
+ @favicons ||= assets("favicon")
+ end
+
+ def favicon
+ favicons.first
+ end
+
+ def favicon?
+ favicon.present?
+ end
+
def stylesheet_path(source)
"/themes/#{dir}/stylesheets/#{source}"
end
@@ -87,6 +99,10 @@ module Redmine
"/themes/#{dir}/javascripts/#{source}"
end
+ def favicon_path
+ "/themes/#{dir}/favicon/#{favicon}"
+ end
+
private
def assets(dir, ext=nil)