Ver Mensaje Individual
  #8 (permalink)  
Antiguo 21/05/2014, 17:16
Avatar de detective_jd
detective_jd
 
Fecha de Ingreso: abril-2011
Ubicación: Salto
Mensajes: 437
Antigüedad: 13 años
Puntos: 6
Respuesta: No muestra color de letra en registros cakePHP

hola, mirando lo que me pusiste para mi el error puede estar o en la línea de UsuariosController en el método edit:

function edit($id=null)
{
if(!$id){
$this->Session->setFlash('Usuario Inválido');
$this->redirect(array('action'=>'index'),null,true);
}
if(empty($this->data)){
$this->data=$this->Usuario->find(array('id'=>$id));
}
else {
if($this->Usuario->save($this->data)){
$this->Session->setFlash('Usuario Modificado');
$this->redirect(array('action'=>'index'),null,true);
}
else {
$this->Session->setFlash('Imposible guargar usuario');
}
}
}

o en la línea de index.ctp en el vinculo que me lleva a la plantilla edit.ctp:

<h2>
Mantenimiento de Usuarios
</h2>
<?php if(empty($usuarios)): ?>
No hay Usuarios en la BD
<?php
else :
echo $this->Html->link('Guardar',array('action'=>'add'));
?>
<table>
<tr>
<th></th>
<th>Usuario</th>
<th>Nombre de Usuario</th>
<th>Contrase&ntilde;a</th>
<th>Nombres</th>
<th>Correo</th>
</tr>
<?php foreach ($usuarios as $usuario): ?>
<tr>
<td><?php echo $this->Html->link('Editar',array('action'=>'edit',$usuario['Usuario']['id'])); ?></td>
<td><?php echo $usuario['Usuario']['id'];?></td>
<td><?php echo $usuario['Usuario']['usuario'];?></td>
<td><?php echo $usuario['Usuario']['password'];?></td>
<td><?php echo $usuario['Usuario']['nombres'];?></td>
<td><?php echo $usuario['Usuario']['correo'];?></td>
</tr>
<?php
endforeach;
endif;
?>
</table>

no sé que hacer, espero su respuesta y si me pueden ayudar, gracias.