Show
Ignore:
Timestamp:
07/09/08 19:24:21 (5 months ago)
Author:
aarkerio
Message:

Added image and comments fixed

Location:
trunk/app/views/entries
Files:
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/app/views/entries/display.ctp

    r634 r635  
    1313  e($html->div('body_entry', $val['Entry']['body'])); 
    1414     
    15   $pl = 'Permalink: http://' . $_SERVER['SERVER_NAME'] . '/users/entry/'.$val["User"]["username"].'/'.$val['Entry']['id']; 
     15  $pl = 'http://' . $_SERVER['SERVER_NAME'] . '/entries/view/'.$val['User']['username'].'/'.$val['Entry']['id']; 
    1616     
    17   e($html->div('plink',$html->link($pl, '/users/entry/'.$val["User"]["username"].'/'.$val['Entry']['id']))); 
     17  e($html->div('plink',$html->link('Permalink: '.$pl, $pl))); 
    1818     
    1919  if ( $val['Entry']['discution'] == 1):  //is the comments in this entry actived and is an individual entry? 
    20     e($html->div('plink', $html->image('static/comentarios.gif', array('alt'=>__('Add comment', true))).'  '.$html->link(__('Add comment', true).'  ('.count($val['Comment']).')', '/users/entry/'.$val['User']['username'].'/'.$val['Entry']['id']))); 
     20    e($html->div('plink', $html->image('static/comentarios.gif', array('alt'=>__('Add comment', true))).'  '.$html->link(__('Add comment', true).'  ('.count($val['Comment']).')', $pl))); 
    2121  endif; 
    2222endforeach; 
     23 
     24$paginator->options(array('url' => $val['User']['username'])); 
     25 
     26$t  = $html->div(null,$paginator->prev('« Previous ',null,null,array('class'=>'disabled')),array('style'=>'width:100px;float:left')); 
     27$t .= $html->div(null,$paginator->next(' Next »', null, null, array('class' => 'disabled')),array('style'=>'width:100px;float:right')); 
     28$t .= $html->div(null,$paginator->counter(), array('style'=>'width:200px;float:center')); 
     29echo  $html->div(null,$t, array('style'=>'font-size:9pt;width:400px;margin:15px auto;')); 
    2330?> 
  • trunk/app/views/entries/view.ctp

    r634 r635  
    1010 e($html->div('body_entry', $data['Entry']['body'])); 
    1111     
    12  $pl = 'Permalink: http://' . $_SERVER['SERVER_NAME'] . '/users/entry/'.$blog['User']['username'].'/'.$entry_id; 
     12 $pl = 'http://' . $_SERVER['SERVER_NAME'] . '/entries/view/'.$blog['User']['username'].'/'.$entry_id; 
    1313  
    14  e($html->div('plink', $html->link($pl, '/users/entry/'.$blog['User']['username'].'/'.$entry_id))); 
     14 e($html->div('plink', $html->link('Permalink: '. $pl, $pl))); 
    1515         
    16  if ( $discution == 1 )  //is the comments in this entry actived by blogger? 
    17  { 
     16 if ( $discution == 1 ):  //is the comments in this entry actived by blogger? 
     17  
    1818   if ( $session->check('Auth.User') ):  // if user logged, anchor to textarea 
    1919        echo  $html->div(null, $html->image('static/comment.gif', array('alt'=>'Comments')) . '  Comments:', array('id'=>'comments'));   
     
    3939         
    4040        echo $form->create('Comment', array('onsubmit'=>'return chkForm()', 'action'=>'add')); 
    41         echo $form->hidden('Comment.redirect_to', array('value'=>'/users/entry/'.$blog['User']['username'].'/'.$entry_id)); 
     41        echo $form->hidden('Comment.redirect_to', array('value'=>'/entries/view/'.$blog['User']['username'].'/'.$entry_id)); 
    4242        echo $form->hidden('Comment.entry_id', array('value'=>$entry_id)); 
    4343         
     
    5555            echo $form->error('Comment.comment', 'A comment is required.');  
    5656          
    57             echo $form->end('Send');  
     57            echo $form->end(__('Send', true));  
    5858            echo '</fieldset>';         
    5959    else: 
    60             echo $html->para(null, $html->link('You must be logged in to write a comment', '/users/login')); 
     60            echo $html->para(null, $html->link(__('You must be logged in to write a comment', true), '/users/login')); 
    6161    endif; 
    6262          
    6363         echo "</div>"; 
    64   } 
     64 endif; 
    6565?> 
    6666<script type="text/javascript">