コード例 #1
0
ファイル: view.php プロジェクト: keltstr/yii2-podium
    echo Html::a('<span class="glyphicon glyphicon-trash"></span>', '', ['class' => 'btn btn-lg disabled text-muted']);
}
?>
                </div>
                <h2>
                    <?php 
echo Html::encode($model->getPodiumName());
?>
 
                    <small>
                        <?php 
echo Html::encode($model->email);
?>
 
                        <?php 
echo Helper::roleLabel($model->role);
?>
                        <?php 
echo Helper::statusLabel($model->status);
?>
                    </small>
                </h2>
                
                <p><?php 
echo Yii::t('podium/view', 'Location');
?>
: <?php 
echo !empty($model->meta) && !empty($model->meta->location) ? Html::encode($model->meta->location) : '-';
?>
</p>
コード例 #2
0
ファイル: view.php プロジェクト: keltstr/yii2-podium
                <h4 class="text-danger"><?php 
        echo Yii::t('podium/view', 'You are ignoring this user.');
        ?>
</h4>
<?php 
    }
}
?>
                <h2>
                    <?php 
echo Html::encode($model->getName());
?>
 
                    <small>
                        <?php 
echo Helper::roleLabel($model->getRole());
?>
                    </small>
                </h2>
                
                <p><?php 
echo Yii::t('podium/view', 'Location');
?>
: <?php 
echo !empty($model->meta) && !empty($model->meta->location) ? Html::encode($model->meta->location) : '-';
?>
</p>
                
                <p><?php 
echo Yii::t('podium/view', 'Member since {DATE}', ['DATE' => Yii::$app->formatter->asDatetime($model->getCreatedAt(), 'long')]);
?>
コード例 #3
0
ファイル: index.php プロジェクト: gitter-badger/yii2-podium
    <li role="presentation"><a href="<?php 
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']);
    }
}]]]]);