/**
  * Set default columns to display
  */
 protected function afterConstruct()
 {
     if (count($this->defaultColumns) == 0) {
         $this->defaultColumns[] = array('header' => 'No', 'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1');
         $this->defaultColumns[] = array('name' => 'plugin_id', 'value' => '$data->plugin->name', 'htmlOptions' => array('class' => 'center'), 'filter' => OmmuPlugins::getPlugin(0, 'id'), 'type' => 'raw');
         $this->defaultColumns[] = array('name' => 'template_key', 'value' => '$data->template_key');
         //$this->defaultColumns[] = 'template';
         $this->defaultColumns[] = 'variable';
         $this->defaultColumns[] = array('name' => 'creation_search', 'value' => '$data->creation_relation->displayname');
         $this->defaultColumns[] = array('name' => 'creation_date', 'value' => 'Utility::dateFormat($data->creation_date)', 'htmlOptions' => array('class' => 'center'), 'filter' => Yii::app()->controller->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $this, 'attribute' => 'creation_date', 'language' => 'ja', 'i18nScriptFile' => 'jquery.ui.datepicker-en.js', 'htmlOptions' => array('id' => 'creation_date_filter'), 'options' => array('showOn' => 'focus', 'dateFormat' => 'dd-mm-yy', 'showOtherMonths' => true, 'selectOtherMonths' => true, 'changeMonth' => true, 'changeYear' => true, 'showButtonPanel' => true)), true));
     }
     parent::afterConstruct();
 }
 /**
  * Set default columns to display
  */
 protected function afterConstruct()
 {
     if (count($this->defaultColumns) == 0) {
         $this->defaultColumns[] = array('header' => 'ID', 'name' => 'phrase_id', 'value' => '$data->phrase_id', 'htmlOptions' => array('class' => 'center'));
         $this->defaultColumns[] = array('name' => 'plugin_id', 'value' => '$data->plugin->name', 'htmlOptions' => array('class' => 'center'), 'filter' => OmmuPlugins::getPlugin(0, 'id'), 'type' => 'raw');
         $this->defaultColumns[] = 'en_us';
         $this->defaultColumns[] = 'id';
         $this->defaultColumns[] = 'location';
     }
     parent::afterConstruct();
 }
				<?php 
echo $form->textField($model, 'template_key', array('size' => 32, 'maxlength' => 32));
?>
				<?php 
echo $form->error($model, 'template_key');
?>
			</div>
		</div>

		<div class="clearfix">
			<?php 
echo $form->labelEx($model, 'plugin_id');
?>
			<div class="desc">
				<?php 
echo $form->dropDownList($model, 'plugin_id', OmmuPlugins::getPlugin(null, 'id'));
?>
				<?php 
echo $form->error($model, 'plugin_id');
?>
			</div>
		</div>

		<div class="clearfix">
			<?php 
echo $form->labelEx($model, 'template');
?>
			<div class="desc">
				<?php 
echo $form->textArea($model, 'template', array('rows' => 6, 'cols' => 50));
?>