NIHVIVO-2893 Add a Cancel link to the "
This commit is contained in:
parent
0e3d374e25
commit
00f146c992
2 changed files with 7 additions and 1 deletions
|
@ -269,6 +269,7 @@ public class FreemarkerHttpServlet extends VitroHttpServlet {
|
|||
urls.put("theme", UrlBuilder.getUrl(themeDir));
|
||||
urls.put("index", UrlBuilder.getUrl("/browse"));
|
||||
urls.put("currentPage", getCurrentPageUrl(vreq));
|
||||
urls.put("referringPage", getReferringPageUrl(vreq));
|
||||
|
||||
if (PolicyHelper.isAuthorizedForActions(vreq, new EditOwnAccount())) {
|
||||
urls.put("myAccount", UrlBuilder.getUrl("/accounts/myAccount"));
|
||||
|
@ -286,6 +287,11 @@ public class FreemarkerHttpServlet extends VitroHttpServlet {
|
|||
path = normalizeServletName(path);
|
||||
return UrlBuilder.getUrl(path);
|
||||
}
|
||||
|
||||
private String getReferringPageUrl(HttpServletRequest request) {
|
||||
String referrer = request.getHeader("referer");
|
||||
return (referrer == null) ? UrlBuilder.getHomeUrl() : referrer;
|
||||
}
|
||||
|
||||
protected TemplateModel wrap(Object obj, int exposureLevel) throws TemplateModelException {
|
||||
BeansWrapper wrapper = getBeansWrapper(exposureLevel);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue