<?php \yii\widgets\Pjax::begin(['enablePushState' => true]); ?> <?php echo \yii\grid\GridView::widget(['id' => 'gridId', 'dataProvider' => $activeDataProvider, 'pager' => ['class' => 'yii\\widgets\\LinkPager', 'lastPageLabel' => 'Last', 'firstPageLabel' => 'First', 'options' => ['class' => 'pagination']], 'emptyCell' => '-', 'rowOptions' => function ($model, $key, $index, $column) { return ['id' => 'rowId' . $model->id, 'class' => $model->status == ACTIVE ? 'success' : 'danger']; }, 'columns' => [['attribute' => 'id', 'label' => 'User ID', 'format' => 'raw', 'value' => function ($model, $key, $index, $column) { return Html::encode($model->id); }], ['attribute' => 'first_name', 'label' => 'Name', 'value' => function ($model, $key, $index, $column) { return Html::encode($model->first_name . ' ' . $model->last_name); }], ['attribute' => 'email', 'label' => 'Email', 'value' => function ($model, $key, $index, $column) { return Html::encode($model->email); }], ['attribute' => 'username', 'label' => 'Username', 'value' => function ($model, $key, $index, $column) { return Html::encode($model->username); }], ['attribute' => 'groups', 'label' => 'Group(s)', 'value' => function ($model, $key, $index, $column) { return Html::encode(vendor\codefire\cfusermgmt\views\helpers\Helper::findRoleAlias($model->userRole[0]->item_name)); }], ['attribute' => 'email_verified', 'label' => 'Email Verified', 'contentOptions' => function ($model, $key, $index, $column) { return ['id' => 'email_verified_td' . $model->id]; }, 'value' => function ($model, $key, $index, $column) { return Html::encode($model->email_verified) == VERIFIED ? 'Yes' : 'No'; }], ['attribute' => 'status', 'label' => 'Status', 'contentOptions' => function ($model, $key, $index, $column) { return ['id' => 'status_td' . $model->id]; }, 'value' => function ($model, $key, $index, $column) { return Html::encode($model->status) == ACTIVE ? 'Active' : 'Inactive'; }], ['attribute' => 'created', 'label' => 'Created', 'value' => function ($model, $key, $index, $column) { return date(DATE_FORMAT, strtotime($model->created)); }], ['attribute' => 'status', 'label' => 'Actions', 'content' => function ($model, $key, $index, $column) { return $this->render('actionIcons', ['model' => $model]); }]]]); ?> <?php
<?php $modelRole = vendor\codefire\cfusermgmt\views\helpers\Helper::findUserRole($model->id); $loggedInRole = vendor\codefire\cfusermgmt\views\helpers\Helper::findUserRole(); $allowUpdateByAdmin = false; if (in_array($loggedInRole, array(ADMIN_ROLE_ALIAS, SUPERADMIN_ROLE_ALIAS))) { $allowUpdateByAdmin = true; } ?> <div class="container"> <div class="radius_box"> <?php $this->title = "User Profile"; ?> <?php echo $this->render("@cfusermgmtView/shared/profile_header", ['model' => $model, 'showEditLink' => true, 'showViewLink' => false, 'showUpdateRequestLink' => true, 'modelRole' => $modelRole, 'allowUpdateByAdmin' => $allowUpdateByAdmin]); ?> <div class="row"> <div class="col-md-6 r_padding_topp22"> <?php echo $this->render("@cfusermgmtView/shared/view_profile_basic_detail", ['model' => $model]); ?> </div> </div> </div> </div>
<span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand logo_tag" href="<?php echo Yii::$app->homeUrl; ?> "> <img src="<?php echo Url::to('@SITE_URL') . "/" . Url::to('@cfusermgmtWeb'); ?> /images/sit_logo.png"/> </a> </div> <div class="collapse navbar-collapse pull-right" id="example-navbar-collapse"> <ul class="nav navbar-nav navbar-right signup_ul"> <?php $userRoleAlias = vendor\codefire\cfusermgmt\views\helpers\Helper::findUserRole(); switch ($userRoleAlias) { case ADMIN_ROLE_ALIAS: ?> <li><?php echo yii\helpers\Html::a("Dashboard", \yii\helpers\Url::to(['/usermgmt/user/dashboard'])); ?> </li> <li><?php echo yii\helpers\Html::a("Sign Out", \yii\helpers\Url::to(['/usermgmt/user/logout'])); ?> </li> <?php break; case DEFAULT_ROLE_NAME: ?>