2017-03-27 14:04:09 +01:00
|
|
|
<div role="tabpanel" class="tab-pane{{ $active_tab == 'upload' ? ' active' : '' }}" id="upload-tab">
|
|
|
|
@if (!$is_upload_enabled)
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<p class="text-danger" style="font-weight: bold">@lang('admin.upload_disabled_heading')</p>
|
|
|
|
<p>@lang('admin.upload_disabled_text')</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@else
|
|
|
|
<h4>@lang('admin.upload_single_file_heading')</h4>
|
|
|
|
<p>@lang('admin.upload_single_file_text')</p>
|
|
|
|
<div class="alert alert-info">
|
|
|
|
@lang('admin.upload_single_file_text2', [
|
|
|
|
'file_size' => sprintf('<b>%s%s</b>', round($file_upload_limit, 2), trans('global.units.megabytes')),
|
|
|
|
'max_upload_size' => sprintf('<b>%s%s</b>', round($max_post_limit, 2), trans('global.units.megabytes'))
|
|
|
|
])
|
|
|
|
</div>
|
|
|
|
|
2017-03-31 22:05:57 +01:00
|
|
|
<div style="margin-bottom: 20px;">
|
|
|
|
<form action="{{ route('photos.store') }}" method="POST" enctype="multipart/form-data" v-on:submit="uploadIndividualFiles">
|
|
|
|
{{ csrf_field() }}
|
|
|
|
<input type="hidden" name="album_id" value="{{ $album->id }}"/>
|
|
|
|
<input type="hidden" name="queue_token" value="{{ $queue_token }}"/>
|
2017-03-27 14:04:09 +01:00
|
|
|
|
2017-03-31 22:05:57 +01:00
|
|
|
<div class="form-group">
|
2017-09-30 08:34:04 +01:00
|
|
|
{{--<label class="custom-file">
|
|
|
|
<input type="file" name="photo[]" id="single-upload-files" multiple="multiple">
|
2017-03-31 22:05:57 +01:00
|
|
|
<span class="custom-file-control"></span>
|
2017-09-30 08:34:04 +01:00
|
|
|
</label>--}}
|
|
|
|
<input type="file" name="photo[]" id="single-upload-files" multiple="multiple">
|
2017-03-27 14:04:09 +01:00
|
|
|
</div>
|
|
|
|
|
2017-03-31 22:05:57 +01:00
|
|
|
<div>
|
|
|
|
<button type="submit" class="btn btn-success" v-bind:disabled="isUploadInProgress || isBulkUploadInProgress" v-html="isUploadInProgress ? '@lang('admin.is_uploading')' : '@lang('forms.upload_action')'"><i class="fa fa-fw fa-upload"></i> @lang('forms.upload_action')</button>
|
2017-03-27 14:04:09 +01:00
|
|
|
</div>
|
2017-03-31 22:05:57 +01:00
|
|
|
</form>
|
2017-03-27 14:04:09 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<hr/>
|
|
|
|
<h4>@lang('admin.upload_bulk_heading')</h4>
|
|
|
|
<p>@lang('admin.upload_bulk_text')</p>
|
|
|
|
<div class="alert alert-info">
|
|
|
|
@lang('admin.upload_bulk_text2', [
|
|
|
|
'max_upload_size' => sprintf('<b>%s%s</b>', round($max_post_limit_bulk, 2), trans('global.units.megabytes'))
|
|
|
|
])
|
|
|
|
</div>
|
|
|
|
|
2017-04-17 22:03:01 +01:00
|
|
|
<form action="{{ route('photos.storeBulk') }}" method="POST" enctype="multipart/form-data" v-on:submit="uploadBulkFiles">
|
2017-03-27 14:04:09 +01:00
|
|
|
{{ csrf_field() }}
|
|
|
|
<input type="hidden" name="album_id" value="{{ $album->id }}"/>
|
|
|
|
<input type="hidden" name="queue_token" value="{{ $queue_token }}"/>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2017-09-30 08:34:04 +01:00
|
|
|
{{--<label class="custom-file">
|
2017-03-27 14:04:09 +01:00
|
|
|
<input type="file" id="single-upload-files" class="custom-file-input" multiple="multiple" name="archive">
|
|
|
|
<span class="custom-file-control"></span>
|
2017-09-30 08:34:04 +01:00
|
|
|
</label>--}}
|
|
|
|
<input type="file" id="single-upload-files" multiple="multiple" name="archive">
|
2017-03-27 14:04:09 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
2017-04-17 22:03:01 +01:00
|
|
|
<button type="submit" class="btn btn-success" v-bind:disabled="isUploadInProgress || isBulkUploadInProgress" v-html="isUploadInProgress ? '@lang('admin.is_uploading')' : '@lang('forms.upload_action')'"><i class="fa fa-fw fa-upload"></i> @lang('forms.upload_action')</button>
|
2017-03-27 14:04:09 +01:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
@endif
|
2017-03-31 22:05:57 +01:00
|
|
|
|
|
|
|
{{-- Single-file upload progress modal --}}
|
2017-04-10 17:29:45 +01:00
|
|
|
<div class="modal" id="upload-progress-modal" data-backdrop="static" data-keyboard="false">
|
2017-03-31 22:05:57 +01:00
|
|
|
<div class="modal-dialog" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h5 class="modal-title">@lang('admin.is_uploading')</h5>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<div class="text-center">
|
|
|
|
<div class="progress">
|
2017-04-08 09:41:41 +01:00
|
|
|
<div class="progress-bar bg-success" role="progressbar" v-bind:style="{ width: successfulPercentage }">
|
2017-03-31 22:05:57 +01:00
|
|
|
</div>
|
2017-04-08 09:41:41 +01:00
|
|
|
<div class="progress-bar bg-danger" role="progressbar" v-bind:style="{ width: failedPercentage }">
|
2017-03-31 22:05:57 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p v-text="currentStatus"></p>
|
|
|
|
</div>
|
|
|
|
|
2018-07-12 23:18:40 +01:00
|
|
|
<div v-if="statusMessages.length > 0"style="max-height: 300px; overflow: scroll;">
|
2017-03-31 22:05:57 +01:00
|
|
|
<p v-if="!isUploadInProgress" class="text-danger" style="font-weight: bold">
|
|
|
|
<span v-text="imagesFailed"></span> @lang('admin.upload_file_number_failed')
|
|
|
|
</p>
|
2018-07-12 23:08:39 +01:00
|
|
|
<p v-if="imagesUploaded > 0" class="text-right">
|
2017-03-31 22:05:57 +01:00
|
|
|
@lang('admin.upload_file_failed_continue')<br /><br/>
|
2018-07-12 23:08:39 +01:00
|
|
|
</p>
|
2017-03-31 22:05:57 +01:00
|
|
|
|
|
|
|
<ul v-for="message in statusMessages">
|
2018-07-12 23:08:39 +01:00
|
|
|
<li v-bind:class="message.message_class" v-text="message.message_text"></li>
|
2017-03-31 22:05:57 +01:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-07-12 23:18:40 +01:00
|
|
|
<div class="modal-footer" v-if="!isUploadInProgress">
|
|
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal" v-if="imagesUploaded === 0">@lang('forms.close_action')</button>
|
|
|
|
<a href="{{ route('albums.analyse', ['id' => $album->id, 'queue_token' => $queue_token]) }}" class="btn btn-primary" v-if="imagesUploaded > 0">@lang('forms.continue_action')</a>
|
|
|
|
</div>
|
2017-03-31 22:05:57 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-27 14:04:09 +01:00
|
|
|
</div>
|