mirunho, on 30 January 2013 - 02:22 AM, said:
@mirunho: Thanks for the hint! I'll start there.
Posted 30 January 2013 - 06:03 AM
mirunho, on 30 January 2013 - 02:22 AM, said:
Posted 30 January 2013 - 06:07 AM
Posted 01 February 2013 - 10:09 PM
if(is_numeric($value))
{
$this->total += $value;
echo number_format($value,2);
}
else
echo $value;
Posted 04 February 2013 - 04:08 PM
<?php echo $form->dateRangeRow($model, 'dateRangeField', array('hint'=>'Click inside! An even a date range field!.', 'prepend'=>'<i class="icon-calendar">>/i>', 'options' => array('callback'=>'js:function(start, end){console.log(start.toString("MMMM d, yyyy") + " - " + end.toString("MMMM d, yyyy"));}') )); ?>
Posted 05 February 2013 - 01:53 AM
array(
'class'=>'bootstrap.widgets.TbRelationalColumn',
'name' => 'Expand',
'url' => $this->createUrl('/profile/daysStatus'),
'value'=> '"<img src=\"'.Yii::app()->baseUrl.'/images/arrow_down.png\">"',
'afterAjaxUpdate' => 'js:function(tr,rowid,data){
}'
),
Posted 05 February 2013 - 02:20 AM
'type' => 'raw'
Posted 07 February 2013 - 11:26 AM
'columns' => array_merge(array(array('class'=>'bootstrap.widgets.TbImageColumn')),$columns)));
Posted 11 February 2013 - 02:31 PM
Posted 11 February 2013 - 02:44 PM
Posted 12 February 2013 - 06:07 AM
Posted 12 February 2013 - 09:54 PM
Posted 15 February 2013 - 05:20 AM
Posted 17 February 2013 - 12:22 AM
Posted 19 February 2013 - 12:53 AM
<?php echo $form->select2Row($model,'hotel_class_id', array('data'=>CHtml::listData(HotelClass::model()->findAll(),'id', 'name'), 'class'=>'span10')); ?>
Posted 19 February 2013 - 12:58 AM
echo $form->select2Row($model, 'places', array(
'asDropDownList' => false,
'options' => array(
'tags' => CHtml::listData(Place::model()->findAll(),'id', 'name'),
'placeholder' => 'type places',
'width'=>'85%',
'tokenSeparators' => array(',', ' ')
)));
Posted 20 February 2013 - 01:36 AM
Posted 20 February 2013 - 04:10 AM
bit0123, on 19 February 2013 - 12:58 AM, said:
echo $form->select2Row($model, 'places', array(
'asDropDownList' => false,
'options' => array(
'tags' => CHtml::listData(Place::model()->findAll(),'id', 'name'),
'placeholder' => 'type places',
'width'=>'85%',
'tokenSeparators' => array(',', ' ')
)));
function getColumn2Array($attribute=null)
{
if(self::model()->hasAttribute($attribute) == false) return '';
$criteria = new CDbCriteria();
$criteria->select = 'DISTINCT '.$attribute; //no need for repetitive data here
$criteria->order = $attribute.' ASC';
$results = self::findAll($criteria);
$data = array();
foreach($results as $result)
$data[] = $result[$attribute];
return $data;
}
'tags' => $model->getColumn2Array('name'),