From c5c4ecd394abacaaf1045a341e8fe4311d8464f1 Mon Sep 17 00:00:00 2001 From: ryounes Date: Thu, 7 Jul 2011 20:34:11 +0000 Subject: [PATCH] NIHVIVO-1317 Migrated custom list view from vitro:primaryLink and vitro:additionalLink to core:webpage --- .../web/templatemodels/BaseTemplateModel.java | 3 +- .../web/config/listViewConfig-vitroLink.xml | 41 ------------------- webapp/web/css/individual/individual.css | 6 +-- .../body/individual/individual-vitro.ftl | 3 -- .../individual/propStatement-vitroLink.ftl | 19 --------- .../freemarker/lib/lib-properties.ftl | 34 --------------- 6 files changed, 4 insertions(+), 102 deletions(-) delete mode 100644 webapp/web/config/listViewConfig-vitroLink.xml delete mode 100644 webapp/web/templates/freemarker/body/partials/individual/propStatement-vitroLink.ftl diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/BaseTemplateModel.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/BaseTemplateModel.java index 28f419a76..2a6e12da4 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/BaseTemplateModel.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/BaseTemplateModel.java @@ -22,8 +22,7 @@ public abstract class BaseTemplateModel { this.vreq = vreq; } - // Some BaseTemplateModel classes don't need vreq, so provide an - // argumentless constructor. + // Provide no-arg constructor for types that don't need vreq. protected BaseTemplateModel() { this.vreq = null; }; diff --git a/webapp/web/config/listViewConfig-vitroLink.xml b/webapp/web/config/listViewConfig-vitroLink.xml deleted file mode 100644 index af191eda4..000000000 --- a/webapp/web/config/listViewConfig-vitroLink.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - - SELECT ?link - (afn:localname(?link) AS ?linkName) - ?anchor - ?url WHERE { - ?subject ?property ?link - OPTIONAL { ?link vitro:linkAnchor ?anchor } - OPTIONAL { ?link vitro:linkURL ?url } - OPTIONAL { ?link vitro:linkDisplayRank ?rank } - - FILTER ( bound(?anchor) && bound(?url) ) - - } ORDER BY ?rank - - - - CONSTRUCT { - ?subject ?property ?link . - ?link ?linkProp ?linkObj - } WHERE { - { ?subject ?property ?link } - UNION { - ?subject ?property ?link . - ?link ?linkProp ?linkObj - } - } - - - - diff --git a/webapp/web/css/individual/individual.css b/webapp/web/css/individual/individual.css index 8ed14469d..2957dd98b 100644 --- a/webapp/web/css/individual/individual.css +++ b/webapp/web/css/individual/individual.css @@ -51,7 +51,7 @@ #individual-intro a.icon-rdf { font-size: 1.125em; } -ul#links-additional{ +ul#webpages{ margin-bottom: 5px; } /* <------ INDIVIDUAL INTRO FOR PERSON*/ @@ -169,8 +169,8 @@ ul.individual-emails li { font-size: .875em; line-height: 1.3em; } -ul#links-additional li, -ul#links-primary li, + +ul#webpages li, ul#primary-email li, ul#additional-emails li { word-wrap: break-word; diff --git a/webapp/web/templates/freemarker/body/individual/individual-vitro.ftl b/webapp/web/templates/freemarker/body/individual/individual-vitro.ftl index e7c18f2c5..22fedb356 100644 --- a/webapp/web/templates/freemarker/body/individual/individual-vitro.ftl +++ b/webapp/web/templates/freemarker/body/individual/individual-vitro.ftl @@ -48,9 +48,6 @@ - <#-- Links --> - <@p.vitroLinks propertyGroups namespaces editable /> - <#if individualProductExtension??> ${individualProductExtension} <#else> diff --git a/webapp/web/templates/freemarker/body/partials/individual/propStatement-vitroLink.ftl b/webapp/web/templates/freemarker/body/partials/individual/propStatement-vitroLink.ftl deleted file mode 100644 index ddae44715..000000000 --- a/webapp/web/templates/freemarker/body/partials/individual/propStatement-vitroLink.ftl +++ /dev/null @@ -1,19 +0,0 @@ -<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> - -<#-- Template for vitro:primaryLink and vitro:additionalLink. - - This template must be self-contained and not rely on other variables set for the individual page, because it - is also used to generate the property statement during a deletion. - --> - -<#assign linkText> - <#if statement.anchor??>${statement.anchor} - <#else>${statement.linkName} (no anchor text provided for link) - - - -<#if statement.url??> - ${linkText} -<#else> - ${linkText} (no url provided for link) - \ No newline at end of file diff --git a/webapp/web/templates/freemarker/lib/lib-properties.ftl b/webapp/web/templates/freemarker/lib/lib-properties.ftl index 32e08b53b..abb07ec56 100644 --- a/webapp/web/templates/freemarker/lib/lib-properties.ftl +++ b/webapp/web/templates/freemarker/lib/lib-properties.ftl @@ -184,40 +184,6 @@ name will be used as the label. --> Macros for specific properties ------------------------------------------------------------------------------> -<#-- Vitro namespace links - - Currently the page displays the vitro namespace links properties. Future versions - will use the vivo core ontology links property, eliminating the need for special handling. - - Note that this macro has a side-effect in the calls to propertyGroups.pullProperty(). ---> -<#macro vitroLinks propertyGroups namespaces editable linkListClass="individual-urls"> - <#local primaryLink = propertyGroups.pullProperty("${namespaces.vitro}primaryLink")!> - <#local additionalLinks = propertyGroups.pullProperty("${namespaces.vitro}additionalLink")!> - - <#if (primaryLink?has_content || additionalLinks?has_content)> <#-- true when the property is in the list, even if not populated (when editing) --> - - - - <#-- Image Values for showPlaceholder: "always", "never", "with_add_link"