Howto add a logo to your Redmine banner » History » Version 39
Carlos Villegas , 2018-04-12 22:29
1 | 6 | Mischa The Evil | h1. HowTo add a logo to your Redmine banner |
---|---|---|---|
2 | |||
3 | 35 | Mischa The Evil | You can very easily add a logo to your Redmine banner by modifying your base.html.erb file. |
4 | 6 | Mischa The Evil | Big thanks to "Chris Miller":/users/758 for showing me how to accomplish this :) |
5 | |||
6 | Note: This has been tested using the Squeejee Theme and the Classic Theme. |
||
7 | 9 | Vojtěch Horký | Note2: if you used apache2 passenger module to install redmine,the location of redmine should be @/usr/share/redmine@ instead of @/opt/redmine@ |
8 | 1 | Aaron Johnson | |
9 | 35 | Mischa The Evil | h2. Edit your @base.html.erb@ file |
10 | 6 | Mischa The Evil | |
11 | 37 | Toshi MARUYAMA | Example: |
12 | <pre> |
||
13 | # nano /opt/redmine/app/views/layouts/base.html.erb |
||
14 | </pre> |
||
15 | 1 | Aaron Johnson | |
16 | 37 | Toshi MARUYAMA | Find this line: |
17 | <pre><code class="erb"> |
||
18 | <h1><%= page_header_title %></h1> |
||
19 | </code></pre> |
||
20 | 10 | Peter Englmaier | |
21 | 37 | Toshi MARUYAMA | Add this line directly above: |
22 | <pre><code class="erb"> |
||
23 | 39 | Carlos Villegas | <img src="<%= Redmine::Utils.relative_url_root %>/images/logoscts.png" style="margin-top: 15px; margin-left: 15px;"/></code></pre> |
24 | 10 | Peter Englmaier | |
25 | 6 | Mischa The Evil | The ruby statement @<%= Redmine::Utils.relative_url_root %>@ will produce the relative URI for your redmine installation. |
26 | 36 | user 42 | |
27 | 1 | Aaron Johnson | |
28 | 37 | Toshi MARUYAMA | Now it should look like this: |
29 | <pre><code class="erb"> |
||
30 | 1 | Aaron Johnson | </div> |
31 | |||
32 | 39 | Carlos Villegas | <img src="<%= Redmine::Utils.relative_url_root %>/images/logoscts.png" style="margin-top: 15px; margin-left: 15px;"/> |
33 | 1 | Aaron Johnson | <h1><%= page_header_title %></h1> |
34 | |||
35 | 37 | Toshi MARUYAMA | <% if display_main_menu?(@project) %> |
36 | </code></pre> |
||
37 | 6 | Mischa The Evil | |
38 | 35 | Mischa The Evil | h2. Upload your logo |
39 | 1 | Aaron Johnson | |
40 | 37 | Toshi MARUYAMA | Example using the scp command: |
41 | <pre> |
||
42 | # scp logo.png root@example.com:/opt/redmine/public/images |
||
43 | </pre> |
||
44 | 1 | Aaron Johnson | |
45 | 37 | Toshi MARUYAMA | You probably should chown the uploaded logo: |
46 | <pre> |
||
47 | 39 | Carlos Villegas | # chown redmine:redmine /opt/redmine/public/images/logoscts.png |
48 | 37 | Toshi MARUYAMA | </pre> |
49 | 6 | Mischa The Evil | |
50 | h2. Restart your web server |
||
51 | |||
52 | 37 | Toshi MARUYAMA | Examples: |
53 | <pre> |
||
54 | # /etc/init.d/apache2 restart |
||
55 | # /etc/init.d/httpd restart |
||
56 | # /etc/init.d/nginx restart |
||
57 | </pre> |