Merge pull request #2425 from nextcloud/show-real-apps-rating

Show app store rating only for 5+ votes
This commit is contained in:
Roeland Jago Douma 2016-12-01 11:56:33 +01:00 committed by GitHub
commit 220452e943
2 changed files with 3 additions and 1 deletions

View File

@ -239,6 +239,8 @@ class AppSettingsController extends Controller {
'canInstall' => true, 'canInstall' => true,
'preview' => isset($app['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/'.base64_encode($app['screenshots'][0]['url']) : '', 'preview' => isset($app['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/'.base64_encode($app['screenshots'][0]['url']) : '',
'score' => $app['ratingOverall'], 'score' => $app['ratingOverall'],
'ratingNumOverall' => $app['ratingNumOverall'],
'ratingNumThresholdReached' => $app['ratingNumOverall'] > 5 ? true : false,
'removable' => $existsLocally, 'removable' => $existsLocally,
'active' => $this->appManager->isEnabledForUser($app['id']), 'active' => $this->appManager->isEnabledForUser($app['id']),
'needsDownload' => !$existsLocally, 'needsDownload' => !$existsLocally,

View File

@ -53,7 +53,7 @@ script(
<div class="app-level"> <div class="app-level">
{{{level}}} {{{level}}}
</div> </div>
{{#if score}} {{#if ratingNumThresholdReached }}
<div class="app-score">{{{score}}}</div> <div class="app-score">{{{score}}}</div>
{{/if}} {{/if}}
<div class="app-detailpage"></div> <div class="app-detailpage"></div>