<?php

$this->widget('ext.PlGrid.PlGridView', array(
        'id'=>'script-extension-grid',
        'headerTitle'=>'Header_title', // optional
        'addButtonTitle'=>'ADD_NEW_SCRIPT_EXTENSION', // optional
        'modalCreateHeader'=>'SCRIPT_EXTENSION_HEADER_CREATE', // optional
        'modalUpdateHeader'=>'SCRIPT_EXTENSION_HEADER_UPDATE', // optional

        'headerAttribute'=>'name', // TEST

        'itemsCssClass'=>'plTable items',
        'dataProvider'=>$model->search(),
        'filter'=>$model,
        'columns'=>array(
            array(
                "name"=>"name",
                'header'=>__('SCRIPT_EXTENSION_MODEL_NAME'),
                "headerHtmlOptions"=>array("data-translation-id" => "SCRIPT_EXTENSION_MODEL_NAME")
            ),
            array(
                "name"=>"extension",
                'header'=>__('SCRIPT_EXTENSION_MODEL_EXTENSION'),
                "headerHtmlOptions"=>array("data-translation-id" => "SCRIPT_EXTENSION_MODEL_EXTENSION")
            ),
            array(
                'class' => 'ext.PlGrid.PlCButtonColumn',
                'template' => '{updateJs}{delete}',
                'buttons' => array(
                    'updateJs'=>array(
                        'label' => '<i class="icon-pencil"></i>',
                        'options'=>array(
                            'title'=>__('SCRIPT_EXTENSION_MODEL_UPDATE_BTN'),
                            'data-translation-id'=>'SCRIPT_EXTENSION_MODEL_UPDATE_BTN',
                        ),
                        'url'=>'Yii::app()->createUrl("routingScriptExtension/default/update", array("id"=>"$data->id"))',
                    ),
                )
                
            )
        ),
    )
);
