From e8ad8a744849ca731a7fc0b56457971ac67f350c Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 22 Feb 2024 14:48:01 +0000 Subject: [PATCH] Added email, phone icons Signed-off-by: snipe --- app/Http/Controllers/Api/UsersController.php | 2 ++ app/Presenters/UserPresenter.php | 9 +++++++++ resources/lang/en-US/general.php | 2 ++ resources/views/hardware/view.blade.php | 4 ++-- resources/views/partials/bootstrap-table.blade.php | 14 +++++++------- resources/views/users/view.blade.php | 8 ++++---- 6 files changed, 26 insertions(+), 13 deletions(-) diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index 6fbaf281b0..dad0954f6e 100644 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -73,6 +73,7 @@ class UsersController extends Controller 'users.end_date', 'users.vip', 'users.autoassign_licenses', + 'users.website', ])->with('manager', 'groups', 'userloc', 'company', 'department', 'assets', 'licenses', 'accessories', 'consumables', 'createdBy',) ->withCount('assets as assets_count', 'licenses as licenses_count', 'accessories as accessories_count', 'consumables as consumables_count'); @@ -254,6 +255,7 @@ class UsersController extends Controller 'start_date', 'end_date', 'autoassign_licenses', + 'website', ]; $sort = in_array($request->get('sort'), $allowed_columns) ? $request->get('sort') : 'first_name'; diff --git a/app/Presenters/UserPresenter.php b/app/Presenters/UserPresenter.php index f70ddf8af6..211057c548 100644 --- a/app/Presenters/UserPresenter.php +++ b/app/Presenters/UserPresenter.php @@ -122,6 +122,15 @@ class UserPresenter extends Presenter 'visible' => true, 'formatter' => 'phoneFormatter', ], + [ + 'field' => 'website', + 'searchable' => true, + 'sortable' => true, + 'switchable' => true, + 'title' => trans('general.website'), + 'visible' => false, + 'formatter' => 'externalLinkFormatter', + ], [ 'field' => 'address', 'searchable' => true, diff --git a/resources/lang/en-US/general.php b/resources/lang/en-US/general.php index 6e1663b590..fd26aaee5e 100644 --- a/resources/lang/en-US/general.php +++ b/resources/lang/en-US/general.php @@ -438,6 +438,8 @@ return [ 'auto_incrementing_asset_tags_disabled_so_tags_required' => 'Generating auto-incrementing asset tags is disabled so all rows need to have the "Asset Tag" column populated.', 'auto_incrementing_asset_tags_enabled_so_now_assets_will_be_created' => 'Note: Generating auto-incrementing asset tags is enabled so assets will be created for rows that do not have "Asset Tag" populated. Rows that do have "Asset Tag" populated will be updated with the provided information.', 'send_welcome_email_to_users' => ' Send Welcome Email for new Users?', + 'send_email' => 'Send Email', + 'call' => 'Call number', 'back_before_importing' => 'Backup before importing?', 'csv_header_field' => 'CSV Header Field', 'import_field' => 'Import Field', diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 2c7ddcf535..5a4f8ffb02 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -409,7 +409,7 @@
- @if ($field->field_encrypted=='1') + @if (($field->field_encrypted=='1') && ($asset->{$field->db_column_name()}!='')) @endif @@ -950,7 +950,7 @@ @endif @if (isset($asset->location)) -
  • {{ $asset->location->name }}
  • +
  • {{ $asset->location->name }}
  • {{ $asset->location->address }} @if ($asset->location->address2!='') {{ $asset->location->address2 }} diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index e26c681008..c39b1bd808 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -548,9 +548,9 @@ if (row.custom_fields[field_column_plain].field_format=='URL') { return '' + row.custom_fields[field_column_plain].value + ''; } else if (row.custom_fields[field_column_plain].field_format=='BOOLEAN') { - return (row.custom_fields[field_column_plain].value == 1) ? "" : ""; + return (row.custom_fields[field_column_plain].value == 1) ? "" : ""; } else if (row.custom_fields[field_column_plain].field_format=='EMAIL') { - return '' + row.custom_fields[field_column_plain].value + ''; + return ' ' + row.custom_fields[field_column_plain].value + ''; } } return row.custom_fields[field_column_plain].value; @@ -570,7 +570,7 @@ if (value) { if ((value.indexOf("{") === -1) || (value.indexOf("}") ===-1)) { - return ' ' + value + ''; + return ' ' + value + ''; } return value; } @@ -625,7 +625,7 @@ // Create a linked phone number in the table list function phoneFormatter(value) { if (value) { - return '' + value + ''; + return ' ' + value + ''; } } @@ -634,7 +634,7 @@ if ((row) && (row!=undefined)) { return '' + row.name + ''; } else if (value.rtd_location) { - return '' + value.rtd_location.name + ''; + return '' + value.rtd_location.name + ''; } } @@ -646,7 +646,7 @@ function assetTagLinkFormatter(value, row) { if ((row.asset) && (row.asset.id)) { if (row.asset.deleted_at!='') { - return 'deleted ' + row.asset.asset_tag + ''; + return '{{ trans('admin/hardware/general.deleted') }} ' + row.asset.asset_tag + ''; } return '' + row.asset.asset_tag + ''; } @@ -700,7 +700,7 @@ function emailFormatter(value) { if (value) { - return '' + value + ''; + return ' ' + value + ''; } } diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index cce0110cef..a8c24b9321 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -431,19 +431,19 @@ {{ trans('admin/users/table.email') }}
  • @endif - @if ($user->phone) + @if ($user->website)
    {{ trans('general.website') }}
    @endif @@ -455,7 +455,7 @@ {{ trans('admin/users/table.phone') }} @endif