/** * Creates data provider instance with search query applied * * @param array $params * * @return ActiveDataProvider */ public function search($params) { $query = SystemLog::find(); $dataProvider = new ActiveDataProvider(['query' => $query]); $this->load($params); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); return $dataProvider; } $query->andFilterWhere(['id' => $this->id, 'level' => $this->level, 'log_time' => $this->log_time]); $query->andFilterWhere(['like', 'category', $this->category])->andFilterWhere(['like', 'prefix', $this->prefix])->andFilterWhere(['like', 'message', $this->message]); return $dataProvider; }
<!-- Inner sidebar --> <div class="sidebar"> <!-- user panel (Optional) --> <!--div class="user-panel"> <div class="pull-left image"> <img src="dist/img/user2-160x160.jpg" class="img-circle" alt="User Image" /> </div> <div class="pull-left info"> <p>User Name</p> <a href="#"><i class="fa fa-circle text-success"></i> Online</a> </div> </div><!-- /.user-panel --> <?php echo Menu::widget(['options' => ['class' => 'sidebar-menu'], 'linkTemplate' => '<a href="{url}">{icon}<span>{label}</span>{right-icon}{badge}</a>', 'submenuTemplate' => "\n<ul class=\"treeview-menu\">\n{items}\n</ul>\n", 'activateParents' => true, 'encodeLabels' => false, 'items' => [['label' => Yii::t('backend', 'Navigation'), 'options' => ['class' => 'header']], ['label' => Yii::t('backend', 'Statistics'), 'icon' => '<i class="fa fa-pie-chart"></i>', 'url' => ['/dashboard/default/index']], ['label' => 'Разделы', 'options' => ['class' => 'header']], ['label' => Yii::t('backend', 'Pages'), 'icon' => '<i class="fa fa-files-o"></i>', 'url' => ['/page/default/index']], ['label' => Yii::t('backend', 'News'), 'icon' => '<i class="fa fa-list"></i>', 'url' => ['/news/default/index']], ['label' => 'Подписчики', 'icon' => '<i class="fa fa-envelope-o"></i>', 'url' => ['/subscribers/default/index']], ['label' => 'Обратная связь', 'icon' => '<i class="fa fa-question-circle-o"></i>', 'url' => ['/feedback/default/index']], ['label' => 'Преподаватели', 'icon' => '<i class="fa fa-graduation-cap"></i>', 'url' => ['/teachers/default/index']], ['label' => 'Слушатели', 'icon' => '<i class="fa fa-address-book-o"></i>', 'url' => ['/students/default/index']], ['label' => Yii::t('backend', 'Menu'), 'icon' => '<i class="fa fa-bars"></i>', 'url' => ['/menu/default/index']], ['label' => Yii::t('backend', 'File Manager'), 'icon' => '<i class="fa fa-floppy-o"></i>', 'url' => ['/file-manager/index']], ['label' => Yii::t('backend', 'System'), 'url' => '#', 'icon' => '<i class="fa fa-cogs"></i>', 'options' => ['class' => 'treeview'], 'items' => [['label' => Yii::t('backend', 'Users'), 'icon' => '<i class="fa fa-angle-double-right"></i>', 'url' => ['/user/default/index']], ['label' => Yii::t('backend', 'Settings'), 'icon' => '<i class="fa fa-angle-double-right"></i>', 'url' => ['/settings/default/index']], ['label' => Yii::t('backend', 'Logs'), 'url' => ['/log/default/index'], 'icon' => '<i class="fa fa-angle-double-right"></i>', 'badge' => \backend\modules\log\models\SystemLog::find()->count(), 'badgeBgClass' => 'label-danger']]]]]); ?> </div><!-- /.sidebar --> </div><!-- /.main-sidebar --> <aside class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> <?php echo $this->title; ?> <?php if (isset($this->params['subtitle'])) { ?>
<!-- Inner sidebar --> <div class="sidebar"> <!-- user panel (Optional) --> <!--div class="user-panel"> <div class="pull-left image"> <img src="dist/img/user2-160x160.jpg" class="img-circle" alt="User Image" /> </div> <div class="pull-left info"> <p>User Name</p> <a href="#"><i class="fa fa-circle text-success"></i> Online</a> </div> </div><!-- /.user-panel --> <?php echo Menu::widget(['options' => ['class' => 'sidebar-menu'], 'linkTemplate' => '<a href="{url}">{icon}<span>{label}</span>{right-icon}{badge}</a>', 'submenuTemplate' => "\n<ul class=\"treeview-menu\">\n{items}\n</ul>\n", 'activateParents' => true, 'encodeLabels' => false, 'items' => [['label' => Yii::t('backend', 'Navigation'), 'options' => ['class' => 'header']], ['label' => Yii::t('backend', 'Statistics'), 'icon' => '<i class="fa fa-pie-chart"></i>', 'url' => ['/dashboard/default/index']], ['label' => 'Разделы', 'options' => ['class' => 'header']], ['label' => Yii::t('backend', 'Pages'), 'icon' => '<i class="fa fa-files-o"></i>', 'url' => ['/page/default/index']], ['label' => Yii::t('backend', 'News'), 'icon' => '<i class="fa fa-list"></i>', 'url' => ['/news/default/index']], ['label' => Yii::t('backend', 'Banners'), 'icon' => '<i class="fa fa-cube"></i>', 'url' => ['/banner/default/index']], ['label' => Yii::t('backend', 'System'), 'url' => '#', 'icon' => '<i class="fa fa-cogs"></i>', 'options' => ['class' => 'treeview'], 'items' => [['label' => Yii::t('backend', 'Users'), 'icon' => '<i class="fa fa-angle-double-right"></i>', 'url' => ['/user/default/index']], ['label' => Yii::t('backend', 'Settings'), 'icon' => '<i class="fa fa-angle-double-right"></i>', 'url' => ['/settings/default/index']], ['label' => Yii::t('backend', 'Logs'), 'url' => ['/log/default/index'], 'icon' => '<i class="fa fa-angle-double-right"></i>', 'badge' => \backend\modules\log\models\SystemLog::find()->count(), 'badgeBgClass' => 'label-danger']]]]]); ?> </div><!-- /.sidebar --> </div><!-- /.main-sidebar --> <aside class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> <?php echo $this->title; ?> <?php if (isset($this->params['subtitle'])) { ?>