<div class="text-center">
	<ul class="stats_box">
		<li>
			<div class="sparkline bar_week">{{ @spark_weekly_impressions.spark_week_ads }}</div>
			<div class="stat_text">
				<strong>{{ @spark_weekly_impressions.overall_num }} </strong>{{ @lang_weekly_ad_impressions }}
				<span class="percent {{ @spark_weekly_impressions.sign }} "> <i class="fa fa-caret-{{ @spark_weekly_impressions.sign }}"></i> {{ @spark_weekly_impressions.overall_per }}%</span>
			</div>
		</li>
		<li>
			<div class="sparkline bar_week">{{ @spark_weekly_ctr.spark_week_ctr }}</div>
			<div class="stat_text">
				<strong>{{ @spark_weekly_ctr.overall_num }} </strong>{{ @lang_weekly_ctr }}
				<span class="percent {{ @spark_weekly_ctr.sign }} "> <i class="fa fa-caret-{{ @spark_weekly_ctr.sign }}"></i> {{ @spark_weekly_ctr.overall_per }}%</span>
			</div>
		</li>
		<li>
			<div class="sparkline bar_week">{{ @spark_weekly_sales.spark_week_sales }}</div>
			<div class="stat_text">
				<strong>{{ @spark_weekly_sales.overall_num }} </strong>{{ @lang_weekly_sale_revenue }}
				<span class="percent {{ @spark_weekly_sales.sign }} "> <i class="fa fa-caret-{{ @spark_weekly_sales.sign }}"></i> {{ @spark_weekly_sales.overall_per }}%</span>
			</div>
		</li>
		</ul>
</div>

<div class="row">
	<div class="col-lg-6">
	<div class="box">
		<header>
			<h5>{{ @lang_overall_ad_performance }} <small>({{ @lang_last_7_days }})</small></h5>
		</header>
		<div class="body text-center" id="dashboard_chart_ad" style="height: 300px;"><h4><img src="{{ IncludeAsset('assets/img/wait.gif') }}" alt="Loading..."/> Generating...</h4></div>
	</div>
</div>
	<div class="col-lg-6">
		<div class="box">
			<header>
				<h5>{{ @lang_overall_sales_performance }} <small>({{ @lang_last_7_days }})</small></h5>
			</header>
			<div class="body text-center" id="dashboard_chart_sale" style="height: 300px;"><h4><img src="{{ IncludeAsset('assets/img/wait.gif') }}" alt="Loading..."/> Generating...</h4></div>
		</div>
	</div>
</div>

<div class="row">
<div class="col-lg-4">
	<div class="box">
		<header>
			<h5>{{ @lang_top_ads }} <small>({{ @lang_last_7_days }} {{ @lang_by_impressions }})</small></h5>
		</header>
		<div class="body">
			<table class="table table-condensed table-hovered sortableTable">
				<thead>
				<tr>
					<th>{{ @lang_ad }}
						<i class="fa fa-sort"></i>
						<i class="fa fa-sort-asc"></i>
						<i class="fa fa-sort-desc"></i>
					</th>
					<th>{{ @lang_impressions }}
						<i class="fa fa-sort"></i>
						<i class="fa fa-sort-asc"></i>
						<i class="fa fa-sort-desc"></i>
					</th>
					<th>{{ @lang_clicks }}
						<i class="fa fa-sort"></i>
						<i class="fa fa-sort-asc"></i>
						<i class="fa fa-sort-desc"></i>
					</th>
					<th>{{ @lang_ctr }}
						<i class="fa fa-sort"></i>
						<i class="fa fa-sort-asc"></i>
						<i class="fa fa-sort-desc"></i>
					</th>
				</tr>
				</thead>
				<tbody>
				<repeat group="{{ @top_ads }}" key="{{ @top_ad_id }}" value="{{ @top_ad }}">
				<tr>
					<td><a href="index.php?ads&edit&{{ @top_ad_id }}">{{ @top_ad.title }}</a></td>
					<td>{{ @top_ad.impressions }}</td>
					<td>{{ @top_ad.clicks }}</td>
					<td>{{ @top_ad.ctr }} %</td>
				</tr>
				</repeat>
				</tbody>
			</table>
		</div>
	</div>
</div>

	<div class="col-lg-4">
		<div class="box">
			<header>
				<h5>{{ @lang_top_groups }} <small>({{ @lang_last_7_days }} {{ @lang_by_impressions }})</small></h5>
			</header>
			<div class="body">
				<table class="table table-condensed table-hovered sortableTable">
					<thead>
					<tr>
						<th>{{ @lang_group }}
							<i class="fa fa-sort"></i>
							<i class="fa fa-sort-asc"></i>
							<i class="fa fa-sort-desc"></i>
						</th>
						<th>{{ @lang_impressions }}
							<i class="fa fa-sort"></i>
							<i class="fa fa-sort-asc"></i>
							<i class="fa fa-sort-desc"></i>
						</th>
					</tr>
					</thead>
					<tbody>
					<repeat group="{{ @top_groups }}" key="{{ @top_group_id }}" value="{{ @top_group }}">
						<tr>
							<td><a href="index.php?groups&edit&{{ @top_group_id }}">{{ @top_group.title }}</a></td>
							<td>{{ @top_group.impressions }}</td>
						</tr>
					</repeat>
					</tbody>
				</table>
			</div>
		</div>
	</div>

<div class="col-lg-4">
	<div class="box">
		<header>
			<h5>{{ @lang_top_sales }} <small>({{ @lang_last_7_days }} {{ @lang_by_sales }})</small></h5>
		</header>
		<div class="body">
			<table class="table table-condensed table-hovered sortableTable">
				<thead>
				<tr>
					<th>{{ @lang_sales_group }}
						<i class="fa fa-sort"></i>
						<i class="fa fa-sort-asc"></i>
						<i class="fa fa-sort-desc"></i>
					</th>
					<th>{{ @lang_sales }}
						<i class="fa fa-sort"></i>
						<i class="fa fa-sort-asc"></i>
						<i class="fa fa-sort-desc"></i>
					</th>
					<th>{{ @lang_revenue }}
						<i class="fa fa-sort"></i>
						<i class="fa fa-sort-asc"></i>
						<i class="fa fa-sort-desc"></i>
					</th>
				</tr>
				</thead>
				<tbody>
				<repeat group="{{ @top_sales }}" key="{{ @top_sale_id }}" value="{{ @top_sale }}">
					<tr>
						<td><a href="index.php?sales&edit&{{ @top_sale_id }}">{{ @top_sale.title }}</a></td>
						<td>{{ @top_sale.sales }}</td>
						<td>{{ @top_sale.revenue }} {{ @top_sale.currency }}</td>
					</tr>
				</repeat>
				</tbody>
			</table>
		</div>
	</div>
</div>
</div>
