Changeset 409 for trunk/app/views/news
- Timestamp:
- 04/18/08 14:30:29 (8 months ago)
- Location:
- trunk/app/views/news
- Files:
-
- 2 modified
-
display.ctp (modified) (2 diffs)
-
view.ctp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/views/news/display.ctp
r401 r409 6 6 foreach ($data as $val) 7 7 { 8 $tmp = $html->div('news_title', $html->link($val['News']['title'], '/news/view/'. $val['News']['id'])); 8 echo '<div class="wrapnew">'; 9 10 echo $html->div('news_title', $html->link($val['News']['title'], '/news/view/'. $val['News']['id'])); 9 11 10 $tmp .=$html->div('news_date', $val['News']['created']);12 echo $html->div('news_date', $val['News']['created']); 11 13 12 $tmp .=$html->div('news_body',14 echo $html->div('news_body', 13 15 $html->div('img_new', $html->link( 14 16 $html->image('themes/'.$val['Theme']['img'], … … 23 25 24 26 25 $tmp .=$val['News']['body'];26 27 if ( strlen($val['News']['reference']) > 5 ) // the reference27 echo $val['News']['body']; 28 29 if ($val['News']['comments'] == 1 ) // comments enabled on this new 28 30 { 29 $tmp .= $html->div(null, $html->link('Reference', $val['News']['reference'])); 30 } 31 32 if ($val['News']['comments'] == 1 ) // the reference 33 { 34 $tmp .= $html->div(null, $html->link('Put your comment', '/news/view/'.$val['News']['id'])); 31 echo $html->para(null, $html->link('Put your comment', '/news/view/'.$val['News']['id'])); 35 32 } 36 echo $html->div('wrapnew', $tmp); 33 34 35 ?> 36 <br /> 37 <span style="font-size:7pt;">Permalink:</span> <br /> 38 <?php echo $html->link( 39 'http://'.$_SERVER['SERVER_NAME'].'/news/view/'.$val['News']['id'], 40 'http://'.$_SERVER['SERVER_NAME'].'/news/view/'.$val['News']['id'] 41 ); 42 ?> 43 <br /><br /> 44 <b>Reference:</b> 45 46 <?php echo $html->link( 47 $html->image('static/newwindow.gif', array("alt"=>"Open new window", "title"=>"Open new window")), 48 $val['News']['reference'], 49 array("onclick"=>"window.open(this.href, '_help', 'status,scrollbars,resizable,width=800,height=600,left=10,top=10,menubar,toolbar')"), 50 null, 51 null, 52 false); 53 54 echo $news->socialNets($val['News']['id'], $val['News']['title']); // Social nets buttons 55 56 57 58 echo '</div>'; 37 59 } 38 60 ?> -
trunk/app/views/news/view.ctp
r407 r409 46 46 47 47 echo '<div class="comentnew" style="background-color:'.$bg.'">'; 48 echo $time->timeAgoInWords($v['created']) . ' <b>'. $v[' name'] . '</b> wrote:<br />';48 echo $time->timeAgoInWords($v['created']) . ' <b>'. $v['username'] . '</b> wrote:<br />'; 49 49 echo $v["comment"]; 50 50 echo "</div>"; … … 53 53 echo "</div>"; 54 54 55 echo $form->create('Discussion', array('action'=>'agregar')); 56 //echo '<form action="/discussions/agregar" method="post">'; 55 if ( isset( $cU['User']['id'] ) ): 56 echo $form->create('Discussion', array('action'=>'add')); 57 echo $form->hidden('Discussion.new_id', array('value'=>$data['News']['id'])); 57 58 ?> 58 59 60 59 <fieldset> 61 60 <legend>Write comment:</legend> 62 61 <?php 63 echo $form->hidden('Discussion.new_id', array('value'=>$data['News']['id'])); 64 echo $form->hidden('Discussion.level', array('value'=>1)); 65 echo $form->hidden('Discussion.comentnew_id', array('value'=>1)); 66 67 if ( isset( $cU['User']['id'] ) ): 68 echo $form->hidden('Discussion.user_id', array('value'=> $cU['User']['id'])); 69 echo $form->hidden('Discussion.name', array('value'=>$cU['User']['username'])); 70 echo '<b>'. $cU['User']['username'] . '</b> write: <br />'; 71 72 else: 73 74 echo $form->hidden('Discussion.user_id', array('value'=> 0)); 75 echo $form->input('Discussion.name', array('size'=> 25, 'maxlength' => 40)); 76 // echo '<br /><br /> <img src="'. $html->url('/discussions/captcha') .'" alt="Captcha" title="Captcha" /> <br />'; 77 //echo $form->input('Discussion.captcha', array("size" => 6, "maxlength" => 6)); 78 //echo $form->label('Discussion.captcha', 'Introduce el código, todas la letras son minúsculas' ).'<br />'; 79 endif; 80 81 echo $form->textarea('Discussion.comment', array('cols'=>60, 'rows'=>10)) . $form->end('Send comment'); 82 62 echo $form->label('Discussion.comment', '<b>'. $cU['User']['username'] . '</b> write:').'<br />'; 63 echo $form->textarea('Discussion.comment', array('cols'=>60, 'rows'=>10)); 64 echo $form->end('Send comment'); 65 else: 66 echo $html->para(null, $html->link('Login to write comments', '/users/login')); 67 endif; 83 68 } 84 69 ?>
