Add asset URI to client asset details page

This commit is contained in:
Andrew Malsbury 2023-11-15 15:32:37 +00:00
parent 201860798a
commit e5752dc335
1 changed files with 8 additions and 1 deletions

View File

@ -101,6 +101,7 @@ if (isset($_GET['ticket_id'])) {
$asset_ip = nullable_htmlentities($row['asset_ip']);
$asset_name = nullable_htmlentities($row['asset_name']);
$asset_type = nullable_htmlentities($row['asset_type']);
$asset_uri = nullable_htmlentities($row['asset_uri']);
$asset_make = nullable_htmlentities($row['asset_make']);
$asset_model = nullable_htmlentities($row['asset_model']);
$asset_serial = nullable_htmlentities($row['asset_serial']);
@ -655,7 +656,7 @@ if (isset($_GET['ticket_id'])) {
<?php } else { ?>
<div>
<i class="fa fa-fw fa-desktop text-secondary ml-1 mr-2"></i><strong><?php echo $asset_name; ?></strong>
<a href='client_asset_details.php?client_id=<?php echo $client_id?>&asset_id=<?php echo $asset_id?>' ><i class="fa fa-fw fa-desktop text-secondary ml-1 mr-2"></i><strong><?php echo $asset_name; ?></strong></a>
</div>
<?php if (!empty($asset_os)) { ?>
@ -688,6 +689,12 @@ if (isset($_GET['ticket_id'])) {
</div>
<?php }
if (!empty($asset_uri)) { ?>
<div class="mt-1">
<i class="fa fa-fw fa-globe text-secondary ml-1 mr-2"></i><a href="<?php echo $asset_uri; ?>" target="_blank"><?php echo $asset_uri; ?></a>
</div>
<?php }
if ($ticket_asset_count > 0) { ?>
<button class="btn btn-block btn-secondary mt-2" data-toggle="modal" data-target="#assetTicketsModal">Service History (<?php echo $ticket_asset_count; ?>)</button>