mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-11 08:04:09 -08:00
Merge branch 'develop'
# Conflicts: # snipeit.sh
This commit is contained in:
commit
8919c3b52a
|
@ -815,6 +815,7 @@ class Asset extends Depreciable
|
|||
{
|
||||
return $query->where(function ($query) use ($filter) {
|
||||
foreach ($filter as $key => $search_val) {
|
||||
|
||||
if ($key =='asset_tag') {
|
||||
$query->where('assets.asset_tag', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
|
@ -914,11 +915,13 @@ class Asset extends Depreciable
|
|||
}
|
||||
|
||||
foreach (CustomField::all() as $field) {
|
||||
if (array_key_exists($field->db_column_name(), $filter)) {
|
||||
$query->orWhere($field->db_column_name(), 'LIKE', "%$search_val%");
|
||||
if (array_key_exists('custom_fields.'.$field->db_column_name(), $filter)) {
|
||||
$query->orWhere($field->db_column_name(), 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
# ensure running as root
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
#Debian doesnt have sudo if root has a password.
|
||||
if ! hash sudo 2>/dev/null; then
|
||||
exec su -c "$0" "$@"
|
||||
else
|
||||
exec sudo "$0" "$@"
|
||||
fi
|
||||
fi
|
||||
|
||||
wget https://raw.githubusercontent.com/snipe/snipe-it/master/snipeit.sh
|
||||
chmod 744 snipeit.sh
|
||||
sudo ./snipeit.sh 2>&1 | sudo tee -a /var/log/snipeit-install.log
|
||||
|
|
|
@ -311,6 +311,11 @@ $('.snipe-table').bootstrapTable({
|
|||
// for custom fields in a more useful way.
|
||||
function customFieldsFormatter(value, row) {
|
||||
|
||||
|
||||
if ((!this) || (!this.title)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var field_column = this.title;
|
||||
|
||||
// Pull out any HTMl that might be passed via the presenter
|
||||
|
|
Loading…
Reference in a new issue