<?php $__env->startSection('content'); ?>
	
    <p class="head_inner_nav">
        <a href="<?php echo URL::to('admin/offerings'); ?>">Offerings</a><span>></span> Subscription agreement
    </p> 
    
	<div class="row">
		<div class="col-xs-6">
			<h2>"<?php echo $offering->name; ?>" Offering - Subscription agreement</h2>
		</div>
		<div class="col-xs-6">
			<div class="buttons" id="right-buttons">
				<a href="<?php echo URL::to('admin/offerings/'.$offering->offering_id.'/subscription-agreement/create'); ?>" class="btn btn-primary"><i class="glyphicon glyphicon-plus"></i> Add a subscription agreement</a>
			</div>
		</div>
	</div>
		
	<table class="table table-bordered table-striped">
		<thead>
			<tr>
				<th class="text-center">ID</th>
				<th class="col-md-4">Title</th>
				<th class="text-center">Created</th>
				<th class="text-center" colspan="2">Actions</th>
			</tr>
		</thead>
		<tbody>
		<?php if($agreement): ?>
			<?php foreach($agreement as $row): ?>
			<tr>
				<td class="text-center"><?php echo $row->agreement_id; ?></td>
				<td><?php echo $row->title; ?></td>
				<td class="text-center"><?php echo date('M d, Y, g:ia',strtotime($row->created_at)); ?></td>
                <td align="center"><a href="<?php echo URL::to('admin/offerings/'.$offering->offering_id.'/subscription-agreement/'.$row->agreement_id.'/edit'); ?>" title="Edit"><i class="glyphicon glyphicon-pencil"></i></a></td>
                <td align="center">
					<?php echo Form::open(array('route' => array('admin.offerings.'.$offering->offering_id.'.subscription-agreement.destroy', $row->agreement_id), 'method' => 'DELETE')); ?>
					<button type="submit" onclick="return confirm('Are you sure?')" class="btn btn-link"  title="Delete"><i class="glyphicon glyphicon-trash"></i></button>
					<?php echo Form::close(); ?>
				</td>
			</tr>
			<?php endforeach; ?>
		<?php else: ?>
			<tr>
				<td colspan="6">No signatures yet.</td>
			</tr>
		<?php endif; ?>
		</tbody>
	</table>
    
    <?php echo $agreement->appends(array('query' => Input::get('query')))->links(); ?>
	
<?php $__env->stopSection(); ?>