- Tarea #1099 -> Mejorar la encriptación de las contraseñas - Tarea #1104 -> Guardar en el usuario la fecha de creación y del último login - Tarea #1125 -> Quitar la máscara en el campo 'teléfono' del usuario git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_PROFIND_Web/trunk@57 3fe1ab16-cfe0-e34b-8c9f-7d8c168d430d
111 lines
5.4 KiB
PHP
111 lines
5.4 KiB
PHP
<?php $this->pageTitle = Yii::t('profind', 'Lista de agentes'); ?>
|
|
|
|
<?php Yii::app()->clientScript->registerScript('delete-link-handler', "
|
|
$('.user_list a.delete').click(function(e) {
|
|
e.preventDefault();
|
|
var id = $(this).data('id');
|
|
var boton = $('#msg_confirm_delete a.btn-danger');
|
|
var href = boton.attr('href');
|
|
boton.attr('href', href.replace(/&id=\d*/, '&id=' + id));
|
|
$('#msg_confirm_delete').modal('show');
|
|
});
|
|
", CClientScript::POS_END);
|
|
?>
|
|
|
|
<?php Yii::app()->clientScript->registerScript('tooltips', "
|
|
$('.user_list').tooltip({selector: 'a[rel=tooltip]'});
|
|
", CClientScript::POS_END);
|
|
?>
|
|
|
|
<div class="row-fluid">
|
|
<div id="lista-agentes" class="span8">
|
|
<h3 class="heading"><?php echo Yii::t('profind', 'Lista de agentes'); ?></h3>
|
|
<ul class="list user_list">
|
|
<?php if (!count($agentes)) : ?>
|
|
<li>
|
|
<p>No hay agentes en el equipo</p>
|
|
</li>
|
|
<?php endif; ?>
|
|
|
|
<?php foreach ($agentes as $agente) : ?>
|
|
<li>
|
|
<a class="label pull-right sl_status <?php echo ($agente->estaActivo) ? 'label-success' : ''; ?>" rel="tooltip" href="#" data-original-title="<?php echo ($agente->estaActivo) ? Yii::t('profind', 'Cuenta confirmada') : Yii::t('profind', 'Cuenta sin confirmar por el agente'); ?>">
|
|
<?php echo ($agente->estaActivo) ? Yii::t('profind', 'activo') : Yii::t('profind', 'no activo'); ?>
|
|
</a>
|
|
|
|
<div class="span1">
|
|
<?php
|
|
echo CHtml::image($agente->fotografia->getThumbnail(), $agente->nombreCompleto, array(
|
|
'class' => 'thumbnail',
|
|
'width' => '50px',
|
|
'height' => '50px')
|
|
);
|
|
?>
|
|
</div>
|
|
<a class="sl_name" href="#"><?php echo $agente->nombreCompleto; ?></a><br>
|
|
<?php if ($agente->titulo) : ?>
|
|
<small><?php echo $agente->titulo; ?></small><br>
|
|
<?php endif; ?>
|
|
<small class="s_color sl_email"><?php echo CHtml::link($agente->email, $agente->email); ?></small><br>
|
|
<?php echo CHtml::link(CHtml::tag('span', array('class' => 'icon-trash')),
|
|
'#', array(
|
|
'data-id' => $agente->id,
|
|
'class' => 'close pull-right delete',
|
|
'rel' => 'tooltip',
|
|
'data-original-title' => Yii::t('profind', 'Eliminar el agente'),
|
|
));
|
|
?>
|
|
<div class="clearfix"> </div>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
<div class="span4">
|
|
<?php if ($invitacion) : ?>
|
|
<?php echo $this->renderPartial('_invitacion_form', array('invitacion' => $invitacion)); ?>
|
|
<?php else: ?>
|
|
<h3 class="heading">Añadir un nuevo agente</h3>
|
|
<div id="w_sort01" class="w-box">
|
|
<div class="w-box-header">
|
|
Máximo alcanzado
|
|
<div class="pull-right"><span class="label label-important"><?php echo Usuario::model()->equipo()->count(); ?> agentes</span></div>
|
|
</div>
|
|
<div class="w-box-content cnt_a">
|
|
<p>Ha alcanzado el número máximo de agentes permitidos para su producto contratado <strong><?php echo Yii::app()->user->subscripcion->producto->titulo; ?></strong>.</p>
|
|
<p>Puede cambiar a producto superior para poder seguir añadiendo más agentes.</p>
|
|
</div>
|
|
<div class="w-box-footer">
|
|
<div class="pagination-centered">
|
|
<?php
|
|
echo CHtml::link(
|
|
'Cambiar de producto',
|
|
Yii::app()->createUrl('/subscripcion/modificar', array('id' => Yii::app()->user->subscripcion->id)),
|
|
array(
|
|
'class' => 'btn btn-primary'
|
|
));
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="msg_confirm_delete" class="modal hide fade">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h3><?php echo Yii::t('profind', 'Eliminar agente'); ?></h3>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p><?php echo Yii::t('profind', '¿Desea eliminar el agente?'); ?></p>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<a href="#" class="btn" data-dismiss="modal" aria-hidden="true"><?php echo Yii::t('profind', 'Volver'); ?></a>
|
|
<?php echo CHtml::link(
|
|
Yii::t('profind', 'Eliminar el agente'),
|
|
$this->createUrl('deleteMember', array('id' => 0)),
|
|
array('class' => 'btn btn-danger')
|
|
);?>
|
|
</div>
|
|
</div>
|