2016-09-02 10:42:05 +01:00
|
|
|
@extends('themes.base.layout')
|
2016-09-01 16:23:39 +01:00
|
|
|
@section('title', 'Gallery Admin')
|
|
|
|
|
2016-09-09 15:06:34 +01:00
|
|
|
@section('breadcrumb')
|
2017-03-27 14:04:09 +01: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.albums')</li>
|
2016-09-09 15:06:34 +01:00
|
|
|
@endsection
|
|
|
|
|
2016-09-01 16:23:39 +01:00
|
|
|
@section('content')
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
2017-03-27 14:04:09 +01:00
|
|
|
<div class="col">
|
2017-02-13 10:36:53 +00:00
|
|
|
<h1>@lang('admin.list_albums_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_albums_intro')
|
2017-02-13 10:36:53 +00:00
|
|
|
</div>
|
|
|
|
|
2016-09-01 17:17:55 +01:00
|
|
|
@if (count($albums) == 0)
|
|
|
|
<div class="text-center">
|
2016-09-06 19:47:25 +01:00
|
|
|
<h4 class="text-danger"><b>@lang('admin.no_albums_title')</b></h4>
|
2016-09-01 17:17:55 +01:00
|
|
|
<p>@lang('admin.no_albums_text')</p>
|
|
|
|
<p style="margin-top: 40px;">
|
2017-02-15 09:14:52 +00:00
|
|
|
<a href="{{ route('albums.create') }}" class="btn btn-lg btn-success"><i class="fa fa-fw fa-plus"></i> @lang('admin.create_album')</a>
|
2016-09-01 17:17:55 +01:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
@else
|
|
|
|
<table class="table table-hover table-striped">
|
|
|
|
<tbody>
|
|
|
|
@foreach ($albums as $album)
|
|
|
|
<tr>
|
2016-09-01 17:31:16 +01:00
|
|
|
<td>
|
2017-03-21 22:10:36 +00:00
|
|
|
<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/>
|
2016-09-01 17:31:16 +01:00
|
|
|
<p>{{ $album->description }}</p>
|
2016-09-09 16:59:13 +01:00
|
|
|
<p style="margin-bottom: 0;"><b>{{ $album->photos_count }}</b> {{ trans_choice('admin.stats_widget.photos', $album->photos_count) }}</p>
|
2016-09-01 17:31:16 +01:00
|
|
|
</td>
|
2016-09-01 17:17:55 +01:00
|
|
|
<td class="text-right">
|
2017-04-16 09:00:57 +01:00
|
|
|
<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>
|
2016-09-01 17:17:55 +01:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2016-09-01 17:31:16 +01:00
|
|
|
|
2016-09-07 21:44:28 +01:00
|
|
|
<div class="text-center">
|
|
|
|
{{ $albums->links() }}
|
|
|
|
</div>
|
|
|
|
|
2016-09-09 16:59:13 +01:00
|
|
|
<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>
|
2016-09-01 17:31:16 +01:00
|
|
|
</div>
|
2016-09-01 17:17:55 +01:00
|
|
|
@endif
|
2016-09-01 16:23:39 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|