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,
'brandUrl' => 'http://www.worldfloraonline.org/',
'options' => [
// 'class' => 'navbar-inverse navbar-fixed-top' ,
'encodeLabels' => true,
]
] );
} else {
NavBar::begin ( [
'brandLabel' => '',
//'
',
// 'brandUrl' => Yii::$app->homeUrl,
'brandUrl' => 'http://www.worldfloraonline.org/',
'options' => [
// 'class' => 'navbar-inverse navbar-fixed-top' ,
'encodeLabels' => true
]
] );
}
$menuItems = [
[
'label' => 'This is currently a beta (ß) version',
'options'=>['class'=>'info'],
],
[
'label' => 'Home',
'url' => Yii::$app->homeUrl
],
[
'label' => 'Search',
'url' => ['/search/index']
],
[
'label' => 'About',
'url' => ['/site/about'],
],
]
;
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' => 'Validation', 'url' => ['/validation/validation?token'],'linkOptions' => ['data-method' => 'post']],
'
',
['label' => 'User profiles', 'url' =>['/account/admin']],
'
',
['label' => 'New Institution', 'url' =>['/validation/new']],
'
',
['label' => 'New Contact', 'url' =>['/validation/contactperson']]
]
];
}
$menuItems [] = [
'label' => 'Account (Basket)',
'items' => [
['label' => 'Profile', 'url' => ['/account/profile']],
'
',
['label' => 'Settings', 'url' => ['/account/settings']],
'
',
['label' => 'Searches', 'url' => ['/account/searches']],
'
',
['label' => 'Basket', 'url' => ['/cart/cart']],
'
',
['label' => 'Recent requests', 'url' => ['/account/orders']],
'
',
['label' => 'Logout', 'url' => ['/site/logout'],'linkOptions' => [
'data-method' => 'post'
]]
],
];
}
}
echo Nav::widget ( [
'options' => [
'class' => 'navbar-nav navbar-right'
],
'items' => $menuItems
] );
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()?>
endPage()?>