snipe-it/resources/views/users/confirm-bulk-delete.blade.php

122 lines
5.3 KiB
PHP
Raw Normal View History

2016-03-25 01:18:05 -07:00
@extends('layouts/default')
{{-- Page title --}}
@section('title')
2016-05-12 21:01:31 -07:00
Bulk Checkin & Delete
2016-03-25 01:18:05 -07:00
@parent
@stop
{{-- Page content --}}
@section('content')
2016-04-21 21:53:31 -07:00
<div class="row">
2016-04-21 22:15:09 -07:00
<div class="col-md-8 col-md-offset-2">
2016-04-21 21:53:31 -07:00
<div class="box box-default">
<div class="box-body">
2016-03-25 01:18:05 -07:00
2016-04-21 21:53:31 -07:00
<form class="form-horizontal" role="form" method="post" action="{{ route('users/bulksave') }}">
<!-- CSRF Token -->
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
2016-03-25 01:18:05 -07:00
<div class="col-md-12">
2016-04-21 21:53:31 -07:00
<div class="callout callout-danger">
2016-03-25 01:18:05 -07:00
<i class="fa fa-exclamation-circle"></i>
<strong>WARNING: </strong>
You are about to delete the {{ count($users) }} user(s) listed below. Super admin names are highlighted in red.
2016-03-25 01:18:05 -07:00
</div>
</div>
@if (config('app.lock_passwords'))
2016-04-21 21:53:31 -07:00
<div class="col-md-12">
<div class="callout callout-warning">
<p>{{ trans('feature_disabled') }}</p>
</div>
</div>
2016-03-25 01:18:05 -07:00
@endif
2016-04-21 21:53:31 -07:00
<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>
2016-05-12 21:01:31 -07:00
<th class="col-md-5">Assets</th>
<th class="col-md-5">Accessories</th>
<th class="col-md-5">Licenses</th>
2016-04-21 21:53:31 -07:00
</tr>
</thead>
<tfoot>
<tr>
2016-05-12 21:01:31 -07:00
<td colspan="6" class="warning">
2016-04-21 21:53:31 -07:00
{{ 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>
</td>
</tr>
2016-05-12 21:01:31 -07:00
<tr>
<td colspan="6" class="warning">
<label><input type="checkbox" name="edit_user['.e($user->id).']" checked> Check in all properties associated with these users</label>
</td>
</tr>
2016-04-21 21:53:31 -07:00
</tfoot>
<tbody>
@foreach ($users as $user)
<tr {!! ($user->isSuperUser() ? ' class="danger"':'') !!}>
2016-04-21 21:53:31 -07:00
<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>
2016-05-12 21:01:31 -07:00
2016-04-21 21:53:31 -07:00
<td>
<span{{ (Auth::user()->id==$user->id ? ' style="text-decoration: line-through"' : '') }}>{{ $user->present()->fullName() }} ({{ $user->username }})</span>
2016-04-21 21:53:31 -07:00
{{ (Auth::user()->id==$user->id ? ' (cannot delete yourself)' : '') }}
</td>
<td>
2016-05-12 21:01:31 -07:00
@foreach ($user->groups as $group)
Discussion: Moving to policies for controller based authorization (#3080) * Make delete routes work. We put a little form in the modal that spoofs the delete field. * Fix route on creating a user. * Fix redundant id parameter. * Port acceptance tests to new urls. * Initial work on migrating to model based policies instead of global gates. Will allow for much more detailed permissions bits in the future. * This needs to stay for the dashboard checks. * Add user states for permissions to build tests. * Build up unit tests for gates/permissions. Move accessories/consumables/assets to policies instead of in authserviceprovider * Migrate various locations to new syntax. Update test to be more specific * Fix functional tests. Add an artisan command for installing a settings setup on travis-ci * Try a different id... Need to come up with a better way of passing the id for tests that need an existing one. * Try to fix travis * Update urls to use routes and not hardcode old paths. Also fix some migration errors found along the way.: * Add a environment for travis functional tests. * Adjust config file to make travis use it. * Use redirect()->route instead of redirect()-to * Dump all failures in the output directory if travis fails. * Cleanups and minor fixes. * Adjust the supplier modelfactory to comply with new validation restrictions. * Some test fixes. * Locales can be longer than 5 characters according to faker... fex gez_ET. Increase lenght in mysql and add a validation * Update test database dump to latest migrations.
2016-12-19 11:04:28 -08:00
<a href=" {{ route('update/group', $group->id) }}" class="label label-default">
2016-05-12 21:01:31 -07:00
{{ $group->name }}
</a>
@endforeach
</td>
2016-04-21 21:53:31 -07:00
2016-05-12 21:01:31 -07:00
<td>
{{ number_format($user->assets->count()) }}
2016-04-21 21:53:31 -07:00
</td>
2016-05-12 21:01:31 -07:00
<td>
{{ number_format($user->accessories->count()) }}
</td>
<td>
{{ number_format($user->licenses->count()) }}
</td>
2016-04-21 21:53:31 -07:00
</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 -->
2016-03-25 01:18:05 -07:00
</div>
2016-04-21 21:53:31 -07:00
2016-03-25 01:18:05 -07:00
</div>
2016-04-21 21:53:31 -07:00
2016-03-25 01:18:05 -07:00
</form>
@stop