Customize Header - add worldclocks

Moderator: crythias

Post Reply
PhyrePhoX
Znuny advanced
Posts: 132
Joined: 05 Dec 2007, 10:56
Znuny Version: 5.0.24 (with ITSM Mo

Customize Header - add worldclocks

Post by PhyrePhoX »

Hi,
i would like to customize the OTRS Header and add for example some clocks (utc, US, Germany, etc), so my agents dont have to do time conversions in their heads. Do you guys think this can be realized easily or does it afford a lot of customizations?
(i know i can add stuff to the dashboard, but i want it to be visible everywhere - the OTRS header consists of a lot of unused space...)
Thanks in advance!
OTRS 5.0.24 (with ITSM Modules) and Znuny 6.4.4 in staging
lido
Znuny newbie
Posts: 70
Joined: 25 Oct 2017, 16:21
Znuny Version: 6.0.5

Re: Customize Header - add worldclocks

Post by lido »

Hi,

You should create a theme and then copy the header template file to your theme folder and edit it. I'm guessing it's either Header.tt or HeaderSmall.tt.

For the clocks themselves, you could potentially build some sort of otrs module for that to calculate them, but I'd personally just throw some javascript code in there. Something like this or this or this.
PhyrePhoX
Znuny advanced
Posts: 132
Joined: 05 Dec 2007, 10:56
Znuny Version: 5.0.24 (with ITSM Mo

Re: Customize Header - add worldclocks

Post by PhyrePhoX »

Thanks!
I took your advice and just implemented an iframe, so now it looks like
header
I added the code to header.tt here:
src

the only thing i'm worried about is safety (not sure if i can trust this iframe thingy), what do you think?
You do not have the required permissions to view the files attached to this post.
OTRS 5.0.24 (with ITSM Modules) and Znuny 6.4.4 in staging
zzz
Znuny superhero
Posts: 888
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: Customize Header - add worldclocks

Post by zzz »

Hello,

including iframes from an unkown source is definitely a possible security threat.

This feature can be replaced with some self-written JavaScript using the Moment.js library.

Moment.js is already included in the OTRS source code but only gets loaded by the dashboard module, so you'd have to load it for all modules.

It's up to you which way you choose.

Best regards
Emin
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
Post Reply