From 9fd31b235d3760db4cdfb32efe41a1c82ea1f221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Sat, 9 Dec 2006 04:28:20 +0000 Subject: [PATCH] Colourize the maintainer's rating and version fields with the appropriate rating colours, both in the application and version view. This should make it easier for users to identify working versions, and it also prevents the maintainer's rating from being 'overshadowed' by the test results. --- include/version.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/include/version.php b/include/version.php index 9e8d248..16bd7a4 100644 --- a/include/version.php +++ b/include/version.php @@ -662,9 +662,14 @@ class Version { echo " \n"; } + if($this->sTestedRating != "/" && $this->sTestedRating) + $sMaintainerColor = $this->sTestedRating; + else + $sMaintainerColor = "color0"; + // rating Area - echo "Maintainer Rating".$this->sTestedRating."\n"; - echo "Maintainers Version".$this->sTestedRelease."\n"; + echo "Maintainer’s Rating".$this->sTestedRating."\n"; + echo "Maintainer’s Version".$this->sTestedRelease."\n"; // image $img = Screenshot::get_random_screenshot_img($oApp->iAppId, $this->iVersionId, false); @@ -923,12 +928,15 @@ class Version { // set row color $bgcolor = ($c % 2 == 0) ? "color0" : "color1"; + if($oVersion->sTestedRating && $oVersion->sTestedRating != "/") + $sRatingColor = "class=\"$oVersion->sTestedRating\""; + //display row echo "\n"; echo " ".$oVersion->sName."\n"; echo " ".util_trim_description($oVersion->sDescription)."\n"; - echo " ".$oVersion->sTestedRating."\n"; - echo " ".$oVersion->sTestedRelease."\n"; + echo " ".$oVersion->sTestedRating."\n"; + echo " ".$oVersion->sTestedRelease."\n"; echo " ".Comment::get_comment_count_for_versionid($oVersion->iVersionId)."\n"; echo "\n\n";