Added a page to the album editor to display photos - doesn't currently display anything yet!

This commit is contained in:
Andy Heathershaw 2016-09-06 15:07:13 +01:00
parent 00b238b3c6
commit 484f5d8fb2
2 changed files with 38 additions and 12 deletions

View File

@ -1,6 +1,12 @@
<?php
return [
'actions_panel' => 'Actions',
'album_no_photos_p1' => 'This album does not yet have any photos.',
'album_no_photos_p2' => 'Click the "Upload photos" button below to get started.',
'album_no_photos_button' => 'Upload photos',
'album_photos_tab' => 'Photos',
'album_settings_tab' => 'Settings',
'album_upload_tab' => 'Upload',
'create_album' => 'Create a photo album',
'create_album_intro' => 'Photo albums contain individual photographs together in the same way as a physical photo album or memory book.',
'create_album_intro2' => 'Complete the form below to create a photo album.',

View File

@ -10,15 +10,26 @@
<hr/>
<div>
{{-- Nav tabs --}}
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#upload-tab" aria-controls="upload-tab" role="tab" data-toggle="tab"><i class="fa fa-fw fa-upload"></i> Upload</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> Settings</a></li>
<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>
</ul>
{{-- Tab panes --}}
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="upload-tab">
{{-- 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">
<h4>Upload single images</h4>
{!! Form::open(['route' => 'photos.store', 'method' => 'POST', 'files' => true]) !!}
@ -49,17 +60,26 @@
{!! Form::close() !!}
</div>
{{-- Settings --}}
<div role="tabpanel" class="tab-pane" id="settings-tab">
<h4>Settings</h4>
</div>
</div>
</div>
<div class="btn-toolbar" style="margin-top: 30px;">
<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>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script type="text/javascript">
$(document).ready(function() {
$('#upload-button').click(function() {
$('.nav-tabs a[href="#upload-tab"]').tab('show');
});
})
</script>
@endpush