<?php
$this->breadcrumbs = array(
        Yii::t('intranet', 'Sistema') => array('sistema/index'),
	Yii::t('Intranet', 'Tecnologías'),
);

$this->menu = array(
	array(
            'label'=>'<img class="mgright5" alt="' . Yii::t('intranet', 'Nueva tecnología') . '" src="' . Yii::app()->baseUrl . '/images/icons/small/white/user.png"/>' . Yii::t('intranet', 'Nueva tecnología'),
            'url'=>array('create'),
            'linkOptions'=>array('class'=>'iconlink'),
        ),
);

$this->pageTitle = Yii::t('intranet', 'Gestión de tecnologías');

?>

<div class="search-form" style="display:none">
    <?php $this->renderPartial('_search',array(
            'model'=>$model,
    )); ?>
</div>
<div class="clear"></div>

<div class="dataTables_wrapper">
    <div class="top">
        <div class="dataTables_length">
        <?php 
            $this->widget('application.extensions.PageSize.PageSize', array(
                'mGridId' => 'tecnologia-grid',
                'mPageSize' => @$_GET['pageSize'],
                'mDefPageSize' => Yii::app()->params['defaultPageSize'],
                'mPageSizeOptions' => Yii::app()->params['pageSizeOptions'],
            ));
        ?>
        </div>
    
        <div class="dataTables_filter">
            <label class="disabled">Buscar: <input type="text" disabled /></label>
        </div>
    </div>
    <?php
       $columns = array(            
            array(
                'header'=>Yii::t('intranet', 'Acciones'),
                'class'=>'CButtonColumn',
                'headerHtmlOptions'=>array(
                    'style' => 'width:55px;',
                    'class' => 'head1', 
                ),
                'template'=>'{update}{delete}',
                'cssClassExpression' => '"con1"',
            ),            
            array(
                'type' => 'html',
                'name' => 'descripcion',
                'value' => 'CHtml::link(CHtml::encode($data->descripcion), array("update", "id"=>$data->id));',
                'headerHtmlOptions'=>array(
                    'class' => 'head0', 
                ),
                'cssClassExpression' => '"con0"',
            ),        
        );

        $dataProvider = $model->search();
        $pageSize = Yii::app()->user->getState('pageSize', Yii::app()->params['defaultPageSize']);
        $dataProvider->getPagination()->setPageSize($pageSize);
        
        $this->widget('application.extensions.SelGridView', array(
            'id'=>'tecnologia-grid',
            'dataProvider'=>$dataProvider,
            'columns'=>$columns,
            'filter'=>$model,
            'filterPosition' => 'footer',
            'cssFile' => Yii::app()->baseUrl . '/css/gridview2.css',
            'itemsCssClass' => 'display',            
            'pagerCssClass' => 'dataTables_paginate',
            'template' => '{items}{summary}{pager}',            
            'emptyText' => Yii::t('intranet', 'No hay tecnologías'),
            'summaryCssClass' => 'dataTables_info',
            'summaryText' => 'Mostrando registros del {start} al {end} de {count} en total.',
            'selectableRows' => 1,
            ));

    ?>
</div>    
