示例#1
0
文件: view.php 项目: EduSec/EduSec
   <div class="fees-collect-category-view">
    <?php 
echo DetailView::widget(['model' => $model, 'options' => ['class' => 'table  detail-view'], 'attributes' => ['fees_collect_name', 'fees_collect_details', ['attribute' => 'fees_collect_batch_id', 'value' => $model->feesCollectBatch->batch_name], ['attribute' => 'fees_collect_start_date', 'value' => Yii::$app->formatter->asDate($model->fees_collect_start_date)], ['attribute' => 'fees_collect_end_date', 'value' => Yii::$app->formatter->asDate($model->fees_collect_end_date)], ['attribute' => 'fees_collect_due_date', 'value' => Yii::$app->formatter->asDate($model->fees_collect_due_date)], ['attribute' => 'created_at', 'value' => Yii::$app->formatter->asDateTime($model->created_at)], ['attribute' => 'created_by', 'value' => $model->createdBy->user_login_id], ['attribute' => 'updated_at', 'value' => $model->updated_at == null ? " - " : Yii::$app->formatter->asDateTime($model->updated_at)], ['attribute' => 'updated_by', 'value' => $model->updated_by == null ? " - " : $model->updatedBy->user_login_id], ['label' => Yii::t('fees', 'Status'), 'attribute' => 'is_status', 'value' => $model->is_status == 0 ? "<span class='label label-success'> " . Yii::t('app', 'Active') . " </span>" : "<span class='label label-danger'> " . Yii::t('app', 'Inactive') . " </span>", 'format' => 'raw']]]);
?>
   </div>

   <div class="box box-success">
    <div class="box-header" id="callout-input-needs-type">
    	<h4 class="box-title"><?php 
echo Yii::t('fees', 'Fees Category Details');
?>
</h4>
    </div>
       <div class="box-body table-responsive">
	<?php 
$fcd_data = new FeesCategoryDetailsSearch();
$fcd_dataprovider = $fcd_data->get_fcd($_REQUEST['id']);
?>
	<?php 
echo GridView::widget(['dataProvider' => $fcd_dataprovider, 'summary' => '', 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'fees_details_name', 'fees_details_description', 'fees_details_amount', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update} {delete}', 'buttons' => ['update' => function ($url, $model) {
    $url = \Yii::$app->getUrlManager()->createUrl(["fees/fees-category-details/update", "fcd_id" => $model->fees_category_details_id, "fcc_id" => $model->fees_details_category_id]);
    return Html::a('<span class="glyphicon glyphicon-edit"></span>', $url, ['title' => Yii::t('yii', 'Update')]);
}, 'delete' => function ($url, $model) {
    $url = \Yii::$app->getUrlManager()->createUrl(["fees/fees-category-details/delete", "fcd_id" => $model->fees_category_details_id, "fcc_id" => $model->fees_details_category_id]);
    return Html::a('<span class="glyphicon glyphicon-remove"></span>', $url, ['title' => Yii::t('yii', 'Delete'), 'data' => ['confirm' => Yii::t('fees', 'Are you sure you want to delete this item?'), 'method' => 'post']]);
}]]]]);
?>
       </div>
   </div>
  </div>
</div>
 /**
  * Lists all FeesCategoryDetails models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new FeesCategoryDetailsSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }