diff options
author | rvelices <rv-github@modusoptimus.com> | 2014-01-17 22:19:44 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2014-01-17 22:19:44 +0000 |
commit | 50927b3569b389da6949d559805f2e846745921c (patch) | |
tree | 347a22dfe357affadd7f18773480570c7bda5043 /admin/rating.php | |
parent | 998cc9c1acdb39fc24879566ef6a8c8b061b7c7f (diff) |
admin rating improvements
- use web service for deletion
- use datatables for rating by user
- use fontello icons
git-svn-id: http://piwigo.org/svn/trunk@26837 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/rating.php | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/admin/rating.php b/admin/rating.php index 0edd1369b..381b5c4cc 100644 --- a/admin/rating.php +++ b/admin/rating.php @@ -212,10 +212,11 @@ ORDER BY date DESC;'; $nb_rates = pwg_db_num_rows($result); $tpl_image = - array( - 'U_THUMB' => $thumbnail_src, - 'U_URL' => $image_url, - 'SCORE_RATE' => $image['score'], + array( + 'id' => $image['id'], + 'U_THUMB' => $thumbnail_src, + 'U_URL' => $image_url, + 'SCORE_RATE' => $image['score'], 'AVG_RATE' => $image['avg_rates'], 'SUM_RATE' => $image['sum_rates'], 'NB_RATES' => (int)$image['nb_rates'], @@ -226,16 +227,6 @@ ORDER BY date DESC;'; while ($row = pwg_db_fetch_assoc($result)) { - - $url_del = PHPWG_ROOT_PATH.'admin.php'. - get_query_string_diff(array('del')); - - $del_param = 'e='.$image['id']. - '&u='.$row['user_id']. - '&a='.$row['anonymous_id']; - - $url_del .= '&del='.urlencode(urlencode($del_param)); - if ( isset($users[$row['user_id']]) ) { $user_rate = $users[$row['user_id']]; @@ -249,13 +240,8 @@ ORDER BY date DESC;'; $user_rate .= '('.$row['anonymous_id'].')'; } - $tpl_image['rates'][] = - array( - 'DATE' => /*format_date*/($row['date']), - 'RATE' => $row['rate'], - 'USER' => $user_rate, - 'U_DELETE' => $url_del - ); + $row['USER'] = $user_rate; + $tpl_image['rates'][] = $row; } $template->append( 'images', $tpl_image ); } |