Merge pull request #1255 from 0ip/feature/show-pl-version
Display plugin version numbers in /admin/plugins
This commit is contained in:
commit
2f37afac66
2 changed files with 9 additions and 0 deletions
|
@ -113,10 +113,15 @@ $(document).ready(function () {
|
||||||
for (plugin_name in data.results) {
|
for (plugin_name in data.results) {
|
||||||
var plugin = data.results[plugin_name];
|
var plugin = data.results[plugin_name];
|
||||||
var row = widget.find(".template tr").clone();
|
var row = widget.find(".template tr").clone();
|
||||||
|
var version = '0.0.0';
|
||||||
|
// hack to access "versions" property of the npm package object
|
||||||
|
for (version in data.results[plugin_name].versions) break;
|
||||||
|
|
||||||
for (attr in plugin) {
|
for (attr in plugin) {
|
||||||
row.find("." + attr).html(plugin[attr]);
|
row.find("." + attr).html(plugin[attr]);
|
||||||
}
|
}
|
||||||
|
row.find(".version").html(version);
|
||||||
|
|
||||||
widget.find(".results").append(row);
|
widget.find(".results").append(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
|
<th>Version</th>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -37,6 +38,7 @@
|
||||||
<tr id="installed-plugin-template">
|
<tr id="installed-plugin-template">
|
||||||
<td class="name"></td>
|
<td class="name"></td>
|
||||||
<td class="description"></td>
|
<td class="description"></td>
|
||||||
|
<td class="version"></td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
<input type="button" value="Uninstall" class="do-uninstall">
|
<input type="button" value="Uninstall" class="do-uninstall">
|
||||||
</td>
|
</td>
|
||||||
|
@ -58,6 +60,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
|
<th>Version</th>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -65,6 +68,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name"></td>
|
<td class="name"></td>
|
||||||
<td class="description"></td>
|
<td class="description"></td>
|
||||||
|
<td class="version"></td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
<input type="button" value="Install" class="do-install">
|
<input type="button" value="Install" class="do-install">
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Reference in a new issue