Ability to Unarchive contacts and assets

This commit is contained in:
johnnyq
2024-06-06 16:51:08 -04:00
parent 94ba05271f
commit 1522f5414a
4 changed files with 63 additions and 2 deletions

View File

@@ -283,6 +283,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
}
$asset_notes = nullable_htmlentities($row['asset_notes']);
$asset_created_at = nullable_htmlentities($row['asset_created_at']);
$asset_archived_at = nullable_htmlentities($row['asset_archived_at']);
$asset_vendor_id = intval($row['asset_vendor_id']);
$asset_location_id = intval($row['asset_location_id']);
$asset_contact_id = intval($row['asset_contact_id']);
@@ -427,9 +428,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<i class="fas fa-fw fa-copy mr-2"></i>Copy
</a>
<?php if ($session_user_role > 2) { ?>
<?php if ($asset_archived_at) { ?>
<a class="dropdown-item text-info" href="post.php?unarchive_asset=<?php echo $asset_id; ?>">
<i class="fas fa-fw fa-redo mr-2"></i>Unarchive
</a>
<?php } else { ?>
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_asset=<?php echo $asset_id; ?>">
<i class="fas fa-fw fa-archive mr-2"></i>Archive
</a>
<?php } ?>
<?php if ($config_destructive_deletes_enable) { ?>
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_asset=<?php echo $asset_id; ?>">
<i class="fas fa-fw fa-archive mr-2"></i>Delete