Display plugin versions

pull/1255/head
0ip 2012-12-04 14:30:30 +01:00
parent ce71002644
commit 1fc5519c86
2 changed files with 8 additions and 0 deletions

View File

@ -113,10 +113,14 @@ $(document).ready(function () {
for (plugin_name in data.results) {
var plugin = data.results[plugin_name];
var row = widget.find(".template tr").clone();
var version = '0.0.0';
for (version in data.results[plugin_name].versions) break;
for (attr in plugin) {
row.find("." + attr).html(plugin[attr]);
}
row.find(".version").html(version);
widget.find(".results").append(row);
}

View File

@ -30,6 +30,7 @@
<tr>
<th>Name</th>
<th>Description</th>
<th>Version</th>
<td></td>
</tr>
</thead>
@ -37,6 +38,7 @@
<tr id="installed-plugin-template">
<td class="name"></td>
<td class="description"></td>
<td class="version"></td>
<td class="actions">
<input type="button" value="Uninstall" class="do-uninstall">
</td>
@ -58,6 +60,7 @@
<tr>
<th>Name</th>
<th>Description</th>
<th>Version</th>
<td></td>
</tr>
</thead>
@ -65,6 +68,7 @@
<tr>
<td class="name"></td>
<td class="description"></td>
<td class="version"></td>
<td class="actions">
<input type="button" value="Install" class="do-install">
</td>