summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorspocky <spocky@ampache>2008-04-02 12:38:47 +0000
committerspocky <spocky@ampache>2008-04-02 12:38:47 +0000
commit2544f5b5629d36658f92d4d0ad111563c2442f1b (patch)
tree74f24fe5d8a40716dfad4f0e5017cce03dd3878b /templates
parent3c36e58d5441dd5a6990fc24332e69d330edf766 (diff)
downloadampache-2544f5b5629d36658f92d4d0ad111563c2442f1b.tar.gz
ampache-2544f5b5629d36658f92d4d0ad111563c2442f1b.tar.bz2
ampache-2544f5b5629d36658f92d4d0ad111563c2442f1b.zip
changed rating display to use 1 digit rounded average, a little bit different than "half star rating" request (Ticket #156), but easily done and also more precise.
minor change to sidebar filter display.
Diffstat (limited to 'templates')
-rw-r--r--templates/show_object_rating.inc.php4
-rw-r--r--templates/show_object_rating_static.inc.php4
-rw-r--r--templates/sidebar_browse.inc.php2
3 files changed, 5 insertions, 5 deletions
diff --git a/templates/show_object_rating.inc.php b/templates/show_object_rating.inc.php
index e028b89f..82ae5047 100644
--- a/templates/show_object_rating.inc.php
+++ b/templates/show_object_rating.inc.php
@@ -27,7 +27,7 @@ $base_url = '?action=set_rating&rating_type=' . $rating->type . '&object_id=' .
<ul>
<?php
// decide width of rating (5 stars -> 20% per star)
- $width = $rating->rating*20;
+ $width = $rating->preciserating*20;
if ($width < 0) $width = 0;
//set the current rating background
@@ -35,7 +35,7 @@ $base_url = '?action=set_rating&rating_type=' . $rating->type . '&object_id=' .
if ($rating->rating <= 0) {
echo "not rated yet </li>\n";
}
- else echo "$rating->rating of 5</li>\n";
+ else echo "$rating->preciserating of 5</li>\n";
for ($i=1; $i<6; $i++)
{
diff --git a/templates/show_object_rating_static.inc.php b/templates/show_object_rating_static.inc.php
index 5fcd4f18..a8359f5b 100644
--- a/templates/show_object_rating_static.inc.php
+++ b/templates/show_object_rating_static.inc.php
@@ -27,7 +27,7 @@ $base_url = Config::get('ajax_url') . '?action=set_rating&amp;rating_type=' . $r
<ul>
<?php
// decide width of rating (5 stars -> 20% per star)
- $width = $rating->rating*20;
+ $width = $rating->preciserating*20;
if ($width < 0) $width = 0;
//set the current rating background
@@ -35,7 +35,7 @@ $base_url = Config::get('ajax_url') . '?action=set_rating&amp;rating_type=' . $r
if ($rating->rating <= 0) {
echo "not rated yet </li>\n";
}
- else echo "$rating->rating of 5</li>\n";
+ else echo "$rating->preciserating of 5</li>\n";
for ($i=1; $i<6; $i++)
{
diff --git a/templates/sidebar_browse.inc.php b/templates/sidebar_browse.inc.php
index 936e847c..7bef4348 100644
--- a/templates/sidebar_browse.inc.php
+++ b/templates/sidebar_browse.inc.php
@@ -43,8 +43,8 @@ $allowed_filters = Browse::get_allowed_filters();
<div class="sb3">
<?php if (in_array('alpha_match',$allowed_filters)) { ?>
<form id="multi_alpha_filter_form" method="post" action="javascript:void(0);">
- <input type="textbox" id="multi_alpha_filter" name="multi_alpha_filter" value="<?php echo scrub_out($_REQUEST['alpha_match']); ?>" onKeyUp="DelayRun(this,'400','ajaxState','<?php echo Config::get('ajax_url'); ?>?page=browse&action=browse&key=alpha_match','multi_alpha_filter');">
<label id="multi_alpha_filterLabel" for="multi_alpha_filter"><?php echo _('Starts With'); ?></label>
+ <input type="textbox" id="multi_alpha_filter" name="multi_alpha_filter" value="<?php echo scrub_out($_REQUEST['alpha_match']); ?>" onKeyUp="DelayRun(this,'400','ajaxState','<?php echo Config::get('ajax_url'); ?>?page=browse&action=browse&key=alpha_match','multi_alpha_filter');">
</form>
<?php } // end if alpha_match ?>
<?php if (in_array('minimum_count',$allowed_filters)) { ?>