aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-11-12 12:58:13 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-11-12 12:58:13 +0000
commit5e0b1df35374b71e7c921188956c4a1f7801f50d (patch)
tree3215ca6daa038013e339773c9b22166af299e19b
parentda452e7b81596b9138641bddca776c00247eb4aa (diff)
Include version number on admin config page.
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm7
-rw-r--r--templates/web/default/admin/config_page.html4
2 files changed, 10 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index 3623348ff..ab6e9ea1f 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -138,6 +138,13 @@ sub index : Path : Args(0) {
}
sub config_page : Path( 'config' ) : Args(0) {
+ my ($self, $c) = @_;
+ my $dir = $c->stash->{additional_template_paths}->[0];
+ my $git_version = `cd $dir && git describe --tags`;
+ chomp $git_version;
+ $c->stash(
+ git_version => $git_version,
+ );
}
sub timeline : Path( 'timeline' ) : Args(0) {
diff --git a/templates/web/default/admin/config_page.html b/templates/web/default/admin/config_page.html
index 959dcc422..77a8be4b1 100644
--- a/templates/web/default/admin/config_page.html
+++ b/templates/web/default/admin/config_page.html
@@ -24,7 +24,9 @@
</tr>
[% END %]
-<p>A summary of this site's configuration.</p>
+<p>A summary of this site's configuration,
+running version <strong>[% git_version || 'unknown' %]</strong>.
+</p>
<table>
<tr><th>Variable</th>