Skip to content
Snippets Groups Projects
Commit d733bb6b authored by Peter Rotich's avatar Peter Rotich
Browse files

Add PDF export - print

parent 33c1936f
No related branches found
No related tags found
No related merge requests found
......@@ -1550,6 +1550,11 @@ class Ticket{
return $id;
}
//Print ticket... export the ticket thread as PDF.
function exportPDF() {
return false;
}
//online based attached files.
function uploadAttachments($files, $refid, $type) {
......
......@@ -40,7 +40,7 @@ if($ticket->isOverdue())
<a href="tickets.php?id=<?php echo $ticket->getId(); ?>" title="Reload" class="reload">Reload</a></h2>
</td>
<td width="50%" class="right_align">
<a href="#" title="Print Ticket" class="print">Print Ticket</a>
<a href="tickets.php?id=<?php echo $ticket->getId(); ?>&a=print" title="Print Ticket" class="print">Print Ticket</a>
<a href="tickets.php?id=<?php echo $ticket->getId(); ?>&a=edit" title="Edit Ticket" class="edit">Edit Ticket</a>
</td>
</tr>
......
......@@ -464,6 +464,8 @@ if($ticket) {
$inc = 'ticket-view.inc.php';
if($_REQUEST['a']=='edit' && $thisstaff->canEditTickets())
$inc = 'ticket-edit.inc.php';
elseif($_REQUEST['a'] == 'print' && !$ticket->exportPDF())
$errors['err'] = 'Internal error: Unable to export the ticket to PDF.';
} else {
$inc = 'tickets.inc.php';
if($_REQUEST['a']=='open' && $thisstaff->canCreateTickets())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment