mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
Feature: Favorites added to assets, Bulk Fav/unfav, adds favs to client overview
This commit is contained in:
@@ -98,12 +98,17 @@ ob_start();
|
||||
<?php } ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Name <strong class="text-danger">*</strong></label>
|
||||
<label>Name <strong class="text-danger">*</strong> / <span class="text-secondary" title="Pin to Overview">Favorite</span></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
|
||||
<span class="input-group-text"><i class="fas fa-fw fa-tag"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="name" placeholder="Asset name or asset tag" maxlength="200" required autofocus>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<input type="checkbox" name="favortie" value="1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ $asset_install_date = nullable_htmlentities($row['asset_install_date']);
|
||||
$asset_photo = nullable_htmlentities($row['asset_photo']);
|
||||
$asset_physical_location = nullable_htmlentities($row['asset_physical_location']);
|
||||
$asset_notes = nullable_htmlentities($row['asset_notes']);
|
||||
$asset_favorite = intval($row['asset_favorite']);
|
||||
$asset_created_at = nullable_htmlentities($row['asset_created_at']);
|
||||
$asset_vendor_id = intval($row['asset_vendor_id']);
|
||||
$asset_location_id = intval($row['asset_location_id']);
|
||||
@@ -145,7 +146,7 @@ $sql_related_credentials = mysqli_query($mysqli, "
|
||||
credentials.credential_password,
|
||||
credentials.credential_otp_secret,
|
||||
credentials.credential_note,
|
||||
credentials.credential_important,
|
||||
credentials.credential_favorite,
|
||||
credentials.credential_contact_id,
|
||||
credentials.credential_asset_id
|
||||
FROM credentials
|
||||
@@ -221,7 +222,9 @@ if (isset($_GET['client_id'])) {
|
||||
ob_start();
|
||||
?>
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-<?php echo $device_icon; ?> mr-2"></i><strong><?php echo $asset_name; ?></strong></h5>
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-<?= $device_icon ?> mr-2"></i><strong><?= $asset_name ?></strong>
|
||||
<?php if ($asset_favorite) { ?><i class="fas fa-fw text-warning fa-star" title="Favorite"></i><?php } ?>
|
||||
</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
@@ -277,7 +280,9 @@ ob_start();
|
||||
<div class="tab-pane fade show active" id="pills-asset-details<?php echo $asset_id; ?>">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="text-bold"><i class="fa fa-fw text-secondary fa-<?php echo $device_icon; ?> mr-3"></i><?php echo $asset_name; ?></h3>
|
||||
<h3 class="text-bold"><i class="fa fa-fw text-secondary fa-<?= $device_icon ?> mr-2"></i><?= $asset_name ?>
|
||||
<?php if ($asset_favorite) { ?><i class="fas fa-fw text-warning fa-star" title="Favorite"></i><?php } ?>
|
||||
</h3>
|
||||
<?php if ($asset_photo) { ?>
|
||||
<img class="img-fluid img-circle p-3" alt="asset_photo" src="<?php echo "../uploads/clients/$client_id/$asset_photo"; ?>">
|
||||
<?php } ?>
|
||||
@@ -512,7 +517,7 @@ ob_start();
|
||||
$otp_display = "<span onmouseenter='showOTPViaCredentialID($credential_id)'><i class='far fa-clock'></i> <span id='otp_$credential_id'><i>Hover..</i></span></span>";
|
||||
}
|
||||
$credential_note = nullable_htmlentities($row['credential_note']);
|
||||
$credential_important = intval($row['credential_important']);
|
||||
$credential_favorite = intval($row['credential_favorite']);
|
||||
$credential_contact_id = intval($row['credential_contact_id']);
|
||||
$credential_asset_id = intval($row['credential_asset_id']);
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ $asset_install_date = nullable_htmlentities($row['asset_install_date']);
|
||||
$asset_photo = nullable_htmlentities($row['asset_photo']);
|
||||
$asset_physical_location = nullable_htmlentities($row['asset_physical_location']);
|
||||
$asset_notes = nullable_htmlentities($row['asset_notes']);
|
||||
$asset_favorite = intval($row['asset_favorite']);
|
||||
$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']);
|
||||
@@ -105,9 +106,20 @@ ob_start();
|
||||
<label>Name <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
|
||||
<span class="input-group-text"><i class="fas fa-fw fa-tag"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="name" placeholder="Asset name or asset tag" maxlength="200" value="<?= $asset_name ?>" required>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<label class="star-toggle mb-0" title="Favorite">
|
||||
<input type="checkbox"
|
||||
name="favorite"
|
||||
value="1"
|
||||
<?php if($asset_favorite) { echo 'checked'; } ?>>
|
||||
<i class="far fa-star"></i>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="name" placeholder="Name the asset" maxlength="200" value="<?= $asset_name ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -478,14 +478,16 @@ ob_start();
|
||||
$asset_tag_name_display_array[] = "<a href='assets.php?$client_url tags[]=$asset_tag_id'><span class='badge text-light p-1 mr-1' style='background-color: $asset_tag_color;'><i class='fa fa-fw fa-$asset_tag_icon mr-2'></i>$asset_tag_name</span></a>";
|
||||
}
|
||||
$asset_tags_display = implode('', $asset_tag_name_display_array);
|
||||
$asset_favorite = intval($row['asset_favorite']);
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<th>
|
||||
<i class="fa fa-fw text-secondary fa-<?= $device_icon ?> mr-2"></i>
|
||||
<a href="#" class="ajax-modal"
|
||||
data-modal-size="lg"
|
||||
data-modal-url="modals/asset/asset_details.php?id=<?= $asset_id ?>">
|
||||
<?= $asset_name ?>
|
||||
<i class="fa fa-fw text-secondary fa-<?= $device_icon ?> mr-2"></i><?= $asset_name ?>
|
||||
<?php if ($asset_favorite) { echo "<i class='fas fa-fw fa-star text-warning' title='Favorite'></i>"; } ?>
|
||||
</a>
|
||||
<div class="mt-0">
|
||||
<small class="text-muted"><?= $asset_description ?></small>
|
||||
|
||||
Reference in New Issue
Block a user