Changeset 457
- Timestamp:
- 06/03/10 15:34:54 (20 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
controllers/comentnews_controller.php (modified) (1 diff)
-
views/elements/new.ctp (modified) (4 diffs)
-
views/news/display.ctp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/controllers/comentnews_controller.php
r386 r457 14 14 class ComentnewsController extends AppController 15 15 { 16 public $helpers = array(' Ajax', 'Time');16 public $helpers = array('Time'); 17 17 18 18 public $components = array('Captcha', 'Mailer'); -
trunk/views/elements/new.ctp
r400 r457 94 94 $avatar = $this->Html->image('avatars/'.$v['User']['avatar'], 95 95 array('alt'=>$v['User']['username'], 'title'=>$v['User']['username'], 'height'=>20, 'width'=>20)); 96 $user = $this->Html->link($v['User']['username'], '/users/about/'.$v['User']['username']) .' ';97 $user .= $this->Html->link($avatar, '/users/about/'.$v['User']['username'], null, null, false);98 else:96 $user = $this->Html->link($v['User']['username'], '/users/about/'.$v['User']['username']) .' '; 97 $user .= $this->Html->link($avatar, '/users/about/'.$v['User']['username'],array('escape'=>False)); 98 else: 99 99 $avatar = $this->Html->image('avatars/t_icon.jpg', array('alt'=>$v['name'], 'title'=>$v['name'], 'height'=>20, 'width'=>20)); 100 100 $user = '<span style="font-weight:bold;">' . $v['name'] .'</span> ' . $avatar ; 101 endif;101 endif; 102 102 103 103 echo $this->Html->div('comentnew', null, array('style'=>'background-color:'.$bg)); 104 echo '<span style="font-weight:bold;color:#000;">'.$i.'.-</span> '.$user . '<br />';105 echo $time->timeAgoInWords($v['created']) . ' <b>'. $v['name'] . '</b> wrote:<br />';106 echo nl2br(h($v['comment']));104 echo '<span style="font-weight:bold;color:#000;">'.$i.'.-</span> '.$user . '<br />'; 105 echo $time->timeAgoInWords($v['created']) . ' <b>'. $v['name'] . '</b> wrote:<br />'; 106 echo nl2br(h($v['comment'])); 107 107 echo '</div>'; 108 108 $i++; … … 110 110 echo '</div>'; 111 111 # Print comment form 112 echo $this->Form->create('Comentnews' );112 echo $this->Form->create('Comentnews', array('action'=>'add')); 113 113 echo $this->Form->hidden('Comentnews.new_id', array('value'=>$val['News']['id'])); 114 114 echo $this->Form->hidden('Comentnews.user_id', array('value'=>$val['News']['user_id'])); … … 125 125 else: # anonymous user 126 126 echo $this->Form->hidden('Comentnews.user_id', array('value'=>0)); 127 echo $this->Form->label('Comentnews.name', ' Nombre (requerido)' );128 127 echo $this->Form->input('Comentnews.name', array('size' => 25, 'maxlength' => 50)); 129 echo $this->Form->error('Comentnews.name', 'Name is required.');130 128 131 129 echo '<br /><br /> <img src="'. $this->Html->url('/comentnews/captcha') .'" alt="Captcha" /> <br />'; 132 echo $this->Form->input('Comentnews.captcha', array('size' => 6, 'maxlength' => 6)); 133 echo $this->Form->label('Comentnews.captcha', 'Introduce el codigo, todas la letras son minusculas' ); 130 echo $this->Form->input('Comentnews.captcha',array('size'=>6,'maxlength'=>6, 'label'=>'Introduce el codigo, todas la letras son minusculas')); 134 131 endif; 135 132 … … 142 139 endif; 143 140 echo '</div>'; 144 # ? > 141 142 # ? > EOF -
trunk/views/news/display.ctp
r392 r457 1 1 <?php 2 $this->Html->div('cintillo', 'Noticias');3 $this->Html->div('barra', 'Noticias del mundo libre');4 echo $this->element('new', array('cache' => false, 'val'=>$data, 'frontend'=>false));5 ?>2 echo $this->Html->div('cintillo', 'Noticias'); 3 echo $this->Html->div('barra', 'Noticias del mundo libre'); 4 echo $this->element('new', array('cache' => false, 'val'=>$data, 'frontend'=>false)); 5 # ? > EOF
Note: See TracChangeset
for help on using the changeset viewer.
