Changeset 25085


Ignore:
Timestamp:
10/22/13 22:48:28 (6 years ago)
Author:
plg
Message:

feature 2920: reuse "nb pending comments" calculation in admin/intro.

add missing CSS code in r25084

Location:
trunk/admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/intro.php

    r25018 r25085  
    214214  list($nb_comments) = pwg_db_fetch_row(pwg_query($query)); 
    215215  $template->assign('DB_COMMENTS', l10n_dec('%d comment', '%d comments', $nb_comments)); 
    216    
    217   // unvalidated comments 
    218   $query = ' 
    219 SELECT COUNT(*) 
    220   FROM '.COMMENTS_TABLE.' 
    221   WHERE validated=\'false\' 
    222 ;'; 
    223   list($nb_comments) = pwg_db_fetch_row(pwg_query($query)); 
    224  
    225   if ($nb_comments > 0) 
    226   { 
    227     $template->assign( 
    228       'unvalidated', 
    229       array( 
    230         'URL' => PHPWG_ROOT_PATH.'admin.php?page=comments', 
    231         'INFO' => l10n('%d waiting for validation', $nb_comments) 
    232         ) 
    233       ); 
    234   } 
    235216} 
    236217 
  • trunk/admin/themes/default/template/intro.tpl

    r25005 r25085  
    7575    {if isset($DB_COMMENTS)} 
    7676      <li> 
    77         {$DB_COMMENTS} 
    78         {if isset($unvalidated)} 
    79         (<a href="{$unvalidated.URL}">{$unvalidated.INFO}</a>) 
    80         {/if} 
     77        {$DB_COMMENTS}{if $NB_PENDING_COMMENTS > 0} (<a href="{$U_COMMENTS}">{'%d waiting for validation'|translate:$NB_PENDING_COMMENTS}</a>){/if} 
    8178      </li> 
    8279    {/if} 
  • trunk/admin/themes/default/theme.css

    r23426 r25085  
    2727.content div.comment blockquote { 
    2828  margin-right: 0.5em; overflow: visible; /*avoid a very strange margin behaviour (all browsers) */ } 
     29 
     30.commentFilterSelected {color:#666;text-decoration:underline;} 
     31.comment .pendingFlag {font-style:italic;color:red;} 
    2932 
    3033/* not used but should be */ 
Note: See TracChangeset for help on using the changeset viewer.