use yii\widgets\Pjax; $avatar = Yii::$app->request->baseUrl . Yii::$app->params['avatar']; !empty($model->student->students_profile_image) ? $img = Yii::$app->request->baseUrl . '/uploads/students/' . $model->student->students_profile_image : ($img = $avatar); Pjax::begin(['id' => 'enroll-detail', 'timeout' => 60000]); ?> <div class="ui segment"> <div class="ui inverted dimmer"> <div class="ui massive text loader"></div> </div> <?php if (DataHelper::checkIfEmpty($model->assessment_id, $model->assessment_id, 'NA') === 'NA') { ?> <div class="detail-button-wrap"> </div> <?php } else { ?> <div class="detail-button-wrap"> <a class="ui right floated big basic button" href="/proverbs/assessment/view?id=<?php echo $model->assessment_id; ?> ">View Assessment</a> </div> <?php } ?> <?php echo UiTable::widget(['model' => $model, 'options' => ['class' => 'ui fixed very basic table'], 'attributes' => ['id', ['attribute' => 'assessment_id', 'value' => DataHelper::checkIfEmpty($model->assessment_id, $model->assessment_id, 'NA')], ['attribute' => 'student_id', 'value' => DataHelper::name($model->student->first_name, $model->student->middle_name, $model->student->last_name)], ['attribute' => 'transaction', 'value' => DataHelper::transaction($model->transaction)], 'paid_amount:currency', 'created_at:date', 'updated_at:date']]); ?> </div> <?php Pjax::end();
<div class="ui inverted dimmer"> <div class="ui massive text loader"></div> </div> <?php if (count($payments) > 0) { ?> <?php echo Html::a('New Payment', ['/payments/new', 'sid' => $model->enrolled->student->id, 'aid' => $model->id], ['class' => 'ui right floated big basic button']); ?> <?php } else { ?> <?php echo Html::a('Pay Enrolment Fee', ['/payments/new', 'sid' => $model->enrolled->student->id, 'aid' => $model->id, 'type' => 1], ['class' => 'ui right floated big basic button']); ?> <?php } ?> <?php if (count($payments) > 0) { for ($i = 0; $i < count($payments); $i++) { echo implode('', ['<div class="ui two stackable grid">', '<div class="eight wide column">', '<label><strong>', DataHelper::carbonDate($payments[$i]->created_at), '</strong></label>', '</div>', '<div class="eight wide column">', UiTable::widget(['model' => $payments[$i], 'options' => ['class' => 'ui fixed basic payment-history table'], 'attributes' => [['attribute' => 'payment_description', 'value' => DataHelper::paymentDescription($payments[$i]->payment_description)], ['attribute' => 'transaction', 'value' => DataHelper::transaction($payments[$i]->transaction)], 'paid_amount:currency']]), '</div>', '</div>', '<div class="ui divider"></div>']); } } else { echo 'No payment transactions yet.'; } ?> </div> <?php Pjax::end();