2015-10-14 16:15:39 +02:00
|
|
|
@extends('header')
|
2015-03-16 22:45:25 +01:00
|
|
|
|
|
|
|
@section('content')
|
|
|
|
@parent
|
2015-10-14 16:15:39 +02:00
|
|
|
@include('accounts.nav', ['selected' => ACCOUNT_USER_MANAGEMENT, 'advanced' => true])
|
2015-03-16 22:45:25 +01:00
|
|
|
|
2016-04-19 04:35:18 +02:00
|
|
|
@if (Utils::hasFeature(FEATURE_USERS))
|
2016-07-11 19:08:43 +02:00
|
|
|
@if (Auth::user()->caddAddUsers())
|
|
|
|
<div class="pull-right">
|
|
|
|
{!! Button::primary(trans('texts.add_user'))->asLinkTo(URL::to('/users/create'))->appendIcon(Icon::create('plus-sign')) !!}
|
|
|
|
</div>
|
|
|
|
@endif
|
2016-05-08 20:50:35 +02:00
|
|
|
@elseif (Utils::isTrial())
|
2016-07-11 19:08:43 +02:00
|
|
|
<div class="alert alert-warning">{!! trans('texts.add_users_not_supported') !!}</div>
|
2015-03-16 22:45:25 +01:00
|
|
|
@endif
|
|
|
|
|
|
|
|
<label for="trashed" style="font-weight:normal; margin-left: 10px;">
|
|
|
|
<input id="trashed" type="checkbox" onclick="setTrashVisible()"
|
2015-11-21 22:10:26 +01:00
|
|
|
{!! Session::get('show_trash:user') ? 'checked' : ''!!}/> {!! trans('texts.show_archived_users')!!}
|
2015-03-16 22:45:25 +01:00
|
|
|
</label>
|
|
|
|
|
2015-11-05 23:37:04 +01:00
|
|
|
@include('partials.bulk_form', ['entityType' => ENTITY_USER])
|
2015-03-16 22:45:25 +01:00
|
|
|
|
2015-04-01 21:57:02 +02:00
|
|
|
{!! Datatable::table()
|
2015-03-16 22:45:25 +01:00
|
|
|
->addColumn(
|
|
|
|
trans('texts.name'),
|
|
|
|
trans('texts.email'),
|
|
|
|
trans('texts.user_state'),
|
|
|
|
trans('texts.action'))
|
|
|
|
->setUrl(url('api/users/'))
|
|
|
|
->setOptions('sPaginationType', 'bootstrap')
|
|
|
|
->setOptions('bFilter', false)
|
|
|
|
->setOptions('bAutoWidth', false)
|
|
|
|
->setOptions('aoColumns', [[ "sWidth"=> "20%" ], [ "sWidth"=> "45%" ], ["sWidth"=> "20%"], ["sWidth"=> "15%" ]])
|
|
|
|
->setOptions('aoColumnDefs', [['bSortable'=>false, 'aTargets'=>[3]]])
|
2015-04-01 21:57:02 +02:00
|
|
|
->render('datatable') !!}
|
2015-03-16 22:45:25 +01:00
|
|
|
|
|
|
|
<script>
|
2016-07-11 19:08:43 +02:00
|
|
|
|
2015-11-11 13:17:58 +01:00
|
|
|
window.onDatatableReady = actionListHandler;
|
2015-03-16 22:45:25 +01:00
|
|
|
|
|
|
|
function setTrashVisible() {
|
|
|
|
var checked = $('#trashed').is(':checked');
|
2016-02-18 19:14:48 +01:00
|
|
|
var url = '{{ URL::to('view_archive/user') }}' + (checked ? '/true' : '/false');
|
|
|
|
|
|
|
|
$.get(url, function(data) {
|
|
|
|
refreshDatatable();
|
|
|
|
})
|
2015-03-16 22:45:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
@stop
|