</h1> <p> <?php echo Yii::$app->user->can('userUpdate', ['user' => $model]) ? Html::a(Yii::t('yii', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) : ''; ?> <?php echo Yii::$app->user->can('userDelete') ? Html::a(Yii::t('yii', 'Delete'), ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'method' => 'post']]) : ''; ?> </p> <?php echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'username', 'email:email', ['attribute' => 'photo', 'value' => $model->photo ? $model->photo : $assets->baseUrl . '/img/' . $model->getDefaultPhoto() . '.png', 'format' => ['image', ['width' => 200, 'height' => 200]]], ['attribute' => 'sex', 'value' => User::getSexArray()[$model->sex]], ['attribute' => 'status', 'value' => User::getStatusArray()[$model->status]], 'created_at:datetime', 'updated_at:datetime']]); ?> <h2><?php echo Yii::t('users', 'USER_PERMISSIONS'); ?> </h2> <p> <?php echo Yii::$app->user->can('userPermissions', ['user' => $model]) ? Html::a(Yii::t('yii', 'Update'), ['permissions', 'id' => $model->id], ['class' => 'btn btn-primary']) : ''; ?> </p> <?php echo PermissionsTreeWidget::widget(['user' => $model]); ?> </div>
<button class="btn btn-success" type="submit" name="AssignmentForm[action]" value="assign"><span class="glyphicon glyphicon-arrow-left"></span></button> <button class="btn btn-success" type="submit" name="AssignmentForm[action]" value="revoke"><span class="glyphicon glyphicon-arrow-right"></span></button> </div> <div class="col-xs-5 children-list"> <div class="form-group"> <input type="text" class="form-control listFilter" placeholder="<?php echo Yii::t('users', 'FILTER_PLACEHOLDER'); ?> "> </div> <?php echo $form->field($modelForm, 'unassigned')->dropDownList(ArrayHelper::map($modelForm->model->notChildren, function ($data) { return serialize([$data->name, $data->type]); }, 'description'), ['multiple' => 'multiple', 'size' => '20', 'class' => 'col-xs-12']); ?> </div> <?php ActiveForm::end(); ?> </div> <h3><?php echo Yii::t('users', 'CHILDREN'); ?> </h3> <div class="row"> <div class="col-xs-12"> <?php echo PermissionsTreeWidget::widget(['item' => $modelForm->model]); ?> </div> </div>