2016-03-25 01:18:05 -07:00
|
|
|
@extends('layouts/default')
|
|
|
|
{{-- Page title --}}
|
|
|
|
@section('title')
|
2022-01-06 03:35:37 -08:00
|
|
|
{!! trans('general.bulk_checkin_delete') !!}
|
2016-03-25 01:18:05 -07:00
|
|
|
@parent
|
|
|
|
@stop
|
|
|
|
|
|
|
|
{{-- Page content --}}
|
|
|
|
@section('content')
|
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-8 col-md-offset-2">
|
|
|
|
<div class="box box-default">
|
|
|
|
<form class="form-horizontal" role="form" method="post" action="{{ route('users/bulksave') }}">
|
|
|
|
<div class="box-body">
|
|
|
|
<!-- CSRF Token -->
|
|
|
|
{{csrf_field()}}
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="callout callout-danger">
|
2021-09-26 01:11:08 -07:00
|
|
|
<i class="fas fa-exclamation-triangle"></i>
|
2023-04-03 19:20:58 -07:00
|
|
|
<strong>{{ trans('admin/users/general.warning_deletion_information', array('count' => count($users))) }} </strong>
|
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
</div>
|
2016-12-27 12:03:47 -08:00
|
|
|
</div>
|
2016-03-25 01:18:05 -07:00
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
@if (config('app.lock_passwords'))
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="callout callout-warning">
|
2022-07-20 18:01:55 -07:00
|
|
|
<p>{{ trans('general.feature_disabled') }}</p>
|
2016-04-21 21:53:31 -07:00
|
|
|
</div>
|
2016-03-25 01:18:05 -07:00
|
|
|
</div>
|
2016-12-27 12:03:47 -08:00
|
|
|
@endif
|
|
|
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="display table table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2023-04-03 22:38:56 -07:00
|
|
|
<th class="col-md-1">
|
|
|
|
<!-- <input type="checkbox" id="checkAll"> -->
|
|
|
|
</th>
|
2022-01-06 03:35:37 -08:00
|
|
|
<th class="col-md-6">{{ trans('general.name') }}</th>
|
|
|
|
<th class="col-md-5">{{ trans('general.groups') }}</th>
|
|
|
|
<th class="col-md-5">{{ trans('general.assets') }}</th>
|
|
|
|
<th class="col-md-5">{{ trans('general.accessories') }}</th>
|
|
|
|
<th class="col-md-5">{{ trans('general.licenses') }}</th>
|
2022-07-20 17:57:39 -07:00
|
|
|
<th class="col-md-5">{{ trans('general.consumables') }}</th>
|
2024-07-03 15:31:09 -07:00
|
|
|
<th class="col-md-5">{{ trans('general.files') }}</th>
|
2016-12-27 12:03:47 -08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach ($users as $user)
|
|
|
|
<tr {!! ($user->isSuperUser() ? ' class="danger"':'') !!}>
|
|
|
|
<td>
|
|
|
|
@if (Auth::id()!=$user->id)
|
2023-04-03 19:19:28 -07:00
|
|
|
<input type="checkbox" name="ids[]" value="{{ $user->id }}" checked="checked">
|
2016-12-27 12:03:47 -08:00
|
|
|
@else
|
2023-04-03 19:19:28 -07:00
|
|
|
<input type="checkbox" name="ids[]" class="cannot_delete" value="{{ $user->id }}" disabled>
|
2016-12-27 12:03:47 -08:00
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td>
|
2022-07-20 17:57:39 -07:00
|
|
|
<span {!! (Auth::user()->id==$user->id ? ' style="text-decoration: line-through"' : '') !!}>
|
2016-12-27 12:03:47 -08:00
|
|
|
{{ $user->present()->fullName() }} ({{ $user->username }})
|
|
|
|
</span>
|
|
|
|
{{ (Auth::id()==$user->id ? ' (cannot delete yourself)' : '') }}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@foreach ($user->groups as $group)
|
2017-02-01 19:07:39 -08:00
|
|
|
<a href=" {{ route('groups.update', $group->id) }}" class="label label-default">
|
2016-12-27 12:03:47 -08:00
|
|
|
{{ $group->name }}
|
2017-02-01 19:07:39 -08:00
|
|
|
</a>
|
2016-12-27 12:03:47 -08:00
|
|
|
@endforeach
|
|
|
|
</td>
|
|
|
|
<td>
|
2024-07-03 15:31:09 -07:00
|
|
|
{{ number_format($user->assets->count()) }}
|
2016-12-27 12:03:47 -08:00
|
|
|
</td>
|
|
|
|
<td>
|
2024-07-03 15:31:09 -07:00
|
|
|
{{ number_format($user->accessories->count()) }}
|
2016-12-27 12:03:47 -08:00
|
|
|
</td>
|
|
|
|
<td>
|
2024-07-03 15:31:09 -07:00
|
|
|
{{ number_format($user->licenses->count()) }}
|
2016-12-27 12:03:47 -08:00
|
|
|
</td>
|
2022-07-20 17:57:39 -07:00
|
|
|
<td>
|
2024-07-03 15:31:09 -07:00
|
|
|
{{ number_format($user->consumables->count()) }}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ number_format($user->uploads->count()) }}
|
2022-07-20 17:57:39 -07:00
|
|
|
</td>
|
2016-12-27 12:03:47 -08:00
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
<tfoot>
|
2022-07-20 17:57:39 -07:00
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
<tr>
|
2024-07-03 15:31:09 -07:00
|
|
|
<td colspan="8">
|
2024-06-27 07:05:47 -07:00
|
|
|
{{ Form::select('status_id', $statuslabel_list , old('status_id'), array('class'=>'select2', 'style'=>'width:250px')) }}
|
2022-07-20 17:57:39 -07:00
|
|
|
<label>{{ trans('admin/users/general.update_user_assets_status') }}</label>
|
2016-12-27 12:03:47 -08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2024-07-03 15:31:09 -07:00
|
|
|
<td colspan="8" class="col-md-12 alert-danger">
|
2023-04-03 19:37:07 -07:00
|
|
|
<label class="form-control">
|
|
|
|
<input type="checkbox" name="delete_user" value="1">
|
|
|
|
<span><i class="fa fa-warning fa-2x"></i> {{ trans('general.bulk_soft_delete') }}</span>
|
2022-07-20 17:57:39 -07:00
|
|
|
</label>
|
2016-12-27 12:03:47 -08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
|
|
</table>
|
|
|
|
</div> <!--/table-responsive-->
|
|
|
|
</div><!--/col-md-12-->
|
|
|
|
</div> <!--/box-body-->
|
|
|
|
<div class="box-footer text-right">
|
2023-03-18 00:14:09 -07:00
|
|
|
<a class="btn btn-link pull-left" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
|
|
|
|
|
|
|
|
<button type="submit" class="btn btn-success"{{ (config('app.lock_passwords') ? ' disabled' : '') }} disabled="disabled"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('button.submit') }}</button>
|
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
</div><!-- /.box-footer -->
|
|
|
|
</form>
|
2016-03-25 01:18:05 -07:00
|
|
|
</div>
|
2016-12-27 12:03:47 -08:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-03-25 01:18:05 -07:00
|
|
|
|
|
|
|
@stop
|
2022-11-23 15:45:59 -08:00
|
|
|
|
|
|
|
@section('moar_scripts')
|
|
|
|
<script>
|
2023-04-03 19:19:28 -07:00
|
|
|
|
|
|
|
|
2023-04-03 22:38:56 -07:00
|
|
|
// TODO: include a class that excludes certain checkboxes by class to not be select-all'd
|
|
|
|
// $("#checkAll").change(function () {
|
|
|
|
// $("input:checkbox").prop('checked', $(this).prop("checked"));
|
|
|
|
// });
|
2023-04-03 19:19:28 -07:00
|
|
|
|
|
|
|
|
|
|
|
$(":submit").attr("disabled", "disabled");
|
2024-02-05 16:41:29 -08:00
|
|
|
$("[name='status_id']").on('select2:select', function (e) {
|
|
|
|
if (e.params.data.id != "") {
|
|
|
|
console.log(e.params.data.id);
|
|
|
|
$(":submit").removeAttr("disabled");
|
|
|
|
} else {
|
|
|
|
$(":submit").attr("disabled", "disabled");
|
|
|
|
}
|
|
|
|
});
|
2022-11-23 15:45:59 -08:00
|
|
|
</script>
|
|
|
|
@stop
|