mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
1384ca658a
|
@ -47,7 +47,7 @@ class ManufacturerPresenter extends Presenter
|
|||
'switchable' => true,
|
||||
'title' => trans('admin/manufacturers/table.url'),
|
||||
'visible' => true,
|
||||
'formatter' => 'linkFormatter',
|
||||
'formatter' => 'externalLinkFormatter',
|
||||
],
|
||||
[
|
||||
'field' => 'support_url',
|
||||
|
@ -56,7 +56,7 @@ class ManufacturerPresenter extends Presenter
|
|||
'switchable' => true,
|
||||
'title' => trans('admin/manufacturers/table.support_url'),
|
||||
'visible' => true,
|
||||
'formatter' => 'linkFormatter',
|
||||
'formatter' => 'externalLinkFormatter',
|
||||
],
|
||||
|
||||
[
|
||||
|
@ -85,7 +85,7 @@ class ManufacturerPresenter extends Presenter
|
|||
'switchable' => true,
|
||||
'title' => trans('admin/manufacturers/table.warranty_lookup_url'),
|
||||
'visible' => false,
|
||||
'formatter' => 'linkFormatter',
|
||||
'formatter' => 'externalLinkFormatter',
|
||||
],
|
||||
|
||||
[
|
||||
|
|
|
@ -597,7 +597,7 @@
|
|||
|
||||
@if (($asset->model->manufacturer) && ($asset->model->manufacturer->warranty_lookup_url!=''))
|
||||
<a href="{{ $asset->present()->dynamicWarrantyUrl() }}" target="_blank">
|
||||
<i class="fa fa-external-link"><span class="sr-only">{{ trans('hardware/general.mfg_warranty_lookup') }}</span></i>
|
||||
<i class="fa fa-external-link"><span class="sr-only">{{ trans('admin/hardware/general.mfg_warranty_lookup', ['manufacturer' => $asset->model->manufacturer->name]) }}</span></i>
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
|
|
@ -511,8 +511,12 @@
|
|||
}
|
||||
|
||||
function externalLinkFormatter(value) {
|
||||
|
||||
if (value) {
|
||||
return '<a href="' + value + '" target="_blank">' + value + '</a>';
|
||||
if ((value.indexOf("{") === -1) || (value.indexOf("}") ===-1)) {
|
||||
return '<i class="fa fa-external-link"></i> <a href="' + value + '" target="_blank">' + value + '</a>';
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue