Ignore:
Timestamp:
01/17/14 23:20:56 (6 years ago)
Author:
rvelices
Message:

merge -r26837 from trunk to branch 2.6
admin rating improvements

  • use web service for deletion
  • use datatables for rating by user
  • use fontello icons
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/admin/rating.php

    r26461 r26838  
    213213 
    214214  $tpl_image =  
    215      array( 
    216        'U_THUMB' => $thumbnail_src, 
    217        'U_URL' => $image_url, 
    218                          'SCORE_RATE' => $image['score'], 
     215    array( 
     216      'id' => $image['id'], 
     217      'U_THUMB' => $thumbnail_src, 
     218      'U_URL' => $image_url, 
     219      'SCORE_RATE' => $image['score'], 
    219220       'AVG_RATE' => $image['avg_rates'], 
    220221       'SUM_RATE' => $image['sum_rates'], 
     
    227228  while ($row = pwg_db_fetch_assoc($result)) 
    228229  { 
    229  
    230     $url_del = PHPWG_ROOT_PATH.'admin.php'. 
    231                 get_query_string_diff(array('del')); 
    232  
    233     $del_param = 'e='.$image['id']. 
    234                  '&u='.$row['user_id']. 
    235                  '&a='.$row['anonymous_id']; 
    236  
    237     $url_del .= '&del='.urlencode(urlencode($del_param)); 
    238  
    239230    if ( isset($users[$row['user_id']]) ) 
    240231    { 
     
    250241    } 
    251242 
    252     $tpl_image['rates'][] = 
    253        array( 
    254          'DATE' => /*format_date*/($row['date']), 
    255          'RATE' => $row['rate'], 
    256          'USER' => $user_rate, 
    257          'U_DELETE' => $url_del 
    258      ); 
     243    $row['USER'] = $user_rate; 
     244    $tpl_image['rates'][] = $row; 
    259245  } 
    260246  $template->append( 'images', $tpl_image ); 
Note: See TracChangeset for help on using the changeset viewer.