?> <?php echo $form->textFieldRow($model, 'city_code', array('class' => 'span5')); ?> <?php echo $form->textFieldRow($model, 'ppk_code', array('class' => 'span5', 'maxlength' => 256)); ?> <?php echo $form->textFieldRow($model, 'limit', array('class' => 'span5')); ?> <?php echo $form->dropDownListRow($model, "up", VEnum::getEnumOptions($model, "up"), array("prompt" => "Please Select", "class" => "autocomplete")); ?> <?php echo $form->textFieldRow($model, 'created_at', array('class' => 'span5')); ?> <?php echo $form->dropDownListRow($model, "created_by", CreatedBy::model()->getOptions(), array("prompt" => "Please Select", "class" => "autocomplete")); ?> <?php echo $form->textFieldRow($model, 'updated_at', array('class' => 'span5')); ?> <?php
public static function enumDropDownList($model, $attribute, $htmlOptions) { return CHtml::activeDropDownList($model, $attribute, VEnum::getEnumOptions($model, $attribute), $htmlOptions); }
<th>Termin</th> <th>Pagu Termin</th> <th></th> </tr> </thead> <tbody> <?php foreach ($models as $i => $model) { ?> <tr data-row="<?php echo $i; ?> "> <td><?php echo $form->dropDownListRow($model, "[{$i}]termin", VEnum::getEnumOptions($model, "[{$i}]termin"), array("prompt" => "Pilih Termin", 'labelOptions' => array('label' => false), "style" => "width: 100%")); ?> </td> <td><?php echo $form->textFieldRow($model, "[{$i}]limit_per_termin", array('class' => '', 'maxlength' => 256, 'labelOptions' => array('label' => false), "style" => "width: 100%; box-sizing: border-box; height: 30px")); ?> </td> <td> <button class="btn btn-default add-row" type="button"><i class="icon icon-plus"></i></button> <button class="btn btn-danger remove-row" type="button"><i class="icon icon-white icon-trash"></i></button> </td> </tr> <?php } ?> </tbody>
$this->widget('ext.dropDownChain.VDropDownChain', array('parentId' => 'nrk', 'childId' => 'contract', 'url' => 'nrkDetail/getContractOptions', 'valueField' => 'contract_number', 'textField' => 'contract_number')); $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'nrk-detail-form', 'htmlOptions' => array('enctype' => 'multipart/form-data'))); ?> <tbody> <tr> <td colspan="3"> <?php echo $form->errorSummary($model); ?> </td> </tr> <tr> <td><?php echo $form->dropDownListRow($model, "termin", VEnum::getEnumOptions($model, "termin"), array("prompt" => "Termin Ke", 'labelOptions' => array('label' => false, "class" => "form-control"))); ?> </td> <td><?php echo $form->textFieldRow($model, 'limit_per_termin', array('class' => 'form-control', 'placeholder' => 'pagu', 'labelOptions' => array('label' => false))); ?> </td> <td> <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => $model->isNewRecord ? 'simpan' : 'Simpan')); ?> </td> </tr> </tbody>
<div class="row-fluid"> <div class="span5"> <?php $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'dipa-form', 'enableAjaxValidation' => false, 'htmlOptions' => array('enctype' => 'multipart/form-data'))); ?> <?php echo $form->errorSummary($model); ?> <?php echo $form->textFieldRow($model, 'dipa_number', array('class' => 'span12', 'maxlength' => 256)); ?> <?php echo $form->datepickerRow($model, "dipa_date", array('class' => 'span12', "prepend" => "<i class='icon-calendar'></i>", "options" => array("format" => "yyyy-mm-dd"))); ?> <?php echo $form->dropDownListRow($model, "type", VEnum::getEnumOptions($model, "type"), array('class' => 'span12', "prompt" => "Please Select")); ?> </br> <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => $model->isNewRecord ? 'Tambah' : 'Simpan')); ?> <?php $this->endWidget(); ?> </div> <div class="span1"> </div> <div class="span6"> <div class="alert alert-info"> <table> <tr><h4>Petunjuk Penginputan.</h4></tr>
// echo yii::app()->baseUrl; ?> /dipa/create" class="btn btn-primary"><i class="fa fa-fw fa-upload"></i> Import DIPA</a>--> <a href="<?php echo yii::app()->baseUrl; ?> /dipa/import" class="btn btn-primary"><i class="fa fa-fw fa-upload"></i> Import DIPA</a> <a href="<?php echo yii::app()->baseUrl; ?> /dipa/clear" onclick="return confirm('Semua data DIPA, Paket Pekerjaan, dan Realisasi akan dihapus. \n\nYakin ingin membersihkan data?')"class="btn btn-primary"><i class="fa fa-fw fa-trash"></i> Bersihkan Pencatatan Data</a> </div> <div class="panel-body"> <div class="table-responsive"> <?php $this->widget('bootstrap.widgets.TbGridView', array('id' => 'dipa-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('header' => 'No', 'value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)'), array('name' => 'dipa_number', 'type' => 'raw', 'value' => 'CHtml::link($data->dipa_number,array("dipa/view","id"=>$data->id))'), array('name' => 'dipa_date', 'value' => 'Yii::app()->dateFormatter->format("d MMM y",strtotime($data->dipa_date))', 'filter' => FALSE), array('name' => 'type', 'value' => '$data->type', 'filter' => VEnum::getEnumOptions(new Dipa(), "type")), array('class' => 'bootstrap.widgets.TbButtonColumn', 'template' => '{view},{update}')))); ?> </div> </div> </div> <?php } else { ?> <div class="alert alert-info"> <div class="pull-left"> <span class="fa-stack fa-lg fa-2x"> <i class="fa fa-database fa-stack-1x"></i> <i class="fa fa-ban fa-stack-2x text-danger"></i> </span> </div> <div class="pull-left">
<?php $this->breadcrumbs = array('Package Accounts' => array('index'), $model->id); $this->menu = array(array('label' => 'List PackageAccount', 'url' => array('index')), array('label' => 'Create PackageAccount', 'url' => array('create')), array('label' => 'Update PackageAccount', 'url' => array('update', 'id' => $model->id)), array('label' => 'Delete PackageAccount', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')), array('label' => 'Manage PackageAccount', 'url' => array('admin'))); ?> <h2>View PackageAccount #<?php echo $model->id; ?> </h2> <?php $this->widget('bootstrap.widgets.TbEditableDetailView', array('url' => $this->createUrl('packageaccount/editable'), 'data' => $model, 'attributes' => array('id', 'code', 'satker_code', 'activity_code', 'output_code', 'suboutput_code', 'component_code', 'package_code', 'account_code', 'budget_code', 'province_code', 'city_code', 'ppk_code', 'limit', array('name' => 'up', 'value' => $model->up, 'editable' => array('type' => 'select', 'source' => VEnum::getEnumOptions($model, "up"))), 'created_at', array('name' => 'created_by', 'value' => $model->createdBy->name, 'editable' => array('type' => 'select', 'source' => CreatedBy::model()->getOptions())), 'updated_at', array('name' => 'updated_by', 'value' => $model->updatedBy->name, 'editable' => array('type' => 'select', 'source' => UpdatedBy::model()->getOptions())))));
<?php $this->breadcrumbs = array('Nrk Details' => array('index'), 'Manage'); $this->menu = array(array('label' => 'List NrkDetail', 'url' => array('index')), array('label' => 'Create NrkDetail', 'url' => array('create'))); Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('nrk-detail-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n"); ?> <?php $this->widget('bootstrap.widgets.TbGridView', array('id' => 'nrk-detail-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('header' => 'No', 'value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)'), array('name' => 'nrk_register', 'value' => '$data->nrk_register', 'filter' => Nrk::model()->getNrkOptions()), array('name' => 'nrk_contract_number', 'value' => '$data->nrk_contract_number', 'filter' => Nrk::model()->getNrkNumberOptions()), array('name' => 'termin', 'value' => '$data->termin', 'filter' => VEnum::getEnumOptions(new NrkDetail(), "termin")), array("name" => "limit_per_termin", "value" => 'Yii::app()->format->number($data->limit_per_termin)', 'htmlOptions' => array('style' => 'text-align: right;'), 'headerHtmlOptions' => array('style' => 'text-align: right;'), 'filter' => FALSE), array('class' => 'bootstrap.widgets.TbButtonColumn'))));
echo Yii::app()->baseUrl . '/nrk/admin'; ?> " class="btn btn-primary"><i class="fa fa-fw fa-table"></i>Daftar</a> </div> <div class="panel-body"> <?php $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'nrk-detail-form', 'htmlOptions' => array('enctype' => 'multipart/form-data'))); ?> <?php echo $form->errorSummary($model); ?> <?php echo $form->dropDownListRow($model, "termin", VEnum::getEnumOptions($model, "termin"), array("prompt" => "Termin Ke", "class" => "autocomplete")); ?> <?php echo $form->textFieldRow($model, 'limit_per_termin', array('class' => 'span5')); ?> <div class="form-actions"> <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => $model->isNewRecord ? 'Tambah' : 'Simpan')); ?> </div> <?php $this->endWidget(); ?>