save
This commit is contained in:
parent
049a669186
commit
c0a1da23ec
8 changed files with 18 additions and 9 deletions
4
app.json
4
app.json
|
@ -26,6 +26,10 @@
|
||||||
"description": "URL where your Snipe-IT install will be available at.",
|
"description": "URL where your Snipe-IT install will be available at.",
|
||||||
"value": "https://your-app-name.herokuapp.com"
|
"value": "https://your-app-name.herokuapp.com"
|
||||||
},
|
},
|
||||||
|
"LABEL_URL": {
|
||||||
|
"description": "Labels",
|
||||||
|
"value": "https://your-app-name.herokuapp.com"
|
||||||
|
},
|
||||||
"APP_TIMEZONE": {
|
"APP_TIMEZONE": {
|
||||||
"description": "Which timezone do you want to use for your install? (http://php.net/manual/en/timezones.php)",
|
"description": "Which timezone do you want to use for your install? (http://php.net/manual/en/timezones.php)",
|
||||||
"value": "UTC"
|
"value": "UTC"
|
||||||
|
|
|
@ -142,6 +142,9 @@ class Label implements View
|
||||||
case 'location':
|
case 'location':
|
||||||
$barcode2DTarget = route('locations.show', $asset->location_id);
|
$barcode2DTarget = route('locations.show', $asset->location_id);
|
||||||
break;
|
break;
|
||||||
|
case 'custom_url_hardware_id':
|
||||||
|
$barcode2DTarget = route('hardware.show', $asset);
|
||||||
|
break;
|
||||||
case 'hardware_id':
|
case 'hardware_id':
|
||||||
default:
|
default:
|
||||||
$barcode2DTarget = route('hardware.show', $asset);
|
$barcode2DTarget = route('hardware.show', $asset);
|
||||||
|
|
|
@ -74,6 +74,7 @@ return [
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'url' => env('APP_URL', 'http://localhost'),
|
'url' => env('APP_URL', 'http://localhost'),
|
||||||
|
'label_url' => env('LABEL_URL', 'http://localhost'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -217,7 +217,7 @@
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: "{{ config('app.url') }}/models/" + modelid + "/custom_fields",
|
url: "{{ config('app.label_url') }}/models/" + modelid + "/custom_fields",
|
||||||
headers: {
|
headers: {
|
||||||
"X-Requested-With": 'XMLHttpRequest',
|
"X-Requested-With": 'XMLHttpRequest',
|
||||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
||||||
|
@ -260,7 +260,7 @@
|
||||||
if (status_id != '') {
|
if (status_id != '') {
|
||||||
$(".status_spinner").css("display", "inline");
|
$(".status_spinner").css("display", "inline");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{{config('app.url') }}/api/v1/statuslabels/" + status_id + "/deployable",
|
url: "{{config('app.label_url') }}/api/v1/statuslabels/" + status_id + "/deployable",
|
||||||
headers: {
|
headers: {
|
||||||
"X-Requested-With": 'XMLHttpRequest',
|
"X-Requested-With": 'XMLHttpRequest',
|
||||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
||||||
|
|
|
@ -112,7 +112,7 @@ $qr_size = ($settings->alt_barcode_enabled=='1') && ($settings->label2_1d_type!=
|
||||||
|
|
||||||
@if ($settings->qr_code=='1')
|
@if ($settings->qr_code=='1')
|
||||||
<div class="qr_img">
|
<div class="qr_img">
|
||||||
<img src="{{ config('app.url') }}/hardware/{{ $asset->id }}/qr_code" class="qr_img">
|
<img src="{{ config('app.label_url') }}/hardware/{{ $asset->id }}/qr_code" class="qr_img">
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ $qr_size = ($settings->alt_barcode_enabled=='1') && ($settings->label2_1d_type!=
|
||||||
|
|
||||||
@if ((($settings->alt_barcode_enabled=='1') && $settings->label2_1d_type!=''))
|
@if ((($settings->alt_barcode_enabled=='1') && $settings->label2_1d_type!=''))
|
||||||
<div class="barcode_container">
|
<div class="barcode_container">
|
||||||
<img src="{{ config('app.url') }}/hardware/{{ $asset->id }}/barcode" class="barcode">
|
<img src="{{ config('app.label_url') }}/hardware/{{ $asset->id }}/barcode" class="barcode">
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
|
@ -276,7 +276,7 @@
|
||||||
function genericRowLinkFormatter(destination) {
|
function genericRowLinkFormatter(destination) {
|
||||||
return function (value,row) {
|
return function (value,row) {
|
||||||
if (value) {
|
if (value) {
|
||||||
return '<a href="{{ config('app.url') }}/' + destination + '/' + row.id + '">' + value + '</a>';
|
return '<a href="{{ config('app.label_url') }}/' + destination + '/' + row.id + '">' + value + '</a>';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -318,7 +318,7 @@
|
||||||
text_help = '';
|
text_help = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '<nobr><a href="{{ config('app.url') }}/' + destination + '/' + value.id + '" data-tooltip="true" title="'+ status_meta[value.status_meta] + '"> <i class="fa ' + icon_style + ' text-' + text_color + '"></i> ' + value.name + ' ' + text_help + ' </a> </nobr>';
|
return '<nobr><a href="{{ config('app.label_url') }}/' + destination + '/' + value.id + '" data-tooltip="true" title="'+ status_meta[value.status_meta] + '"> <i class="fa ' + icon_style + ' text-' + text_color + '"></i> ' + value.name + ' ' + text_help + ' </a> </nobr>';
|
||||||
} else if ((value) && (value.name)) {
|
} else if ((value) && (value.name)) {
|
||||||
|
|
||||||
// Add some overrides for any funny urls we have
|
// Add some overrides for any funny urls we have
|
||||||
|
@ -328,7 +328,7 @@
|
||||||
var dpolymorphicItemFormatterest = 'fields/';
|
var dpolymorphicItemFormatterest = 'fields/';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '<nobr><a href="{{ config('app.url') }}/' + dpolymorphicItemFormatterest + dest + '/' + value.id + '">' + value.name + '</a></span>';
|
return '<nobr><a href="{{ config('app.label_url') }}/' + dpolymorphicItemFormatterest + dest + '/' + value.id + '">' + value.name + '</a></span>';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -341,7 +341,7 @@
|
||||||
|
|
||||||
|
|
||||||
function hardwareAuditFormatter(value, row) {
|
function hardwareAuditFormatter(value, row) {
|
||||||
return '<a href="{{ config('app.url') }}/hardware/' + row.id + '/audit" class="btn btn-sm bg-yellow" data-tooltip="true" title="Audit this item">{{ trans('general.audit') }}</a>';
|
return '<a href="{{ config('app.label_url') }}/hardware/' + row.id + '/audit" class="btn btn-sm bg-yellow" data-tooltip="true" title="Audit this item">{{ trans('general.audit') }}</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -303,6 +303,7 @@
|
||||||
id="label2_2d_target"
|
id="label2_2d_target"
|
||||||
:options="['hardware_id'=>'/hardware/{id} ('.trans('admin/settings/general.default').')',
|
:options="['hardware_id'=>'/hardware/{id} ('.trans('admin/settings/general.default').')',
|
||||||
'ht_tag'=>'/ht/{asset_tag}',
|
'ht_tag'=>'/ht/{asset_tag}',
|
||||||
|
'custom_url_hardware_id'=>'/hardware/{id}',
|
||||||
'location' => '/location/{location_id}',
|
'location' => '/location/{location_id}',
|
||||||
]"
|
]"
|
||||||
:selected="old('label2_2d_target', $setting->label2_2d_target)"
|
:selected="old('label2_2d_target', $setting->label2_2d_target)"
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
|
|
||||||
function statuslabelsAssetLinkFormatter(value, row) {
|
function statuslabelsAssetLinkFormatter(value, row) {
|
||||||
if ((row) && (row.name)) {
|
if ((row) && (row.name)) {
|
||||||
return '<a href="{{ config('app.url') }}/hardware/?status_id=' + row.id + '"> ' + row.name + '</a>';
|
return '<a href="{{ config('app.label_url') }}/hardware/?status_id=' + row.id + '"> ' + row.name + '</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue