[rt-users] Customizing the New ticket page on the RT Self service portal
Parish, Brent
bparish at cognex.com
Tue Mar 29 13:35:59 EDT 2016
There’s probably other ways, but this is what we do:
Per the recommended method of altering RT code, copy share/html/SelfService/CreateTicketInQueue.html to local/html/SelfService/CreateTicketInQueue.html (create the path first if it does not already exist, and be sure not to overwrite your customized CreateTicketInQueue.html if it is already in that local/… path!)
(see http://requesttracker.wikia.com/wiki/CustomizingWithLocalDir for details on customizing code in this way)
What changed the actual layout was the table style (qlist).
For this style to take effect, create a style sheet in local/static/css (e.g. local/static/css/norseman.css).
(see the official docs here https://docs.bestpractical.com/rt/4.4.0/customizing/styling_rt.html for details)
Tweak these to whatever looks good to you, this is our style sheet:
/*
*
* CUSTOM CSS STYLES FOR RT
*
*/
/* SELF SERVICE PAGE LAYOUTS */
/* THIN BORDERS GROUPING FORM ELEMENTS/SECTIONS TOGETHER */
td.tblbdr { border: solid #bbbbbb 1px; }
/* THE TEXT (INSTRUCTIONS) UNDERNEATH EACH FORM ELEMENT/INPUT */
td.helptext {
color: #444444;
font-style: italic;
}
/* LIST OF QUEUES TO CREATE A NEW TICKET IN, ON SelfService PAGE */
table.qlist { border-style: none; }
/* STYLE THE NAME OF THE QUEUE ON THIS "NEW TICKET IN ..." PAGE */
/* GENERIC (BOTH <TD> AND <A> TAGS) */
.qname {
color: blue;
font-weight: bold;
}
/* APPLIES TO THE <TD> TAG */
td.qname { padding: 7px; }
/* APPLIES TO THE <A> TAG */
td.qname a:visited { color: blue; }
/* FORCES TWO COLUMN (NEW TICKET) FORMS TO PUSH THE COLUMNS FURTHER APART */
td.empty {
width: 60px;
overflow: hidden;
display: inline-block;
white-space: nowrap;
}
/* FOR [Mandatory] CUSTOM FIELDS, CHANGE FORMATTING: */
.requiredfield {
color: #aa4444;
font-style: italic;
}
/* LEFT ALIGNED LABEL */
.labelleft {
.label
text-align: left;
}
Have RT load that file via something like this in your RT_SiteConfig.pm file:
Set( @CSSFiles, ('norseman.css') );
Here is how we modified the CreateTicketInQueue.html file.
Only the style references are necessary, the rest is added code that looks in local/html/SelfService for html files that match the names of your queues.
If it finds one (e.g. Helpdesk.html, or whatever), it will load that customized page display in lieu of the generic ‘new ticket’ page.
We did this because some of our queues required extra text (helpful instructions) and page layout.
# diff -u /opt/rt4/share/html/SelfService/CreateTicketInQueue.html CreateTicketInQueue.html
--- /opt/rt4/share/html/SelfService/CreateTicketInQueue.html 2015-06-19 22:44:32.956890832 -0400
+++ CreateTicketInQueue.html 2015-05-15 12:33:16.806628404 -0400
@@ -47,16 +47,21 @@
%# END BPS TAGGED BLOCK }}}
<& Elements/Header, Title => loc("Create a ticket") &>
-<h1><&|/l&>Select a queue for your new ticket</&></h1>
+<h1><&|/l&>Please select a queue (department) for your new ticket</&></h1>
-<dl>
+<table style='qlist'>
% while (my $queue = $queues->Next) {
% next unless $queue->CurrentUserHasRight('CreateTicket');
-<dt><a href="<%RT->Config->Get('WebPath')%>/SelfService/Create.html?Queue=<%$queue->id%>"><%$queue->Name%></a></dt>
-<dd><%$queue->Description%></dd>
+% my $QueueName = $queue->Name;
+% if (-e "/opt/rt4/local/html/SelfService/$QueueName.html") {
+<tr><td class="qname"><a class="qname" href="<%RT->Config->Get('WebPath')%>/SelfService/<%$queue->Name%>.html?Queue=<%$queue->id%>"><%$queue->Name%></a></td>
+% } else {
+<tr><td class="qname"><a class="qname" href="<%RT->Config->Get('WebPath')%>/SelfService/Create.html?Queue=<%$queue->id%>"><%$queue->Name%></a></td>
% }
-</dl>
+<td><%$queue->Description%></td>
+% }
+</table>
<%init>
my $queues = RT::Queues->new($session{'CurrentUser'});
$queues->UnLimit;
From: rt-users [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Robert Deptuch
Sent: Tuesday, March 29, 2016 12:18 PM
To: 'rt-users at lists.bestpractical.com' <rt-users at lists.bestpractical.com>
Subject: [rt-users] Customizing the New ticket page on the RT Self service portal
I am trying to figure out when logged into the RT self service portal, if I can modify the way the list of Queues shows up when creating a new ticket? By default the Queue name and description are cluttered together, and have the same font size/color making it a little less user friendly then I would like. I would like to either modify the spacing so its not so cluttered, change the font size or color for the Queue name so it stands out better, or both. If anyone know if this is even possible or not before I get to time invested into it, I would greatly appreciate your knowledge.
I am using RT 4.2.9 currently.
Thanks.
[http://media.norseman.ca/Email/Signatures/NG/NI.jpg]
Robert Deptuch
Technical Support Analyst
3815 Wanuskewin Road
Saskatoon, SK, S7P 1A4
T:(306) 385-2735 F:(306) 249-1889
C:(306) 291-4409 TF:(888) 457-2004
rdeptuch at norseman.ca<mailto:rdeptuch at norseman.ca> norseman.ca<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.norseman.ca&d=CwMGaQ&c=VCWpAYkS3z1bOCIxc-BPGZarCq9MRCAVxZJE051VqH8&r=luSRdPePk6fhFa3rH2PFBzWEtgcJguY0a__6vpfaX-I&m=ZegfcbvMkpEDOVyYt4DxUDreZcNIqvqnTSJeJUZP73g&s=-vy2fqJrGbiagYaykuLoVXPH_1N9eySBa9eTxfDIlMk&e=>
The information in this e-mail and any attachments are privileged and confidential and for the intended recipient(s) only. Any unauthorized use is strictly prohibited. If you have received this e-mail in error, or are not an intended recipient, please notify the sender and delete or destroy all copies immediately.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20160329/dbe0612e/attachment.htm>
More information about the rt-users
mailing list