Incam_PROFIND_Web/www/themes/profind/views/candidato/__idiomas.php
david e81ded2173 - Titulaciones de candidatos
- Extensión "jQuery Chosen"
- Arreglos en migraciones para indicar el tipo de tablas InnoDB


git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_PROFIND_Web/trunk@67 3fe1ab16-cfe0-e34b-8c9f-7d8c168d430d
2012-10-24 17:18:48 +00:00

96 lines
5.5 KiB
PHP

<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/jquery.format.js', CClientScript::POS_END); ?>
<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/jquery.calculation.min.js', CClientScript::POS_END); ?>
<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/profind-template.js', CClientScript::POS_END); ?>
<?php
$js_chosen = <<<JS
profind_template.onAppend = function() {
$('.chosen').chosen();
};
JS;
Yii::app()->clientScript->registerScript('js_chosen', $js_chosen, CClientScript::POS_END);
?>
<div class="row-fluid formSep">
<div class="span12">
<label class="control-label"><?php echo Yii::t('profind', 'Idiomas'); ?></label>
<div class="controls">
<table class="table templateFrame">
<thead class="templateHead">
<tr>
<th style="width: 50%;"><?php echo Yii::t('profind', 'Idioma'); ?></th>
<th style="width: 20%;"><?php echo Yii::t('profind', 'Conversación'); ?></th>
<th style="width: 20%;"><?php echo Yii::t('profind', 'Lectura / traducción'); ?></th>
<th style="width: 10%;"></th>
</tr>
</thead>
<tbody class="templateTarget">
<?php foreach($candidato->idiomas as $i=>$idioma): ?>
<tr class="templateContent">
<td>
<?php echo CHtml::activeDropDownList($idioma,
"[$i]idioma",
CHtml::listData(Idioma::model()->findAll(), 'descripcion', 'descripcion'),
array('class' => 'span12 chosen')
);
?>
</td>
<td>
<?php echo CHtml::activeDropDownList($idioma,
"[$i]conversacion",
$idioma->opcionesNivel,
array('class' => 'span12 chosen')
);
?>
</td>
<td>
<?php echo CHtml::activeDropDownList($idioma,
"[$i]lectura_traduccion",
$idioma->opcionesNivel,
array('class' => 'span12 chosen')
);
?>
</td>
<td>
<?php echo CHtml::activeHiddenField($idioma, "[$i]id", array('class' => 'pk')); ?>
<?php echo CHtml::activeHiddenField($idioma, "[$i]candidato_id"); ?>
<?php echo CHtml::hiddenField("CandidatoIdioma[$i][_borrar]", '0', array('class' => 'to_remove')); ?>
<input type="hidden" class="rowIndex" value="<?php echo $i;?>" />
<a class="btn btn-small remove" href="#"><i class="icon-trash"></i></a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
<tfoot>
<tr>
<td colspan="4">
<a class="btn btn-small add" href="#"><i class="icon-plus"></i> <?php echo Yii::t('profind', 'Añadir un idioma');?></a>
<textarea class="hide template">
<tr class="templateContent">
<td>
<?php echo CHtml::dropDownList('CandidatoIdioma[{0}][idioma]', '', CHtml::listData(Idioma::model()->findAll(), 'descripcion', 'descripcion'), array('class' => 'span12 chosen')); ?>
</td>
<td>
<?php echo CHtml::dropDownList('CandidatoIdioma[{0}][conversacion]', '', CandidatoIdioma::model()->opcionesNivel, array('class' => 'span12 chosen')); ?>
</td>
<td>
<?php echo CHtml::dropDownList('CandidatoIdioma[{0}][lectura_traduccion]', '', CandidatoIdioma::model()->opcionesNivel, array('class' => 'span12 chosen')); ?>
</td>
<td>
<?php echo CHtml::hiddenField('CandidatoIdioma[{0}][id]', '', array('class' => 'pk')); ?>
<?php echo CHtml::hiddenField('CandidatoIdioma[{0}][candidato_id]'); ?>
<?php echo CHtml::hiddenField('CandidatoIdioma[{0}][_borrar]', '0', array('class' => 'to_remove')); ?>
<input type="hidden" class="rowIndex" value="{0}" />
<a class="btn btn-small remove" href="#"><i class="icon-trash"></i></a>
</td>
</tr>
</textarea>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>