Changeset 654

Show
Ignore:
Timestamp:
07/15/08 15:38:15 (3 months ago)
Author:
aarkerio
Message:

Update

Location:
trunk/app
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/news_controller.php

    r653 r654  
    4949  $this->layout = 'portal'; 
    5050 
    51   $this->pageTitle = '::News'; 
     51  $this->pageTitle = '::'.__('News', true); 
    5252 
    5353  $this->News->User->unbindAll(); 
  • trunk/app/models/discussion.php

    r636 r654  
    2525                            array('className'     => 'User', 
    2626                                  'conditions'    => null, 
    27                                   'fields'        => 'id, username', 
     27                                  'fields'        => 'id, username, avatar', 
    2828                                  'order'         => null, 
    2929                                  'limit'         => null, 
  • trunk/app/views/news/display.ctp

    r653 r654  
    1515                                                                            array('alt'=>$val['Theme']['theme'],  
    1616                                                                                   'title'=>$val['Theme']['theme'],  
    17                                                                                    'class'=>'themes') 
     17                                                                                   'class'=>'themes', 'id'=>'new'.$val['News']['id']) 
    1818                                                                           ),  
    1919                                  '/news/category/'.$val['News']['theme_id'], null, null, false 
    2020                                                   ) 
    21                                       ) 
     21                       ) 
    2222                    );   
    2323   
     
    2828     e($html->para(null,$html->link(__('Put your comment', true).' ('. count($val['Discussion']).')','/news/view/'.$val['News']['id']))); 
    2929  endif; 
    30 ?> 
    31   <br /> 
    32     <span style="font-size:7pt;">Permalink:</span> <br /> 
    33     <?php echo $html->link( 
     30 
     31  echo $html->para(null,   '<span style="font-size:7pt;">Permalink:</span> ' .$html->link( 
    3432               'http://'.$_SERVER['HTTP_HOST'].'/news/view/'.$val['News']['id'], 
    3533                           'http://'.$_SERVER['HTTP_HOST'].'/news/view/'.$val['News']['id'] 
    36                );  
    37 ?> 
    38     <br /><br /> 
    39     <b><?php __('Reference'); ?>:</b> 
     34                           ));  
     35if ( strlen($val['News']['reference'])  > 10) : 
    4036     
    41     <?php echo $html->link( 
    42                            $html->image('static/newwindow.gif', array("alt"=>"Open new window", "title"=>"Open new window")), 
    43                            $val['News']['reference'], 
    44                            array("onclick"=>"window.open(this.href, '_help', 'status,scrollbars,resizable,width=800,height=600,left=10,top=10,menubar,toolbar')"),  
    45                            null, 
    46                            null, 
    47                            false); 
    48        
     37   echo $html->para(null, __('Reference', true). ' ' .$html->link( 
     38                           $html->image('static/newwindow.gif', array('alt'=>'Open new window', 'title'=>'Open new window')), 
     39                           '#new'.$val['News']['id'], 
     40                           array("onclick"=>"window.open('".$val['News']['reference']."', '_help', 'status,scrollbars,resizable,width=800,height=600,left=10,top=10,menubar,toolbar')"), null, null, false)); 
     41endif;     
     42   
    4943  echo $news->socialNets($val['News']['id'], $val['News']['title']); // Social nets buttons 
    5044       
  • trunk/app/views/news/view.ctp

    r636 r654  
    1717  
    1818 echo $data['News']['body'];  
    19 ?> 
    2019     
    21     <br /> 
    22     <span style="font-size:7pt;">Permalink:</span> <br /> 
    23     <?php echo $html->link( 
     20 echo $html->para(null,'<span style="font-size:7pt;">Permalink:</span><br /> '.$html->link( 
    2421               'http://'.$_SERVER['HTTP_HOST'].'/news/view/'.$data['News']['id'],  
    2522                           'http://'.$_SERVER['HTTP_HOST'].'/news/view/'.$data['News']['id'] 
    26                );  
    27 ?> 
    28     <br /><br /> 
    29     <b>Reference:</b> 
    30      
    31     <?php echo $html->link( 
    32                            $html->image('static/newwindow.gif', array("alt"=>"Open new window", "title"=>"Open new window")), 
    33                            $data['News']['reference'], 
    34                            array("onclick"=>"window.open(this.href, '_help', 'status,scrollbars,resizable,width=800,height=600,left=10,top=10,menubar,toolbar')"),  
    35                            null, 
    36                            null, 
    37                            false); 
     23               ));  
     24 
     25if ( strlen($data['News']['reference'])  > 10) : 
     26 
     27 echo $html->para(null, __('Reference', true) .': '. $html->link( 
     28                           $html->image('static/newwindow.gif', 
     29                                     array('alt'=>__('Open new window', true), 'title'=>__('Open new window', true))), 
     30                           '#', 
     31                           array("onclick"=>"window.open('".$data['News']['reference']."', '_help', 'status,scrollbars,resizable,width=800,height=600,left=10,top=10,menubar,toolbar')"), null, null, false)); 
     32endif; 
    3833       
    3934echo $news->socialNets($data['News']['id'], $data['News']['title']); // Social nets buttons 
     
    4742      $bg = ($i%2 == 0) ? "#e2e2e2" : "#fff"; 
    4843           
    49       $tmp  = $html->para(null,$time->timeAgoInWords($v['created']) . ' <b>'. $v['User']['username']    . '</b> wrote:<br />', array('style'=>'font-size:8pt;font-family:Georgia;')); 
     44      $tmp  = $html->para(null,  
     45              $html->link($html->image('avatars/'.$v['User']['avatar'], array('width'=>'20px','alt'=>$v['User']['username'],'title'=>$v['User']['username'])), '/users/about/'.$v['User']['username'], null, null, false) .' '. 
     46              $html->link($v['User']['username'], '/users/about/'.$v['User']['username']).'<br />'. 
     47              $html->image('static/time.png', array('alt'=>'Time')).' '.$time->timeAgoInWords($v['created']), array('style'=>'font-size:8pt;font-family:Georgia;')); 
    5048      $tmp .= $html->para(null, $v['comment']); 
    5149      echo $html->div('divblock', $tmp, array('style'=>'background-color:'.$bg));