params['maintenance']) echo '
'.
Yii::$app->params['maintenanceMessage']
.'
';
if (BaseUrl::current () === Yii::$app->homeUrl || strpos ( BaseUrl::current (), 'site/index' )) {
NavBar::begin ( [
'brandLabel' => '',
'brandUrl' => Yii::$app->homeUrl,
'options' => [
// 'class' => 'navbar-inverse navbar-fixed-top' ,
'encodeLabels' => true
]
] );
} else {
NavBar::begin ( [
'brandLabel' => '',
'brandUrl' => Yii::$app->homeUrl,
'options' => [
// 'class' => 'navbar-inverse navbar-fixed-top' ,
'encodeLabels' => true
]
] );
}
$menuItems = [
// [
// 'label' => 'This is currently a beta (ß) version',
// 'options' => [
// 'class' => 'info'
// ]
// ],
[
'label' => "Search",
'items' => [
[
'label' => 'Search form',
'url' => [
'/search/index'
]
],
'
',
[
'label' => 'Browse Tree of Life',
'url' => [
'/search/tree'
]
],
'
',
[
'label' => 'Browse Collections',
'url' => [
'/search/browse'
]
]
],
'url' => [
'/search/index'
],
'linkOptions' => [
"title" => 'Data portal'
]
],
[
'label' => "Statistics",
'items' => [
[
'label' => 'Summary',
'url' => [
'/site/overview'
]
],
'
',
[
'label' => 'Statistics',
'url' => [
'/stats/index'
]
],
'
',
[
'label' => 'Members',
'url' => [
'/members/index'
]
],
]
],
[
'label' => "Contacts",
'url' => "http://ngbz.cz/kontakty_21/"
],
[
'label' => "Home",
'url' => "http://ngbz.cz/"
],
];
// [
// 'label' => 'Contact',
// 'url' => [
// '/site/contact'
// ]
// ]
if (Yii::$app->params ['useLogin'] && ( in_array ( Yii::$app->request->userIP, Yii::$app->params ['authorizedIPs'] ) || in_array("all", Yii::$app->params['authorizedIPs'] ))) {
if (Yii::$app->user->isGuest or (User::getCookie() != Yii::$app->params['siteName'])) {
$menuItems [] = [
'label' => "Login",
'url' => [
'/site/login'
]
];
} else {
if (\Yii::$app->user->can ( 'validateUser' )) {
$menuItems [] = [
'label' => "Admin",
'items' => [
[
'label' => 'Admin panel',
'url' => [
'/validation/adminpanel'
]
],
'
',
[
'label' => 'Validation',
'url' => [
'/validation/validation?token'
],
'linkOptions' => [
'data-method' => 'post'
]
],
'
',
[
'label' => 'User profiles',
'url' => [
'/account/admin'
]
],
'
',
[
'label' => 'Creating maps',
'url' => [
'/maps/index'
]
],
]
];
}
$menuItems [] = [
'label' => Html::img ( "".Yii::$app->request->baseUrl."/images/icons/preferences-desktop-user-password.png", [
"title" => "Account (Basket)",
"height" => "30px"
] ),
'items' => [
[
'label' => 'Profile',
'url' => [
'/account/profile'
]
],
'
',
[
'label' => 'Settings',
'url' => [
'/account/settings'
] ,
'linkOptions' => array (
'target' => '_blank'
)
],
'
',
[
'label' => 'Searches',
'url' => [
'/account/searches'
] ,
'linkOptions' => array (
'target' => '_blank'
)
],
'
',
[
'label' => 'Basket',
'url' => [
'/cart/cart'
] ,
'linkOptions' => array (
'target' => '_blank'
)
],
'
',
[
'label' => 'Recent requests',
'url' => [
'/account/orders'
] ,
'linkOptions' => array (
'target' => '_blank'
)
],
'
',
[
'label' => 'Logout',
'url' => [
'/site/logout'
],
'linkOptions' => [
'data-method' => 'post'
]
]
]
];
}
}
echo Nav::widget ( [
'options' => [
'class' => 'navbar-nav navbar-right'
],
'items' => $menuItems,
'encodeLabels' => false
] );
NavBar::end ();
?>
=Breadcrumbs::widget ( [ 'links' => isset ( $this->params ['breadcrumbs'] ) ? $this->params ['breadcrumbs'] : [ ] ] )?>
= Alert::widget()?>
= $content?>
render("/site/feedback",["model"=>new FeedbackForm(), "current"=>Yii::$app->request->url])?>
endBody()?>