From 54ca2a4b798c1ce31d0eeeef4d363de9a06572d7 Mon Sep 17 00:00:00 2001 From: tworrall Date: Fri, 23 May 2014 11:36:36 -0400 Subject: [PATCH] VIVO-763: display the url type on the manage page --- .../templates/freemarker/edit/forms/addEditWebpageForm.ftl | 2 +- .../freemarker/edit/forms/manageWebpagesForIndividual.ftl | 4 ++-- .../generators/ManageWebpagesForIndividualGenerator.java | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/productMods/templates/freemarker/edit/forms/addEditWebpageForm.ftl b/productMods/templates/freemarker/edit/forms/addEditWebpageForm.ftl index 5912cb61..8b9810d7 100644 --- a/productMods/templates/freemarker/edit/forms/addEditWebpageForm.ftl +++ b/productMods/templates/freemarker/edit/forms/addEditWebpageForm.ftl @@ -69,7 +69,7 @@ - ${label} + <#if editMode="add"> diff --git a/productMods/templates/freemarker/edit/forms/manageWebpagesForIndividual.ftl b/productMods/templates/freemarker/edit/forms/manageWebpagesForIndividual.ftl index c4f0b1d0..c4288518 100644 --- a/productMods/templates/freemarker/edit/forms/manageWebpagesForIndividual.ftl +++ b/productMods/templates/freemarker/edit/forms/manageWebpagesForIndividual.ftl @@ -36,7 +36,8 @@ - ${anchor} + ${anchor} + <#if webpage.typeLabel??>(<#if webpage.typeLabel == "URL">Standard Web Link<#else>${webpage.typeLabel}) ${i18n().edit_capitalized} | @@ -84,4 +85,3 @@ ${scripts.add('', '', '')} - diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageWebpagesForIndividualGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageWebpagesForIndividualGenerator.java index 8911b395..b05f9fe3 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageWebpagesForIndividualGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManageWebpagesForIndividualGenerator.java @@ -94,13 +94,16 @@ public class ManageWebpagesForIndividualGenerator extends BaseEditConfigurationG + "PREFIX core: \n" + "PREFIX vcard: \n" + "PREFIX rdfs: \n" - + "SELECT DISTINCT ?vcard ?link ?url ?label ?rank WHERE { \n" + + "PREFIX vitro: \n" + + "SELECT DISTINCT ?vcard ?link ?url ?label ?rank ?typeLabel WHERE { \n" + " ?subject ?vcard . \n" + " ?vcard vcard:hasURL ?link . \n" + " ?link a vcard:URL \n" + " OPTIONAL { ?link vcard:url ?url } \n" + " OPTIONAL { ?link rdfs:label ?label } \n" + " OPTIONAL { ?link core:rank ?rank } \n" + + " OPTIONAL { ?link vitro:mostSpecificType ?type } \n" + + " OPTIONAL { ?type rdfs:label ?typeLabel } \n" + "} ORDER BY ?rank";