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>
This commit is contained in:
Morris Jobke 2016-11-30 15:59:02 +01:00
parent d7dd399bbd
commit 9f27c2b3e7
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
2 changed files with 3 additions and 1 deletions

View File

@ -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,

View File

@ -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>