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.
|
// 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.
|
// 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) {
|
public static void getFreeMarkerComponentsForJsp(HttpServletRequest request, HttpServletResponse response) {
|
||||||
System.out.println("IN getFreeMarkerComponentsForJsp");
|
|
||||||
FreeMarkerComponentGenerator fcg = new FreeMarkerComponentGenerator(request, response);
|
FreeMarkerComponentGenerator fcg = new FreeMarkerComponentGenerator(request, response);
|
||||||
request.setAttribute("ftl_identity", fcg.getIdentity());
|
request.setAttribute("ftl_identity", fcg.getIdentity());
|
||||||
request.setAttribute("ftl_menu", fcg.getMenu());
|
request.setAttribute("ftl_menu", fcg.getMenu());
|
||||||
|
|
|
@ -26,14 +26,14 @@ public class FreeMarkerSetup implements ServletContextListener {
|
||||||
Configuration cfg = new Configuration();
|
Configuration cfg = new Configuration();
|
||||||
|
|
||||||
// Specify the data source where the template files come from.
|
// 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 {
|
// try {
|
||||||
// cfg.setDirectoryForTemplateLoading(new File(templatePath));
|
// cfg.setDirectoryForTemplateLoading(new File(templatePath));
|
||||||
// } catch (IOException e) {
|
// } catch (IOException e) {
|
||||||
// log.error("Error specifying template directory.");
|
// 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");
|
String buildEnv = ConfigurationProperties.getProperty("Environment.build");
|
||||||
if (buildEnv != null && buildEnv.equals("development")) {
|
if (buildEnv != null && buildEnv.equals("development")) {
|
||||||
cfg.setTemplateUpdateDelay(0); // no template caching in development
|
cfg.setTemplateUpdateDelay(0); // no template caching in development
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class UrlBuilder {
|
||||||
BROWSE("/browse"),
|
BROWSE("/browse"),
|
||||||
CONTACT("/contact"),
|
CONTACT("/contact"),
|
||||||
INDIVIDUAL("/individual"),
|
INDIVIDUAL("/individual"),
|
||||||
INDIVIDUAL_LIST("/individuallist"), // individuallist entitylist
|
INDIVIDUAL_LIST("/entitylist"), // entitylist individuallist
|
||||||
SEARCH("/search"),
|
SEARCH("/search"),
|
||||||
TERMS_OF_USE("/termsOfUse"),
|
TERMS_OF_USE("/termsOfUse"),
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class IndividualView extends ViewObject {
|
||||||
// getEditUrl(), getDeleteUrl() to return the links computed by PropertyEditLinks.
|
// getEditUrl(), getDeleteUrl() to return the links computed by PropertyEditLinks.
|
||||||
// RY **** Need to account for everything in URLRewritingHttpServlet
|
// RY **** Need to account for everything in URLRewritingHttpServlet
|
||||||
public String getProfileUrl() {
|
public String getProfileUrl() {
|
||||||
return getUrl("/individual/" + individual.getLocalName());
|
return getUrl(PATH + "/" + individual.getLocalName());
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSearchView() {
|
public String getSearchView() {
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
<#if message??>
|
<#if message??>
|
||||||
<p>${message}</p>
|
<p>${message}</p>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- RY NEED TO ACCOUNT FOR p:process stuff -->
|
|
||||||
<ul>
|
<ul>
|
||||||
<#list individuals as individual>
|
<#list individuals as individual>
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -2,13 +2,14 @@
|
||||||
|
|
||||||
<#-- Default individual search view -->
|
<#-- Default individual search view -->
|
||||||
|
|
||||||
<#import "/macros/list.ftl" as l>
|
<#import "/lib/list.ftl" as l>
|
||||||
|
|
||||||
<a href="${individual.profileUrl}">${individual.name}</a>
|
<a href="${individual.profileUrl}">${individual.name}</a>
|
||||||
<ul class="individualData">
|
<ul class="individualData">
|
||||||
<@l.firstLastList>
|
<@l.firstLastList>
|
||||||
<li>${individual.tagline}</li>,
|
<li>${individual.tagline}</li>,
|
||||||
<#list individual.links as link>
|
<#list individual.links as link>
|
||||||
|
${link.setAnchor("Changing Anchor Text")}
|
||||||
<li><a class="externalLink" href="${link.url}">${link.anchor}</a></li>,
|
<li><a class="externalLink" href="${link.url}">${link.anchor}</a></li>,
|
||||||
</#list>
|
</#list>
|
||||||
</@l.firstLastList>
|
</@l.firstLastList>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
<#-- $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">
|
<div id="footer">
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
<#-- $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">
|
<div id="identity">
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue