summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2012-12-05 05:09:20 -0800
committerMarcel Klehr <mklehr@gmx.net>2012-12-05 05:09:20 -0800
commit2f37afac66d78de75c237a0bd544aea1a5248c46 (patch)
treefcb0acc3ce9d41bd5eac141b5c6a9c717922af99
parent8d0ef88baf3fc815916cef66b8636060209bdb33 (diff)
parent20f13bc8cedb3721d64af6da9214df150959218c (diff)
downloadetherpad-lite-2f37afac66d78de75c237a0bd544aea1a5248c46.zip
Merge pull request #1255 from 0ip/feature/show-pl-version
Display plugin version numbers in /admin/plugins
-rw-r--r--src/static/js/admin/plugins.js5
-rw-r--r--src/templates/admin/plugins.html4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/static/js/admin/plugins.js b/src/static/js/admin/plugins.js
index 93acf6ea..61852028 100644
--- a/src/static/js/admin/plugins.js
+++ b/src/static/js/admin/plugins.js
@@ -113,10 +113,15 @@ $(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';
+ // hack to access "versions" property of the npm package object
+ 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);
}
diff --git a/src/templates/admin/plugins.html b/src/templates/admin/plugins.html
index 3dad3bd0..394cf0e0 100644
--- a/src/templates/admin/plugins.html
+++ b/src/templates/admin/plugins.html
@@ -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>