123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- <?php
- /* @var $this \yii\web\View */
- /* @var $content string */
- use yii\helpers\Html;
- use yii\bootstrap\Nav;
- use yii\bootstrap\NavBar;
- use app\assets\AppAsset;
- use yii\helpers\Url;
- AppAsset::register($this);
- ?>
- <?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">
- <?= Html::csrfMetaTags() ?>
- <title><?= Html::encode($this->title) ?></title>
- <?php $this->head() ?>
- <style>
- body{
- padding-top: 80px; }
- .footer-custom{}
- .img-responsive{
- max-width: 200px;
- height: auto;
- }
- .custom-block{
- margin-top: 10px;
- }
- .hamburger{
- background-color: #2b542c;
- }
- .nav-menu{
- margin-top: 15px !important;
- }
- .navbar-custom{
- background-color: rgba(254,254,254,254);
- }
- .container{
- width: 80%;
- }
- .custom{
- padding-top: 40px !important;
- }
- </style>
- </head>
- <body>
- <?php $this->beginBody() ?>
- <div class="wrap">
- <?php
- /*<?= Yii::t('app', 'Welcome!')?>*/
- NavBar::begin([
- 'innerContainerOptions' => ['class' => 'container'],
- 'brandLabel' => '<img src="'.Yii::getAlias('@web').'/images/imws_logo.gif" class="img-responsive"/>',
- 'brandUrl' => Yii::$app->homeUrl,
- 'options' => [
- 'class' => 'navbar-fixed-top navbar-custom',//navbar-inverse
- ],
- ]);
- $adminToolsDropdown = [
- ['label' => Yii::t('app', 'Roles and Permissions'), 'url' => ['/admin-tools/index'], 'visible' => !Yii::$app->user->isGuest],
- ['label' => Yii::t('app', 'User Import'), 'url' => ['/admin-tools/userimport'], 'visible' => !Yii::$app->user->isGuest],
- ['label' => Yii::t('app', 'Gii'), 'url' => ['/gii'], 'visible' => !Yii::$app->user->isGuest],
- ];
- $hrToolsDropdown = [
- ['label' => Yii::t('app', 'Groups Editor'), 'url' => ['/hr-tools/groups'], 'visible' => !Yii::$app->user->isGuest],
- ['label' => Yii::t('app', 'Workflow Configuration'), 'url' => ['/hr-tools/workflow'], 'visible' => !Yii::$app->user->isGuest],
- ['label' => Yii::t('app', 'Tasks Editor'), 'url' => ['/hr-tools/tasks'], 'visible' => !Yii::$app->user->isGuest],
- ];
- $userDropdown = [
- ['label' => Yii::t('app', 'My profile'), 'url' => ['/site/account'], 'visible' => !Yii::$app->user->isGuest],
- ['label' => Yii::t('app', 'Settings'), 'url' => ['/site/settings'], 'visible' => !Yii::$app->user->isGuest]
- ];
- echo Nav::widget([
- 'options' => ['class' => 'navbar-nav navbar-right nav-menu'],
- 'items' => [
- ['label' => Yii::t('app', 'My tasks'), 'url' => ['/site/index'], 'visible' => !Yii::$app->user->isGuest],
- ['label' => Yii::t('app', 'Workflow'), 'url' => ['/site/workflow'], 'visible' => !Yii::$app->user->isGuest],
- ['label' => Yii::t('app', 'Organigram'), 'url' => ['/site/organigram'], 'visible' => !Yii::$app->user->isGuest],
- (Yii::$app->user->can('permission_hr') or Yii::$app->user->can('permission_admin'))?['label' => Yii::t('app', 'HR Tools'), 'url' => ['#'], 'visible' => !Yii::$app->user->isGuest, 'items' => $hrToolsDropdown]: '',
- (Yii::$app->user->can('permission_admin'))?['label' => Yii::t('app', 'Admin Tools'), 'url' => ['#'], 'visible' => !Yii::$app->user->isGuest, 'items' => $adminToolsDropdown]: '',
- ['label' => Yii::t('app', 'Profile') /*Yii::$app->user->identity->username*/, 'url' => ['#'], 'visible' => !Yii::$app->user->isGuest, 'items' => $userDropdown],
- Yii::$app->user->isGuest ? (
- ['label' => 'Login', 'url' => ['/site/login'], 'visible' => false]
- ) : (
- '<li>'
- . Html::beginForm(['/site/logout'], 'post')
- . Html::submitButton(
- Yii::t('app', 'Logout').' (' . Yii::$app->user->identity->username . ')',
- ['class' => 'btn btn-link logout']
- )
- . Html::endForm()
- . '</li>'
- ),
- ],
- ]);
- NavBar::end();
- ?>
- <div class="container custom">
- <?= $content ?>
- </div>
- </div>
- <footer class="footer-custom">
- <div class="container">
- <p class="pull-left"><!--<?= Yii::powered() ?>--></p>
- <p class="pull-right"> © Fraunhofer IMWS <?= date('Y') ?></p>
- </div>
- </footer>
- <?php $this->endBody() ?>
- </body>
- </html>
- <?php $this->endPage() ?>
|