<?php $__env->startSection('css_page_level'); ?>
<link href="<?php echo e(asset('assets/global/plugins/jquery-file-upload/blueimp-gallery/blueimp-gallery.min.css')); ?>" rel="stylesheet"/>
<link href="<?php echo e(asset('assets/global/plugins/jquery-file-upload/css/jquery.fileupload.css')); ?>" rel="stylesheet"/>
<link href="<?php echo e(asset('assets/global/plugins/jquery-file-upload/css/jquery.fileupload-ui.css')); ?>" rel="stylesheet"/>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page-content-wrapper'); ?>
	<div class="page-content-wrapper" id="main">
		<div class="page-content">
			<!-- BEGIN PAGE HEADER-->
			<h3 class="page-title">
			<?php $setting = app('anlutro\LaravelSettings\Facade'); ?>
			<?php echo e($setting::get('system_name','全方位建築智慧化管理系統')); ?> <small><?php echo e($setting::get('company_name','新保科技')); ?></small>
			</h3>
			<div class="page-bar">
				<ul class="page-breadcrumb">
					<li>	
						<i class="fa fa-home"></i>
						<a href="index.html"><?php echo app('translator')->get('messages.homepage'); ?></a>
						<i class="fa fa-angle-right"></i>
					</li>
					<li>
						<a href="#"><?php echo app('translator')->get('messages.manage_neighberhood_album'); ?></a>
						<i class="fa fa-angle-right"></i>
					</li>
					<li>
						<a href="#"><?php echo app('translator')->get('messages.add_album'); ?></a>
					</li>
				</ul>
				<div class="page-toolbar">

				</div>
			</div>
			<!-- END PAGE HEADER-->
			<!-- BEGIN PAGE CONTENT-->
			<div class="row">
				<div class="col-md-12">
					
				</div>
				<div class="col-md-12">
					<form id="fileupload" action="<?php echo e(action('Manage\Platform\AlbumController@storeImage')); ?>" method="POST" enctype="multipart/form-data">
						<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
						<div class="row fileupload-buttonbar">
							<div class="col-lg-7">
								<!-- The fileinput-button span is used to style the file input field as button -->
								<span class="btn green fileinput-button">
								<i class="fa fa-plus"></i>
								<span>
								<?php echo app('translator')->get('messages.add_img'); ?> </span>
								<input type="file" name="files[]" multiple="">
								</span>
								<button type="submit" class="btn blue start">
								<i class="fa fa-upload"></i>
								<span>
								<?php echo app('translator')->get('messages.start_upload'); ?> </span>
								</button>
								<button type="reset" class="btn warning cancel">
								<i class="fa fa-ban"></i>
								<span>
								<?php echo app('translator')->get('messages.cancel_upload'); ?> </span>
								</button>
								<button type="button" class="btn red delete">
								<i class="fa fa-trash"></i>
								<span>
								<?php echo app('translator')->get('messages.del'); ?> </span>
								</button>
								<a class="btn grey" onclick="window.history.go(-1); return false;">
									<?php echo app('translator')->get('messages.return_album'); ?>
								</a>

								<input type="checkbox" class="toggle">
								<!-- The global file processing state -->
								<span class="fileupload-process">
								</span>
							</div>
							<!-- The global progress information -->
							<div class="col-lg-5 fileupload-progress fade">
								<!-- The global progress bar -->
								<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
									<div class="progress-bar progress-bar-success" style="width:0%;">
									</div>
								</div>
								<!-- The extended global progress information -->
								<div class="progress-extended">
									 &nbsp;
								</div>
							</div>
						</div>
						<!-- The table listing the files available for upload/download -->
						<table role="presentation" class="table table-striped clearfix">
						<tbody class="files">
						</tbody>
						</table>

					</form>
					<div class="panel panel-success">
						<div class="panel-heading">
							<h3 class="panel-title"><?php echo app('translator')->get('messages.remind_of_upload'); ?></h3>
						</div>
						<div class="panel-body">
							<ul>
								<li>
									 <?php echo app('translator')->get('messages.max_file_size'); ?><strong>2 MB</strong>，<?php echo app('translator')->get('messages.dont_upload_maxxx_file'); ?>
								</li>
								<li>
									 <?php echo app('translator')->get('messages.only_apply_type'); ?>(<strong>JPG, GIF, PNG</strong>)。
								</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
			<!-- END PAGE CONTENT-->
		</div>
<!-- The blueimp Gallery widget -->
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls" data-filter=":even">
	<div class="slides">
	</div>
	<h3 class="title"></h3>
	<a class="prev">
	‹ </a>
	<a class="next">
	› </a>
	<a class="close white">
	</a>
	<a class="play-pause">
	</a>
	<ol class="indicator">
	</ol>
</div>
<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
<script id="template-upload" type="text/x-tmpl">
{% for (var i=0, file; file=o.files[i]; i++) { %}
    <tr class="template-upload fade">
        <td>
            <span class="preview"></span>
        </td>
        <td>
            <p class="name">{%=file.name%}</p>
            <strong class="error text-danger label label-danger"></strong>
        </td>
        <td>
        	<input name="name" type="text" class="form-control" placeholder="{%=file.name%}">
        	<input type="hidden" id="_token" name="_token" value="<?php echo e(csrf_token()); ?>">
        	<input type="hidden" id="album_id" name="album_id" value="<?php echo e($id); ?>">
        </td>
        <td>
            <p class="size"><?php echo app('translator')->get('messages.sending'); ?>.........</p>
            <div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">
            <div class="progress-bar progress-bar-success" style="width:0%;"></div>
            </div>
        </td>
        <td>
            {% if (!i && !o.options.autoUpload) { %}
                <button class="btn blue start" disabled>
                    <i class="fa fa-upload"></i>
                    <span><?php echo app('translator')->get('messages.start'); ?></span>
                </button>
            {% } %}
            {% if (!i) { %}
                <button class="btn red cancel">
                    <i class="fa fa-ban"></i>
                    <span><?php echo app('translator')->get('messages.cancel'); ?></span>
                </button>
            {% } %}
        </td>
    </tr>
{% } %}
</script>
<!-- The template to display files available for download -->
<script id="template-download" type="text/x-tmpl">
        {% for (var i=0, file; file=o.files[i]; i++) { %}
            <tr class="template-download fade">
                <td>
                    <span class="preview">
                        {% if (file.thumbnailUrl) { %}
                            <a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" data-gallery><img src="{%=file.thumbnailUrl%}"></a>
                        {% } %}
                    </span>
                </td>
                <td>
                    <p class="name">
                        {% if (file.url) { %}
                            <a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" {%=file.thumbnailUrl?'data-gallery':''%}>{%=file.name%}</a>
                        {% } else { %}
                            <span>{%=file.name%}</span>
                        {% } %}
                    </p>
                    {% if (file.error) { %}
                        <div><span class="label label-danger">Error</span> {%=file.error%}</div>
                    {% } %}
                </td>

                <td>
                    <span class="size">{%=o.formatFileSize(file.size)%}</span>
                </td>
                <td>
                    {% if (file.deleteUrl) { %}
                        <button class="btn red delete btn-sm" data-type="{%=file.deleteType%}" data-url="{%=file.deleteUrl%}"{% if (file.deleteWithCredentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}>
                            <i class="fa fa-trash-o"></i>
                            <span>Delete</span>
                        </button>
                        <input type="checkbox" name="delete" value="1" class="toggle">
                    {% } else { %}
                        <button class="btn yellow cancel btn-sm">
                            <i class="fa fa-ban"></i>
                            <span>Cancel</span>
                        </button>
                    {% } %}
                </td>
            </tr>
        {% } %}
    </script>
	
<?php $__env->stopSection(); ?>

<?php $__env->startSection('plugins_page_level'); ?>
<script src="<?php echo e(asset('assets/global/plugins/fancybox/source/jquery.fancybox.pack.js')); ?>"></script>
<!-- BEGIN:File Upload Plugin JS files-->
<!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
<script src="<?php echo e(asset('assets/global/plugins/jquery-file-upload/js/vendor/jquery.ui.widget.js')); ?>"></script>
<!-- The Templates plugin is included to render the upload/download listings -->
<script src="<?php echo e(asset('assets/global/plugins/jquery-file-upload/js/vendor/tmpl.min.js')); ?>"></script>
<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
<script src="<?php echo e(asset('assets/global/plugins/jquery-file-upload/js/vendor/load-image.min.js')); ?>"></script>
<!-- The Canvas to Blob plugin is included for image resizing functionality -->
<script src="<?php echo e(asset('assets/global/plugins/jquery-file-upload/js/vendor/canvas-to-blob.min.js')); ?>"></script>
<!-- blueimp Gallery script -->
<script src="<?php echo e(asset('assets/global/plugins/jquery-file-upload/blueimp-gallery/jquery.blueimp-gallery.min.js')); ?>"></script>
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
<script src="<?php echo e(asset('assets/global/plugins/jquery-file-upload/js/jquery.iframe-transport.js')); ?>"></script>
<!-- The basic File Upload plugin -->
<script src="<?php echo e(asset('assets/global/plugins/jquery-file-upload/js/jquery.fileupload.js')); ?>"></script>
<!-- The File Upload processing plugin -->
<script src="<?php echo e(asset('assets/global/plugins/jquery-file-upload/js/jquery.fileupload-process.js')); ?>"></script>
<!-- The File Upload image preview & resize plugin -->
<script src="<?php echo e(asset('assets/global/plugins/jquery-file-upload/js/jquery.fileupload-image.js')); ?>"></script>
<!-- The File Upload audio preview plugin -->
<script src="<?php echo e(asset('assets/global/plugins/jquery-file-upload/js/jquery.fileupload-audio.js')); ?>"></script>
<!-- The File Upload video preview plugin -->
<script src="<?php echo e(asset('assets/global/plugins/jquery-file-upload/js/jquery.fileupload-video.js')); ?>"></script>
<!-- The File Upload validation plugin -->
<script src="<?php echo e(asset('assets/global/plugins/jquery-file-upload/js/jquery.fileupload-validate.js')); ?>"></script>
<!-- The File Upload user interface plugin -->
<script src="<?php echo e(asset('assets/global/plugins/jquery-file-upload/js/jquery.fileupload-ui.js')); ?>"></script>
<!-- The main application script -->
<!-- The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9 -->
<!--[if (gte IE 8)&(lt IE 10)]>
    <script src="<?php echo e(asset('assets/global/plugins/jquery-file-upload/js/cors/jquery.xdr-transport.js')); ?>"></script>
    <![endif]-->
<!-- END:File Upload Plugin JS files-->
<?php $__env->stopSection(); ?>

<?php $__env->startSection('js_page_level'); ?>
<script>
$(document).ready(function(){
	$('#fileupload').fileupload({
        disableImageResize: false,
        autoUpload: false,
        disableImageResize: /Android(?!.*Chrome)|Opera/.test(window.navigator.userAgent),
        maxFileSize: 5000000,
        acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
        // Uncomment the following to send cross-domain cookies:
        //xhrFields: {withCredentials: true},                
    });

    $('#fileupload').bind('fileuploadsubmit', function (e, data) {
	    var inputs = data.context.find(':input');
	    if (inputs.filter(function () {
	            return !this.value && $(this).prop('required');
	        }).first().focus().length) {
	        data.context.find('button').prop('disabled', false);
	        return false;
	    }
	    data.formData = inputs.serializeArray();
	});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout.manage', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>