diff --git a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/controller/individual/IndividualResponseBuilder.java b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/controller/individual/IndividualResponseBuilder.java index 3ac23858d..098d8d7c9 100644 --- a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/controller/individual/IndividualResponseBuilder.java +++ b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/controller/individual/IndividualResponseBuilder.java @@ -6,7 +6,6 @@ import java.io.IOException; import java.sql.SQLException; import java.util.HashMap; import java.util.Map; -import java.util.Properties; import org.apache.jena.rdf.model.RDFNode; import edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.IndividualTemplateModelBuilder; @@ -88,6 +87,7 @@ class IndividualResponseBuilder { body.put("verbosePropertySwitch", getVerbosePropertyValues()); addAltMetricOptions(body); + addPlumPrintOptions(body); //Execute data getters that might apply to this individual, e.g. because of the class of the individual try{ @@ -202,6 +202,27 @@ class IndividualResponseBuilder { } } + private void addPlumPrintOptions(Map body) { + ConfigurationProperties properties = ConfigurationProperties.getBean(vreq); + + if (properties != null) { + String enabled = properties.getProperty("resource.plum-print", "enabled"); + String displayTo = properties.getProperty("resource.plum-print.displayto", "right"); + String printHideEmpty = properties.getProperty("resource.plum-print.hide-when-empty", "true"); + String printPopover = properties.getProperty("resource.plum-print.popover", "right"); + String printSize = properties.getProperty("resource.plum-print.size", "medium"); + + if (!"disabled".equalsIgnoreCase(enabled)) { + body.put("plumPrintEnabled", true); + + body.put("plumPrintDisplayTo", displayTo); + body.put("plumPrintHideEmpty", "true".equalsIgnoreCase(printHideEmpty) ? "true" : "false"); + body.put("plumPrintPopover", printPopover); + body.put("plumPrintSize", printSize); + } + } + } + private boolean getTemporalVisualizationFlag() { String property = ConfigurationProperties.getBean(vreq).getProperty( "visualization.temporal"); diff --git a/webapp/src/main/webapp/css/individual/individual-property-groups.css b/webapp/src/main/webapp/css/individual/individual-property-groups.css index 7b97e5d4b..c3ce68ca2 100644 --- a/webapp/src/main/webapp/css/individual/individual-property-groups.css +++ b/webapp/src/main/webapp/css/individual/individual-property-groups.css @@ -19,7 +19,7 @@ section.property-group h2 { top: 8px; /* changed for redesign, was 0 */ right: 12px; /* changed for redesign, was -21px;*/ } -section.property-group div { +section.property-group > div { margin-top:15px; /* display:none; */ }