2016-09-02 10:42:05 +01:00
|
|
|
@extends('themes.base.layout')
|
2016-09-01 16:37:49 +01:00
|
|
|
@section('title', $album->name)
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<h1>{{ $album->name }}</h1>
|
|
|
|
<p>{{ $album->description }}</p>
|
|
|
|
<hr/>
|
2016-09-02 21:27:50 +01:00
|
|
|
|
|
|
|
<div>
|
|
|
|
<ul class="nav nav-tabs" role="tablist">
|
2016-09-06 15:07:13 +01:00
|
|
|
<li role="presentation" class="active"><a href="#photos-tab" aria-controls="photos-tab" role="tab" data-toggle="tab"><i class="fa fa-fw fa-photo"></i> @lang('admin.album_photos_tab')</a></li>
|
|
|
|
<li role="presentation"><a href="#upload-tab" aria-controls="upload-tab" role="tab" data-toggle="tab"><i class="fa fa-fw fa-upload"></i> @lang('admin.album_upload_tab')</a></li>
|
|
|
|
<li role="presentation"><a href="#settings-tab" aria-controls="settings-tab" role="tab" data-toggle="tab"><i class="fa fa-fw fa-cog"></i> @lang('admin.album_settings_tab')</a></li>
|
2016-09-02 21:27:50 +01:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="tab-content">
|
2016-09-06 15:07:13 +01:00
|
|
|
{{-- Photos --}}
|
|
|
|
<div role="tabpanel" class="tab-pane active" id="photos-tab">
|
|
|
|
@if ($album->photos()->count() == 0)
|
|
|
|
<div class="text-center" style="margin-top: 30px;">
|
|
|
|
<p><b class="text-danger">@lang('admin.album_no_photos_p1')</b></p>
|
|
|
|
<p>@lang('admin.album_no_photos_p2')</p>
|
|
|
|
<p style="margin-top: 30px;"><button id="upload-button" class="btn btn-lg btn-success">@lang('admin.album_no_photos_button')</button></p>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{-- Upload --}}
|
|
|
|
<div role="tabpanel" class="tab-pane" id="upload-tab">
|
2016-09-05 12:01:30 +01:00
|
|
|
<h4>Upload single images</h4>
|
2016-09-02 21:27:50 +01:00
|
|
|
|
|
|
|
{!! Form::open(['route' => 'photos.store', 'method' => 'POST', 'files' => true]) !!}
|
|
|
|
{!! Form::hidden('album_id', $album->id) !!}
|
|
|
|
|
|
|
|
<div class="form-group">
|
2016-09-05 12:01:30 +01:00
|
|
|
{!! Form::file('photo[]', ['class' => 'control-label', 'multiple' => 'multiple']) !!}
|
2016-09-02 21:27:50 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
{!! Form::submit(trans('forms.upload_action'), ['class' => 'btn btn-success']) !!}
|
|
|
|
</div>
|
|
|
|
{!! Form::close() !!}
|
2016-09-05 12:56:13 +01:00
|
|
|
|
|
|
|
<hr/>
|
|
|
|
<h4>Bulk upload</h4>
|
|
|
|
|
|
|
|
{!! Form::open(['route' => 'photos.storeBulk', 'method' => 'POST', 'files' => true]) !!}
|
|
|
|
{!! Form::hidden('album_id', $album->id) !!}
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
{!! Form::file('archive', ['class' => 'control-label']) !!}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
{!! Form::submit(trans('forms.upload_action'), ['class' => 'btn btn-success']) !!}
|
|
|
|
</div>
|
|
|
|
{!! Form::close() !!}
|
2016-09-02 21:27:50 +01:00
|
|
|
</div>
|
|
|
|
|
2016-09-06 15:07:13 +01:00
|
|
|
{{-- Settings --}}
|
2016-09-02 21:27:50 +01:00
|
|
|
<div role="tabpanel" class="tab-pane" id="settings-tab">
|
2016-09-06 15:07:13 +01:00
|
|
|
<div class="btn-toolbar">
|
|
|
|
<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>
|
|
|
|
</div>
|
2016-09-02 21:27:50 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-09-01 16:37:49 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-09-06 15:07:13 +01:00
|
|
|
@endsection
|
|
|
|
|
|
|
|
@push('scripts')
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#upload-button').click(function() {
|
|
|
|
$('.nav-tabs a[href="#upload-tab"]').tab('show');
|
|
|
|
});
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
@endpush
|