70 lines
3.6 KiB
PHP
70 lines
3.6 KiB
PHP
@extends('themes.base.layout')
|
|
@section('title', 'Gallery Admin')
|
|
|
|
@section('breadcrumb')
|
|
<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.albums')</li>
|
|
@endsection
|
|
|
|
@section('content')
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col">
|
|
<h1>@lang('admin.list_albums_title')</h1>
|
|
<div class="alert alert-info" style="margin-bottom: 30px;">
|
|
<i class="fa fa-fw fa-info"></i> @lang('admin.list_albums_intro')
|
|
</div>
|
|
|
|
@if (count($albums) == 0)
|
|
<div class="text-center">
|
|
<h4 class="text-danger"><b>@lang('admin.no_albums_title')</b></h4>
|
|
<p>@lang('admin.no_albums_text')</p>
|
|
<p style="margin-top: 40px;">
|
|
<a href="{{ route('albums.create') }}" class="btn btn-lg btn-success"><i class="fa fa-fw fa-plus"></i> @lang('admin.create_album')</a>
|
|
</p>
|
|
</div>
|
|
@else
|
|
<table class="table table-hover table-striped">
|
|
<tbody>
|
|
@foreach ($albums as $album)
|
|
<tr>
|
|
<td>
|
|
<span style="font-size: 1.3em;">
|
|
@can('edit', $album)
|
|
<a href="{{ route('albums.show', ['id' => $album->id]) }}">{{ $album->name }}</a>
|
|
@endcan
|
|
@cannot('edit', $album)
|
|
{{ $album->name }} <i class="fa fa-fw fa-lock"></i>
|
|
@endcannot
|
|
</span><br/>
|
|
<p>{{ $album->description }}</p>
|
|
<p style="margin-bottom: 0;"><b>{{ $album->photos_count }}</b> {{ trans_choice('admin.stats_widget.photos', $album->photos_count) }}</p>
|
|
</td>
|
|
<td class="text-right">
|
|
<div class="btn-group">
|
|
@can('edit', $album)
|
|
<a href="{{ route('albums.edit', ['id' => $album->id]) }}" class="btn btn-secondary">@lang('forms.edit_action')</a>
|
|
@endcan
|
|
@can('delete', $album)
|
|
<a href="{{ route('albums.delete', ['id' => $album->id]) }}" class="btn btn-danger">@lang('forms.delete_action')</a>
|
|
@endcan
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="text-center">
|
|
{{ $albums->links() }}
|
|
</div>
|
|
|
|
<div class="pull-right" style="margin-top: 10px;">
|
|
<a href="{{ route('albums.create') }}" class="btn btn-success"><i class="fa fa-fw fa-plus"></i> @lang('admin.actions_widget.create_album_link')</a>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection |