Code Style

This commit is contained in:
Daniel Kesselberg 2017-12-31 16:27:40 +01:00
parent 974609ff6f
commit 6eca54ada4

View File

@ -7,19 +7,29 @@ use yii\helpers\Url;
?>
<div class="panel-body">
<?= humhub\libs\Html::backButton(['/admin/user/index'], ['label' => Yii::t('AdminModule.base', 'Back to user overview'), 'class' => 'pull-right']); ?>
<?= humhub\libs\Html::backButton(
['/admin/user/index'],
['label' => Yii::t('AdminModule.base', 'Back to user overview'), 'class' => 'pull-right']
); ?>
<h4><?= Yii::t('AdminModule.base', 'Pending user registrations'); ?></h4>
<div class="help-block">
<?= Yii::t('AdminModule.views_approval_index', 'The following list contains all pending sign-ups and invites.'); ?>
<?= Yii::t(
'AdminModule.views_approval_index',
'The following list contains all pending sign-ups and invites.'
); ?>
</div>
<div class="dropdown pull-right">
<button class="btn btn-primary btn-sm " type="button" data-toggle="dropdown"><i class="fa fa-download"></i> <?= Yii::t('base', 'Export')?> <span class="caret"></span></button>
<ul class="dropdown-menu">
<li><?= Button::asLink('csv', Url::current(['export' => '1', 'format' => 'CSV']))->pjax(false)->icon('fa-file-code-o')->sm() ?></li>
<li><?= Button::asLink('xlsx', Url::current(['export' => '1', 'format' => 'XLSX']))->pjax(false)->icon('fa-file-excel-o')->sm() ?></li>
</ul>
<button class="btn btn-primary btn-sm " type="button" data-toggle="dropdown">
<i class="fa fa-download"></i> <?= Yii::t('base', 'Export')?> <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><?= Button::asLink('csv', Url::current(['export' => '1', 'format' => 'CSV']))
->pjax(false)->icon('fa-file-code-o')->sm() ?></li>
<li><?= Button::asLink('xlsx', Url::current(['export' => '1', 'format' => 'XLSX']))
->pjax(false)->icon('fa-file-excel-o')->sm() ?></li>
</ul>
</div>
<?= GridView::widget([
@ -27,34 +37,35 @@ use yii\helpers\Url;
'filterModel' => $searchModel,
'columns' =>
[
'email',
'originator.username',
'language',
'created_at',
[
'attribute' => 'source',
'filter' => \yii\helpers\Html::activeDropDownList($searchModel, 'source', array_merge(['' => ''], $types)),
'options' => ['width' => '40px'],
'format' => 'raw',
'value' => function($data) use ($types) {
if (isset($types[$data->source])) {
return $types[$data->source];
}
return Html::encode($data->source);
},
],
[
'header' => Yii::t('AdminModule.views_user_index', 'Actions'),
'class' => 'yii\grid\ActionColumn',
'template' => '{resend}',
'options' => ['style' => 'width:80px; min-width:80px;'],
'buttons' => [
'resend' => function($url, $model) {
return Html::a('<i class="fa fa-envelope"></i>', Url::toRoute(['resend', 'id' => $model->id]), ['class' => 'btn btn-primary btn-xs tt']);
'email',
'originator.username',
'language',
'created_at',
[
'attribute' => 'source',
'filter' => Html::activeDropDownList($searchModel, 'source', array_merge(['' => ''], $types)),
'options' => ['width' => '40px'],
'format' => 'raw',
'value' => function ($data) use ($types) {
return isset($types[$data->source]) ? $types[$data->source] : Html::encode($data->source);
},
],
],
]
[
'header' => Yii::t('AdminModule.views_user_index', 'Actions'),
'class' => 'yii\grid\ActionColumn',
'template' => '{resend}',
'options' => ['style' => 'width:80px; min-width:80px;'],
'buttons' => [
'resend' => function ($url, $model, $key) {
return Html::a(
'<i class="fa fa-envelope"></i>',
Url::toRoute(['resend', 'id' => $model->id]),
['class' => 'btn btn-primary btn-xs tt']
);
},
],
],
]
]); ?>
</div>