mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-01 20:04:51 +02:00
related to #1679 same badge for rating page
This commit is contained in:
+7
-1
@@ -102,6 +102,12 @@ $query.= '
|
||||
WHERE 1=1'. $page['user_filter'];
|
||||
list($nb_images) = pwg_db_fetch_row(pwg_query($query));
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM '.RATE_TABLE.
|
||||
';';
|
||||
list($nb_elements) = pwg_db_fetch_row(pwg_query($query));
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | template init |
|
||||
@@ -119,7 +125,7 @@ $template->assign(
|
||||
),
|
||||
'F_ACTION' => PHPWG_ROOT_PATH.'admin.php',
|
||||
'DISPLAY' => $elements_per_page,
|
||||
'NB_ELEMENTS' => $nb_images,
|
||||
'NB_ELEMENTS' => $nb_elements,
|
||||
'category' => (isset($_GET['cat']) ? array($_GET['cat']) : array()),
|
||||
'CACHE_KEYS' => get_admin_client_cache_keys(array('categories')),
|
||||
)
|
||||
|
||||
@@ -229,6 +229,13 @@ $template->assign('order_by_options_selected', array($order_by_index) );
|
||||
|
||||
$x = uasort($by_user_ratings, $available_order_by[$order_by_index][1] );
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM '.RATE_TABLE.
|
||||
';';
|
||||
list($nb_elements) = pwg_db_fetch_row(pwg_query($query));
|
||||
|
||||
$template->assign( array(
|
||||
'F_ACTION' => get_root_url().'admin.php',
|
||||
'F_MIN_RATES' => $filter_min_rates,
|
||||
@@ -237,6 +244,7 @@ $template->assign( array(
|
||||
'ratings' => $by_user_ratings,
|
||||
'image_urls' => $image_urls,
|
||||
'TN_WIDTH' => ImageStdParams::get_by_type(IMG_SQUARE)->sizing->ideal_size[0],
|
||||
'NB_ELEMENTS' => $nb_elements,
|
||||
) );
|
||||
$template->set_filename('rating', 'rating_user.tpl');
|
||||
$template->assign_var_from_handle('ADMIN_CONTENT', 'rating');
|
||||
|
||||
@@ -37,7 +37,7 @@ body .ui-tooltip {
|
||||
|
||||
{/html_style}
|
||||
|
||||
<h2>{'Rating'|@translate}<span class='badge-number'>{$ratings|@count}</span></h2>
|
||||
<h2>{'Rating'|@translate}<span class='badge-number'>{$NB_ELEMENTS}</span></h2>
|
||||
|
||||
<form action="{$F_ACTION}" method="GET">
|
||||
<fieldset>
|
||||
|
||||
Reference in New Issue
Block a user