Defect #35153 » 0001-Added-touch-icon.png.patch
| app/helpers/application_helper.rb | ||
|---|---|---|
| 1720 | 1720 |
end |
| 1721 | 1721 | |
| 1722 | 1722 |
def favicon |
| 1723 |
"<link rel='shortcut icon' href='#{favicon_path}' />".html_safe
|
|
| 1723 |
"<link rel='shortcut icon' sizes='180x180' href='#{favicon_path}' />".html_safe
|
|
| 1724 | 1724 |
end |
| 1725 | 1725 | |
| 1726 | 1726 |
# Returns the path to the favicon |
| ... | ... | |
| 1741 | 1741 |
'<meta name="robots" content="noindex,follow,noarchive" />'.html_safe |
| 1742 | 1742 |
end |
| 1743 | 1743 | |
| 1744 |
def touchicon |
|
| 1745 |
"<link rel='apple-touch-icon' href='#{touchicon_path}' />".html_safe
|
|
| 1746 |
end |
|
| 1747 | ||
| 1748 |
def touchicon_path |
|
| 1749 |
touchicon = (current_theme && current_theme.touchicon?) ? current_theme.touchicon_path : '/touch-icon.png' |
|
| 1750 |
image_path(touchicon) |
|
| 1751 |
end |
|
| 1752 | ||
| 1753 |
def touchicon_url |
|
| 1754 |
path = touchicon_path |
|
| 1755 |
base = url_for(:controller => 'welcome', :action => 'index', :only_path => false) |
|
| 1756 |
base.sub(%r{/+$}, '') + '/' + path.sub(%r{^/+}, '')
|
|
| 1757 |
end |
|
| 1758 | ||
| 1744 | 1759 |
# Returns true if arg is expected in the API response |
| 1745 | 1760 |
def include_in_api_response?(arg) |
| 1746 | 1761 |
unless @included_in_api_response |
| app/views/layouts/base.html.erb | ||
|---|---|---|
| 9 | 9 |
<meta name="keywords" content="issue,bug,tracker" /> |
| 10 | 10 |
<%= csrf_meta_tag %> |
| 11 | 11 |
<%= favicon %> |
| 12 |
<%= touchicon %> |
|
| 12 | 13 |
<%= stylesheet_link_tag 'jquery/jquery-ui-1.12.1', 'tribute-5.1.3', 'application', 'responsive', :media => 'all' %> |
| 13 | 14 |
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> |
| 14 | 15 |
<%= javascript_heads %> |
| lib/redmine/themes.rb | ||
|---|---|---|
| 88 | 88 |
favicon.present? |
| 89 | 89 |
end |
| 90 | 90 | |
| 91 |
def touchicons |
|
| 92 |
@touchicon ||= assets("touchicon")
|
|
| 93 |
end |
|
| 94 | ||
| 95 |
def touchicon |
|
| 96 |
touchicons.first |
|
| 97 |
end |
|
| 98 | ||
| 99 |
def touchicon? |
|
| 100 |
touchicon.present? |
|
| 101 |
end |
|
| 102 | ||
| 91 | 103 |
def stylesheet_path(source) |
| 92 | 104 |
"/themes/#{dir}/stylesheets/#{source}"
|
| 93 | 105 |
end |
| ... | ... | |
| 104 | 116 |
"/themes/#{dir}/favicon/#{favicon}"
|
| 105 | 117 |
end |
| 106 | 118 | |
| 119 |
def touchicon_path |
|
| 120 |
"/themes/#{dir}/touchicon/#{touchicon}"
|
|
| 121 |
end |
|
| 122 | ||
| 107 | 123 |
private |
| 108 | 124 | |
| 109 | 125 |
def assets(dir, ext=nil) |