<?php
	Assets::add( 'downloads.min.js' );
	// Assets::add( 'downloads.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( $download ) ): ?>
		<?php echo Form::model( $download, array( 'files' => true ) ); ?>

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

	<?php endif; ?>

		<table class="no-border">
			<tr>
				<td><?php echo Form::label( 'name', 'عنوان' ); ?></td>
				<td><?php echo Form::text( 'name' ); ?></td>
			</tr>
			<tr>
				<td><?php echo Form::label( 'file', 'فایل پیوست' ); ?></td>
				<td>
					<?php echo Form::file( 'file' ); ?><br>
				</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(); ?>