[VIVO-1315] Plum print integration (#57)
This commit is contained in:
parent
7991bc3da1
commit
6db6fabdac
2 changed files with 23 additions and 2 deletions
|
@ -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<String, Object> 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");
|
||||
|
|
|
@ -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; */
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue