NIHVIVO-1230 Added stub for version info in FreemarkerHttpServlet and templates
This commit is contained in:
parent
a1e27c5935
commit
9b3ac410c2
3 changed files with 19 additions and 0 deletions
|
@ -435,6 +435,8 @@ public class FreemarkerHttpServlet extends VitroHttpServlet {
|
|||
map.put("bannerImage", UrlBuilder.getUrl(themeDir + "site_icons/" + bannerImage));
|
||||
}
|
||||
|
||||
map.put("version", getVersionInfo());
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -476,6 +478,13 @@ public class FreemarkerHttpServlet extends VitroHttpServlet {
|
|||
}
|
||||
return copyright;
|
||||
}
|
||||
|
||||
private final Map<String, Object> getVersionInfo() {
|
||||
Map<String, Object> version = new HashMap<String, Object>();
|
||||
// Add revision info here
|
||||
version.put("number", "1.2"); // test code - to be removed
|
||||
return version;
|
||||
}
|
||||
|
||||
// Subclasses may override. This serves as a default.
|
||||
protected String getTitle(String siteName) {
|
||||
|
|
|
@ -20,4 +20,5 @@
|
|||
|
||||
All Rights Reserved. <a href="${urls.termsOfUse}">Terms of Use</a>
|
||||
|
||||
<#include "version.ftl">
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Template for version/revision information -->
|
||||
|
||||
<#if loginName??>
|
||||
<div id="version">
|
||||
Version ${version.number}
|
||||
</div>
|
||||
</#if>
|
Loading…
Add table
Add a link
Reference in a new issue