Howto add a logo to your Redmine banner » History » Revision 35
« Previous |
Revision 35/39
(diff)
| Next »
Mischa The Evil, 2013-10-26 02:18
Fixed file extensions (rhtml -> html.erb) & replaced textual bold headings to real h2's.
HowTo add a logo to your Redmine banner¶
You can very easily add a logo to your Redmine banner by modifying your base.html.erb file.
Big thanks to Chris Miller for showing me how to accomplish this :)
Note: This has been tested using the Squeejee Theme and the Classic Theme.
Note2: if you used apache2 passenger module to install redmine,the location of redmine should be /usr/share/redmine
instead of /opt/redmine
Edit your base.html.erb
file¶
Example:
nano /opt/redmine/app/views/layouts/base.html.erb
Find this line:
<h1><%= page_header_title %></h1>
And change it to:
<!--<h1><%= page_header_title %></h1>-->
Add this line directly below:
<img src="<%= Redmine::Utils.relative_url_root %>/images/logo.png" style="top-margin: 15px; left-margin: 15px;"/>
The ruby statement <%= Redmine::Utils.relative_url_root %>
will produce the relative URI for your redmine installation.
Now it should look like this:
</div> <!--<h1><%= page_header_title %></h1>--> <img src="<%= Redmine::Utils.relative_url_root %>/images/logo.png" style="top-margin: 15px; left-margin: 15px;"/> <% if display_main_menu?(@project) %>
Upload your logo¶
Example using the scp command:
scp logo.png root@example.com:/opt/redmine/public/images
You probably should chown the uploaded logo:
chown redmine:redmine /opt/redmine/public/images/logo.png
Restart your web server¶
Examples:
/etc/init.d/apache2 restart
/etc/init.d/httpd restart
/etc/init.d/nginx restart
Updated by Mischa The Evil about 11 years ago · 35 revisions