Settings tweaks

This commit is contained in:
snipe 2016-05-19 19:49:25 -07:00
parent c4a699f109
commit cbcc155f27
3 changed files with 5 additions and 8 deletions

View file

@ -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') {

View file

@ -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', '$'));

View file

@ -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!='')