2017-09-10 21:12:57 +01:00
|
|
|
@extends(Theme::viewName('layout'))
|
2017-02-13 12:08:16 +00:00
|
|
|
@section('title', trans('admin.list_groups_title'))
|
|
|
|
|
|
|
|
@section('breadcrumb')
|
2017-03-25 21:21:22 +00:00
|
|
|
<li class="breadcrumb-item"><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
|
|
|
|
<li class="breadcrumb-item"><a href="{{ route('admin') }}">@lang('navigation.breadcrumb.admin')</a></li>
|
|
|
|
<li class="breadcrumb-item active">@lang('navigation.breadcrumb.groups')</li>
|
2017-02-13 12:08:16 +00:00
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
2017-03-25 21:21:22 +00:00
|
|
|
<div class="col">
|
2017-02-13 12:08:16 +00:00
|
|
|
<h1>@yield('title')</h1>
|
|
|
|
<div class="alert alert-info" style="margin-bottom: 30px;">
|
2017-03-27 14:04:09 +01:00
|
|
|
<i class="fa fa-fw fa-info"></i> @lang('admin.list_groups_intro')
|
2017-02-13 12:08:16 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
@if (count($groups) == 0)
|
|
|
|
<div class="text-center">
|
|
|
|
<h4 class="text-danger"><b>@lang('admin.no_groups_title')</b></h4>
|
|
|
|
<p>@lang('admin.no_groups_text')</p>
|
|
|
|
<p style="margin-top: 40px;">
|
|
|
|
<a href="{{ route('groups.create') }}" class="btn btn-lg btn-success">@lang('admin.create_group')</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
@else
|
|
|
|
<table class="table table-hover table-striped">
|
|
|
|
<tbody>
|
|
|
|
@foreach ($groups as $group)
|
|
|
|
<tr>
|
|
|
|
<td>
|
2017-03-25 21:21:22 +00:00
|
|
|
<a href="{{ route('groups.edit', ['id' => $group->id]) }}"><span style="font-size: 1.3em;">{{ $group->name }}</span></a><br/>
|
2017-02-15 09:14:52 +00:00
|
|
|
<span class="{{ $group->users()->count() == 0 ? "text-danger" : "text-success" }}">{{ trans_choice('admin.group_number_users', $group->users()->count()) }}</span>
|
2017-02-13 12:08:16 +00:00
|
|
|
</td>
|
|
|
|
<td class="text-right">
|
|
|
|
<a href="{{ route('groups.delete', ['id' => $group->id]) }}" class="btn btn-danger">@lang('forms.delete_action')</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<div class="text-center">
|
|
|
|
{{ $groups->links() }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="pull-right" style="margin-top: 10px;">
|
2017-04-15 10:50:22 +01:00
|
|
|
@can('admin:manage-users')
|
|
|
|
<a href="{{ route('users.index') }}" class="btn btn-link">@lang('admin.list_users_title')</a>
|
|
|
|
@endcan
|
2017-02-13 12:08:16 +00:00
|
|
|
<a href="{{ route('groups.create') }}" class="btn btn-success"><i class="fa fa-fw fa-plus"></i> @lang('admin.create_group')</a>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|