summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-11-30 15:59:02 +0100
committerMorris Jobke <hey@morrisjobke.de>2016-11-30 15:59:02 +0100
commit9f27c2b3e77f24862410e83adf0dc2473bbbfa8d (patch)
tree7c9be800800829c31cd15011552a6b4c98cf2e58 /settings
parentd7dd399bbda8da55f46db6e8f825bf282efbec52 (diff)
downloadnextcloud-server-9f27c2b3e77f24862410e83adf0dc2473bbbfa8d.tar.gz
nextcloud-server-9f27c2b3e77f24862410e83adf0dc2473bbbfa8d.zip
Show app store rating only for 5+ votes
* shows the rating of an app only if a given amount of ratings are given * fixes #2001 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'settings')
-rw-r--r--settings/Controller/AppSettingsController.php2
-rw-r--r--settings/templates/apps.php2
2 files changed, 3 insertions, 1 deletions
diff --git a/settings/Controller/AppSettingsController.php b/settings/Controller/AppSettingsController.php
index a665532a3b7..fe050332fc8 100644
--- a/settings/Controller/AppSettingsController.php
+++ b/settings/Controller/AppSettingsController.php
@@ -239,6 +239,8 @@ class AppSettingsController extends Controller {
'canInstall' => true,
'preview' => isset($app['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/'.base64_encode($app['screenshots'][0]['url']) : '',
'score' => $app['ratingOverall'],
+ 'ratingNumOverall' => $app['ratingNumOverall'],
+ 'ratingNumThresholdReached' => $app['ratingNumOverall'] > 5 ? true : false,
'removable' => $existsLocally,
'active' => $this->appManager->isEnabledForUser($app['id']),
'needsDownload' => !$existsLocally,
diff --git a/settings/templates/apps.php b/settings/templates/apps.php
index 3753fd67a0c..2cb8378d74e 100644
--- a/settings/templates/apps.php
+++ b/settings/templates/apps.php
@@ -53,7 +53,7 @@ script(
<div class="app-level">
{{{level}}}
</div>
- {{#if score}}
+ {{#if ratingNumThresholdReached }}
<div class="app-score">{{{score}}}</div>
{{/if}}
<div class="app-detailpage"></div>