Miscellaneous minor changes for Freemarker implementation. Restored old entitylist instead of new individuallist until url errors in the latter are fixed.
This commit is contained in:
parent
5f5d4b98ac
commit
340970c891
9 changed files with 8 additions and 9 deletions
|
@ -348,7 +348,6 @@ public class FreeMarkerHttpServlet extends VitroHttpServlet {
|
|||
// a FreeMarkerHttpServlet, which will generate identity, menu, and footer from the page template.
|
||||
// It's a static method because it needs to be called from JSPs that don't go through a servlet.
|
||||
public static void getFreeMarkerComponentsForJsp(HttpServletRequest request, HttpServletResponse response) {
|
||||
System.out.println("IN getFreeMarkerComponentsForJsp");
|
||||
FreeMarkerComponentGenerator fcg = new FreeMarkerComponentGenerator(request, response);
|
||||
request.setAttribute("ftl_identity", fcg.getIdentity());
|
||||
request.setAttribute("ftl_menu", fcg.getMenu());
|
||||
|
|
|
@ -26,14 +26,14 @@ public class FreeMarkerSetup implements ServletContextListener {
|
|||
Configuration cfg = new Configuration();
|
||||
|
||||
// Specify the data source where the template files come from.
|
||||
// RY Now being done for each request, in order to support multi-portal apps
|
||||
// and dynamic theme-loading.
|
||||
// try {
|
||||
// cfg.setDirectoryForTemplateLoading(new File(templatePath));
|
||||
// } catch (IOException e) {
|
||||
// log.error("Error specifying template directory.");
|
||||
// }
|
||||
|
||||
// RY This setting won't take effect until we use Configuration.getTemplate() to
|
||||
// create templates.
|
||||
String buildEnv = ConfigurationProperties.getProperty("Environment.build");
|
||||
if (buildEnv != null && buildEnv.equals("development")) {
|
||||
cfg.setTemplateUpdateDelay(0); // no template caching in development
|
||||
|
|
|
@ -28,7 +28,7 @@ public class UrlBuilder {
|
|||
BROWSE("/browse"),
|
||||
CONTACT("/contact"),
|
||||
INDIVIDUAL("/individual"),
|
||||
INDIVIDUAL_LIST("/individuallist"), // individuallist entitylist
|
||||
INDIVIDUAL_LIST("/entitylist"), // entitylist individuallist
|
||||
SEARCH("/search"),
|
||||
TERMS_OF_USE("/termsOfUse"),
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ public class IndividualView extends ViewObject {
|
|||
// getEditUrl(), getDeleteUrl() to return the links computed by PropertyEditLinks.
|
||||
// RY **** Need to account for everything in URLRewritingHttpServlet
|
||||
public String getProfileUrl() {
|
||||
return getUrl("/individual/" + individual.getLocalName());
|
||||
return getUrl(PATH + "/" + individual.getLocalName());
|
||||
}
|
||||
|
||||
public String getSearchView() {
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
<#if message??>
|
||||
<p>${message}</p>
|
||||
<#else>
|
||||
<#-- RY NEED TO ACCOUNT FOR p:process stuff -->
|
||||
<ul>
|
||||
<#list individuals as individual>
|
||||
<li>
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
|
||||
<#-- Default individual search view -->
|
||||
|
||||
<#import "/macros/list.ftl" as l>
|
||||
<#import "/lib/list.ftl" as l>
|
||||
|
||||
<a href="${individual.profileUrl}">${individual.name}</a>
|
||||
<ul class="individualData">
|
||||
<@l.firstLastList>
|
||||
<li>${individual.tagline}</li>,
|
||||
<#list individual.links as link>
|
||||
${link.setAnchor("Changing Anchor Text")}
|
||||
<li><a class="externalLink" href="${link.url}">${link.anchor}</a></li>,
|
||||
</#list>
|
||||
</@l.firstLastList>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#import "/macros/list.ftl" as l>
|
||||
<#import "/lib/list.ftl" as l>
|
||||
|
||||
<div id="footer">
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#import "/macros/list.ftl" as l>
|
||||
<#import "/lib/list.ftl" as l>
|
||||
|
||||
<div id="identity">
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue