Changeset 2247

Show
Ignore:
Timestamp:
07/24/08 23:23:01 (4 months ago)
Author:
dmondark
Message:

Make the 'View post' link use FormUI. Closes #554. Thanks arthus.

Location:
trunk/htdocs/system
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/system/admin/publish.php

    r2062 r2247  
    66<div class="create"> 
    77 
    8     <?php if(!$newpost): ?> 
    9     <div class="container"> 
    10         <a href="<?php echo $post->permalink; ?>" class="viewpost"><?php _e('View Post'); ?></a> 
    11     </div> 
    12     <?php endif; ?> 
    138 
    149    <?php $form->out(); ?> 
  • trunk/htdocs/system/classes/adminhandler.php

    r2239 r2247  
    447447        $form = new FormUI('publishform'); 
    448448        $form->class[] = 'create'; 
    449  
     449         
     450        if(isset($this->handler_vars['slug'])) { 
     451            $post_links = $form->append('wrapper', 'post_links'); 
     452            $post_links->append('static', 'post_permalink', '<a href="'.$post->permalink.'" class="viewpost">'._t('View Post').'</a>'); 
     453            $post_links->class='container'; 
     454        } 
     455         
    450456        // Create the Title field 
    451457        $form->append('text', 'title', 'null:null', _t('Title'), 'admincontrol_text');