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
parent
commit
9f27c2b3e7
No known key found for this signature in database GPG Key ID: 9CE5ED29E7FCD38A
  1. 2
      settings/Controller/AppSettingsController.php
  2. 2
      settings/templates/apps.php

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

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

Loading…
Cancel
Save