NIHVIVO-2449 Display preferred title on individuallist page

This commit is contained in:
ryounes 2011-07-05 23:03:51 +00:00
parent 977d859cd6
commit fface83a87
2 changed files with 38 additions and 0 deletions

View file

@ -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). -->
<a href="${individual.profileUrl}">${individual.name}</a>
<#if individual.preferredTitle?has_content>${individual.preferredTitle}</#if>
<#-- add display of web pages -->

View file

@ -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
}