blue-twilight/resources/views/themes/base/admin/list_groups.blade.php

63 lines
3.0 KiB
PHP

@extends('themes.base.layout')
@section('title', trans('admin.list_groups_title'))
@section('breadcrumb')
<div class="breadcrumb">
<div class="container">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
<li><a href="{{ route('admin') }}">@lang('navigation.breadcrumb.admin')</a></li>
<li class="active">@lang('navigation.breadcrumb.groups')</li>
</ol>
</div>
</div>
@endsection
@section('content')
<div class="container">
<div class="row">
<div class="col-xs-12">
<h1>@yield('title')</h1>
<div class="alert alert-info" style="margin-bottom: 30px;">
<p><i class="fa fa-fw fa-info"></i> @lang('admin.list_groups_intro')</p>
</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>
<span style="font-size: 1.3em;">{{ $group->name }}</span><br/>
<span class="{{ $group->users()->count() == 0 ? "text-danger" : "text-success" }}">{{ trans_choice('admin.group_number_users', $group->users()->count()) }}</span>
</td>
<td class="text-right">
<a href="{{ route('groups.edit', ['id' => $group->id]) }}" class="btn btn-default">@lang('forms.edit_action')</a>
<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;">
<a href="{{ route('users.index') }}" class="btn btn-default">@lang('admin.list_users_title')</a>
<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