Mercurial > hg > soundsoftware-site
diff app/helpers/application_helper.rb @ 504:3cab7f3ad3c7 cannam
Merge
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Thu, 14 Jul 2011 10:14:12 +0100 |
parents | 5d608412b003 |
children | 5e80956cc792 |
line wrap: on
line diff
--- a/app/helpers/application_helper.rb Wed Jul 13 14:37:14 2011 +0100 +++ b/app/helpers/application_helper.rb Thu Jul 14 10:14:12 2011 +0100 @@ -913,6 +913,17 @@ '<meta name="robots" content="noindex,follow,noarchive" />' end + def stylesheet_platform_font_tag + agent = request.env['HTTP_USER_AGENT'] + name = 'fonts-generic' + if agent and agent =~ %r{Windows} + name = 'fonts-ms' + elsif agent and agent =~ %r{Macintosh} + name = 'fonts-mac' + end + stylesheet_link_tag name, :media => 'all' + end + # Returns true if arg is expected in the API response def include_in_api_response?(arg) unless @included_in_api_response