Jump to content

Customise View tickets list date formate - to DD/MM/YY


Protagonist

Recommended Posts

Hi, I find the dates used in the view ticket list in supportticketslist.tpl and clientareahome.tpl overly long, and would like to shorten the year from YYYY format to YY, so e.g. it's just 14 rather than 2014.

 

The templates use {$ticket.date} to get the ticket date, but I have no idea how to display the date in DD/MM/YY format instead of DD/MM/YYYY

 

Any ideas?

 

Thanks very much.

Link to comment
Share on other sites

assuming you're using d/m/y and not m/d/y, the quickest way might be to edit the templates and change {$ticket.date} to...

 

{$ticket.date|replace:'/20':'/'}

that should remove '20' from the year, but not affect any other part of the date...

 

there are cleverer ways to do it, but they might be overkill for your needs.

Link to comment
Share on other sites

Great, will try that thanks. Yes using d/m/y

Where is ticket.date defined?

 

View tickets is proving a pain. Think I'm going to modify it to fixed width as the default theme is broken.

e.g. the ascending/descending icon shows over the heading - had to add a right margin to fix that, and the view ticket button gets double thickness - really fat, in several cases. The subject text doesn't wrap nicely or truncate. Already applied text overflow and ellipsis to that so is a single line and very long subject titles don't break the formatting.

 

Any advice on fixing view tickets is welcome, perhaps should start a separate topic.

 

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated