修正评论bug
This commit is contained in:
@@ -5,6 +5,7 @@ include 'menu.php';
|
||||
|
||||
$stat = Typecho_Widget::widget('Widget_Stat');
|
||||
$comments = Typecho_Widget::widget('Widget_Comments_Admin');
|
||||
$isAllComments = ('on' == $request->get('__typecho_all_comments') || 'on' == Typecho_Cookie::get('__typecho_all_comments'));
|
||||
?>
|
||||
<div class="main">
|
||||
<div class="body container">
|
||||
@@ -16,9 +17,9 @@ $comments = Typecho_Widget::widget('Widget_Comments_Admin');
|
||||
. (isset($request->cid) ? '?cid=' . $request->cid : '')); ?>"><?php _e('已通过'); ?></a></li>
|
||||
<li<?php if('waiting' == $request->get('status')): ?> class="current"<?php endif; ?>><a href="<?php $options->adminUrl('manage-comments.php?status=waiting'
|
||||
. (isset($request->cid) ? '&cid=' . $request->cid : '')); ?>"><?php _e('待审核'); ?>
|
||||
<?php if('on' != $request->get('__typecho_all_comments') && $stat->myWaitingCommentsNum > 0 && !isset($request->cid)): ?>
|
||||
<?php if(!$isAllComments && $stat->myWaitingCommentsNum > 0 && !isset($request->cid)): ?>
|
||||
<span class="balloon"><?php $stat->myWaitingCommentsNum(); ?></span>
|
||||
<?php elseif('on' == $request->get('__typecho_all_comments') && $stat->waitingCommentsNum > 0 && !isset($request->cid)): ?>
|
||||
<?php elseif($isAllComments && $stat->waitingCommentsNum > 0 && !isset($request->cid)): ?>
|
||||
<span class="balloon"><?php $stat->waitingCommentsNum(); ?></span>
|
||||
<?php elseif(isset($request->cid) && $stat->currentWaitingCommentsNum > 0): ?>
|
||||
<span class="balloon"><?php $stat->currentWaitingCommentsNum(); ?></span>
|
||||
@@ -26,17 +27,17 @@ $comments = Typecho_Widget::widget('Widget_Comments_Admin');
|
||||
</a></li>
|
||||
<li<?php if('spam' == $request->get('status')): ?> class="current"<?php endif; ?>><a href="<?php $options->adminUrl('manage-comments.php?status=spam'
|
||||
. (isset($request->cid) ? '&cid=' . $request->cid : '')); ?>"><?php _e('垃圾'); ?>
|
||||
<?php if('on' != $request->get('__typecho_all_comments') && $stat->mySpamCommentsNum > 0 && !isset($request->cid)): ?>
|
||||
<?php if(!$isAllComments && $stat->mySpamCommentsNum > 0 && !isset($request->cid)): ?>
|
||||
<span class="balloon"><?php $stat->mySpamCommentsNum(); ?></span>
|
||||
<?php elseif('on' == $request->get('__typecho_all_comments') && $stat->spamCommentsNum > 0 && !isset($request->cid)): ?>
|
||||
<?php elseif($isAllComments && $stat->spamCommentsNum > 0 && !isset($request->cid)): ?>
|
||||
<span class="balloon"><?php $stat->spamCommentsNum(); ?></span>
|
||||
<?php elseif(isset($request->cid) && $stat->currentSpamCommentsNum > 0): ?>
|
||||
<span class="balloon"><?php $stat->currentSpamCommentsNum(); ?></span>
|
||||
<?php endif; ?>
|
||||
</a></li>
|
||||
<?php if($user->pass('editor', true) && !isset($request->cid)): ?>
|
||||
<li class="right<?php if('on' == $request->get('__typecho_all_comments')): ?> current<?php endif; ?>"><a href="<?php echo $request->makeUriByRequest('__typecho_all_comments=on'); ?>"><?php _e('所有'); ?></a></li>
|
||||
<li class="right<?php if('on' != $request->get('__typecho_all_comments')): ?> current<?php endif; ?>"><a href="<?php echo $request->makeUriByRequest('__typecho_all_comments=off'); ?>"><?php _e('我的'); ?></a></li>
|
||||
<li class="right<?php if($isAllComments): ?> current<?php endif; ?>"><a href="<?php echo $request->makeUriByRequest('__typecho_all_comments=on'); ?>"><?php _e('所有'); ?></a></li>
|
||||
<li class="right<?php if(!$isAllComments): ?> current<?php endif; ?>"><a href="<?php echo $request->makeUriByRequest('__typecho_all_comments=off'); ?>"><?php _e('我的'); ?></a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ include 'menu.php';
|
||||
<div class="col-group typecho-page-main">
|
||||
<div class="col-mb-12 typecho-list">
|
||||
<?php Typecho_Widget::widget('Widget_Plugins_List_Activated')->to($activatedPlugins); ?>
|
||||
<?php if ($activatedPlugins->have()): ?>
|
||||
<?php if ($activatedPlugins->have() && !empty($activatedPlugins->activatedPlugins)): ?>
|
||||
<h4 class="typecho-list-table-title"><?php _e('启用的插件'); ?></h4>
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
|
||||
Reference in New Issue
Block a user