- Edited
Based on the fine work of (xrat)
Result report:
FIRST STEP
To add this, first create a file print.css with the following content:
/* print.css for osTicket by Andreas Schamanek v0.02 (c) public domain */
body { color: black; background-color: white;
font-family: arial, helvetica, sans-serif;
}/**** elements to hide ****/
#header,
#nav,
table.ticketoptions,
#content div + table, /* SCP tabber after ticketthread */
.Icon, /* all icons */
input.button, /* all buttons */
img, /* all images */
input, /* all input fields, checkboxes, etc. */
#reply /* client reply */
{ display: none; }
#basic, #advance /* SCP search/query */
{ display: none !important; }
/* If we exclude .Icon we need to make some visible, though */
a.otherTicket, a.phoneTicket, a.emailTicket, a.webTicket,
a.assignedTicket, a.lockedTicket, a.overdueTicket { display: inline; }
/**** Margins + Padding ****/
/* osTicket unfortunately uses tables for the layout */
td { padding: 0.2em; }
#ticketnotes, #ticketthread { margin: 1em 0; }
#ticketnotes { margin-bottom: 2em; }
#ticketnotes table,
#ticketthread table { margin-top: 1em; }
/**** Ticket number + Subject ****/
td.msg, div.msg { font-size: 1.4em; padding: 0.3em; }
/**** Borders ****/
table.ticketinfo,
table.infotable,
#ticketnotes,
#ticketthread { padding: 0.4em; border: 1px solid gray; }
#ticketnotes table,
#ticketthread table { padding-top: 1em; border-top: 1px solid black; }
#ticketnotes table-child,
#ticketthread table-child { padding-top: 0; border-top: 0; }
/**** Miscellaneous ****/
a { color: navy; text-decoration: underline; }
th { text-align: left; }
/**** Ticket lists ****/
/* Borders in ticket lists */
#content div > table table td
{ padding: 0.2em; border-bottom: 1px solid gray; padding-top: 0.4em; }
#content div > table table th
{ padding: 0.3em; border-bottom: 2px solid black;
border-top: 1px solid black; padding-top: 0.5em;
}#content div > table table a { color: black; text-decoration: none; }
Copy the print.css to following paths:
osTicketRootFolder/scp/css
osTicketRootFolder/styles
SECOND STEP
make the following modifications:
File: include/clientheader.inc.php.
FIND
<link rel="stylesheet" href="./styles/main.css" media="screen">
<link rel="stylesheet" href="./styles/colors.css" media="screen">
ADD
<link rel="stylesheet" href="./styles/print.css" media="print">
File: include/staffheader.inc.php.
FIND
<link rel="stylesheet" href="css/main.css" media="screen">
<link rel="stylesheet" href="css/style.css" media="screen">
ADD
<link rel="stylesheet" href="css/print.css" media="print">
THIRD STEP
File: scp/cssmain.css
FIND:
#nav a.closedTickets { background(../images/icons/closed_tickets.gif) 0 5px no-repeat #ececec; }
#nav a.newTicket { background(../images/icons/new_ticket.gif) 0 5px no-repeat #ececec; }
ADD:
/** START MOD08 print button **/
#nav a.printTicket { background(../images/icons/print_ticket.gif) 0 5px no-repeat #ececec; }
/** END MOD08 print button **/
File: scptickets.php
FIND:
$nav->addSubMenu(array('desc'=>'New Ticket','href'=>'tickets.php?a=open','iconclass'=>'newTicket'));
ADD:
// START MOD08 add print button to staff page
$nav->addSubMenu(array('desc'=>'Print Ticket','href'=>'javascript.print()','iconclass'=>'printTicket'));
// END MOD08 add print button to staff page
FOURTH STEP
Save the attached image to scp\images\icons with the name print_ticket.gif