From 7ba91a1698fd2ee046cea08af956a5a4e9997e39 Mon Sep 17 00:00:00 2001 From: rjy7 Date: Thu, 4 Mar 2010 16:01:21 +0000 Subject: [PATCH] Custom short view for Service Activity, minus good date formatting. --- .../WEB-INF/ontologies/user/activity.rdf | 18 ++++ .../entity/serviceActivityShortView.jsp | 90 +++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 productMods/WEB-INF/ontologies/user/activity.rdf create mode 100644 productMods/templates/entity/serviceActivityShortView.jsp diff --git a/productMods/WEB-INF/ontologies/user/activity.rdf b/productMods/WEB-INF/ontologies/user/activity.rdf new file mode 100644 index 00000000..7d326b48 --- /dev/null +++ b/productMods/WEB-INF/ontologies/user/activity.rdf @@ -0,0 +1,18 @@ + + + + + professionalServiceActivityShortView.jsp + + + + personHasServiceActivity.jsp + + + diff --git a/productMods/templates/entity/serviceActivityShortView.jsp b/productMods/templates/entity/serviceActivityShortView.jsp new file mode 100644 index 00000000..3c5d3b64 --- /dev/null +++ b/productMods/templates/entity/serviceActivityShortView.jsp @@ -0,0 +1,90 @@ +<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> +<%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/StringProcessorTag" prefix="p" %> + +<%-- Custom short view for ServiceActivity + + SUBJECT - entity + PREDICATE - predicateUri + OBJECT - individual + +--%> + + + <%-- individual is the OBJECT of the property referenced - in this case, a ServiceActivity object --%> + + + + + <%-- Get the ServiceActivity title --%> + + + <%-- Get the time span of the service activity --%> + <%-- RY FIX the display --%> + + + + + + + + + + + <%-- CASE 1: SUBJECT is Person, OBJECT is ServiceActivity --%> + + <%-- The head object of the short view is the Organization object's name or data property organization name. Get it from the service activity. --%> + + <%-- This ServiceActivity object is linked to an Organization object --%> + + + + + + + <%-- The ServiceActivity object has an organization name data property --%> + + + + + <%-- There's not even an organization name, so just display the title in place of the name --%> + + <%-- don't output title twice --%> + + + + + <%-- CASE 2: SUBJECT is Organization, OBJECT is ServiceActivity --%> + + + + + + + <%-- CASE 3: Other predicate --%> + + + + + + <%-- Create an html link element to the objUri --%> + + + + + + + <%-- Final output --%> + ${openLink}${objName}${closeLink}${title}${timeSpan} + + + <%-- no predicate --%> + + + + + + <%-- no object --%> + + +