Change Priority Colours via css in OTRS5

Florian Edlhuber, 15. Nov 2016 | AdministrationMiscellaneous

Sometimes it could be useful to change priority colours. Changing the framework files is not recommended, but changes can be added in additional .css files. For this you have to find the .css file where the colours are defined: The .css are stored in $OTRSHOME/var/httpd/htdocs/skins/Agent/default/css/

Searching the code you’ll find that it is stored in Core.Default.css

otrs@server:/opt/otrs/var/httpd/htdocs/skins/Agent/default/css$ fgrep Prio ./*
./Core.Default.css:.Flag span.PriorityID-1 {
./Core.Default.css:.Flag span.PriorityID-2 {
./Core.Default.css:.Flag span.PriorityID-3 {
./Core.Default.css:.Flag span.PriorityID-4 {
./Core.Default.css:.Flag span.PriorityID-5 {

We are going to create our own .css file. In this example it is created in

./thirdparty/ZZZCustom/ZZZCustomPriority.css

the content of the file needs to be .css style (in this example green -> orange -> yellow -> light red -> red)

.Flag span.PriorityID-1 {
    background-color:##01DF01;
}
.Flag span.PriorityID-2 {
    background-color:#2EFEC8;
}
.Flag span.PriorityID-3 {
    background-color:##D7DF01;
}
.Flag span.PriorityID-4 {
    background-color:#FF8000;
}
.Flag span.PriorityID-5 {
    background-color:#FF0000;

 

The next step is to configure the new .css in sysconfig. Browse to Framework -> Core::Web and search for

Loader::Agent::CommonCSS###000-Framework and add the new css with the correct path.

 

Delete the loader cache

otrs@server:/opt/otrs$ /opt/otrs/bin/otrs.Console.pl Maint::Loader::CacheCleanup

and the new colours are available.

 

 

Your email address will not be published. Required fields are marked *

This site uses cookies. By continuing to use the site, you agree to the use of cookies. More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close