<link rel="stylesheet" href="{{ IncludeAsset('assets/lib/datatables/css/DT_bootstrap.css') }}">
<link rel="stylesheet" href="{{ IncludeAsset('assets/lib/datatables/css/datatables.responsive.css') }}">

<!--Begin Datatables-->
<div class="row">
	<div class="col-lg-12">
		<div class="box">
			<header>
				<div class="icons">
					<i class="fa fa-table"></i>
				</div>
				<h5>{{ @lang_sales_spots }}</h5>
			</header>
			<div id="collapse4" class="body">
				<table id="dataTable" class="table table-bordered table-condensed table-hover table-striped">
					<thead>
					<tr>
						<th data-class="expand">{{ @lang_spot }}</th>
						<th data-hide="phone">{{ @lang_status }}</th>
						<th data-hide="phone,tablet">{{ @lang_last_updated }}</th>
						<th data-hide="phone">{{ @lang_site }}</th>
						<th data-hide="phone,tablet">{{ @lang_fill_group }}</th>
						<th data-hide="phone">{{ @lang_cost }}</th>
						<th data-hide="phone">{{ @lang_cost }} {{ @lang_type }}</th>
						<th data-hide="phone">{{ @lang_clicks }}</th>
						<th data-hide="phone">{{ @lang_sales }}</th>
						<th>{{ @lang_commands }}</th>
					</tr>
					</thead>
					<tbody>
					<repeat group="{{ @res_sales }}" value="{{ @res_sale }}">
						<tr>
							<td>{{ @res_sale.title | raw }} <i class="fa {{ @res_sale.type }}"></i></td>
							<td>
								<check if ="{{ @res_sale.status == true }}">
									<true>
										<span class="label label-success">{{ @lang_on }}</span>
									</true>
									<false>
										<span class="label label-danger">{{ @lang_off }}</span>
									</false>
								</check>
							</td>
							<td>{{ @res_sale.last_updated }}</td>
							<td>{{ @res_sale.site_name }}</td>
							<td>{{ @res_sale.fill_group | raw }}</td>
							<td>{{ @res_sale.pricing_cost }}</td>
							<td>{{ @res_sale.pricing_type }}</td>
							<td>{{ @res_sale.clicks }}</td>
							<td>{{ @res_sale.sales }}</td>
							<td><a class="delete" href="index.php?sales&delete&{{ @res_sale.id }}" title="{{ @lang_delete }}" data-toggle="modal" data-target="#deleteModal" data-id="{{ @res_sale.id }}" data-row="{{ @res_sale.count }}"><i class="fontsize15 fa fa-times"></i> </a><a class="edit" href="index.php?sales&edit&{{ @res_sale.id }}" title="{{ @lang_edit }}"><i class="fontsize15 fa fa-pencil"></i></a> <a class="code" href="index.php?sales&code&{{ @res_sale.id }}" title="{{ @lang_ad_code }}"><i class="fontsize15 fa fa-cloud-upload"></i></a></td>
						</tr>
					</repeat>

					</tbody>
				</table>
			</div>
		</div>
	</div>
</div><!-- /.row -->

<!--End Datatables-->


<!-- Modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="{{ @lang_delete }}" aria-hidden="true" data-id="" data-row="">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="deleteModalLabel">{{ @lang_delete }}</h4>
			</div>
			<div class="modal-body">
				{{ @lang_are_you_sure_you_want_to_delete_it }}?
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">{{ @lang_cancel }}</button>
				<button type="button" class="btn btn-danger" id="delete">{{ @lang_delete }}</button>
			</div>
		</div>
	</div>
</div>