Skip to content

Commit

Permalink
updated plugin tab labels, and added out of date plugin count
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Aug 2, 2016
1 parent 0f60245 commit 077f905
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
6 changes: 6 additions & 0 deletions src/controllers/admin/plugins.js
Expand Up @@ -37,6 +37,12 @@ pluginsController.get = function(req, res, next) {
installed: payload.compatible.filter(function(plugin) {
return plugin.installed;
}),
upgradeCount: payload.compatible.reduce(function(count, current) {
if (current.installed && current.outdated) {
++count;
}
return count;
}, 0),
download: payload.compatible.filter(function(plugin) {
return !plugin.installed;
}),
Expand Down
17 changes: 10 additions & 7 deletions src/views/admin/extend/plugins.tpl
@@ -1,8 +1,11 @@
<ul class="nav nav-pills">
<li class="active"><a href="#installed" data-toggle="tab">Installed Plugins</a></li>
<li><a href="#active" data-toggle="tab">Active Plugins</a></li>
<li><a href="#download" data-toggle="tab">Download Plugins</a></li>
<li><a href="#upgrade" data-toggle="tab">Upgradable Plugins</a></li>
<li class="active"><a href="#installed" data-toggle="tab">Installed</a></li>
<li><a href="#active" data-toggle="tab">Active</a></li>
<li><a href="#upgrade" data-toggle="tab">
Out of Date
<span class="badge">{../upgradeCount}</span>
</a></li>
<li><a href="#download" data-toggle="tab">Find Plugins</a></li>
</ul>
<br />

Expand All @@ -19,16 +22,16 @@
<div class="tab-pane fade" id="active">
<ul class="active"></ul>
</div>
<div class="tab-pane fade" id="upgrade">
<ul class="upgrade"></ul>
</div>
<div class="tab-pane fade" id="download">
<ul class="download">
<!-- BEGIN download -->
<!-- IMPORT admin/partials/download_plugin_item.tpl -->
<!-- END download -->
</ul>
</div>
<div class="tab-pane fade" id="upgrade">
<ul class="upgrade"></ul>
</div>
</div>
</div>

Expand Down

0 comments on commit 077f905

Please sign in to comment.