Skip to content
Snippets Groups Projects
Commit b143ec59 authored by Jared Hancock's avatar Jared Hancock
Browse files

Merge pull request #800 from protich/feature/quick-print


Add hot print links to bypass the print dialog

Reviewed-By: default avatarJared Hancock <jared@osticket.com>
parents 455667cd e5b8617a
Branches
Tags
No related merge requests found
...@@ -1895,9 +1895,12 @@ class Ticket { ...@@ -1895,9 +1895,12 @@ class Ticket {
global $thisstaff; global $thisstaff;
require_once(INCLUDE_DIR.'class.pdf.php'); require_once(INCLUDE_DIR.'class.pdf.php');
if (!is_string($psize)) if (!is_string($psize)) {
if (!$thisstaff || !($psize = $thisstaff->getDefaultPaperSize())) if ($_SESSION['PAPER_SIZE'])
$psize = $_SESSION['PAPER_SIZE'];
elseif (!$thisstaff || !($psize = $thisstaff->getDefaultPaperSize()))
$psize = 'Letter'; $psize = 'Letter';
}
$pdf = new Ticket2PDF($this, $psize, $notes); $pdf = new Ticket2PDF($this, $psize, $notes);
$name='Ticket-'.$this->getNumber().'.pdf'; $name='Ticket-'.$this->getNumber().'.pdf';
......
...@@ -78,9 +78,18 @@ if($ticket->isOverdue()) ...@@ -78,9 +78,18 @@ if($ticket->isOverdue())
<?php <?php
}?> }?>
<span class="action-button" data-dropdown="#action-dropdown-print">
<a id="ticket-print" class="action-button" href="tickets.php?id=<?php echo $ticket->getId(); ?>&a=print"><i class="icon-print"></i> Print</a> <a id="ticket-print" href="tickets.php?id=<?php echo $ticket->getId(); ?>&a=print"><i class="icon-print"></i> Print</a>
<i class="icon-caret-down"></i>
</span>
<div id="action-dropdown-print" class="action-dropdown anchor-right">
<ul>
<li><a class="no-pjax" target="_blank" href="tickets.php?id=<?php echo $ticket->getId(); ?>&a=print&notes=0"><i
class="icon-file-alt"></i> Ticket Thread</a>
<li><a class="no-pjax" target="_blank" href="tickets.php?id=<?php echo $ticket->getId(); ?>&a=print&notes=1"><i
class="icon-file-text-alt"></i> Thread + Internal Notes</a>
</ul>
</div>
<div id="action-dropdown-more" class="action-dropdown anchor-right"> <div id="action-dropdown-more" class="action-dropdown anchor-right">
<ul> <ul>
<?php <?php
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment