Changeset 537 for trunk/app/views/news

Show
Ignore:
Timestamp:
05/20/08 20:43:23 (7 months ago)
Author:
aarkerio
Message:

Discussions

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/news/view.ctp

    r497 r537  
    11<?php 
     2// die(debug($data)); 
    23echo $html->div('titnew', $data['News']['title']); 
    34 
     
    89<?php 
    910 
    10 echo $html->div('img_new', $html->link( 
     11 echo $html->div('img_new', $html->link( 
    1112                        $html->image('themes/'.$data['Theme']['img'],  
    1213                            array("alt"=>$data['Theme']['theme'], "title"=>$data['Theme']['theme'], "class"=>"themes")),  
     
    1415                    null, null, false)); 
    1516  
    16     echo $data['News']['body'];  
     17 echo $data['News']['body'];  
    1718?> 
    1819     
     
    4344  foreach($data['Discussion'] as $v) 
    4445  { 
    45       $bg = ($i%2==0) ? "#e2e2e2" : "#fff"; 
    46                
    47       echo '<div class="comentnew" style="background-color:'.$bg.'">';   
    48       echo $time->timeAgoInWords($v['created']) . ' <b>'. $v['username']    . '</b> wrote:<br />'; 
    49       echo $v["comment"]; 
    50       echo "</div>"; 
     46      $bg = ($i%2 == 0) ? "#e2e2e2" : "#fff"; 
     47           
     48      $tmp  = $html->para(null,$time->timeAgoInWords($v['created']) . ' <b>'. $v['username']    . '</b> wrote:<br />', array('style'=>'font-size:8pt;font-family:Georgia;')); 
     49      $tmp .= $html->para(null, $v['comment']); 
     50      echo $html->div('divblock', $tmp, array('style'=>'background-color:'.$bg));  
    5151      $i++; 
    5252  }