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

54 lines
2.8 KiB
PHP
Raw Normal View History

<div role="tabpanel" class="tab-pane{{ $active_tab == 'photos' ? ' active' : '' }}" id="photos-tab">
@if (count($photos) == 0)
<div class="text-center" style="margin-top: 30px;">
<h4 class="text-danger"><b>@lang('admin.album_no_photos_p1')</b></h4>
@if (Gate::check('upload-photos', $album))
<p>@lang('admin.album_no_photos_p2')</p>
<p style="margin-top: 30px;"><button class="btn btn-lg btn-success" v-on:click="switchToUploadTab"><i class="fa fa-fw fa-upload"></i> @lang('admin.album_no_photos_button')</button></p>
@else
<p>@lang('admin.album_no_photos_p2_no_upload')</p>
@endif
</div>
@else
<form action="{{ route('photos.updateBulk', [$album->id, 'page' => Request::get('page', 1)]) }}" method="POST">
{{ csrf_field() }}
{{ method_field('PUT') }}
@foreach ($photos as $photo)
@include (Theme::viewName('partials.single_photo_admin'))
@endforeach
<div class="row">
<div class="col-md-6 mb-3">
<p style="margin-bottom: 15px;">
<button v-on:click="selectAll" type="button" class="btn btn-secondary">@lang('admin.select_all_action')</button>
<button v-on:click="selectNone" type="button" class="btn btn-secondary">@lang('admin.select_none_action')</button>
</p>
<input v-model="selectAllInAlbum" type="hidden" name="select-all-album"/>
<div v-if="selectAllInAlbum" class="alert alert-warning">
@lang('admin.select_all_album_active')
</div>
<p><label class="control-label" for="bulk-action">@lang('forms.bulk_edit_photos_label')</label></p>
<input type="hidden" name="new-album-id" value="{{ $album->id }}"/>
<select name="bulk-action" v-model="bulkModifyMethod">
<option>@lang('forms.bulk_edit_photos_placeholder')</option>
@foreach ($bulk_actions as $key => $value)
<option value="{{ $key }}"{{ $key == old('bulk-action') ? ' selected="selected"' : '' }}>{{ $value }}</option>
@endforeach
</select>
<button type="submit" class="btn btn-sm btn-primary" name="bulk-apply" value="clicked" v-on:click="bulkModifySelected">@lang('forms.apply_action')</button>
</div>
<div class="col-md-6 text-right">
<button type="submit" class="btn btn-success">@lang('forms.save_action')</button>
</div>
</div>
</form>
<div class="text-center">
{{ $photos->links() }}
</div>
@endif
</div>