$CommentList->display_init(); } if ($user_perm_moderate_cmt && $CommentList->result_num_rows) { // We have comments awaiting moderation load_funcs('comments/model/_comment_js.funcs.php'); $nb_blocks_displayed++; $opentrash_link = get_opentrash_link(true, false, array('class' => 'btn btn-default')); $refresh_link = '<span class="floatright">' . action_icon(T_('Refresh comment list'), 'refresh', $admin_url . '?blog=' . $blog, ' ' . T_('Refresh'), 3, 4, array('onclick' => 'startRefreshComments( \'' . request_from() . '\' ); return false;', 'class' => 'btn btn-default')) . '</span> '; $show_statuses_param = $param_prefix . 'show_statuses[]=' . implode('&' . $param_prefix . 'show_statuses[]=', $user_modeartion_statuses); $block_item_Widget->title = $refresh_link . $opentrash_link . T_('Comments awaiting moderation') . ' <a href="' . $admin_url . '?ctrl=comments&blog=' . $Blog->ID . '&' . $show_statuses_param . '" style="text-decoration:none">' . '<span id="badge" class="badge badge-important">' . $CommentList->get_total_rows() . '</span></a>' . get_manual_link('collection-dashboard'); echo '<div class="evo_content_block">'; echo '<div id="comments_block" class="dashboard_comments_block">'; $block_item_Widget->disp_template_replaced('block_start'); echo '<div id="comments_container">'; // GET COMMENTS AWAITING MODERATION (the code generation is shared with the AJAX callback): show_comments_awaiting_moderation($Blog->ID, $CommentList); echo '</div>'; $block_item_Widget->disp_template_raw('block_end'); echo '</div>'; echo '</div>'; } /* * RECENT POSTS awaiting moderation */ $post_moderation_statuses = explode(',', $Blog->get_setting('post_moderation_statuses')); ob_start(); foreach ($post_moderation_statuses as $status) { // go through all statuses if (display_posts_awaiting_moderation($status, $block_item_Widget)) { // a block was dispalyed for this status $nb_blocks_displayed++;
/** * Get comments awaiting moderation * * @param integer blog_ID */ function get_comments_awaiting_moderation($blog_ID) { $limit = 30; load_funcs('dashboard/model/_dashboard.funcs.php'); show_comments_awaiting_moderation($blog_ID, NULL, $limit, array(), false); }