Changeset 2186

Show
Ignore:
Timestamp:
07/15/08 20:51:10 (6 months ago)
Author:
ringmaster
Message:

Show a message when no results match the admin's filter of posts and comments. Fixes #411. Provided by arthus.

Location:
trunk/htdocs/system/admin
Files:
2 modified

Legend:

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

    r2104 r2186  
    1 <?php foreach( $comments as $comment ) : ?> 
     1<?php if(count($comments) != 0) : 
     2    foreach( $comments as $comment ) : ?> 
    23 
    34<div class="item clear <?php echo strtolower( $comment->statusname ); ?>" id="comment_<?php echo $comment->id; ?>"> 
     
    1213        </span> 
    1314        <span class="title pct40"><span class="dim"><?php _e('in'); ?> '</span><a href="<?php echo $comment->post->permalink ?>#comment-<?php echo $comment->id; ?>" title="<?php _e('Go to \''.$comment->post->title.'\'') ?>"><?php echo $comment->post->title; ?></a><span class="dim">'</span></span> 
    14         <span class="date pct15"><span class="dim"><?php _e('on'); ?></span> <a href="#" class="edit-date" title="<?php _e('Search for other comments from '.date('M, Y', strtotime($comment->date))) ?>"><?php echo date('M d, Y', strtotime($comment->date));?></a></span> 
     15        <span class="date pct15"><span class="dim"><?php _e('on'); ?></span> <a href="<?php URL::out('admin', array('page' => 'comments', 'status' => $comment->status, 'year' => date( 'Y', strtotime( $comment->date ) ), 'month' => date( 'm', strtotime( $comment->date ) ) ) ); ?>" class="edit-date" title="<?php _e('Search for other comments from '.date('M, Y', strtotime($comment->date))) ?>"><?php echo date('M d, Y', strtotime($comment->date));?></a></span> 
    1516        <span class="time pct10 dim"><?php _e('at'); ?> <span class="edit-time"><?php echo date('H:i', strtotime($comment->date));?></span></span> 
    1617 
     
    4950</div> 
    5051 
    51 <?php endforeach; ?> 
     52<?php   endforeach;  
     53else : ?> 
     54<div class="message none"> 
     55    <p><?php echo _t('No comments could be found to match the query criteria.'); ?></p> 
     56</div> 
     57<?php endif; ?> 
  • trunk/htdocs/system/admin/posts_items.php

    r2135 r2186  
    1 <?php foreach($posts as $post) : ?> 
     1<?php if(count($posts) != 0) : 
     2    foreach($posts as $post) : ?> 
    23 
    34<div class="item clear <?php echo $post->statusname; ?>" id="post_<?php echo $post->id; ?>"> 
     
    2122</div> 
    2223 
    23 <?php endforeach; ?> 
     24<?php   endforeach;  
     25else : ?> 
     26<div class="message none"> 
     27    <p><?php echo _t('No posts could be found to match the query criteria.'); ?></p> 
     28</div> 
     29<?php endif; ?>