<script type="text/ng-template" id="seeWorkOrdersRecurringModal.html">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">
			<i class="ti ti-close"></i>
		</button>
		<h4 class="modal-title">Work Orders (Recurring)</h4>
	</div>
	<div class="modal-body">
		<table class="table table-striped">
			<thead>
				<tr>
					<th>ID</th>
					<th>Customer</th>
					<th class="hidden-xs">Property</th>
					<th class="hidden-xs">Type</th>
					<th class="hidden-xs">Start</th>
					<th class="hidden-xs">End</th>
					<th class="hidden-xs">Schedule</th>
				</tr>
			</thead>
			<tbody>
				<tr dir-paginate="work_order in work_orders | itemsPerPage: 10">
					<td>{{work_order.number}}</td>
					<td>{{work_order.customer.name}}</td>
					<td class="hidden-xs">{{work_order.property.location['address']}}</td>
					<td class="hidden-xs">{{work_order.type}}</td>
					<td class="hidden-xs">{{work_order.work_order_schedule.start_date_formatted}}</td>
					<td class="hidden-xs">{{work_order.work_order_schedule.end_date_formatted}}</td>
					<td class="hidden-xs">{{work_order.work_order_schedule.schedule_formatted}}</td>
				</tr>
			</tbody>
		</table>
		<p class="text-center" ng-show="work_orders.length == 0">No records found</p>
		<div class="row" ng-if="work_orders.length > 10">
			<div class="col-sm-12 text-center">
				<dir-pagination-controls></dir-pagination-controls>
			</div>
		</div>
	</div>
	<div class="modal-footer">
		<button class="btn btn-info" ng-click="downloadCSV()">
			<i class="ti ti-save" style="margin-right: 5px;"></i>
			Download CSV
		</button>
		<button class="btn btn-danger" ng-click="close()">
			<i class="ti ti-close" style="margin-right: 5px;"></i>
			Close
		</button>
	</div>
</script>