Feature #3301

Add favicon to base layout

Added by Marek Hulan over 8 years ago. Updated almost 7 years ago.

Status:ClosedStart date:2009-05-06
Priority:LowDue date:
Assignee:Eric Davis% Done:

100%

Category:UI
Target version:1.0.1
Resolution:Fixed

Description

In <head> tag should be added a line

<link rel="shortcut icon" href="/favicon.ico" />

that will cause a favicon.ico stored in /public will be used.

Associated revisions

Revision 3894
Added by Eric Davis over 7 years ago

Add a favicon link with support for suburi. #3301

Contributed by Yuki Kita and Christian Boenning

Revision 3899
Added by Eric Davis over 7 years ago

Use image_path for the favicon instead to pick up asset hosts. #3301

History

#1 Updated by Jean-Philippe Lang over 8 years ago

favicon.ico found in public is added so that browsers do not get 404 errors.
But it's just a blank icon so I see no reason to add this tag, until we have a official Redmine logo.

#2 Updated by Jean-Philippe Lang over 8 years ago

  • Status changed from New to Closed
  • Resolution set to Wont fix

Also, this tag won't work if the application is installed in a sub-URI.

#3 Updated by Eric Davis over 8 years ago

  • Status changed from Closed to Reopened
  • Assignee set to Eric Davis
  • Priority changed from Normal to Low
  • Estimated time deleted (0.01)
  • Resolution deleted (Wont fix)

Jean-Philippe Lang wrote:

Also, this tag won't work if the application is installed in a sub-URI.

I think we could still link to a favicon in a sub-URI. Some browsers won't pick it up but most will. If I can't get it to work, then I'll re-close this ticket.

#4 Updated by Eric Davis over 8 years ago

  • Tracker changed from Defect to Feature

#5 Updated by James Robertson over 8 years ago

+1 vote - A favicon would help me to quickly identify Redmine in my (extensive) bookmarks :-)

Agree that Redmine need a favicon/logo first though. I could ask our design to come up one if you like.

#6 Updated by Eric Davis over 8 years ago

James Robertson wrote:

Agree that Redmine need a favicon/logo first though. I could ask our design to come up one if you like.

James Robertson, there is a thread about the Redmine logo as well as a beta version that I packaged up for the community. I'd appreciate your help to clean it up and do any revisions you see fit.

http://www.redmine.org/boards/1/topics/1183

#7 Updated by James Robertson over 8 years ago

Hi Eric. I've mentioned this to our designer, Kelly, but it looks like your fairly far through the process already. Good work.

#8 Updated by Eric Davis over 8 years ago

All I did was create the git repo and package it up. Martin Herr is the designer.

#9 Updated by Stas SUSHKOV about 8 years ago

Still, I can't see why redMine should not have the tag in <head>.
It would be much easier to replace the "dummy" favicon with a new one instead of searching where in the source code the tag is missing and update it.

I would add the tag to exist, even if the favicon file is a 1px file.

Thank you.

#10 Updated by Alexey Palazhchenko almost 8 years ago

+1 from me.
Also it will be neat to allow specify icon in custom theme via some ruby code or template.

#11 Updated by Nickolay Mischenko over 7 years ago

I've take an quick patch for this feature:
in app/views/layouts/base.rhtml, insert after <head>:
<link rel="shortcut icon" href="/favicon.ico" />
and restart redmine

#12 Updated by Yuki Kita over 7 years ago

+1

I made a tiny plugin to add favicon.ico
With the plugin, the icon of the official logo is displayed on the address bar.

http://github.com/YukiKita/redmine_favicon

#13 Updated by Holger Just over 7 years ago

Redmine includes a default favicon since r3845.

So you can either include the fixed link in the base layout, or (better) allow themes to overwrite it. This can be achieved by using my Favicon plugin.

#14 Updated by Eric Davis over 7 years ago

  • Status changed from Reopened to Resolved
  • Target version set to 1.0.1
  • % Done changed from 0 to 100
  • Resolution set to Fixed

I've updated Redmine's favicon to support suburis now (r3894).

Holger and Yuki Kita: the icon link is generated by ApplicationHelper#favicon so your plugins can now override that method if you want to change the path.

#15 Updated by Eric Davis over 7 years ago

  • Status changed from Resolved to Closed

Merged to 1.0-stable

#16 Updated by Kris Lou almost 7 years ago

Line 866 in application_helper.rb now reads (v1.0.4):

def favicon
  "<link rel='shortcut icon' href='#{image_path('/favicon.ico')}' />" 
end

instead of (r3894)

def favicon
  "<link rel='shortcut icon' href='#{Redmine::Utils.relative_url_root}/favicon.ico' />" 
end

Shows favicon.ico if listed under public/images directory, but currently not showing in default theme? I don't know how this would affect themes.

Also available in: Atom PDF