

{include file="init/echarts-init.tpl"}

<!-- Page header -->
{capture name="buttons"}
{/capture}

{capture name="breadcrumb"}
	<a href="{$adminUrl}/overview" class="breadcrumb-item">{$title}</a>
{/capture}

{capture name="showBy"}
{/capture}

{include file="components/page-header.tpl" buttons=$smarty.capture.buttons breadcrumb=$smarty.capture.breadcrumb showBy=$smarty.capture.showBy}
<!-- /page header -->

{if empty($days)}

	<div class="content d-flex justify-content-center align-items-center">
		<div class="flex-fill">
			<div class="text-center mb-3">
				<h1 class="error-title offline-title">Statistics is empty </h1>
				<div class="row">
					<div class="col-md-6 offset-md-3">
						<div class="alert bg-info text-white alert-styled-left alert-dismissible">
							<span class="font-weight-semibold">Сбор статистики!</span> Нужно включить в настройках.
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

{else}

	<div class="content">
		<div class="row">
			<div class="col-md-12">
				<div class="card border shadow-sm">
                    {include file="views/stats/form/selectors.tpl" action='' select=''}
				</div>

				<div class="card border shadow-sm">
					<div class="card-body">
						<div class="chart-container">
							<div class="chart has-fixed-height" id="stats_users"></div>
						</div>
					</div>
				</div>

				<div class="card border shadow-sm">
					<div class="card-body">
						<div class="chart-container">
							<div class="chart has-fixed-height" id="stats_content"></div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

{/if}

