Merge pull request #807 from twetech/add-asset-uri-to-ticket-information

Add asset URI to client asset details page
This commit is contained in:
Johnny 2023-11-16 13:23:51 -05:00 committed by GitHub
commit 8eccdc6b6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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']);
@ -647,7 +648,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)) { ?>
@ -680,6 +681,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>