Skip to content

Commit

Permalink
feature 2920: reuse "nb pending comments" calculation in admin/intro.
Browse files Browse the repository at this point in the history
add missing CSS code in r25084


git-svn-id: http://piwigo.org/svn/trunk@25085 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Oct 22, 2013
1 parent fac62f8 commit 1ba3136
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
19 changes: 0 additions & 19 deletions admin/intro.php
Expand Up @@ -213,25 +213,6 @@
;';
list($nb_comments) = pwg_db_fetch_row(pwg_query($query));
$template->assign('DB_COMMENTS', l10n_dec('%d comment', '%d comments', $nb_comments));

// unvalidated comments
$query = '
SELECT COUNT(*)
FROM '.COMMENTS_TABLE.'
WHERE validated=\'false\'
;';
list($nb_comments) = pwg_db_fetch_row(pwg_query($query));

if ($nb_comments > 0)
{
$template->assign(
'unvalidated',
array(
'URL' => PHPWG_ROOT_PATH.'admin.php?page=comments',
'INFO' => l10n('%d waiting for validation', $nb_comments)
)
);
}
}

if ($nb_elements > 0)
Expand Down
5 changes: 1 addition & 4 deletions admin/themes/default/template/intro.tpl
Expand Up @@ -74,10 +74,7 @@ jQuery().ready(function(){
<li>{$DB_GROUPS}</li>
{if isset($DB_COMMENTS)}
<li>
{$DB_COMMENTS}
{if isset($unvalidated)}
(<a href="{$unvalidated.URL}">{$unvalidated.INFO}</a>)
{/if}
{$DB_COMMENTS}{if $NB_PENDING_COMMENTS > 0} (<a href="{$U_COMMENTS}">{'%d waiting for validation'|translate:$NB_PENDING_COMMENTS}</a>){/if}
</li>
{/if}
<li>{$DB_RATES}</li>
Expand Down
3 changes: 3 additions & 0 deletions admin/themes/default/theme.css
Expand Up @@ -27,6 +27,9 @@ ul.categoryActions { margin: 0 2px; width: auto; list-style-position:outside;
.content div.comment blockquote {
margin-right: 0.5em; overflow: visible; /*avoid a very strange margin behaviour (all browsers) */ }

.commentFilterSelected {color:#666;text-decoration:underline;}
.comment .pendingFlag {font-style:italic;color:red;}

/* not used but should be */
#thePopuphelpPage .content { margin: 1em; }

Expand Down

0 comments on commit 1ba3136

Please sign in to comment.