echo Url::to(['members/mods']); ?> "><span class="glyphicon glyphicon-scissors"></span> <?php echo Yii::t('podium/view', 'Moderation Team'); ?> </a></li> </ul> <br> <?php Pjax::begin(); echo PageSizer::widget(); echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'filterSelector' => 'select#per-page', 'tableOptions' => ['class' => 'table table-striped table-hover'], 'columns' => [['attribute' => 'username', 'label' => Yii::t('podium/view', 'Username') . Helper::sortOrder('username'), 'encodeLabel' => false, 'format' => 'raw', 'value' => function ($model) { return Html::a($model->podiumName, ['members/view', 'id' => $model->id, 'slug' => $model->podiumSlug], ['data-pjax' => '0']); }], ['attribute' => 'role', 'label' => Yii::t('podium/view', 'Role') . Helper::sortOrder('role'), 'encodeLabel' => false, 'format' => 'raw', 'filter' => User::getRoles(), 'value' => function ($model) { return Helper::roleLabel($model->role); }], ['attribute' => 'created_at', 'label' => Yii::t('podium/view', 'Joined') . Helper::sortOrder('created_at'), 'encodeLabel' => false, 'value' => function ($model) { return Yii::$app->formatter->asDatetime($model->created_at); }], ['attribute' => 'threads_count', 'label' => Yii::t('podium/view', 'Threads'), 'encodeLabel' => false, 'value' => function ($model) { return $model->threadsCount; }], ['attribute' => 'posts_count', 'label' => Yii::t('podium/view', 'Posts'), 'encodeLabel' => false, 'value' => function ($model) { return $model->postsCount; }], ['class' => ActionColumn::className(), 'header' => Yii::t('podium/view', 'Actions'), 'contentOptions' => ['class' => 'text-right'], 'headerOptions' => ['class' => 'text-right'], 'template' => '{view}' . (!Yii::$app->user->isGuest ? ' {pm}' : ''), 'buttons' => ['view' => function ($url, $model) { return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', ['members/view', 'id' => $model->id, 'slug' => $model->podiumSlug], ['class' => 'btn btn-default btn-xs', 'data-pjax' => '0', 'data-toggle' => 'tooltip', 'data-placement' => 'top', 'title' => Yii::t('podium/view', 'View Member')]); }, 'pm' => function ($url, $model) { if ($model->id !== User::loggedId()) { return Html::a('<span class="glyphicon glyphicon-envelope"></span>', ['messages/new', 'user' => $model->id], ['class' => 'btn btn-default btn-xs', 'data-pjax' => '0', 'data-toggle' => 'tooltip', 'data-placement' => 'top', 'title' => Yii::t('podium/view', 'Send Message')]); } else { return Html::a('<span class="glyphicon glyphicon-envelope"></span>', '#', ['class' => 'btn btn-xs disabled text-muted']); } }]]]]); Pjax::end();
$class = ''; } return ['class' => $class]; }, 'columns' => [['attribute' => 'id', 'label' => Yii::t('podium/view', 'ID') . Helper::sortOrder('id'), 'encodeLabel' => false], ['attribute' => 'level', 'label' => Yii::t('podium/view', 'Level') . Helper::sortOrder('level'), 'encodeLabel' => false, 'filter' => Log::getTypes(), 'format' => 'raw', 'value' => function ($model) { $name = ArrayHelper::getValue(Log::getTypes(), $model->level, 'other'); switch ($model->level) { case 1: $class = 'danger'; break; case 2: $class = 'warning'; break; case 4: $class = 'info'; break; default: $class = 'default'; } return Html::tag('span', Yii::t('podium/view', $name), ['class' => 'label label-' . $class]); }], ['attribute' => 'category', 'label' => Yii::t('podium/view', 'Category') . Helper::sortOrder('category'), 'encodeLabel' => false, 'value' => function ($model) { return str_replace('bizley\\podium', '', $model->category); }], ['attribute' => 'log_time', 'label' => Yii::t('podium/view', 'Time') . Helper::sortOrder('log_time'), 'encodeLabel' => false, 'filter' => false, 'value' => function ($model) { return Yii::$app->formatter->asDatetime(floor($model->log_time), 'medium'); }], ['attribute' => 'prefix', 'label' => Yii::t('podium/view', 'Signature') . Helper::sortOrder('prefix'), 'encodeLabel' => false], ['attribute' => 'message', 'label' => Yii::t('podium/view', 'Message') . Helper::sortOrder('message'), 'encodeLabel' => false, 'format' => 'raw', 'value' => function ($model) { return nl2br(Html::encode($model->message)); }], ['attribute' => 'model', 'label' => Yii::t('podium/view', 'Model ID') . Helper::sortOrder('model'), 'encodeLabel' => false, 'value' => function ($model) { return $model->model !== null ? $model->model : ''; }], ['attribute' => 'blame', 'label' => Yii::t('podium/view', 'Who') . Helper::sortOrder('blame'), 'encodeLabel' => false, 'value' => function ($model) { return $model->blame !== null ? $model->blame : ''; }]]]); Pjax::end();
</h4> <?php echo Html::beginForm(); ?> <?php Pjax::begin(); ?> <?php echo PageSizer::widget(); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'filterSelector' => 'select#per-page', 'tableOptions' => ['class' => 'table table-striped table-hover'], 'columns' => [['class' => CheckboxColumn::className(), 'headerOptions' => ['class' => 'col-sm-1 text-center'], 'contentOptions' => ['class' => 'col-sm-1 text-center'], 'checkboxOptions' => function ($model) use($mod) { return ['value' => $model->id, 'checked' => $model->isMod($mod->id)]; }], ['attribute' => 'id', 'label' => Yii::t('podium/view', 'ID') . Helper::sortOrder('id'), 'encodeLabel' => false, 'contentOptions' => ['class' => 'col-sm-1 text-center'], 'headerOptions' => ['class' => 'col-sm-1 text-center']], ['attribute' => 'name', 'label' => Yii::t('podium/view', 'Name') . Helper::sortOrder('name'), 'encodeLabel' => false, 'format' => 'raw', 'value' => function ($model) use($mod) { return Html::encode($model->name) . ($model->isMod($mod->id) ? Html::hiddenInput('pre[]', $model->id) : ''); }], ['class' => ActionColumn::className(), 'header' => Yii::t('podium/view', 'Actions'), 'contentOptions' => ['class' => 'text-right'], 'headerOptions' => ['class' => 'text-right'], 'template' => '{mod}', 'urlCreator' => function ($action, $model) use($mod) { return Url::toRoute([$action, 'fid' => $model->id, 'uid' => $mod->id]); }, 'buttons' => ['mod' => function ($url, $model) use($mod) { if ($model->isMod($mod->id)) { return Html::a('<span class="glyphicon glyphicon-remove"></span> ' . Yii::t('podium/view', 'Remove'), $url, ['class' => 'btn btn-danger btn-xs', 'data-toggle' => 'tooltip', 'data-placement' => 'top', 'title' => Yii::t('podium/view', 'Remove from moderation list')]); } else { return Html::a('<span class="glyphicon glyphicon-plus"></span> ' . Yii::t('podium/view', 'Add'), $url, ['class' => 'btn btn-success btn-xs', 'data-toggle' => 'tooltip', 'data-placement' => 'top', 'title' => Yii::t('podium/view', 'Add to moderation list')]); } }]]]]); ?> <?php Pjax::end(); ?>
var button = jQuery(e.relatedTarget); jQuery(\'#unbanUrl\').attr(\'href\', button.data(\'url\')); });', View::POS_READY, 'bootstrap-modal-unban'); echo $this->render('/elements/admin/_navbar', ['active' => 'members']); ?> <br> <?php Pjax::begin(); echo PageSizer::widget(); echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'filterSelector' => 'select#per-page', 'tableOptions' => ['class' => 'table table-striped table-hover'], 'columns' => [['attribute' => 'id', 'label' => Yii::t('podium/view', 'ID') . Helper::sortOrder('id'), 'encodeLabel' => false, 'contentOptions' => ['class' => 'col-sm-1 text-right'], 'headerOptions' => ['class' => 'col-sm-1 text-right']], ['attribute' => 'username', 'label' => Yii::t('podium/view', 'Username') . Helper::sortOrder('username'), 'encodeLabel' => false], ['attribute' => 'email', 'label' => Yii::t('podium/view', 'E-mail') . Helper::sortOrder('email'), 'encodeLabel' => false, 'format' => 'raw', 'value' => function ($model) { return Html::mailto($model->email); }], ['attribute' => 'role', 'label' => Yii::t('podium/view', 'Role') . Helper::sortOrder('role'), 'encodeLabel' => false, 'filter' => User::getRoles(), 'value' => function ($model) { return Yii::t('podium/view', ArrayHelper::getValue(User::getRoles(), $model->role)); }], ['attribute' => 'status', 'label' => Yii::t('podium/view', 'Status') . Helper::sortOrder('status'), 'encodeLabel' => false, 'filter' => User::getStatuses(), 'value' => function ($model) { return Yii::t('podium/view', ArrayHelper::getValue(User::getStatuses(), $model->status)); }], ['class' => ActionColumn::className(), 'header' => Yii::t('podium/view', 'Actions'), 'contentOptions' => ['class' => 'text-right'], 'headerOptions' => ['class' => 'text-right'], 'template' => '{view} {pm} {ban} {delete}', 'buttons' => ['view' => function ($url) { return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', $url, ['class' => 'btn btn-default btn-xs', 'data-toggle' => 'tooltip', 'data-placement' => 'top', 'title' => Yii::t('podium/view', 'View Member')]); }, 'pm' => function ($url, $model) { if ($model->id !== Yii::$app->user->id) { return Html::a('<span class="glyphicon glyphicon-envelope"></span>', ['messages/new', 'user' => $model->id], ['class' => 'btn btn-default btn-xs', 'data-toggle' => 'tooltip', 'data-placement' => 'top', 'title' => Yii::t('podium/view', 'Send Message')]); } else { return Html::a('<span class="glyphicon glyphicon-envelope"></span>', '#', ['class' => 'btn btn-xs disabled text-muted']); } }, 'ban' => function ($url, $model) { if ($model->id !== Yii::$app->user->id) { if ($model->status !== User::STATUS_BANNED) { return Html::tag('span', Html::tag('button', '<span class="glyphicon glyphicon-ban-circle"></span>', ['class' => 'btn btn-danger btn-xs', 'data-toggle' => 'tooltip', 'data-placement' => 'top', 'title' => Yii::t('podium/view', 'Ban Member')]), ['data-toggle' => 'modal', 'data-target' => '#podiumModalBan', 'data-url' => $url]); } else { return Html::tag('span', Html::tag('button', '<span class="glyphicon glyphicon-ok-circle"></span>', ['class' => 'btn btn-success btn-xs', 'data-toggle' => 'tooltip', 'data-placement' => 'top', 'title' => Yii::t('podium/view', 'Unban Member')]), ['data-toggle' => 'modal', 'data-target' => '#podiumModalUnBan', 'data-url' => $url]);