mirror of
https://github.com/itflow-org/itflow
synced 2026-12-05 10:39:00 +00:00
Link assets to each other: a Linked assets card on the asset page with the link picker for any of the client's other assets, links kept both ways in asset_links (database 4.4.7) and written to both assets' History and the audit log, a menu on a linked asset at another site to move either one to the other's site, linked names on the assets list and quick look, links in the client export, and links kept between assets transferred to another client together; 26.12.6 changelog
This commit is contained in:
@@ -209,6 +209,7 @@ $asset_list_specs = assetSpecsFor(array_keys($assets));
|
||||
|
||||
// Tags, rack positions and what its RMM says of each for the whole page in three queries, not three per row
|
||||
$assets_tags = tagsForRecords('asset', array_keys($assets));
|
||||
$assets_linked = assetLinkedNames(array_keys($assets)); // what each is linked to - a printer's knife unit
|
||||
$assets_rmm = $rmm_set_up ? rmmDevicesForAssets(array_keys($assets)) : [];
|
||||
$assets_racked = [];
|
||||
if ($assets) {
|
||||
@@ -623,6 +624,9 @@ $search_noun = $type_filter ? $asset_type_tabs[$type_filter]['label'] : 'assets'
|
||||
<?php if ($asset_description) { ?>
|
||||
<div class="small text-body-secondary text-truncate itflow-asset-desc" title="<?= $asset_description ?>"><?= $asset_description ?></div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($assets_linked[$asset_id])) { $linked_names = $assets_linked[$asset_id]; ?>
|
||||
<div class="small text-body-secondary text-truncate" title="Linked to <?= escapeHtml(implode(', ', $linked_names)) ?>"><i class="fas fa-fw fa-link me-1"></i><?= escapeHtml(implode(', ', array_slice($linked_names, 0, 2))) ?><?= count($linked_names) > 2 ? ' +' . (count($linked_names) - 2) : '' ?></div>
|
||||
<?php } ?>
|
||||
<?php if ($asset_tags || lookupUserPermission('module_client') >= 2) { ?>
|
||||
<div class="itflow-tags-row mt-1 itflow-above-stretch"><?= tagPills('asset', $asset_id, $asset_tags, "assets.php?$client_url") ?></div>
|
||||
<?php } ?>
|
||||
|
||||
Reference in New Issue
Block a user