Starting to work on some more responsive layout for ticket.php
This commit is contained in:
parent
e6d1d715da
commit
c295f081c5
357
ticket.php
357
ticket.php
@ -207,200 +207,199 @@ require_once(HESK_PATH . 'inc/header.inc.php');
|
|||||||
<li class="active"><?php hesk_showTopBar($hesklang['cid'].': '.$trackingID); ?></li>
|
<li class="active"><?php hesk_showTopBar($hesklang['cid'].': '.$trackingID); ?></li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<div class="enclosingDashboard">
|
<div class="row">
|
||||||
<div class="row">
|
<div align="left" class="col-md-4">
|
||||||
<div align="left" class="col-md-4">
|
<div class="panel panel-default">
|
||||||
<div class="moreToLeft">
|
<div class="panel-heading"><?php echo $hesklang['quick_help']; ?></div>
|
||||||
<ul class="nav nav-tabs">
|
<div class="panel-body">
|
||||||
<li class="active"><a href="#" onclick="return false;"><?php echo $hesklang['quick_help']; ?></a></li>
|
<div class="row">
|
||||||
</ul>
|
<div class="col-md-6 col-xs-12">
|
||||||
<div class="summaryList">
|
<label class="control-label" style="margin-top:8px;"><?php echo $hesklang['changeLanguage']; ?></label>
|
||||||
<div class="viewTicketSidebar">
|
</div>
|
||||||
<div class="row">
|
<div class="col-md-6 col-xs-12">
|
||||||
<div class="col-md-6 col-xs-12">
|
<?php echo hesk_getLanguagesAsFormIfNecessary(); ?>
|
||||||
<label class="control-label" style="margin-top:8px;"><?php echo $hesklang['changeLanguage']; ?></label>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="col-md-6 col-xs-12">
|
|
||||||
<?php echo hesk_getLanguagesAsFormIfNecessary(); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p><?php echo $hesklang['quick_help_ticket']; ?></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-7">
|
|
||||||
<?php
|
|
||||||
/* This will handle error, success and notice messages */
|
|
||||||
hesk_handle_messages();
|
|
||||||
|
|
||||||
/*
|
|
||||||
* If the ticket has been reopened by customer:
|
|
||||||
* - show the "Add a reply" form on top
|
|
||||||
* - and ask them why the form has been reopened
|
|
||||||
*/
|
|
||||||
if (isset($_SESSION['force_form_top']))
|
|
||||||
{
|
|
||||||
hesk_printCustomerReplyForm(1);
|
|
||||||
echo ' <p> </p> ';
|
|
||||||
|
|
||||||
unset($_SESSION['force_form_top']);
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<h3 align="left"><?php echo $hesklang['view_ticket']; ?>: <?php
|
|
||||||
if ($hesk_settings['sequential'])
|
|
||||||
{
|
|
||||||
echo $trackingID.' ('.$hesklang['seqid'].': '.$ticket['id'].')';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo $trackingID;
|
|
||||||
}
|
|
||||||
?></h3>
|
|
||||||
<div class="footerWithBorder"></div>
|
|
||||||
<div class="blankSpace"></div>
|
|
||||||
<table class="table table-bordered">
|
|
||||||
<tr>
|
|
||||||
<td colspan="20" style="border-bottom: 0px;">
|
|
||||||
<h2><?php echo $ticket['subject']; ?></h2>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="10" style="border-width: 0px">
|
|
||||||
<p><?php echo $hesklang['created_on']; ?>: <?php echo hesk_date($ticket['dt'], true); ?> <?php echo $hesklang['last_update']; ?>: <?php echo hesk_date($ticket['lastchange'], true); ?></p>
|
|
||||||
</td>
|
|
||||||
<td colspan="10" style="border-width: 0px; text-align: right;">
|
|
||||||
<p><?php $random=rand(10000,99999);
|
|
||||||
if ($ticket['isClosed'] == true && $ticket['locked'] != 1 && $hesk_settings['custopen']) {echo '<a href="change_status.php?track='.$trackingID.$hesk_settings['e_query'].'&s=2&Refresh='.$random.'&token='.hesk_token_echo(0).'" title="'.$hesklang['open_action'].'">'.$hesklang['open_action'].'</a>';}
|
|
||||||
else {echo '<a href="change_status.php?track='.$trackingID.$hesk_settings['e_query'].'&s=3&Refresh='.$random.'&token='.hesk_token_echo(0).'" title="'.$hesklang['close_action'].'">'.$hesklang['close_action'].'</a>';} ?></p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="medLowPriority">
|
|
||||||
|
|
||||||
<?php //This entire conditional is all just for priority
|
|
||||||
if ($hesk_settings['cust_urgency'])
|
|
||||||
{
|
|
||||||
$hesk_settings['ticketColumnWidth'] = 4;
|
|
||||||
|
|
||||||
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'" ';
|
|
||||||
if ($ticket['priority'] == 0) {echo 'class="criticalPriority">';}
|
|
||||||
elseif ($ticket['priority'] == 1) {echo 'class="highPriority">';}
|
|
||||||
else {echo 'class="medLowPriority">';}
|
|
||||||
|
|
||||||
echo '<p class="ticketPropertyTitle">'.$hesklang['priority'].'</p>';
|
|
||||||
|
|
||||||
if ($ticket['priority']==0) {echo '<p class="ticketPropertyText">'.$hesklang['critical'].'</p>';}
|
|
||||||
elseif ($ticket['priority']==1) {echo '<p class="ticketPropertyText">'.$hesklang['high'].'</p>';}
|
|
||||||
elseif ($ticket['priority']==2) {echo '<p class="ticketPropertyText">'.$hesklang['medium'].'</p>';}
|
|
||||||
else {echo '<p class="ticketPropertyText">'.$hesklang['low'].'</p>';}
|
|
||||||
echo '</td>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$hesk_settings['ticketColumnWidth'] = 5;
|
|
||||||
}
|
|
||||||
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['status'].'</p>';
|
|
||||||
$ticketStatusKey = $ticket['statusKey'];
|
|
||||||
echo '<p class="ticketPropertyText">'.$hesklang[$ticketStatusKey].'</p>';
|
|
||||||
echo '</td>';
|
|
||||||
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['last_replier'].'</p>
|
|
||||||
<p class="ticketPropertyText">'.$ticket['repliername'].'</p></td>';
|
|
||||||
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['category'].'</p>
|
|
||||||
<p class="ticketPropertyText">'.$category['name'].'</p></td>';
|
|
||||||
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['replies'].'</p>
|
|
||||||
<p class="ticketPropertyText">'.$replies.'</p></td>';
|
|
||||||
?>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<!-- REPLIES -->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if ($hesk_settings['new_top'])
|
|
||||||
{
|
|
||||||
$i = hesk_printCustomerTicketReplies() ? 0 : 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$i = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Make sure original message is in correct color if newest are on top */
|
|
||||||
$color = 'class="ticketMessageContainer"';
|
|
||||||
?>
|
|
||||||
<div class="row ticketMessageContainer">
|
|
||||||
<div class="col-md-3 col-xs-12">
|
|
||||||
<div class="ticketName"><?php echo $ticket['name']; ?></div>
|
|
||||||
<div class="ticketEmail"><?php echo $ticket['email']; ?></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9 col-xs-12 pushMarginLeft">
|
<p><?php echo $hesklang['quick_help_ticket']; ?></p>
|
||||||
<div class="ticketMessageTop withBorder">
|
</div>
|
||||||
<!-- Date and Action buttons -->
|
</div>
|
||||||
<p><?php echo $hesklang['date']; ?>: <?php echo hesk_date($ticket['dt'], true); ?><span style="float: right"><?php echo hesk_getCustomerButtons($i); ?></span></p>
|
</div>
|
||||||
<!-- Custom Fields Before Message -->
|
<div class="col-md-8">
|
||||||
<?php
|
<?php
|
||||||
foreach ($hesk_settings['custom_fields'] as $k=>$v)
|
/* This will handle error, success and notice messages */
|
||||||
{
|
hesk_handle_messages();
|
||||||
if ($v['use'] && $v['place']==0)
|
|
||||||
{
|
/*
|
||||||
echo '
|
* If the ticket has been reopened by customer:
|
||||||
<p>'.$v['name'].': '.$ticket[$k].'</p>';
|
* - show the "Add a reply" form on top
|
||||||
}
|
* - and ask them why the form has been reopened
|
||||||
}
|
*/
|
||||||
?>
|
if (isset($_SESSION['force_form_top']))
|
||||||
</div>
|
{
|
||||||
<div class="ticketMessageBottom">
|
hesk_printCustomerReplyForm(1);
|
||||||
<!-- Message -->
|
echo ' <p> </p> ';
|
||||||
<p><b><?php echo $hesklang['message']; ?>:</b></p>
|
|
||||||
<p class="message"><?php echo $ticket['message']; ?><br /> </p>
|
unset($_SESSION['force_form_top']);
|
||||||
</div>
|
}
|
||||||
<div class="ticketMessageTop">
|
?>
|
||||||
<!-- Custom Fields after Message -->
|
<h3 align="left"><?php echo $hesklang['view_ticket']; ?>: <?php
|
||||||
<?php
|
if ($hesk_settings['sequential'])
|
||||||
|
{
|
||||||
|
echo $trackingID.' ('.$hesklang['seqid'].': '.$ticket['id'].')';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo $trackingID;
|
||||||
|
}
|
||||||
|
?></h3>
|
||||||
|
<div class="footerWithBorder"></div>
|
||||||
|
<div class="blankSpace"></div>
|
||||||
|
<div class="table-bordered">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<h2><?php echo $ticket['subject']; ?></h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 col-sm-12">
|
||||||
|
<p><?php echo $hesklang['created_on']; ?>: <?php echo hesk_date($ticket['dt'], true); ?> <?php echo $hesklang['last_update']; ?>: <?php echo hesk_date($ticket['lastchange'], true); ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2 col-md-offset-4 col-sm-12" style="text-align: right">
|
||||||
|
<p><?php $random=rand(10000,99999);
|
||||||
|
if ($ticket['isClosed'] == true && $ticket['locked'] != 1 && $hesk_settings['custopen']) {echo '<a href="change_status.php?track='.$trackingID.$hesk_settings['e_query'].'&s=2&Refresh='.$random.'&token='.hesk_token_echo(0).'" title="'.$hesklang['open_action'].'">'.$hesklang['open_action'].'</a>';}
|
||||||
|
else {echo '<a href="change_status.php?track='.$trackingID.$hesk_settings['e_query'].'&s=3&Refresh='.$random.'&token='.hesk_token_echo(0).'" title="'.$hesklang['close_action'].'">'.$hesklang['close_action'].'</a>';} ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="medLowPriority">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<tr class="medLowPriority">
|
||||||
|
|
||||||
|
<?php //This entire conditional is all just for priority
|
||||||
|
if ($hesk_settings['cust_urgency'])
|
||||||
|
{
|
||||||
|
$hesk_settings['ticketColumnWidth'] = 4;
|
||||||
|
|
||||||
|
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'" ';
|
||||||
|
if ($ticket['priority'] == 0) {echo 'class="criticalPriority">';}
|
||||||
|
elseif ($ticket['priority'] == 1) {echo 'class="highPriority">';}
|
||||||
|
else {echo 'class="medLowPriority">';}
|
||||||
|
|
||||||
|
echo '<p class="ticketPropertyTitle">'.$hesklang['priority'].'</p>';
|
||||||
|
|
||||||
|
if ($ticket['priority']==0) {echo '<p class="ticketPropertyText">'.$hesklang['critical'].'</p>';}
|
||||||
|
elseif ($ticket['priority']==1) {echo '<p class="ticketPropertyText">'.$hesklang['high'].'</p>';}
|
||||||
|
elseif ($ticket['priority']==2) {echo '<p class="ticketPropertyText">'.$hesklang['medium'].'</p>';}
|
||||||
|
else {echo '<p class="ticketPropertyText">'.$hesklang['low'].'</p>';}
|
||||||
|
echo '</td>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$hesk_settings['ticketColumnWidth'] = 5;
|
||||||
|
}
|
||||||
|
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['status'].'</p>';
|
||||||
|
$ticketStatusKey = $ticket['statusKey'];
|
||||||
|
echo '<p class="ticketPropertyText">'.$hesklang[$ticketStatusKey].'</p>';
|
||||||
|
echo '</td>';
|
||||||
|
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['last_replier'].'</p>
|
||||||
|
<p class="ticketPropertyText">'.$ticket['repliername'].'</p></td>';
|
||||||
|
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['category'].'</p>
|
||||||
|
<p class="ticketPropertyText">'.$category['name'].'</p></td>';
|
||||||
|
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['replies'].'</p>
|
||||||
|
<p class="ticketPropertyText">'.$replies.'</p></td>';
|
||||||
|
?>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<!-- REPLIES -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($hesk_settings['new_top'])
|
||||||
|
{
|
||||||
|
$i = hesk_printCustomerTicketReplies() ? 0 : 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$i = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make sure original message is in correct color if newest are on top */
|
||||||
|
$color = 'class="ticketMessageContainer"';
|
||||||
|
?>
|
||||||
|
<div class="row ticketMessageContainer">
|
||||||
|
<div class="col-md-3 col-xs-12">
|
||||||
|
<div class="ticketName"><?php echo $ticket['name']; ?></div>
|
||||||
|
<div class="ticketEmail"><?php echo $ticket['email']; ?></div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-9 col-xs-12 pushMarginLeft">
|
||||||
|
<div class="ticketMessageTop withBorder">
|
||||||
|
<!-- Date and Action buttons -->
|
||||||
|
<p><?php echo $hesklang['date']; ?>: <?php echo hesk_date($ticket['dt'], true); ?><span style="float: right"><?php echo hesk_getCustomerButtons($i); ?></span></p>
|
||||||
|
<!-- Custom Fields Before Message -->
|
||||||
|
<?php
|
||||||
foreach ($hesk_settings['custom_fields'] as $k=>$v)
|
foreach ($hesk_settings['custom_fields'] as $k=>$v)
|
||||||
{
|
{
|
||||||
if ($v['use'] && $v['place'])
|
if ($v['use'] && $v['place']==0)
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<p>'.$v['name'].': '.$ticket[$k].'</p>';
|
<p>'.$v['name'].': '.$ticket[$k].'</p>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Attachments */
|
|
||||||
hesk_listAttachments($ticket['attachments'], $i);
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="ticketMessageBottom">
|
||||||
|
<!-- Message -->
|
||||||
|
<p><b><?php echo $hesklang['message']; ?>:</b></p>
|
||||||
|
<p class="message"><?php echo $ticket['message']; ?><br /> </p>
|
||||||
|
</div>
|
||||||
|
<div class="ticketMessageTop">
|
||||||
|
<!-- Custom Fields after Message -->
|
||||||
|
<?php
|
||||||
|
foreach ($hesk_settings['custom_fields'] as $k=>$v)
|
||||||
|
{
|
||||||
|
if ($v['use'] && $v['place'])
|
||||||
|
{
|
||||||
|
echo '
|
||||||
|
<p>'.$v['name'].': '.$ticket[$k].'</p>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* Attachments */
|
||||||
|
hesk_listAttachments($ticket['attachments'], $i);
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
</div>
|
||||||
if ( ! $hesk_settings['new_top'])
|
<?php
|
||||||
|
if ( ! $hesk_settings['new_top'])
|
||||||
|
{
|
||||||
|
hesk_printCustomerTicketReplies();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!-- END REPLIES -->
|
||||||
|
<?php
|
||||||
|
// Print "Submit a reply" form?
|
||||||
|
if ($ticket['locked'] != 1 && $ticket['status'] != 3 && $hesk_settings['reply_top'] == 1)
|
||||||
{
|
{
|
||||||
hesk_printCustomerTicketReplies();
|
hesk_printCustomerReplyForm();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!-- END REPLIES -->
|
|
||||||
<?php
|
|
||||||
// Print "Submit a reply" form?
|
|
||||||
if ($ticket['locked'] != 1 && $ticket['status'] != 3 && $hesk_settings['reply_top'] == 1)
|
|
||||||
{
|
|
||||||
hesk_printCustomerReplyForm();
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/* Print "Submit a reply" form? */
|
/* Print "Submit a reply" form? */
|
||||||
if ($ticket['locked'] != 1 && $ticket['status'] != 3 && ! $hesk_settings['reply_top'])
|
if ($ticket['locked'] != 1 && $ticket['status'] != 3 && ! $hesk_settings['reply_top'])
|
||||||
{
|
{
|
||||||
hesk_printCustomerReplyForm();
|
hesk_printCustomerReplyForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If needed update unread replies as read for staff to know */
|
/* If needed update unread replies as read for staff to know */
|
||||||
if ( count($unread_replies) )
|
if ( count($unread_replies) )
|
||||||
{
|
{
|
||||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` SET `read` = '1' WHERE `id` IN ('".implode("','", $unread_replies)."')");
|
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` SET `read` = '1' WHERE `id` IN ('".implode("','", $unread_replies)."')");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div> <!-- End col-md-7 -->
|
</div> <!-- End col-md-7 -->
|
||||||
</div> <!-- End row -->
|
</div> <!-- End row -->
|
||||||
</div> <!-- End enclosingDashboard-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user