base.php
4.35 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?php
/**
* @var AdminController $this
*/
$cs = Yii::app()->getClientScript();
$cs->registerCoreScript('jquery');
if (defined('YII_DEBUG'))
$cs->registerScriptFile($this->getModule()->assets . '/bootstrap/js/bootstrap.js', CClientScript::POS_END);
else
$cs->registerScriptFile($this->getModule()->assets . '/bootstrap/js/bootstrap.min.js', CClientScript::POS_END);
$cs->registerScript('$ajax-timeout', '$.ajaxSetup({ timeout:10000 });');
?>
<?php
/**
* @var AdminController $this
* @var string $content
*/
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<meta charset="utf-8">
<link rel="stylesheet" href="<?php echo $this->getModule()->assets . '/bootstrap/css/bootstrap.css'?>"/>
<style type="text/css">
body {
padding-top: <?php echo empty($this->module->sectionMenu) ? '60px' : '96px'?>;
/* 60px to make the container go all the way to the bottom of the topbar */
}
</style>
<link rel="stylesheet" href="<?php echo $this->getModule()->assets . '/bootstrap/css/bootstrap-responsive.css'?>"/>
<link rel="stylesheet" href="<?php echo $this->getModule()->assets . '/admin.css'?>"/>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="<?php echo $this->getModule()->assets; ?>/js/html5.js"></script>
<![endif]-->
<title><?php echo $this->pageTitle;?></title>
<link rel="shortcut icon" href="<?php echo $this->getModule()->assets;?>/favicon.ico"/>
<?php
$request = Yii::app()->request;
if ($request->enableCsrfValidation) {
echo CHtml::metaTag($request->csrfTokenName, 'csrf-param');
echo CHtml::metaTag($request->getCsrfToken(), 'csrf-token');
}
?>
</head>
<body>
<div class="navbar navbar-fixed-top " style="z-index: 1031;">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<?php //echo CHtml::link(Yii::app()->name, array('/admin/default/index'), array('class' => 'brand'))?>
<div class="nav-collapse">
<?php
$this->widget('BHorizontalMenu', array(
'items' => $this->module->mainMenu,
));
?>
<ul class="nav pull-right">
<li class="divider-vertical"></li>
<li class="dropdown">
<a href="#"
class="dropdown-toggle"
data-toggle="dropdown">
<i class="icon-user icon-white"></i>
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a><b><?php echo Yii::app()->user->fullName ?></b></a></li>
<li class="divider"></li>
<li><?php echo CHtml::link('Сменить пароль', array('/admin/default/changePassword'))?></li>
<?php if (Yii::app()->user->checkAccess('admin')): ?>
<li><?php echo CHtml::link('Управление пользователями', array('/admin/user/admin'))?></li>
<?php endif;?>
<li class="divider"></li>
<li><?php echo CHtml::link('Выход', array('/admin/default/logout'))?></li>
</ul>
</li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</div>
</div>
<?php if (!empty($this->module->sectionMenu)): ?>
<div class="subnav subnav-fixed">
<div class="container-fluid">
<?php
$this->widget('BHorizontalMenu', array(
'items' => $this->module->sectionMenu,
'class' => 'nav nav-pills',
// 'style' => 'width:1170px;',
));
?>
</div>
</div>
<?php endif;?>
<?php echo $content ?>
</body>
</html>