Howto add a logo to your Redmine banner » History » Version 6

Mischa The Evil, 2010-11-23 10:54
Rollback to version 6 to squash some spam.

1 6 Mischa The Evil
h1. HowTo add a logo to your Redmine banner
2 6 Mischa The Evil
3 6 Mischa The Evil
You can very easily add a logo to your Redmine banner by modifying your base.rhtml file.
4 6 Mischa The Evil
Big thanks to "Chris Miller":/users/758 for showing me how to accomplish this :)
5 6 Mischa The Evil
6 6 Mischa The Evil
Note: This has been tested using the Squeejee Theme and the Classic Theme.
7 6 Mischa The Evil
8 6 Mischa The Evil
*Edit your base.rhtml file*
9 6 Mischa The Evil
10 6 Mischa The Evil
Example:<pre>
11 6 Mischa The Evil
nano /opt/redmine/app/views/layouts/base.rhtml</pre>
12 6 Mischa The Evil
13 6 Mischa The Evil
Find this line:<pre>
14 6 Mischa The Evil
    <h1><%= page_header_title %></h1></pre>
15 6 Mischa The Evil
16 6 Mischa The Evil
And change it to:<pre>
17 6 Mischa The Evil
     <!--<h1><%= page_header_title %></h1>--></pre>
18 6 Mischa The Evil
19 6 Mischa The Evil
Add this line directly below:<pre>
20 6 Mischa The Evil
     <img src="/images/logo.png" style="top-margin: 15px; left-margin: 15px;"/></pre>
21 6 Mischa The Evil
22 6 Mischa The Evil
Now it should look like this:<pre>
23 6 Mischa The Evil
    </div>
24 6 Mischa The Evil
25 6 Mischa The Evil
     <!--<h1><%= page_header_title %></h1>-->
26 6 Mischa The Evil
     <img src="/images/logo.png" style="top-margin: 15px; left-margin: 15px;"/>
27 6 Mischa The Evil
28 6 Mischa The Evil
    <% if display_main_menu?(@project) %></pre>
29 6 Mischa The Evil
30 6 Mischa The Evil
*Upload your logo*
31 6 Mischa The Evil
32 6 Mischa The Evil
Example using the scp command:<pre>
33 6 Mischa The Evil
scp logo.png root@example.com:/opt/redmine/public/images</pre>
34 6 Mischa The Evil
35 6 Mischa The Evil
You probably should chown the uploaded logo:<pre>
36 6 Mischa The Evil
chown redmine:redmine /opt/redmine/public/images/logo.png</pre>
37 6 Mischa The Evil
38 6 Mischa The Evil
*Restart your web server*
39 6 Mischa The Evil
40 6 Mischa The Evil
Examples:<pre>/etc/init.d/apache2 restart</pre><pre>/etc/init.d/httpd restart</pre><pre>/etc/init.d/nginx restart</pre>