<?php /* @var $this SearchController */ /* @var $dataProvider ActiveDataProvider */ /* @var $search String */ /* @var $choice Integer */ /* @var $type Integer */ $this->title = Yii::t('forum', 'Forum'); $this->params['breadcrumbs'][] = $this->title; $this->context->bbii_breadcrumbs = array(Yii::t('BbiiModule.bbii', 'Forum') => array('forum/index'), Yii::t('BbiiModule.bbii', 'Search')); $approvals = BbiiPost::find()->unapproved()->count(); $reports = BbiiMessage::find()->report()->count(); $item = array(array('label' => Yii::t('BbiiModule.bbii', 'Forum'), 'url' => array('forum/index')), array('label' => Yii::t('BbiiModule.bbii', 'Members'), 'url' => array('member/index')), array('label' => Yii::t('BbiiModule.bbii', 'Approval') . ' (' . $approvals . ')', 'url' => array('moderator/approval'), 'visible' => $this->context->isModerator()), array('label' => Yii::t('BbiiModule.bbii', 'Reports') . ' (' . $reports . ')', 'url' => array('moderator/report'), 'visible' => $this->context->isModerator()), array('label' => Yii::t('BbiiModule.bbii', 'Posts'), 'url' => array('moderator/admin'), 'visible' => $this->context->isModerator()), array('label' => Yii::t('BbiiModule.bbii', 'Blocked IP'), 'url' => array('moderator/ipadmin'), 'visible' => $this->context->isModerator())); ?> <div id = "bbii-wrapper" class="well clearfix"> <?php echo $this->render('_header', array('item' => $item)); ?> <?php $form = $this->beginWidget('ActiveForm', array('id' => 'bbii-search-form', 'action' => array('search/index'), 'enableAjaxValidation' => false)); echo Html::textField('search', $search, array('size' => 80, 'maxlength' => 100)); echo Html::submitButton(Yii::t('BbiiModule.bbii', 'Search')) . '<br>'; echo Html::radioButtonList('choice', $choice, array('1' => Yii::t('BbiiModule.bbii', 'Subject'), '2' => Yii::t('BbiiModule.bbii', 'Content'), '0' => Yii::t('BbiiModule.bbii', 'Both')), array('separator' => ' ')); echo ' | '; echo Html::radioButtonList('type', $type, array('1' => Yii::t('BbiiModule.bbii', 'Any word'), '2' => Yii::t('BbiiModule.bbii', 'All words'), '0' => Yii::t('BbiiModule.bbii', 'Phrase')), array('separator' => ' ')); $this->endWidget(); ?> <?php $this->widget('zii.widgets.CListView', array('id' => 'bbii-search-result', 'dataProvider' => $dataProvider, 'itemView' => '_post'));
<?php use yii\helpers\Html; use sourcetoad\bbii2\AppAsset; $assets = AppAsset::register($this); /* @var $this SearchController */ /* @var $item array */ ?> <div id = "bbii-header"> <?php if (!\Yii::$app->user->isGuest) { ?> <?php $messages = BbiiMessage::find()->inbox()->unread()->count('sendto = ' . \Yii::$app->user->identity->id); ?> <div class = "btn-group pull-right"> <?php if ($messages) { echo Html::a(Html::img($assets->baseUrl . '/images/newmail.png', array('title' => $messages . ' ' . Yii::t('BbiiModule.bbii', 'new messages'), 'style' => 'vertical-align:bottom;')), array('message/inbox'), array('class' => 'btn btn-default')); } else { echo Html::a(Html::img($assets->baseUrl . '/images/mail.png', array('title' => Yii::t('BbiiModule.bbii', 'no new messages'), 'style' => 'vertical-align:bottom;')), array('message/inbox'), array('class' => 'btn btn-default')); } echo Html::a(Html::img($assets->baseUrl . '/images/settings.png', array('title' => Yii::t('BbiiModule.bbii', 'My settings'), 'style' => 'vertical-align:bottom;')), array('member/view', 'id' => \Yii::$app->user->identity->id), array('class' => 'btn btn-default')); echo Html::a(Html::img($assets->baseUrl . '/images/config.png', array('title' => Yii::t('BbiiModule.bbii', 'Forum settings'), 'style' => 'vertical-align:bottom;')), array('setting/index'), array('class' => 'btn btn-default')); ?> </div> <?php } ?> <h2><?php echo $this->context->module->forumTitle;