git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_PROFIND_Web/trunk@71 3fe1ab16-cfe0-e34b-8c9f-7d8c168d430d
109 lines
3.9 KiB
PHP
109 lines
3.9 KiB
PHP
<?php Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl . '/css/grid.css'); ?>
|
|
|
|
<?php
|
|
$columnas = array(
|
|
//'id',
|
|
array(
|
|
'type' => 'html',
|
|
'name' => 'nombreCompleto',
|
|
'value' => 'CHtml::link(CHtml::encode($data->nombreCompleto), array("update", "id"=>$data->id));',
|
|
'headerHtmlOptions' => array(
|
|
'class' => 'sorting',
|
|
),
|
|
'cssClassExpression' => '',
|
|
),
|
|
array(
|
|
'type' => 'html',
|
|
'name' => 'descripcionEstado',
|
|
'value' => 'CHtml::encode($data->estado->descripcion);',
|
|
'headerHtmlOptions' => array(
|
|
'class' => 'sorting',
|
|
),
|
|
'cssClassExpression' => '',
|
|
),
|
|
array(
|
|
'name' => 'email',
|
|
'headerHtmlOptions' => array(
|
|
'class' => 'sorting',
|
|
),
|
|
),
|
|
array(
|
|
'type' => 'raw',
|
|
'name' => 'modified_time',
|
|
'value' => '($data->modified_time === NULL) ? CHtml::tag("span", array("class"=>"nodata"), "Nunca") : TimeHelper::timeAgoInWords($data->modified_time);',
|
|
'headerHtmlOptions' => array(
|
|
'class' => 'sorting',
|
|
),
|
|
'cssClassExpression' => '"con1"',
|
|
),
|
|
array(
|
|
'header' => Yii::t('profind', 'Acciones'),
|
|
'class' => 'CButtonColumn',
|
|
'headerHtmlOptions' => array(
|
|
'style' => 'width:55px;',
|
|
'class' => '',
|
|
),
|
|
'template' => '{delete}',
|
|
'buttons' => array(
|
|
'delete' => array(
|
|
'label' => Yii::t('profind', 'Eliminar'),
|
|
//'visible' => '$data->canDelete',
|
|
'imageUrl' => '',
|
|
'options' => array(
|
|
'class' => 'btn btn-small delete'
|
|
)
|
|
)
|
|
),
|
|
),
|
|
);
|
|
|
|
$gridView = $this->widget('zii.widgets.grid.CGridView', array(
|
|
'id' => 'candidato-grid',
|
|
'dataProvider' => $candidatos->search(),
|
|
'columns' => $columnas,
|
|
'filter' => $candidatos,
|
|
'filterPosition' => 'header',
|
|
'cssFile' => false,
|
|
'htmlOptions' => array('class' => 'dataTables_wrapper form-inline'),
|
|
'itemsCssClass' => 'table table-striped table-bordered dataTable',
|
|
'template' => '{items}{summary}{pager}',
|
|
'emptyText' => Yii::t('profind', 'No hay candidatos'),
|
|
'summaryCssClass' => 'dataTables_info',
|
|
'pagerCssClass' => 'dataTables_paginate paging_bootstrap_alt pagination',
|
|
'pager' => array(
|
|
'htmlOptions' => array('class' => ''),
|
|
'header' => '',
|
|
'hiddenPageCssClass' => 'disabled',
|
|
),
|
|
), true);
|
|
?>
|
|
|
|
<div class="row-fluid">
|
|
<div class="span12">
|
|
<h3 class="heading"><?php echo Yii::t('profind', 'BD Candidatos'); ?></h3>
|
|
<div class="row-fluid sepH_b">
|
|
<div class="span8">
|
|
<div class="btn-toolbar">
|
|
<?php echo CHtml::link(CHtml::tag('i', array('class' => 'icon-plus'), '') . ' ' . Yii::t('profind', 'Nuevo candidato'),
|
|
$this->createUrl('create'),
|
|
array('class' => 'btn')
|
|
); ?>
|
|
<?php echo CHtml::link(CHtml::tag('i', array('class' => 'icon-filter'), '') . ' ' . Yii::t('profind', 'Filtro'),
|
|
$this->createUrl('create'),
|
|
array('class' => 'btn')
|
|
); ?>
|
|
</div>
|
|
</div>
|
|
<!--<div class="span4">
|
|
<div class="btn-group pull-right">
|
|
<button class="btn"><i class="icon-th-large"></i> </button>
|
|
<button class="btn"><i class="icon-th"></i> </button>
|
|
<button class="btn active"><i class="icon-th-list"></i> </button>
|
|
</div>
|
|
</div>-->
|
|
</div>
|
|
<?php echo $gridView; ?>
|
|
</div>
|
|
</div>
|
|
|