예제 #1
0
 */
function statusList($model)
{
    if ($model['STATUS'] == 0) {
        return Html::a('<i class="fa fa-remove"></i> Disable', '', ['class' => 'btn btn-dangger btn-xs', 'style' => ['width' => '70px', 'text-align' => 'left'], 'title' => 'New']);
    } elseif ($model['STATUS'] == 1) {
        return Html::a('<i class="fa fa-check"></i> Enable ', '', ['class' => 'btn btn-info btn-xs', 'style' => ['width' => '70px', 'text-align' => 'left'], 'title' => 'Validate']);
    }
}
/**
 * COLUMN DATA.
 */
$columnList = [['class' => 'kartik\\grid\\SerialColumn', 'contentOptions' => ['class' => 'kartik-sheet-style'], 'width' => '10px', 'header' => 'No.', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '7pt', 'background-color' => 'rgba(221, 235, 29, 0.8)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '7pt']]], ['attribute' => 'judulRoad', 'label' => 'Road Sales', 'hAlign' => 'left', 'vAlign' => 'middle', 'filter' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '300px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '7pt', 'background-color' => 'rgba(221, 235, 29, 0.8)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '300px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '7pt']]], ['attribute' => 'IMG_NAME', 'label' => 'Image Name', 'hAlign' => 'left', 'vAlign' => 'middle', 'filter' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '300px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '7pt', 'background-color' => 'rgba(221, 235, 29, 0.8)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '300px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '7pt']]], ['attribute' => 'IMGBASE64', 'format' => 'raw', 'value' => function ($model) {
    return Html::img($model->IMGBASE64, ['width' => '120', 'height' => '120']);
}, 'label' => 'DESCRIPTION', 'hAlign' => 'left', 'vAlign' => 'middle', 'filter' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '500px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '7pt', 'background-color' => 'rgba(221, 235, 29, 0.8)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '500px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '7pt']]], ['attribute' => 'STATUS', 'label' => 'Status', 'mergeHeader' => true, 'format' => 'raw', 'hAlign' => 'center', 'value' => function ($model) {
    return statusList($model);
}, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '70px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '7pt', 'background-color' => 'rgba(221, 235, 29, 0.8)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '70px', 'height' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '7pt']]]];
/*
 * GRIDVIEW ROAD LIST
 * @author ptrnov [piter@lukison]
 * @since 1.2
 */
$_gvRoadimage = GridView::widget(['id' => 'gv-road-image-list', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'filterRowOptions' => ['style' => 'background-color:rgba(214, 255, 138, 1); align:center'], 'columns' => $columnList, 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'gv-road-image-list']], 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => false, 'toolbar' => [''], 'panel' => ['type' => GridView::TYPE_INFO, 'heading' => "<span class='fa fa-list-ol fa-xs'><b> List Sales Road Image</b></span>", 'type' => 'info', 'before' => tombolCreate() . ' ' . tombolRefresh()], 'floatOverflowContainer' => true, 'floatHeader' => true]);
Modal::begin(['id' => 'modal-road-image', 'header' => '<div style="float:left;margin-right:10px" class="fa fa-2x fa-plus"></div><div><h4 class="modal-title">' . Html::encode('Road Image') . '</h4></div>', 'headerOptions' => ['style' => 'border-radius:5px; background-color: rgba(90, 171, 255, 0.7)']]);
echo "<div id='modalContentroadimage'></div>";
Modal::end();
?>

<div class="sales-road-image-index">

    
예제 #2
0
<div class="uk-form-row">
  <label class="uk-form-label"><?php 
echo Yii::t("default", "Fax Credit Limit");
?>
</label>
  <?php 
echo CHtml::textField('fax_limit', isset($data['fax_limit']) ? $data['fax_limit'] : "", array('class' => 'uk-form-width-medium numeric_only', 'data-validation' => "required"));
?>
</div>


<div class="uk-form-row">
  <label class="uk-form-label"><?php 
echo Yii::t("default", "Status");
?>
</label>
  <?php 
echo CHtml::dropDownList('status', isset($data['status']) ? $data['status'] : "", (array) statusList(), array('class' => 'uk-form-width-large', 'data-validation' => "required"));
?>
</div>

<div class="uk-form-row">
<label class="uk-form-label"></label>
<input type="submit" value="<?php 
echo Yii::t("default", "Save");
?>
" class="uk-button uk-form-width-medium uk-button-success">
</div>

</form>
 <p><a href="javascript:rm_preview();"><?php 
    echo Yii::t("default", "Remove image");
    ?>
</a></p>
 <?php 
}
?>
</div>
</div>



<div class="uk-form-row">
  <label class="uk-form-label"><?php 
echo Yii::t("default", "Status");
?>
</label>
  <?php 
echo CHtml::dropDownList('status', isset($data['payment_name']) ? $data['payment_name'] : "", statusList(), array('class' => "uk-form-width-large"));
?>
</div>

<div class="uk-form-row">
<label class="uk-form-label"></label>
<input type="submit" value="<?php 
echo Yii::t("default", "Save");
?>
" class="uk-button uk-form-width-medium uk-button-success">
</div>

</form>