<div class="widget">
	<div class="widget-content">
		<div class="headline">
			<h4>Suppliers</h4>
		</div>
		<br>
		<table class="table table-condensed table-striped">
			<thead>
				<th>ID</th>
				<th>Name</th>
				<th>Created at</th>
				<th></th>
			</thead>
			<tbody>
				<tr ng-repeat="supplier in suppliers">
					<td>{[{ supplier.id }]}</td>
					<td>{[{ supplier.name }]}</td>
					<td>{[{ supplier.created_at }]}</td>
					<td>
						<div class="btn-group pull-right">
							<a class="btn btn-sm dropdown-toggle" data-toggle="dropdown" href="#" eat-click>
								<i class="fa fa-cog"></i>
								<span class="caret"></span>
							</a>
							<ul class="dropdown-menu pull-right">
								<!-- dropdown menu links -->
								<li><a tabindex="-1" href="#" ng-click="showModal(supplier)" eat-click><i class="fa-fw fa fa-pencil"></i> Edit</a></li>
								<li><a tabindex="-1" href="#" ng-click="delete(supplier.id)" eat-click><i class="fa-fw fa fa-times"></i> Delete</a></li>
							</ul>
						</div>
					</td>
				</tr>
			</tbody>
		</table>
		<div paginator="paginator"></div>
		<div class="form-actions text-right">
			<span class="btn btn-primary" ng-click="showModal()"><i class="fa fa-plus"></i> Add new supplier</span>
		</div>
	</div>
</div>

<script type="text/ng-template" id="stock/suppliers/modal.html">
	@include('stock::forms.supplier')
</script>