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

64 lines
2.9 KiB
PHP
Raw Normal View History

@extends('themes.base.layout')
@section('title', 'Gallery Admin')
@section('breadcrumb')
<div class="breadcrumb">
<div class="container">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">@lang('navigation.breadcrumb.home')</a></li>
<li><a href="{{ route('admin') }}">@lang('navigation.breadcrumb.admin')</a></li>
<li class="active">@lang('navigation.breadcrumb.albums')</li>
</ol>
</div>
</div>
@endsection
@section('content')
<div class="container">
<div class="row">
<div class="col-xs-12">
@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">@lang('admin.create_album')</a>
</p>
</div>
@else
<table class="table table-hover table-striped">
<thead>
<tr>
<th>@lang('admin.list_albums_name_column')</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach ($albums as $album)
<tr>
<td>
<span style="font-size: 1.3em;"><a href="{{ route('albums.show', ['id' => $album->id]) }}">{{ $album->name }}</a></span><br/>
<p>{{ $album->description }}</p>
<p style="margin-bottom: 0;"><b>{{ $album->photos_count }}</b> {{ trans_choice('admin.stats_photos', $album->photos_count) }}</p>
</td>
<td class="text-right">
<a href="{{ route('albums.edit', ['id' => $album->id]) }}" class="btn btn-default">@lang('forms.edit_action')</a>
<a href="{{ route('albums.delete', ['id' => $album->id]) }}" class="btn btn-danger">@lang('forms.delete_action')</a>
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="text-center">
{{ $albums->links() }}
</div>
<div style="margin-top: 10px;">
<a href="{{ route('albums.create') }}" class="btn btn-success"><i class="fa fa-fw fa-plus"></i> @lang('admin.create_album_link')</a>
</div>
@endif
</div>
</div>
</div>
@endsection