Merge branch 'develop'

This commit is contained in:
snipe 2017-09-28 22:22:37 -07:00
commit 8247a73182
3 changed files with 4 additions and 3 deletions

View file

@ -1230,7 +1230,7 @@ class AssetsController extends Controller
foreach ($asset_ids as $asset_id) {
$asset = Asset::find($asset_id);
$this->authorize('checkout', $asset);
$error = $asset->checkOutToUser($user, $admin, $checkout_at, $expected_checkin, e(Input::get('note')), null);
$error = $asset->checkOut($user, $admin, $checkout_at, $expected_checkin, e(Input::get('note')), null);
if ($error) {
array_merge_recursive($errors, $asset->getErrors()->toArray());

View file

@ -82,13 +82,14 @@
{!! $errors->first('selected_asset', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
</form>
</div> <!--./box-body-->
<div class="box-footer">
<a class="btn btn-link" href="{{ URL::previous() }}"> {{ trans('button.cancel') }}</a>
<button type="submit" class="btn btn-success pull-right"><i class="fa fa-check icon-white"></i> {{ trans('general.checkout') }}</button>
</div>
</div>
</form>
</div> <!--/.col-md-7-->
<!-- right column -->

View file

@ -139,7 +139,7 @@ $('.snipe-table').bootstrapTable({
// Use this when we're introspecting into a column object and need to link
function genericColumnObjLinkFormatter(destination) {
return function (value,row) {
if (value.status_type) {
if ((value) && (value.status_type)) {
return '<a href="{{ url('/') }}/' + destination + '/' + value.id + '"> ' + value.name + '</a> ' + '<label class="label label-default">'+ value.status_type + '</label>';
} else if ((value) && (value.name)) {
return '<a href="{{ url('/') }}/' + destination + '/' + value.id + '"> ' + value.name + '</a>';