mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Settings tweaks
This commit is contained in:
parent
c4a699f109
commit
cbcc155f27
|
@ -1088,18 +1088,13 @@ class AssetsController extends Controller
|
|||
|
||||
|
||||
$settings = Setting::getSettings();
|
||||
if ($settings->qr_code=='1') {
|
||||
|
||||
$assets = Asset::find($asset_ids);
|
||||
$assetcount = count($assets);
|
||||
$count = 0;
|
||||
|
||||
return View::make('hardware/labels')->with('assets', $assets)->with('settings', $settings)->with('count', $count)->with('settings', $settings);
|
||||
|
||||
} else {
|
||||
// QR codes are not enabled
|
||||
return redirect()->to("hardware")->with('error', 'Barcodes are not enabled in Admin > Settings');
|
||||
}
|
||||
|
||||
|
||||
} elseif (Input::get('bulk_actions')=='delete') {
|
||||
|
||||
|
|
|
@ -329,9 +329,9 @@ class SettingsController extends Controller
|
|||
}
|
||||
|
||||
$setting->locale = e(Input::get('locale', 'en'));
|
||||
$setting->qr_code = e(Input::get('qr_code', '1'));
|
||||
$setting->qr_code = e(Input::get('qr_code', '0'));
|
||||
$setting->alt_barcode = e(Input::get('alt_barcode'));
|
||||
$setting->alt_barcode_enabled = e(Input::get('alt_barcode_enabled', '1'));
|
||||
$setting->alt_barcode_enabled = e(Input::get('alt_barcode_enabled', '0'));
|
||||
$setting->barcode_type = e(Input::get('barcode_type'));
|
||||
$setting->load_remote = e(Input::get('load_remote', '0'));
|
||||
$setting->default_currency = e(Input::get('default_currency', '$'));
|
||||
|
|
|
@ -95,9 +95,11 @@
|
|||
<?php $count++; ?>
|
||||
<div class="label" {!! ($count % $settings->labels_per_page == 0) ? 'style="margin-bottom: 0px;"' : '' !!}>
|
||||
|
||||
@if ($settings->qr_code=='1')
|
||||
<div class="qr_img">
|
||||
<img src="./{{ $asset->id }}/qr_code" class="qr_img">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="qr_text">
|
||||
@if ($settings->qr_text!='')
|
||||
|
|
Loading…
Reference in a new issue