diff --git a/productMods/templates/freemarker/body/partials/listedIndividual.ftl b/productMods/templates/freemarker/body/partials/listedIndividual.ftl new file mode 100644 index 00000000..4608907d --- /dev/null +++ b/productMods/templates/freemarker/body/partials/listedIndividual.ftl @@ -0,0 +1,9 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- Display of an individual in a list (/individuallist). --> + +${individual.name} + +<#if individual.preferredTitle?has_content>${individual.preferredTitle} + +<#-- add display of web pages --> \ No newline at end of file diff --git a/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/ListedIndividual.java b/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/ListedIndividual.java new file mode 100644 index 00000000..23921951 --- /dev/null +++ b/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/ListedIndividual.java @@ -0,0 +1,29 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import edu.cornell.mannlib.vitro.webapp.beans.Individual; +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; + +public class ListedIndividual extends BaseListedIndividual { + + private static final Log log = LogFactory.getLog(ListedIndividual.class); + + private static final String CORE = "http://vivoweb.org/ontology/core#"; + + public ListedIndividual(Individual individual, VitroRequest vreq) { + super(individual, vreq); + } + + /* Access methods for templates */ + + public String getPreferredTitle() { + return individual.getDataValue(CORE + "preferredTitle"); + } + + // Add method to get core:webpages + +}