<commit_before><?php

/* @var $this \yii\web\View */
/* @var $content string */

use app\components\ControlPanelWidget;
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use app\assets\AppAsset;

AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode($this->title) ?></title>
    <?php $this->head() ?>
</head>
<body>
<?php $this->beginBody() ?>

<div class="wrap">
    <?php
    NavBar::begin([
        'brandLabel' => "<img src='/images/logo.png'>",
        'brandUrl' => Yii::$app->homeUrl,
        'options' => [
            'class' => 'navbar-inverse navbar-fixed-top',
        ],
    ]);
    echo Nav::widget([
        'options' => ['class' => 'navbar-nav navbar-right'],
        'items' => [
            ['label' => 'Главная', 'url' => ['/post']],
            ['label' => 'О блоге', 'url' => ['/about']],
            ['label' => 'Контакты', 'url' => ['/contact']],
            Yii::$app->user->isGuest ? (
            ['label' => "Вход", 'url' => ['/login']]
            ) : (
                '<li>'
                . Html::beginForm(['/site/logout'], 'post', ['class' => 'navbar-form'])
                . Html::submitButton(
                    'Выход  <i class="fa fa-user"></i>  (' . Yii::$app->user->identity->username . ')',
                    ['class' => 'user']
                )
                . Html::endForm()
                . '</li>'
            ),
            Yii::$app->user->getIdentity()->username === 'admin' ? (

                '<li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-cog fa-lg"></i> <b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li>' . Html::a('Пользователи', '/admin/user.html') . '</li>
            <li>' . Html::a('Посты', '/admin/post.html') . '</li>
            <li>' . Html::a('Комментарии', '/admin/comment.html') . '</li>
            <li>' . Html::a('Теги', '/admin/tag.html') . '</li>
            <li>' . Html::a('Справочник', '/admin/lookup.html') . '</li>
            
          </ul>
        </li>'
            ) : ('<li></li>')
        ],

    ]);
    NavBar::end();
    ?>

    <div class="container">
        <?= Breadcrumbs::widget([
            'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
        ]) ?>

        <div class="container">
            <div class="row">

                <div class="col-lg-9">
                    <?= $content ?>
                </div>

                <div class="col-lg-3">
                    <?
                    echo ControlPanelWidget::widget() ?>
                </div>
<commit_msg>12122016<commit_after><?php

/* @var $this \yii\web\View */
/* @var $content string */

use app\components\ControlPanelWidget;
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use app\assets\AppAsset;

AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode($this->title) ?></title>
    <?php $this->head() ?>
</head>
<body>
<?php $this->beginBody() ?>

<div class="wrap">
    <?php
    NavBar::begin([
        'brandLabel' => "<img src='/images/logo.png'>",
        'brandUrl' => Yii::$app->homeUrl,
        'options' => [
            'class' => 'navbar-inverse navbar-fixed-top',
        ],
    ]);
    echo Nav::widget([
        'options' => ['class' => 'navbar-nav navbar-right'],
        'items' => [
            ['label' => 'Главная', 'url' => ['/post']],
            ['label' => 'О блоге', 'url' => ['/about']],
            ['label' => 'Контакты', 'url' => ['/contact']],

            Yii::$app->user->isGuest ? ('<li></li>') :
            ['label' => 'Внести данные', 'url' => ['/about']],


            Yii::$app->user->isGuest ? (
            ['label' => "Вход", 'url' => ['/login']]
            ) :
                (
                '<li>'
                . Html::beginForm(['/site/logout'], 'post', ['class' => 'navbar-form'])
                . Html::submitButton(
                    'Выход  <i class="fa fa-user"></i>  (' . Yii::$app->user->identity->username . ')',
                    ['class' => 'user']
                )
                . Html::endForm()
                . '</li>'
            ),
        ],

    ]);
    NavBar::end();
    ?>

    <div class="container">
        <?= Breadcrumbs::widget([
            'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
        ]) ?>

        <div class="container">
            <div class="row">

                <div class="col-lg-9">
                    <?= $content ?>
                </div>

                <div class="col-lg-3">
                    <?
                    echo ControlPanelWidget::widget() ?>
                </div>

{'fraction_non_alphanumeric': 0.23281130634071812, 'fraction_numerical': 0.00267379679144385, 'mean_word_length': 1.8338744588744589, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 0, '>': 166, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4403603', 'n_tokens_mistral': 1742, 'n_tokens_neox': 1709, 'n_words': 281}