Customize Header - add worldclocks

Moderator: crythias

PhyrePhoX
OTRS expert
Posts: 82
Joined: 05 Dec 2007, 10:56

Customize Header - add worldclocks

Postby PhyrePhoX » 05 Apr 2018, 13:41

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!

lido
OTRS expert
Posts: 70
Joined: 25 Oct 2017, 16:21
OTRS Version?: 6.0.5

Re: Customize Header - add worldclocks

Postby lido » 05 Apr 2018, 17:22

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
OTRS expert
Posts: 82
Joined: 05 Dec 2007, 10:56

Re: Customize Header - add worldclocks

Postby PhyrePhoX » 07 Apr 2018, 20:06

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.

zzz
OTRS wizard
Posts: 176
Joined: 15 Dec 2016, 15:13
OTRS Version?: 3.x - 6.0.x
Real Name: Emin Yazi
Company: maxence business consulting GmbH
Contact:

Re: Customize Header - add worldclocks

Postby zzz » 09 Apr 2018, 09:39

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


Return to “Help”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 14 guests