Skip to content

Commit

Permalink
Merge pull request #22422 from owncloud/issue-17230-better-promotion-…
Browse files Browse the repository at this point in the history
…of-app-updates

Make app updates better visible (part1)
  • Loading branch information
DeepDiver1975 committed Feb 18, 2016
2 parents d2f4b4b + 87746e4 commit 22541b7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion settings/js/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
$('.app-level .experimental').tipsy({fallback: t('settings', 'This app is not checked for security issues and is new or known to be unstable. Install at your own risk.')});
},
complete: function() {
var availableUpdates = 0;
$('#apps-list').removeClass('icon-loading');
$.ajax(OC.generateUrl('settings/apps/list?category={categoryId}&includeUpdateInfo=1', {
categoryId: categoryId
Expand All @@ -135,8 +136,14 @@ OC.Settings.Apps = OC.Settings.Apps || {
var $update = $('#app-' + app.id + ' .update');
$update.removeClass('hidden');
$update.val(t('settings', 'Update to %s').replace(/%s/g, app.update));
availableUpdates++;
OC.Settings.Apps.State.apps[app.id].update = true;
}
})
});

if (availableUpdates > 0) {
OC.Notification.show(n('settings', 'You have %n app update pending', 'You have %n app updates pending', availableUpdates));
}
}
});
}
Expand Down
4 changes: 4 additions & 0 deletions settings/templates/apps.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@
<div class="app-description-toggle-show"><?php p($l->t("Show description …"));?></div>
<div class="app-description-toggle-hide hidden"><?php p($l->t("Hide description …"));?></div>

<div class="app-dependencies update hidden">
<p><?php p($l->t('This app has an update available.')); ?></p>
</div>

{{#if missingMinOwnCloudVersion}}
<div class="app-dependencies">
<p><?php p($l->t('This app has no minimum ownCloud version assigned. This will be an error in ownCloud 11 and later.')); ?></p>
Expand Down

0 comments on commit 22541b7

Please sign in to comment.