mirror of https://github.com/itflow-org/itflow
Remove the Add Contact to a ticket as this can be done at the top
This commit is contained in:
parent
dfb1304bfa
commit
d2e11fca61
|
|
@ -131,6 +131,131 @@
|
|||
<p>Bulk Mail</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-header mt-3">SETTINGS</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="settings_company.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "settings_company.php") { echo "active"; } ?>">
|
||||
<i class="nav-icon fa fa-briefcase"></i>
|
||||
<p>Company Details</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="settings_localization.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "settings_localization.php") { echo "active"; } ?>">
|
||||
<i class="nav-icon fa fa-globe"></i>
|
||||
<p>Localization</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "settings_theme.php") { echo "active"; } ?>"
|
||||
href="settings_theme.php">
|
||||
<i class="nav-icon fa fa-paint-brush"></i>
|
||||
<p>Theme</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "settings_security.php") { echo "active"; } ?>"
|
||||
href="settings_security.php">
|
||||
<i class="nav-icon fas fa-shield-alt"></i>
|
||||
<p>Security</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "settings_mail.php") { echo "active"; } ?>"
|
||||
href="settings_mail.php">
|
||||
<i class="nav-icon far fa-envelope"></i>
|
||||
<p>Mail</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "settings_notifications.php") { echo "active"; } ?>"
|
||||
href="settings_notifications.php">
|
||||
<i class="nav-icon far fa-bell"></i>
|
||||
<p>Notifications</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "settings_defaults.php") { echo "active"; } ?>"
|
||||
href="settings_defaults.php">
|
||||
<i class="nav-icon fas fa-cogs"></i>
|
||||
<p>Defaults</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<?php if ($config_module_enable_accounting) { ?>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "settings_invoice.php") { echo "active"; } ?>"
|
||||
href="settings_invoice.php">
|
||||
<i class="nav-icon fas fa-file-invoice"></i>
|
||||
<p>Invoice</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "settings_quote.php") { echo "active"; } ?>"
|
||||
href="settings_quote.php">
|
||||
<i class="nav-icon fas fa-comment-dollar"></i>
|
||||
<p>Quote</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "settings_online_payment.php") { echo "active"; } ?>"
|
||||
href="settings_online_payment.php">
|
||||
<i class="nav-icon far fa-credit-card"></i>
|
||||
<p>Online Payment</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($config_module_enable_ticketing) { ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "settings_ticket.php") { echo "active"; } ?>"
|
||||
href="settings_ticket.php">
|
||||
<i class="nav-icon fas fa-life-ring"></i>
|
||||
<p>Ticket</p>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="settings_ai.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "settings_ai.php") { echo "active"; } ?>">
|
||||
<i class="nav-icon fas fa-robot"></i>
|
||||
<p>AI</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="settings_integrations.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "settings_integrations.php") { echo "active"; } ?>">
|
||||
<i class="nav-icon fas fa-plug"></i>
|
||||
<p>Integrations</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "settings_telemetry.php") { echo "active"; } ?>"
|
||||
href="settings_telemetry.php">
|
||||
<i class="nav-icon fas fa-satellite-dish"></i>
|
||||
<p>Telemetry</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "settings_modules.php") { echo "active"; } ?>"
|
||||
href="settings_modules.php">
|
||||
<i class="nav-icon fas fa-cube"></i>
|
||||
<p>Modules</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- /.sidebar-menu -->
|
||||
|
|
|
|||
113
ticket.php
113
ticket.php
|
|
@ -273,8 +273,8 @@ if (isset($_GET['ticket_id'])) {
|
|||
<div class="btn-group float-right d-print-none">
|
||||
|
||||
<?php if (empty($ticket_closed_at)) { ?>
|
||||
<div class="dropdown dropleft text-center mr-3">
|
||||
<button class="btn btn-default btn-sm" type="button" id="dropdownMenuButton" data-toggle="dropdown">
|
||||
<div class="dropdown dropdown text-center mr-3">
|
||||
<button class="btn btn-primary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown">
|
||||
<i class="fas fa-fw fa-plus mr-2"></i>Add
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
|
|
@ -301,7 +301,7 @@ if (isset($_GET['ticket_id'])) {
|
|||
<?php }
|
||||
|
||||
if (empty($ticket_closed_at)) { ?>
|
||||
<a href="post.php?close_ticket=<?php echo $ticket_id; ?>" class="btn btn-secondary btn-sm confirm-link" id="ticket_close">
|
||||
<a href="post.php?close_ticket=<?php echo $ticket_id; ?>" class="btn btn-dark btn-sm confirm-link" id="ticket_close">
|
||||
<i class="fas fa-fw fa-gavel mr-2"></i>Close
|
||||
</a>
|
||||
|
||||
|
|
@ -402,7 +402,6 @@ if (isset($_GET['ticket_id'])) {
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="custom-tt-horizontal-spacing"></div> <!-- Add custom class for smaller spacing -->
|
||||
|
||||
<!-- Time Tracking -->
|
||||
|
|
@ -678,73 +677,67 @@ if (isset($_GET['ticket_id'])) {
|
|||
|
||||
|
||||
<!-- Contact card -->
|
||||
<?php if ($contact_id) { ?>
|
||||
<div class="card card-body card-outline card-dark mb-3">
|
||||
<h5 class="text-secondary">Contact</h5>
|
||||
<div>
|
||||
<i class="fa fa-fw fa-user text-secondary mr-2"></i><a href="#" data-toggle="modal" data-target="#editTicketContactModal<?php echo $ticket_id; ?>"><strong><?php echo $contact_name; ?></strong>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($contact_id)) { ?>
|
||||
<?php
|
||||
|
||||
<div>
|
||||
<i class="fa fa-fw fa-user text-secondary mr-2"></i><a href="#" data-toggle="modal" data-target="#editTicketContactModal<?php echo $ticket_id; ?>"><strong><?php echo $contact_name; ?></strong>
|
||||
</a>
|
||||
if (!empty($location_name)) { ?>
|
||||
<div class="mt-2">
|
||||
<i class="fa fa-fw fa-map-marker-alt text-secondary mr-2"></i><?php echo $location_name; ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
<?php
|
||||
if (!empty($contact_email)) { ?>
|
||||
<div class="mt-2">
|
||||
<i class="fa fa-fw fa-envelope text-secondary mr-2"></i><a href="mailto:<?php echo $contact_email; ?>"><?php echo $contact_email; ?></a>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if (!empty($location_name)) { ?>
|
||||
<div class="mt-2">
|
||||
<i class="fa fa-fw fa-map-marker-alt text-secondary mr-2"></i><?php echo $location_name; ?>
|
||||
</div>
|
||||
<?php }
|
||||
if (!empty($contact_phone)) { ?>
|
||||
<div class="mt-2">
|
||||
<i class="fa fa-fw fa-phone text-secondary mr-2"></i><a href="tel:<?php echo $contact_phone; ?>"><?php echo $contact_phone; ?></a>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if (!empty($contact_email)) { ?>
|
||||
<div class="mt-2">
|
||||
<i class="fa fa-fw fa-envelope text-secondary mr-2"></i><a href="mailto:<?php echo $contact_email; ?>"><?php echo $contact_email; ?></a>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if (!empty($contact_phone)) { ?>
|
||||
<div class="mt-2">
|
||||
<i class="fa fa-fw fa-phone text-secondary mr-2"></i><a href="tel:<?php echo $contact_phone; ?>"><?php echo $contact_phone; ?></a>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if (!empty($contact_mobile)) { ?>
|
||||
<div class="mt-2">
|
||||
<i class="fa fa-fw fa-mobile-alt text-secondary mr-2"></i><a href="tel:<?php echo $contact_mobile; ?>"><?php echo $contact_mobile; ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
|
||||
// Previous tickets
|
||||
$prev_ticket_id = $prev_ticket_subject = $prev_ticket_status = ''; // Default blank
|
||||
|
||||
$sql_prev_ticket = "SELECT ticket_id, ticket_created_at, ticket_subject, ticket_status, ticket_assigned_to FROM tickets WHERE ticket_contact_id = $contact_id AND ticket_id <> $ticket_id ORDER BY ticket_id DESC LIMIT 1";
|
||||
$prev_ticket_row = mysqli_fetch_assoc(mysqli_query($mysqli, $sql_prev_ticket));
|
||||
|
||||
if ($prev_ticket_row) {
|
||||
$prev_ticket_id = intval($prev_ticket_row['ticket_id']);
|
||||
$prev_ticket_subject = nullable_htmlentities($prev_ticket_row['ticket_subject']);
|
||||
$prev_ticket_status = nullable_htmlentities( getTicketStatusName($prev_ticket_row['ticket_status']));
|
||||
?>
|
||||
|
||||
<hr>
|
||||
<div>
|
||||
<i class="fa fa-fw fa-history text-secondary mr-2"></i><b>Previous ticket:</b>
|
||||
<a href="ticket.php?ticket_id=<?php echo $prev_ticket_id; ?>"><?php echo $prev_ticket_subject; ?></a>
|
||||
</div>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-hourglass-start text-secondary mr-2"></i><strong>Status:</strong>
|
||||
<span class="text-success"><?php echo $prev_ticket_status; ?></span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php } else { ?>
|
||||
<div class="d-print-none">
|
||||
<a href="#" data-toggle="modal" data-target="#editTicketContactModal<?php echo $ticket_id; ?>"><i class="fa fa-fw fa-plus mr-2"></i>Add a Contact</a>
|
||||
if (!empty($contact_mobile)) { ?>
|
||||
<div class="mt-2">
|
||||
<i class="fa fa-fw fa-mobile-alt text-secondary mr-2"></i><a href="tel:<?php echo $contact_mobile; ?>"><?php echo $contact_mobile; ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
|
||||
// Previous tickets
|
||||
$prev_ticket_id = $prev_ticket_subject = $prev_ticket_status = ''; // Default blank
|
||||
|
||||
$sql_prev_ticket = "SELECT ticket_id, ticket_created_at, ticket_subject, ticket_status, ticket_assigned_to FROM tickets WHERE ticket_contact_id = $contact_id AND ticket_id <> $ticket_id ORDER BY ticket_id DESC LIMIT 1";
|
||||
$prev_ticket_row = mysqli_fetch_assoc(mysqli_query($mysqli, $sql_prev_ticket));
|
||||
|
||||
if ($prev_ticket_row) {
|
||||
$prev_ticket_id = intval($prev_ticket_row['ticket_id']);
|
||||
$prev_ticket_subject = nullable_htmlentities($prev_ticket_row['ticket_subject']);
|
||||
$prev_ticket_status = nullable_htmlentities( getTicketStatusName($prev_ticket_row['ticket_status']));
|
||||
?>
|
||||
|
||||
<hr>
|
||||
<div>
|
||||
<i class="fa fa-fw fa-history text-secondary mr-2"></i><b>Previous ticket:</b>
|
||||
<a href="ticket.php?ticket_id=<?php echo $prev_ticket_id; ?>"><?php echo $prev_ticket_subject; ?></a>
|
||||
</div>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-hourglass-start text-secondary mr-2"></i><strong>Status:</strong>
|
||||
<span class="text-success"><?php echo $prev_ticket_status; ?></span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- End contact card -->
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue