main.php
2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
/* @var $this \yii\web\View */
/* @var $content string */
use frontend\assets\MaterializeAsset;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\web\View;
use yii\widgets\Breadcrumbs;
use frontend\assets\AppAsset;
use common\widgets\Alert;
AppAsset::register($this);
MaterializeAsset::register($this);
$js = <<< JS
$(".button-collapse").sideNav();
JS;
$this->registerJs($js, View::POS_READY);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
<meta charset="<?= Yii::$app->charset ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<?= Html::csrfMetaTags() ?>
<title><?= Html::encode($this->title) ?></title>
<?php $this->head() ?>
</head>
<body>
<?php $this->beginBody() ?>
<div class="wrap">
<?php
if (!\Yii::$app->getUser()->isGuest) {
?>
<ul id="slide-out" class="side-nav">
<li><a href="<?= Url::to([ 'site/index' ]) ?>"><i class="material-icons">home</i>Home</a></li>
<li><a data-method="POST" href="<?= Url::to(
[ 'site/logout' ]
) ?>"><i class="material-icons">exit_to_app</i>Logout</a>
</li>
</ul>
<a href="#" data-activates="slide-out" class="button-collapse waves-effect waves-light btn"><i class="material-icons left">menu</i>Menu</a>
<?php
}
?>
<div class="container">
<?= Alert::widget() ?>
<?= $content ?>
</div>
</div>
<footer class="footer">
<div class="container">
<p class="pull-left">© Calls - ArtWeb <?= date('Y') ?></p>
</div>
</footer>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>