blue-twilight/resources/views/themes/base/partials/single_album_admin.blade.php

37 lines
1.7 KiB
PHP

<tr data-album-id="{{ $album->id }}" class="{{ $is_child ? 'hidden' : '' }}" @if (!is_null($album->parent_album_id)) data-parent-album-id="{{ $album->parent_album_id }}" @endif>
<td style="width: 20px;">
@if (count($album->child_albums) > 0)
<i class="album-expand-handle fa fa-fw fa-plus mt-2"></i>
@endif
</td>
<td>
<span style="font-size: 1.3em;">
@can('edit', $album)
<a href="{{ route('albums.show', ['album' => $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) }}
@if (count($album->child_albums) > 0)
&middot; <b>{{ count($album->child_albums) }}</b> {{ trans_choice('admin.stats_widget.albums', count($album->child_albums)) }}
@endif
</p>
</td>
<td class="text-right">
<div class="btn-group">
@can('edit', $album)
<a href="{{ route('albums.edit', ['album' => $album->id]) }}" class="btn btn-secondary">@lang('forms.edit_action')</a>
@endcan
@can('delete', $album)
<a href="{{ route('albums.delete', ['album' => $album->id]) }}" class="btn btn-danger">@lang('forms.delete_action')</a>
@endcan
</div>
</td>
</tr>
@foreach ($album->child_albums as $album)
@include (Theme::viewName('partials.single_album_admin'), ['is_child' => true])
@endforeach