<?php $role = app\rbac\models\AuthAssignment::getAssignment(Yii::$app->user->identity->id); if ($role === 'dev') { echo $this->render('_dashboard-dev'); } elseif ($role === 'master') { echo $this->render('_dashboard-master'); } elseif ($role === 'admin') { echo $this->render('_dashboard-admin'); } elseif ($role === 'staff') { echo $this->render('_dashboard-staff'); } elseif ($role === 'cashier') { echo $this->render('_dashboard-cashier'); } elseif ($role === 'principal') { echo $this->render('_dashboard-principal'); } elseif ($role === 'teacher') { echo $this->render('_dashboard-teacher'); } elseif ($role === 'parent') { echo $this->render('_dashboard-parent'); }
<div class="header"> <?php echo DataHelper::name($model->first_name, $model->middle_name, $model->last_name); ?> <p></p> </div> <div class="meta"> <span id="meta-content"><?php echo implode('', ['\'', $model->username, '\'']); ?> </span> <p></p> </div> </div> <?php if (app\rbac\models\AuthAssignment::getAssignment(Yii::$app->user->identity->id) !== 'parent') { ?> <div class="extra center aligned content"> <label class="user-id"><span><?php echo ucfirst($model->role->item_name); ?> </span></label> </div> <?php } ?> </div> </div> <?php Pjax::end(); ?>