<link rel="stylesheet" href="{{ IncludeAsset('assets/lib/bootstrap-daterangepicker/css/daterangepicker-bs3.css') }}">
<link rel="stylesheet" href="{{ IncludeAsset('assets/lib/datatables/css/DT_bootstrap.css') }}">
<link rel="stylesheet" href="{{ IncludeAsset('assets/lib/datatables/css/datatables.responsive.css') }}">
<link rel="stylesheet" href="{{ IncludeAsset('assets/lib/datatables/extensions/css/dataTables.tableTools.min.css') }}">
<link rel="stylesheet" href="{{ IncludeAsset('assets/lib/tablesorter/addons/pager/jquery.tablesorter.pager.css') }}">

<div class="row">
	<div class="col-lg-12">
		<form class="form-horizontal" id="stats_form" enctype="multipart/form-data" method="post">
			<div class="box dark">

				<header>
					<div class="icons">
						<i class="fa fa-bar-chart-o"></i>
					</div>
					<h5>
						{{ @lang_view_your_stats }}
					</h5>
				</header>

				<div class="spacer"></div>

				<div class="form-group">
					<label for="selects" class="tips control-label col-lg-3">{{ @lang_select_what_to_view }}</label>
					<div class="col-lg-5">

						<select id="selects" name="selects" class="form-control chzn-select">
							<check if ="{{ @USER->role > 7 }}">
								<optgroup label="{{ @lang_ads }}">
									<option value="ad|0">{{ @lang_all_ads}}</option>
									<repeat group="{{ @selects.ads }}" value="{{ @ad }}">
										<option value="ad|{{ @ad._id }}">{{ @ad.title}}</option>
									</repeat>
								</optgroup>

								<optgroup label="{{ @lang_ad_groups }}">
									<option value="group|0">{{ @lang_all_groups}}</option>
									<repeat group="{{ @selects.groups }}" value="{{ @group }}">
										<option value="group|{{ @group._id }}">{{ @group.title}}</option>
									</repeat>
								</optgroup>

								<optgroup label="{{ @lang_sales_spots }}">
									<option value="sale|0">{{ @lang_all_sales}}</option>
									<repeat group="{{ @selects.sales }}" value="{{ @sale }}">
										<option value="sale|{{ @sale._id }}">{{ @sale.title}}</option>
									</repeat>
								</optgroup>
							</check>
							<optgroup label="{{ @lang_ads_by_user }}">
								<repeat group="{{ @selects.users }}" value="{{ @user }}">
									<option value="user|{{ @user._id }}">{{ @user.username}}</option>
								</repeat>
							</optgroup>
						</select>
					</div>
				</div>

				<div class="form-group">
					<label for="reportrange" class="tips control-label col-lg-3">{{ @lang_select_dates_to_view }}</label>
					<div class="col-lg-3">
						<div class="input-prepend input-group">

							<span class="add-on input-group-addon"><i class="glyphicon glyphicon-calendar fa fa-calendar"></i></span>
							<input type="text" name="reportrange" id="reportrange" class="form-control"
							       value="{{ date('Y/m/d', strtotime('-6 day')) }} - {{ date('Y/m/d') }}"/>

						</div>
					</div>
				</div>

				<div class="row">
					<div class="col-lg-3">
						&nbsp;
					</div>
					<div class="col-lg-5">
						<br />
						<button type="submit" class="btn btn-success" id="submit_view" name="submit_view">{{ @lang_view }}</button>
						<div><br /></div>
					</div>
				</div>


				<div id="stats_section">
					<div id="stats_loaded"></div>
				</div>



			</div>



		</form>
	</div>
</div>