git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_PROFIND_Web/trunk@79 3fe1ab16-cfe0-e34b-8c9f-7d8c168d430d
105 lines
4.6 KiB
PHP
105 lines
4.6 KiB
PHP
<?php
|
|
/**
|
|
* @var $this SearchController
|
|
*/
|
|
$this->pageTitle = Yii::app()->name . ' - ' . Yii::t('profind', 'Resultados de la búsqueda');
|
|
$this->breadcrumbs = array(
|
|
Yii::t('profind', 'Resultados de la búsqueda')
|
|
);
|
|
|
|
// Sidebar
|
|
// echo $this->renderPartial('//sidebars/_search', array('formulario' => $formulario));
|
|
|
|
?>
|
|
|
|
<?php $inicio = (($currentPage * $pages->pageSize) - $pages->pageSize) + 1; ?>
|
|
<?php $final = $currentPage * $pages->pageSize; ?>
|
|
<?php $final = (count($results) < $final) ? count($results) : $final; ?>
|
|
|
|
|
|
<div class="row-fluid search_page">
|
|
<div class="span12">
|
|
<h3 class="heading"><?php echo Yii::t('profind', 'Resultados de la búsqueda'); ?></h3>
|
|
|
|
<?php if ($results) : ?>
|
|
<div class="well clearfix">
|
|
<div class="row-fluid">
|
|
<div class="pull-left">
|
|
<?php echo Yii::t('profind', 'Mostrando');?> <?php echo $inicio; ?> - <?php echo $final; ?> <?php echo Yii::t('profind', 'de'); ?> <?php echo count($results); ?> <?php echo Yii::t('profind', 'resultados');?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($pages->pageCount > 1): ?>
|
|
<div class="pagination">
|
|
<?php $this->widget('CLinkPager', array(
|
|
'pages' => $pages,
|
|
'hiddenPageCssClass' => '',
|
|
'header' => '',
|
|
'htmlOptions' => array('class' => '')
|
|
));
|
|
?>
|
|
</div>
|
|
<?php endif; ?>
|
|
<pre>
|
|
<?php print_r($term); ?>
|
|
</pre>
|
|
<div class="search_panel clearfix">
|
|
<?php if (!empty($results)): ?>
|
|
<?php for($i = ($inicio - 1); $i < $final; $i++) : ?>
|
|
<?php $doc = $results[$i]->getDocument(); ?>
|
|
<?php $candidato = Candidato::model()->findByPk($doc->id); ?>
|
|
|
|
<div class="search_item clearfix">
|
|
<span class="searchNb"><?php echo $i + 1; ?>.</span>
|
|
<div class="thumbnail pull-left">
|
|
<?php echo CHtml::image($candidato->fotografia->getThumbnail(), $candidato->nombreCompleto, array('width' => '80', 'height' => '80')); ?>
|
|
</div>
|
|
<div class="search_content">
|
|
<h4>
|
|
<?php
|
|
echo CHtml::link(
|
|
//$query->htmlFragmentHighlightMatches(CHtml::encode($candidato->nombreCompleto)),
|
|
CHtml::encode($candidato->nombreCompleto),
|
|
array('candidato/update', 'id' => $candidato->id),
|
|
array('class' => 'sepV_a')
|
|
);
|
|
?>
|
|
<span class="label label-info"><?php echo $candidato->estado->descripcion; ?></span>
|
|
</h4>
|
|
<p class="sepH_b item_description">
|
|
<!-- email -->
|
|
<?php $text = ''; //CHtml::encode($query->htmlFragmentHighlightMatches(CHtml::encode($results[$i]->email))); ?>
|
|
<?php if ($text != CHtml::encode($results[$i]->email)) : ?>
|
|
<strong>Email:</strong>
|
|
<?php echo CHtml::link($text, CHtml::encode($results[$i]->email)); ?>
|
|
<?php endif; ?>
|
|
</h4>
|
|
|
|
|
|
</p>
|
|
|
|
<small class="sepH_a">Tag 1</small>, <small>Tag 2</small><br/>
|
|
</div>
|
|
</div>
|
|
<?php endfor; ?>
|
|
<?php else: ?>
|
|
<p class="error"><?php echo Yii::t('profind', 'No se han encontrado resultados.'); ?></p>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<?php if ($pages->pageCount > 1): ?>
|
|
<div class="pagination">
|
|
<?php $this->widget('CLinkPager', array(
|
|
'pages' => $pages,
|
|
'hiddenPageCssClass' => '',
|
|
'header' => '',
|
|
'htmlOptions' => array('class' => '')
|
|
));
|
|
?>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|