mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
638a7b2d91
* Extract method/cleanup * Remove apiStore method that is unusued since api controllers. * Use proper model exception * Remove old user importer. This is now supported by the general importer framework. * Refactor AssetsController methods. This is a giant diff without many functional changes, mostly cosmetic. I've pulled a number of methods out of assetscontroller, preferring instead to create some more targetted controllers for related actions. I think this cleans up the file some, and suggests some places for future targetted improvement. Fix weird missing things. * Fix Unit test failing after date changes. * Pass valid string to be translated. * Some method cleanup for codacy. * Extract trait for common checkout uses and codacy fixes.
97 lines
3.4 KiB
PHP
Executable file
97 lines
3.4 KiB
PHP
Executable file
@extends('layouts/default')
|
|
|
|
{{-- Page title --}}
|
|
@section('title')
|
|
|
|
@if (Input::get('status')=='deleted')
|
|
{{ trans('general.deleted') }}
|
|
@else
|
|
{{ trans('general.current') }}
|
|
@endif
|
|
{{ trans('general.users') }}
|
|
|
|
@parent
|
|
@stop
|
|
|
|
@section('header_right')
|
|
@can('create', \App\Models\User::class)
|
|
@if ($snipeSettings->ldap_enabled == 1)
|
|
<a href="{{ route('ldap/user') }}" class="btn btn-default pull-right"><span class="fa fa-sitemap"></span> LDAP Sync</a>
|
|
@endif
|
|
<a href="{{ route('users.create') }}" class="btn btn-primary pull-right" style="margin-right: 5px;"> {{ trans('general.create') }}</a>
|
|
@endcan
|
|
|
|
@if (Input::get('status')=='deleted')
|
|
<a class="btn btn-default pull-right" href="{{ route('users.index') }}" style="margin-right: 5px;">{{ trans('admin/users/table.show_current') }}</a>
|
|
@else
|
|
<a class="btn btn-default pull-right" href="{{ route('users.index', ['status' => 'deleted']) }}" style="margin-right: 5px;">{{ trans('admin/users/table.show_deleted') }}</a>
|
|
@endif
|
|
@can('view', \App\Models\User::class)
|
|
<a class="btn btn-default pull-right" href="{{ route('users.export') }}" style="margin-right: 5px;">Export</a>
|
|
@endcan
|
|
@stop
|
|
|
|
{{-- Page content --}}
|
|
@section('content')
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="box box-default">
|
|
<div class="box-body">
|
|
{{ Form::open([
|
|
'method' => 'POST',
|
|
'route' => ['users/bulkedit'],
|
|
'class' => 'form-inline',
|
|
'id' => 'bulkForm']) }}
|
|
|
|
@if (Input::get('status')!='deleted')
|
|
@can('delete', \App\Models\User::class)
|
|
<div id="toolbar">
|
|
<select name="bulk_actions" class="form-control select2" style="width: 200px;">
|
|
<option value="delete">Bulk Checkin & Delete</option>
|
|
<option value="edit">Bulk Edit</option>
|
|
</select>
|
|
<button class="btn btn-default" id="bulkEdit" disabled>Go</button>
|
|
</div>
|
|
@endcan
|
|
@endif
|
|
|
|
|
|
<table
|
|
data-click-to-select="true"
|
|
data-columns="{{ \App\Presenters\UserPresenter::dataTableLayout() }}"
|
|
data-cookie-id-table="usersTable"
|
|
data-pagination="true"
|
|
data-id-table="usersTable"
|
|
data-search="true"
|
|
data-side-pagination="server"
|
|
data-show-columns="true"
|
|
data-show-export="true"
|
|
data-show-refresh="true"
|
|
data-sort-order="asc"
|
|
data-toolbar="#toolbar"
|
|
id="usersTable"
|
|
class="table table-striped snipe-table"
|
|
data-url="{{ route('api.users.index',
|
|
array('deleted'=> (Input::get('status')=='deleted') ? 'true' : 'false','company_id'=>e(Input::get('company_id')))) }}"
|
|
data-export-options='{
|
|
"fileName": "export-users-{{ date('Y-m-d') }}",
|
|
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
|
}'>
|
|
</table>
|
|
|
|
|
|
{{ Form::close() }}
|
|
</div><!-- /.box-body -->
|
|
</div><!-- /.box -->
|
|
</div>
|
|
</div>
|
|
|
|
@stop
|
|
|
|
@section('moar_scripts')
|
|
@include ('partials.bootstrap-table')
|
|
|
|
|
|
@stop
|