Update ticket.php

Hide Previous ticket if none exists
This commit is contained in:
AFTECH.RO
2023-05-13 09:42:48 +01:00
committed by GitHub
parent 052d418bad
commit ffe4061429

View File

@@ -532,17 +532,20 @@ if (isset($_GET['ticket_id'])) {
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<i class="fa fa-history text-secondary ml-1 mr-2 mb-2"></i> <b>Previous ticket:</b> <?php if (!empty($prev_ticket_id)) { ?>
<a href="ticket.php?ticket_id=<?php echo $prev_ticket_id; ?>"><?php echo $prev_ticket_subject; ?></a> <i class="fa fa-history text-secondary ml-1 mr-2 mb-2"></i> <b>Previous ticket:</b>
<br> <a href="ticket.php?ticket_id=<?php echo $prev_ticket_id; ?>"><?php echo $prev_ticket_subject; ?></a>
<i class="fa fa-hourglass-start text-secondary ml-1 mr-2 mb-2"></i> <b>Status:</b> <?php if ($prev_ticket_status == 'Open') { ?> <br>
<span class="text-danger"><?php echo $prev_ticket_status; ?></span> <?php if ($prev_ticket_status == 'Open') { ?>
<?php } else { ?> <i class="fa fa-hourglass-start text-secondary ml-1 mr-2 mb-2"></i> <b>Status:</b>
<span class="text-success"><?php echo $prev_ticket_status; ?></span> <span class="text-danger"><?php echo $prev_ticket_status; ?></span>
<?php } ?> <?php } else { ?>
<i class="fa fa-hourglass-start text-secondary ml-1 mr-2 mb-2"></i> <b>Status:</b>
<span class="text-success"><?php echo $prev_ticket_status; ?></span>
<?php } ?>
<?php } ?>
</div> </div>
</div> </div>
</div> </div>