<?php
	// Assets::add( 'slides.min.js' );
	// Assets::add( 'slides.css' );
?>
<?php $__env->startSection( 'head' ); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection( 'foot' ); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection( 'content' ); ?>
<div class="cc ov">
	<?php foreach( $errors as $error ): ?>
		<div class="error-msg"><?php echo $error; ?></div>
	<?php endforeach; ?>

	<?php if( isset( $message ) || $message = Session::get( 'message' ) ): ?>
		<div class="msg-success"><?php echo e($message); ?></div>
	<?php endif; ?>

	<h1>اسلاید</h1>

	<?php if( isset( $slide ) ): ?>
		<?php echo Form::model( $slide, array( 'files' => true ) ); ?>

		<?php echo HTML::image( $slide->image_url, $slide->title, array( 'class' => 'big-image-thumb' ) ); ?>

	<?php else: ?>
		<?php echo Form::open( array( 'files' => true ) ); ?>

	<?php endif; ?>

		<table class="no-border">
			<tr>
				<td><?php echo Form::label( 'type', 'نوع' ); ?></td>
				<td><?php echo Form::select( 'type', trans( 'slide.types' ), null, isset( $slide ) ? array( 'disabled' ) : array() ); ?></td>
			</tr>
			<tr>
				<td><?php echo Form::label( 'title', 'عنوان' ); ?></td>
				<td><?php echo Form::text( 'title' ); ?></td>
			</tr>
			<tr>
				<td><?php echo Form::label( 'url', 'نشانی وب' ); ?></td>
				<td><?php echo Form::text( 'url', null, array( 'class' => 'ltr' ) ); ?></td>
			</tr>
			<tr>
				<td><?php echo Form::label( 'image', 'تصویر' ); ?></td>
				<td>
					<?php echo Form::file( 'image' ); ?><br>
					<div>اندازه اسلاید: ۴۵۰ × ۱۲۰۰</div>
					<div>اندازه بنر: ۲۵۰ × ۳۰۰</div>
				</td>
			</tr>
			<tr>
				<td></td>
				<td><label><?php echo Form::checkbox( 'active', 1, true ); ?> اسلاید قابل دیدن باشد</label></td>
			</tr>
			<tr>
				<td></td>
				<td><?php echo Form::submit( 'ثبت' ); ?></td>
			</tr>
		</table>

	<?php echo Form::close(); ?>

</div>
<?php $__env->stopSection(); ?>