<?php
	// Assets::add( 'jquery' );
?>
<?php $__env->startSection( 'head' ); ?>
<?php $__env->stopSection(); ?>

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

<?php $__env->startSection( 'content' ); ?>
	<div id="main-content" class="cc padding">
		<h1><?php echo trans( 'order.my-orders' ); ?></h1>
		
		<?php if( count( $orders ) ): ?>
			<table class="default">
				<thead>
					<tr>
						<th><?php echo trans( 'main.row' ); ?></th>
						<th><?php echo trans( 'order.id' ); ?></th>
						<th><?php echo trans( 'order.finalized' ); ?></th>
						<th></th>
					</tr>
				</thead>
				<tbody>
					<?php $row = $orders->getFrom(); ?>
					<?php foreach( $orders as $order ): ?>
						<?php $url = $order->finalized ? route( 'order', array( $order->id ) ) : route( 'basket' ); ?>	
						<tr data-id="<?php echo $order->id; ?>">
							<td><?php echo en2fa( $row++ ); ?></td>
							<td><a href="<?php echo $url; ?>"><?php echo e($order->id); ?></a></td>
							<td><?php echo $order->finalized ? trans( 'main.yes' ) : trans( 'user.basket' ); ?></td>
							<td><a href="<?php echo $url; ?>" target="_BLANK" class="button view"><?php echo trans( 'main.view' ); ?></a></td>
						</tr>
					<?php endforeach; ?>
				</tbody>
				
				<?php echo $orders->links(); ?>

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