diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-07-23 02:10:27 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-07-23 02:10:27 +0000 |
commit | 84eca6a3d59fc591a7e28b3d7e0c11746dc837fc (patch) | |
tree | 837dd1a9051e787ff9bca6a7f928ac710ea639cd /templates/show_object_rating.inc.php | |
parent | b62f10549d421dfee1d9f4268522946f665ae11f (diff) | |
download | ampache-84eca6a3d59fc591a7e28b3d7e0c11746dc837fc.tar.gz ampache-84eca6a3d59fc591a7e28b3d7e0c11746dc837fc.tar.bz2 ampache-84eca6a3d59fc591a7e28b3d7e0c11746dc837fc.zip |
sync french translation, fixed ratings
Diffstat (limited to 'templates/show_object_rating.inc.php')
-rw-r--r-- | templates/show_object_rating.inc.php | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/templates/show_object_rating.inc.php b/templates/show_object_rating.inc.php index 9de4c0b8..6e5bf185 100644 --- a/templates/show_object_rating.inc.php +++ b/templates/show_object_rating.inc.php @@ -20,22 +20,17 @@ /* Create some variables we are going to need */ $web_path = Config::get('web_path'); -$base_url = Config::get('ajax_url') . '?action=set_rating&rating_type=' . $rating->type . '&object_id=' . $rating->id . Config::get('ajax_info'); +$base_url = '?action=set_rating&rating_type=' . $rating->type . '&object_id=' . $rating->id; //set the background to no stars echo "<ul class=\"star-rating\">\n"; -/* Handle the "Not rated" possibility */ -if ($rating->rating == '-1') { - echo "<li class=\"zero-stars\"><span onclick=\"ajaxPut('" . $base_url . "&rating=-1');return true;\" title=\"don't play\" class=\"zero-stars\"></span></li>\n"; -} -else { - echo "<li class=\"zero-stars\"><span onclick=\"ajaxPut('" . $base_url . "&rating=-1');return true;\" title=\"remove rating\" class=\"zero-stars\"></span></li>\n"; -} +// Add in the 0 / Remove rating level +echo "<li class=\"zero-stars\">" . Ajax::text($base_url . '&rating=-1','','rating0_' . $rating->id,'','zero-stars') . "</li>"; + // decide width of rating. image is 16 px wide $width = $rating->rating*16; -if ($width < 0) $width = 0; //set the current rating background echo "<li class=\"current-rating\" style=\"width:${width}px\" >Current rating: "; @@ -47,19 +42,19 @@ else echo "$rating->rating of 5</li>\n"; //it did not like my "1-star", "2-star" ... css styles, and I changed it to this after I realized star1... would have worked :\ ?> <li> - <span onclick="ajaxPut('<?php echo $base_url; ?>&rating=1');return true;" class="one-stars" title="1 <?php echo _('out of'); ?> 5"></span> + <?php echo Ajax::text($base_url . '&rating=1','','rating1_' . $rating->id,'','one-stars'); ?> </li> <li> - <span onclick="ajaxPut('<?php echo $base_url; ?>&rating=2');return true;" class="two-stars" title="2 <?php echo _('out of'); ?> 5"></span> + <?php echo Ajax::text($base_url . '&rating=2','','rating2_' . $rating->id,'','two-stars'); ?> </li> <li> - <span onclick="ajaxPut('<?php echo $base_url; ?>&rating=3');return true;" class="three-stars" title="3 <?php echo _('out of'); ?> 5"></span> + <?php echo Ajax::text($base_url . '&rating=3','','rating3_' . $rating->id,'','three-stars'); ?> </li> <li> - <span onclick="ajaxPut('<?php echo $base_url; ?>&rating=4');return true;" class="four-stars" title="4 <?php echo _('out of'); ?> 5"></span> + <?php echo Ajax::text($base_url . '&rating=4','','rating4_' . $rating->id,'','four-stars'); ?> </li> <li> - <span onclick="ajaxPut('<?php echo $base_url; ?>&rating=5');return true;" class="five-stars" title="5 <?php echo _('out of'); ?> 5"></span> + <?php echo Ajax::text($base_url . '&rating=5','','rating5_' . $rating->id,'','five-stars'); ?> </li> </ul> |