// } // ), // array( // 'name' => 'service_type', // 'header' => 'Product' // ), // array( // 'name' => 'created', // 'value' => '$data->created!=""?Yii::app()->getDateFormatter()->formatDateTime($data->created):""', // 'type' => 'raw', // ), // ))); ?> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'shipment-grid1', 'dataProvider' => $model->search(), 'htmlOptions' => array('class' => 'hastable'), 'columns' => array('awb', array('header' => 'Booking Code', 'type' => 'raw', 'value' => function ($data, $row) { if ($data->booking instanceof Booking) { return strtoupper($data->booking->booking_code); } }), array('header' => 'Shipper Details', 'type' => 'raw', 'value' => function ($data, $row) { return $data->shipper_name; }), array('header' => 'Receiver Details', 'type' => 'raw', 'value' => function ($data, $row) { return $data->receiver_name; }), array('name' => 'shipping_status', 'type' => 'raw', 'value' => function ($data, $row) { $status = ShipmentStatus::model()->findByPk($data->shipping_status); if ($status instanceof ShipmentStatus) { return $status->status; } }), array('name' => 'service_type', 'header' => 'Product'), array('name' => 'created', 'value' => '$data->created!=""?Yii::app()->getDateFormatter()->formatDateTime($data->created):""', 'type' => 'raw'), array('type' => 'raw', 'value' => function ($data, $raw) { return CHtml::link('order tracking', Yii::app()->createUrl('ordertracking/trackingDetails', array('id' => $data->id))); }))));
<?php echo $form->labelEx($new_event, 'event_time'); ?> <?php $this->widget('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker', array('attribute' => 'event_time', 'model' => $new_event, 'language' => '', 'options' => array('yearRange' => '-0:+7', 'changeYear' => 'true', 'changeMonth' => 'true'))); ?> <?php echo $form->error($new_event, 'event_time'); ?> </div> <div class="row"> <?php echo $form->labelEx($new_event, 'last status'); ?> <?php echo $form->dropDownList($new_event, 'status', CHtml::listData(ShipmentStatus::model()->findAll(), 'id', 'status')); ?> <?php echo $form->error($new_event, 'status'); ?> </div> </div> <div class="c50r"> <div id="rm"> </div> </div> </div>
jQuery("#assignDriver").dialog({"title":"Assign Driver","autoOpen":false,"modal":true,"buttons":{"Close":function(){$(this).dialog("close")},"Assign":function(){jQuery.ajax({"url":"/~febri/dcourier.system/index.php/ordertracking/assignDriver.html","type":"post","dataType":"json","data":$("#assignDriver form").serialize(),"success":function(r){if(r.success){ $("#assignDriver").dialog("close"); $.fn.yiiGridView.update("tracking-grid"); }; if(!r.success){alert("Gagal assign driver")}},"cache":false});;}}}); jQuery("body").undelegate(".assignDriver_button","click").delegate(".assignDriver_button","click",function(){ driverDialog=jQuery("#assignDriver"); driverDialog.dialog("open"); jQuery("#assignDriver input#OrderTracking_id").val($(this).attr("rel").replace("grid.","")); return false; }); jQuery("#OrderTracking_dateFrom").datepicker(jQuery.extend({showMonthAfterYear:false}, jQuery.datepicker.regional["id"], {"dateFormat":"d MM yy","changeMonth":true,"changeYear":true})); jQuery("#OrderTracking_dateTo").datepicker(jQuery.extend({showMonthAfterYear:false}, jQuery.datepicker.regional["id"], {"dateFormat":"d MM yy","changeMonth":true,"changeYear":true})); jQuery("#tracking-grid").yiiGridView({"ajaxUpdate":false,"ajaxVar":"ajax","pagerClass":"pager","loadingClass":"grid-view-loading","filterClass":"filters","tableClass":"items","selectableRows":1,"pageVar":"ViewTracking_page"}); }', "timeOut" => 4000, "id" => "commet")); ?> <h4 class="ui-box-header ui-corner-all">Manage Order Trackings</h4> <br /> <div class="search-form"> <?php $this->renderPartial('_search', array('model' => $model)); ?> </div><!-- search-form --> <div id="response"> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'tracking-grid', 'ajaxUpdate' => false, 'filter' => $model, 'dataProvider' => $model->search(), 'columns' => array(array('name' => 'order_id', 'type' => 'raw', 'value' => function ($data, $row) { return CHtml::link($data->order_id, array('TrackingDetails', 'awb' => $data->order_id)); }), array('name' => 'shipment_type', 'value' => 'ucwords($data->shipment_type)', 'filter' => CHtml::activeDropDownList($model, 'shipment_type', $model->shipmentTypeList, array('prompt' => 'Semua Type'))), 'customer_name', array('name' => 'driver', 'value' => 'Yii::app()->trackOrder->getAssignButton($data,"driver")', 'type' => 'raw', 'filter' => CHtml::activeDropDownList($model, 'driver', $model->driverList, array('prompt' => 'Semua Driver'))), array('name' => 'courier'), array('name' => 'status', 'value' => 'Yii::app()->trackOrder->getStatusLabel($data,"status",array("red"=>"red","yellow"=>"yellow","green"=>"green","createdTime"=>"created"))', 'type' => 'raw', 'filter' => CHtml::activeDropDownList($model, 'status', CHtml::listData(ShipmentStatus::model()->findAll(), 'status', 'status'), array('prompt' => 'Semua'))), array('name' => 'event.title', 'header' => 'Message'), array('name' => 'Last Updated', 'value' => 'Yii::app()->dateFormatter->formatDateTime($data->event_time,"long")', 'filter' => $this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => 'dateFrom', 'language' => 'id', 'options' => array('dateFormat' => 'd MM yy', 'changeMonth' => true, 'changeYear' => true)), true) . $this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => 'dateTo', 'language' => 'id', 'options' => array('dateFormat' => 'd MM yy', 'changeMonth' => true, 'changeYear' => true)), true))))); ?> </div>