Merge branch 'develop'

This commit is contained in:
snipe 2018-01-20 00:21:03 -08:00
commit 4ca8272efc
8 changed files with 27 additions and 8 deletions

View file

@ -69,7 +69,8 @@ class ManufacturerPresenter extends Presenter
"sortable" => true,
"switchable" => true,
"title" => trans('admin/manufacturers/table.support_phone'),
"visible" => true
"visible" => true,
"formatter" => "phoneFormatter"
],
[

View file

@ -85,6 +85,7 @@ class UserPresenter extends Presenter
"switchable" => true,
"title" => trans('admin/users/table.phone'),
"visible" => true,
"formatter" => "phoneFormatter",
],
[
"field" => "address",

View file

@ -170,7 +170,9 @@
@endif
@if ($asset->model->manufacturer->support_phone)
<li><i class="fa fa-phone"></i> {{ $asset->model->manufacturer->support_phone }}</li>
<li><i class="fa fa-phone"></i>
<a href="tel:{{ $asset->model->manufacturer->support_phone }}">{{ $asset->model->manufacturer->support_phone }}</a>
</li>
@endif
@if ($asset->model->manufacturer->support_email)
@ -467,8 +469,11 @@
<li><i class="fa fa-envelope-o"></i> <a href="mailto:{{ $asset->assignedTo->email }}">{{ $asset->assignedTo->email }}</a></li>
@endif
@if ((isset($asset->assignedTo->phone)) && ($asset->assignedTo->phone!=''))
<li><i class="fa fa-phone"></i> {{ $asset->assignedTo->phone }}</li>
@if ((isset($asset->assignedTo)) && ($asset->assignedTo->phone!=''))
<li>
<i class="fa fa-phone"></i>
<a href="tel:{{ $asset->assignedTo->phone }}">{{ $asset->assignedTo->phone }}</a>
</li>
@endif
@if (isset($asset->location))

View file

@ -118,7 +118,9 @@
@if ($model->manufacturer->support_phone)
<li>
<i class="fa fa-phone"></i> {{ $model->manufacturer->support_phone }}
<i class="fa fa-phone"></i>
<a href="tel:{{ $model->manufacturer->support_phone }}">{{ $model->manufacturer->support_phone }}</a>
</li>
@endif

View file

@ -425,6 +425,14 @@
}
// Create a linked phone number in the table list
function phoneFormatter(value) {
if (value) {
return '<a href="tel:' + value + '">' + value + '</a>';
}
}
function deployedLocationFormatter(row, value) {
if ((row) && (row!=undefined)) {
return '<a href="{{ url('/') }}/locations/' + row.id + '"> ' + row.name + '</a>';

View file

@ -35,7 +35,7 @@
<th data-sortable="true" data-field="address">{{ trans('admin/suppliers/table.address') }}</th>
<th data-searchable="true" data-sortable="true" data-field="contact">{{ trans('admin/suppliers/table.contact') }}</th>
<th data-searchable="true" data-sortable="true" data-field="email" data-formatter="emailFormatter">{{ trans('admin/suppliers/table.email') }}</th>
<th data-searchable="true" data-sortable="true" data-field="phone">{{ trans('admin/suppliers/table.phone') }}</th>
<th data-searchable="true" data-sortable="true" data-field="phone" data-formatter="phoneFormatter">{{ trans('admin/suppliers/table.phone') }}</th>
<th data-searchable="true" data-sortable="true" data-field="fax" data-visible="false">{{ trans('admin/suppliers/table.fax') }}</th>
<th data-searchable="false" data-sortable="true" data-field="assets_count">{{ trans('admin/suppliers/table.assets') }}</th>
<th data-searchable="false" data-sortable="true" data-field="accessories_count">{{ trans('general.accessories') }}</th>

View file

@ -222,7 +222,9 @@
<li><i class="fa fa-user"></i> {{ $supplier->contact }}</li>
@endif
@if ($supplier->phone)
<li><i class="fa fa-phone"></i> {{ $supplier->phone }}</li>
<li><i class="fa fa-phone"></i>
<a href="tel:{{ $supplier->phone }}">{{ $supplier->phone }}</a>
</li>
@endif
@if ($supplier->fax)
<li><i class="fa fa-print"></i> {{ $supplier->fax }}</li>

View file

@ -196,7 +196,7 @@
@if ($user->phone)
<tr>
<td>{{ trans('admin/users/table.phone') }}</td>
<td>{{ $user->phone }}</td>
<td><a href="tel:{{ $user->phone }}">{{ $user->phone }}</a></td>
</tr>
@endif