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

Aaron Johnson, 2010-05-27 23:50

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