<div class="widget">
	<div class="widget-content">
		<div class="headline">
			<h4>Categories</h4>
		</div>
		<br>
		<table class="table table-condensed table-striped">
			<thead>
				<th>ID</th>
				<th>Name</th>
				            <th>Category</th>
            <th>Purchase Category</th>
				<th></th>
			</thead>
			<tbody>
				<tr ng-repeat="category in categories">
					<td>{[{ category.id }]}</td>
					<td>{[{ category.name }]}</td>
					            <td>{[{ category.type }]}</td>
            <td>{[{ category.purchase_type }]}</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(category)" eat-click><i class="fa-fw fa fa-pencil"></i> Edit</a></li>
								<li><a tabindex="-1" href="#" ng-click="delete(category.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 category</span>
		</div>
	</div>
</div>

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