- Redmine Cookbook
- Aleksandar Pavi?
- 347字
- 2021-07-16 09:44:48
Editing Redmine's views manually
In its essence, Redmine is a Ruby on Rails web application, and it's open source. This means that you can edit its code, distribute it, or do anything else, as long as it complies with GNU General Public License v2 (GPL). So, for this recipe, we are going to add a company logo to the top left just below the top navigation row that contains Home and other links.
Getting ready
Make sure that you have access to the files and folders of your working Redmine installation.
How to do it…
Adding a company logo can be done in two ways. One is to customize the CSS theme and the other is to edit the base template manually. To edit the base template and add a logo or some other content, which will be visible on all pages, open /app/views/layouts/base.html.erb
in your favorite code editor and find a line that looks like this:
<h1><%= page_header_title %></h1>
Replace it with the following content:
<!--<h1><%= page_header_title %></h1>--> <img src="<%= Redmine::Utils.relative_url_root %>/images/logo.png" style="top-margin: 15px; left-margin: 15px;"/>
Save the file, upload your logo to /public/images
, and name it logo.png
. Restart Redmine, and you should see the logo on Redmine:

The alternative method would be to edit /public/stylesheets/application.css
. Fi find a line that looks like #header {min-height:5.3em;margin:0;background-color:#628DB6;color:#f8f8f8; padding: 4px 8px 20px 6px; position:relative;}
, and add your logo as a background image.
How it works…
As Redmine is a web application, it produces HTML code as the end result of its execution. In this recipe, we edited Redmine's source files that are used to render HTML content.
There's more…
You can also customize Redmine's terminology by editing the language files that are located in /config/locales/
. So, for example, it's possible to use some different term, such as card instead of issue. Simply edit the en.yml
file and replace all occurrences of issue that you don't like. The same goes for various kinds of alerts or messages from the system.
See also
Ruby on Rails tutorials, and the Redmine Developer Guide can be found at http://www.redmine.org/projects/redmine/wiki/Developer_Guide.
Additional customizations can be achieved through following plugin:
- JBoss Weld CDI for Java Platform
- Mastering Visual Studio 2017
- 零基礎(chǔ)搭建量化投資系統(tǒng):以Python為工具
- Java 9 Concurrency Cookbook(Second Edition)
- Java加密與解密的藝術(shù)(第2版)
- 三維圖形化C++趣味編程
- Java程序設(shè)計(jì)與計(jì)算思維
- 名師講壇:Java微服務(wù)架構(gòu)實(shí)戰(zhàn)(SpringBoot+SpringCloud+Docker+RabbitMQ)
- Hands-On Functional Programming with TypeScript
- ScratchJr趣味編程動(dòng)手玩:讓孩子用編程講故事
- BeagleBone Robotic Projects(Second Edition)
- 零基礎(chǔ)學(xué)HTML+CSS第2版
- Selenium WebDriver Practical Guide
- Learning Rust
- Visual C++網(wǎng)絡(luò)編程教程(Visual Studio 2010平臺(tái))