Browse Source
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>
pull/2425/head
Morris Jobke
10 years ago
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
2 changed files with
3 additions and
1 deletions
-
settings/Controller/AppSettingsController.php
-
settings/templates/apps.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, |
|
|
|
|
|
|
|
@ -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> |
|
|
|
|