Fixed bulk user delete display

This commit is contained in:
snipe 2016-04-21 21:53:31 -07:00
parent 4b6f657739
commit d009c66c8b

View file

@ -2,34 +2,26 @@
{{-- Page title --}}
@section('title')
Bulk Edit/Delete
Bulk Edit/Delete
@parent
@stop
{{-- Page content --}}
@section('content')
<div class="page-header">
<h3>
Bulk Process Users
<div class="pull-right">
<a href="{{ route('users') }}" class="btn-flat gray pull-right"><i class="fa fa-arrow-circle-left icon-white"></i> {{ trans('general.back') }}</a>
</div>
</h3>
</div>
<form class="form-horizontal" role="form" method="post" action="{{ route('users/bulksave') }}">
<!-- CSRF Token -->
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
<div class="row">
<div class="col-md-12">
<div class="box box-default">
<div class="box-body">
<form class="form-horizontal" role="form" method="post" action="{{ route('users/bulksave') }}">
<!-- CSRF Token -->
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
<!-- Tabs Content -->
<div class="col-md-12 col-sm-12">
<!-- General tab -->
<div class="col-md-12">
<div class="alert alert-danger">
<div class="callout callout-danger">
<i class="fa fa-exclamation-circle"></i>
<strong>WARNING: </strong>
You are about to delete the {{ count($users) }} user(s) listed below. Admin names are highlighted in red.
@ -37,62 +29,70 @@ Bulk Edit/Delete
</div>
@if (config('app.lock_passwords'))
<p>Note: This feature is disabled on the demo.</p>
<div class="col-md-12">
<div class="callout callout-warning">
<p>{{ trans('feature_disabled') }}</p>
</div>
</div>
@endif
<div class="table-responsive">
<table class="display table table-hover">
<thead>
<tr>
<th class="col-md-1"></th>
<th class="col-md-4">Name</th>
<th class="col-md-7">Groups</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="2">
Update all assets for these users to this status:
</td>
<td>
{{ Form::select('status_id', $statuslabel_list , Input::old('status_id'), array('class'=>'select2', 'style'=>'width:350px')) }}
</td>
</tr>
</tfoot>
<tbody>
@foreach ($users as $user)
<tr>
<td>
@if (Auth::user()->id!=$user->id)
<input type="checkbox" name="edit_user[]" value="{{ $user->id }}" checked="checked">
@else
<input type="checkbox" name="edit_user[]" value="{{ $user->id }}" disabled>
@endif
</td>
<td>
<span{{ (Auth::user()->id==$user->id ? ' style="text-decoration: line-through"' : '') }}>{{ $user->fullName() }}</span>
<div class="col-md-12">
<div class="table-responsive">
<table class="display table table-hover">
<thead>
<tr>
<th class="col-md-1"></th>
<th class="col-md-6">Name</th>
<th class="col-md-5">Groups</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="3" class="warning">
{{ Form::select('status_id', $statuslabel_list , Input::old('status_id'), array('class'=>'select2', 'style'=>'width:250px')) }}
<label>Update all assets for these users to this status</label>
{{ (Auth::user()->id==$user->id ? ' (cannot delete yourself)' : '') }}
</td>
<td>
</td>
</tr>
</tfoot>
<tbody>
@foreach ($users as $user)
<tr>
<td>
@if (Auth::user()->id!=$user->id)
<input type="checkbox" name="edit_user[]" value="{{ $user->id }}" checked="checked">
@else
<input type="checkbox" name="edit_user[]" value="{{ $user->id }}" disabled>
@endif
</td>
<td>
<span{{ (Auth::user()->id==$user->id ? ' style="text-decoration: line-through"' : '') }}>{{ $user->fullName() }} ({{ $user->username }})</span>
</td>
</tr>
@endforeach
</tbody>
</table>
{{ (Auth::user()->id==$user->id ? ' (cannot delete yourself)' : '') }}
</td>
<td>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
<div class="box-footer text-right">
<a class="btn btn-link" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('button.submit') }}</button>
</div><!-- /.box-footer -->
</div>
</div>
<!-- Form Actions -->
<div class="form-group">
<div class="col-sm-offset-2 col-sm-4">
<a class="btn btn-link" href="{{ route('users') }}">{{ trans('button.cancel') }}</a>
<button type="submit" class="btn btn-default">{{ trans('button.submit') }}</button>
</div>
</div>
</form>