mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Added email, phone icons
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
eb61f5aa9e
commit
e8ad8a7448
|
@ -73,6 +73,7 @@ class UsersController extends Controller
|
||||||
'users.end_date',
|
'users.end_date',
|
||||||
'users.vip',
|
'users.vip',
|
||||||
'users.autoassign_licenses',
|
'users.autoassign_licenses',
|
||||||
|
'users.website',
|
||||||
|
|
||||||
])->with('manager', 'groups', 'userloc', 'company', 'department', 'assets', 'licenses', 'accessories', 'consumables', 'createdBy',)
|
])->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');
|
->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',
|
'start_date',
|
||||||
'end_date',
|
'end_date',
|
||||||
'autoassign_licenses',
|
'autoassign_licenses',
|
||||||
|
'website',
|
||||||
];
|
];
|
||||||
|
|
||||||
$sort = in_array($request->get('sort'), $allowed_columns) ? $request->get('sort') : 'first_name';
|
$sort = in_array($request->get('sort'), $allowed_columns) ? $request->get('sort') : 'first_name';
|
||||||
|
|
|
@ -122,6 +122,15 @@ class UserPresenter extends Presenter
|
||||||
'visible' => true,
|
'visible' => true,
|
||||||
'formatter' => 'phoneFormatter',
|
'formatter' => 'phoneFormatter',
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'field' => 'website',
|
||||||
|
'searchable' => true,
|
||||||
|
'sortable' => true,
|
||||||
|
'switchable' => true,
|
||||||
|
'title' => trans('general.website'),
|
||||||
|
'visible' => false,
|
||||||
|
'formatter' => 'externalLinkFormatter',
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'field' => 'address',
|
'field' => 'address',
|
||||||
'searchable' => true,
|
'searchable' => true,
|
||||||
|
|
|
@ -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_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.',
|
'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_welcome_email_to_users' => ' Send Welcome Email for new Users?',
|
||||||
|
'send_email' => 'Send Email',
|
||||||
|
'call' => 'Call number',
|
||||||
'back_before_importing' => 'Backup before importing?',
|
'back_before_importing' => 'Backup before importing?',
|
||||||
'csv_header_field' => 'CSV Header Field',
|
'csv_header_field' => 'CSV Header Field',
|
||||||
'import_field' => 'Import Field',
|
'import_field' => 'Import Field',
|
||||||
|
|
|
@ -409,7 +409,7 @@
|
||||||
</strong>
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6{{ (($field->format=='URL') && ($asset->{$field->db_column_name()}!='')) ? ' ellipsis': '' }}">
|
<div class="col-md-6{{ (($field->format=='URL') && ($asset->{$field->db_column_name()}!='')) ? ' ellipsis': '' }}">
|
||||||
@if ($field->field_encrypted=='1')
|
@if (($field->field_encrypted=='1') && ($asset->{$field->db_column_name()}!=''))
|
||||||
<i class="fas fa-lock" data-tooltip="true" data-placement="top" title="{{ trans('admin/custom_fields/general.value_encrypted') }}"></i>
|
<i class="fas fa-lock" data-tooltip="true" data-placement="top" title="{{ trans('admin/custom_fields/general.value_encrypted') }}"></i>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@ -950,7 +950,7 @@
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if (isset($asset->location))
|
@if (isset($asset->location))
|
||||||
<li>{{ $asset->location->name }}</li>
|
<li><i class="fas fa-map-marker-alt" aria-hidden="true"></i> {{ $asset->location->name }}</li>
|
||||||
<li>{{ $asset->location->address }}
|
<li>{{ $asset->location->address }}
|
||||||
@if ($asset->location->address2!='')
|
@if ($asset->location->address2!='')
|
||||||
{{ $asset->location->address2 }}
|
{{ $asset->location->address2 }}
|
||||||
|
|
|
@ -548,9 +548,9 @@
|
||||||
if (row.custom_fields[field_column_plain].field_format=='URL') {
|
if (row.custom_fields[field_column_plain].field_format=='URL') {
|
||||||
return '<a href="' + row.custom_fields[field_column_plain].value + '" target="_blank" rel="noopener">' + row.custom_fields[field_column_plain].value + '</a>';
|
return '<a href="' + row.custom_fields[field_column_plain].value + '" target="_blank" rel="noopener">' + row.custom_fields[field_column_plain].value + '</a>';
|
||||||
} else if (row.custom_fields[field_column_plain].field_format=='BOOLEAN') {
|
} else if (row.custom_fields[field_column_plain].field_format=='BOOLEAN') {
|
||||||
return (row.custom_fields[field_column_plain].value == 1) ? "<span class='fas fa-check-circle' style='color:green' />" : "<span class='fas fa-times-circle' style='color:red' />";
|
return (row.custom_fields[field_column_plain].value == 1) ? "<span class='fas fa-check-circle' style='color:green'>" : "<span class='fas fa-times-circle' style='color:red' />";
|
||||||
} else if (row.custom_fields[field_column_plain].field_format=='EMAIL') {
|
} else if (row.custom_fields[field_column_plain].field_format=='EMAIL') {
|
||||||
return '<a href="mailto:' + row.custom_fields[field_column_plain].value + '">' + row.custom_fields[field_column_plain].value + '</a>';
|
return '<a href="mailto:' + row.custom_fields[field_column_plain].value + '" style="white-space: nowrap" data-tooltip="true" title="{{ trans('general.send_email') }}"><i class="fa-regular fa-envelope" aria-hidden="true"></i> ' + row.custom_fields[field_column_plain].value + '</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return row.custom_fields[field_column_plain].value;
|
return row.custom_fields[field_column_plain].value;
|
||||||
|
@ -625,7 +625,7 @@
|
||||||
// Create a linked phone number in the table list
|
// Create a linked phone number in the table list
|
||||||
function phoneFormatter(value) {
|
function phoneFormatter(value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
return '<a href="tel:' + value + '">' + value + '</a>';
|
return '<span style="white-space: nowrap;"><a href="tel:' + value + '" data-tooltip="true" title="{{ trans('general.call') }}"><i class="fa-solid fa-phone" aria-hidden="true"></i> ' + value + '</a></span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -634,7 +634,7 @@
|
||||||
if ((row) && (row!=undefined)) {
|
if ((row) && (row!=undefined)) {
|
||||||
return '<a href="{{ config('app.url') }}/locations/' + row.id + '">' + row.name + '</a>';
|
return '<a href="{{ config('app.url') }}/locations/' + row.id + '">' + row.name + '</a>';
|
||||||
} else if (value.rtd_location) {
|
} else if (value.rtd_location) {
|
||||||
return '<a href="{{ config('app.url') }}/locations/' + value.rtd_location.id + '" data-tooltip="true" title="Default Location">' + value.rtd_location.name + '</a>';
|
return '<a href="{{ config('app.url') }}/locations/' + value.rtd_location.id + '">' + value.rtd_location.name + '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -646,7 +646,7 @@
|
||||||
function assetTagLinkFormatter(value, row) {
|
function assetTagLinkFormatter(value, row) {
|
||||||
if ((row.asset) && (row.asset.id)) {
|
if ((row.asset) && (row.asset.id)) {
|
||||||
if (row.asset.deleted_at!='') {
|
if (row.asset.deleted_at!='') {
|
||||||
return '<span style="white-space: nowrap;"><i class="fas fa-times text-danger"></i><span class="sr-only">deleted</span> <del><a href="{{ config('app.url') }}/hardware/' + row.asset.id + '" data-tooltip="true" title="{{ trans('admin/hardware/general.deleted') }}">' + row.asset.asset_tag + '</a></del></span>';
|
return '<span style="white-space: nowrap;"><i class="fas fa-times text-danger"></i><span class="sr-only">{{ trans('admin/hardware/general.deleted') }}</span> <del><a href="{{ config('app.url') }}/hardware/' + row.asset.id + '" data-tooltip="true" title="{{ trans('admin/hardware/general.deleted') }}">' + row.asset.asset_tag + '</a></del></span>';
|
||||||
}
|
}
|
||||||
return '<a href="{{ config('app.url') }}/hardware/' + row.asset.id + '">' + row.asset.asset_tag + '</a>';
|
return '<a href="{{ config('app.url') }}/hardware/' + row.asset.id + '">' + row.asset.asset_tag + '</a>';
|
||||||
}
|
}
|
||||||
|
@ -700,7 +700,7 @@
|
||||||
|
|
||||||
function emailFormatter(value) {
|
function emailFormatter(value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
return '<a href="mailto:' + value + '">' + value + '</a>';
|
return '<a href="mailto:' + value + '" style="white-space: nowrap" data-tooltip="true" title="{{ trans('general.send_email') }}"><i class="fa-regular fa-envelope" aria-hidden="true"></i> ' + value + '</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -431,19 +431,19 @@
|
||||||
{{ trans('admin/users/table.email') }}
|
{{ trans('admin/users/table.email') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<a href="mailto:{{ $user->email }}">{{ $user->email }}</a>
|
<a href="mailto:{{ $user->email }}" data-tooltip="true" title="{{ trans('general.send_email') }}"><i class="fa-regular fa-envelope" aria-hidden="true"></i> {{ $user->email }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($user->phone)
|
@if ($user->website)
|
||||||
<!-- website -->
|
<!-- website -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
{{ trans('general.website') }}
|
{{ trans('general.website') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<a href="{{ $user->website }}" target="_blank">{{ $user->website }}</a>
|
<a href="{{ $user->website }}" target="_blank"><i class="fa fa-external-link" aria-hidden="true"></i> {{ $user->website }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
@ -455,7 +455,7 @@
|
||||||
{{ trans('admin/users/table.phone') }}
|
{{ trans('admin/users/table.phone') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<a href="tel:{{ $user->phone }}">{{ $user->phone }}</a>
|
<a href="tel:{{ $user->phone }}" data-tooltip="true" title="{{ trans('general.call') }}"><i class="fa-solid fa-phone" aria-hidden="true"></i> {{ $user->phone }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
Loading…
Reference in a new issue