No Jira issue. Add tooltips to object property labels by pulling in the public description of th eproperty.
This commit is contained in:
parent
f993cf85ab
commit
3fdc17d16d
2 changed files with 10 additions and 4 deletions
|
@ -81,6 +81,7 @@ public abstract class ObjectPropertyTemplateModel extends PropertyTemplateModel
|
||||||
private PropertyListConfig config;
|
private PropertyListConfig config;
|
||||||
private String objectKey;
|
private String objectKey;
|
||||||
private String sortDirection;
|
private String sortDirection;
|
||||||
|
private String publicDescription;
|
||||||
private int displayLimit;
|
private int displayLimit;
|
||||||
|
|
||||||
ObjectPropertyTemplateModel(ObjectProperty op, Individual subject, VitroRequest vreq,
|
ObjectPropertyTemplateModel(ObjectProperty op, Individual subject, VitroRequest vreq,
|
||||||
|
@ -92,6 +93,7 @@ public abstract class ObjectPropertyTemplateModel extends PropertyTemplateModel
|
||||||
sortDirection = op.getDomainEntitySortDirection();
|
sortDirection = op.getDomainEntitySortDirection();
|
||||||
domainUri = op.getDomainVClassURI();
|
domainUri = op.getDomainVClassURI();
|
||||||
rangeUri = op.getRangeVClassURI();
|
rangeUri = op.getRangeVClassURI();
|
||||||
|
publicDescription = op.getPublicDescription();
|
||||||
displayLimit = op.getDomainDisplayLimit();
|
displayLimit = op.getDomainDisplayLimit();
|
||||||
|
|
||||||
// Get the config for this object property
|
// Get the config for this object property
|
||||||
|
@ -182,6 +184,10 @@ public abstract class ObjectPropertyTemplateModel extends PropertyTemplateModel
|
||||||
return displayLimit;
|
return displayLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPublicDescription() {
|
||||||
|
return publicDescription;
|
||||||
|
}
|
||||||
|
|
||||||
public ConfigError checkQuery(String queryString) {
|
public ConfigError checkQuery(String queryString) {
|
||||||
if (StringUtils.isBlank(queryString)) {
|
if (StringUtils.isBlank(queryString)) {
|
||||||
return ConfigError.NO_SELECT_QUERY;
|
return ConfigError.NO_SELECT_QUERY;
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
Assumes property is non-null. -->
|
Assumes property is non-null. -->
|
||||||
<#macro objectPropertyListing property editable template=property.template>
|
<#macro objectPropertyListing property editable template=property.template>
|
||||||
<#local localName = property.localName>
|
<#local localName = property.localName>
|
||||||
<h2 id="${localName}" class="mainPropGroup">${property.name?capitalize} <@addLink property editable /> <@verboseDisplay property /></h2>
|
<h2 id="${localName}" class="mainPropGroup" title="${property.publicDescription!}">${property.name?capitalize} <@addLink property editable /> <@verboseDisplay property /></h2>
|
||||||
<ul id="individual-${localName}" role="list">
|
<ul id="individual-${localName}" role="list">
|
||||||
<@objectProperty property editable />
|
<@objectProperty property editable />
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -114,11 +114,11 @@ name will be used as the label. -->
|
||||||
displayLimitAnnot, for example). Otherwise the display looks odd, since neighboring
|
displayLimitAnnot, for example). Otherwise the display looks odd, since neighboring
|
||||||
properties have labels.
|
properties have labels.
|
||||||
<#if addLink?has_content || verboseDisplay?has_content>
|
<#if addLink?has_content || verboseDisplay?has_content>
|
||||||
<h2 id="${property.localName}">${label} ${addLink!} ${verboseDisplay!}</h2>
|
<h2 id="${property.localName}" title="${property.publicDescription!}">${label} ${addLink!} ${verboseDisplay!}</h2>
|
||||||
</#if>
|
</#if>
|
||||||
-->
|
-->
|
||||||
<#if editable>
|
<#if editable>
|
||||||
<h2 id="${property.localName!}">${label} ${addLink!} ${verboseDisplay!}</h2>
|
<h2 id="${property.localName!}" title="${property.publicDescription!}">${label} ${addLink!} ${verboseDisplay!}</h2>
|
||||||
</#if>
|
</#if>
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ name will be used as the label. -->
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
<#macro propertyLabel property label="${property.name?capitalize}">
|
<#macro propertyLabel property label="${property.name?capitalize}">
|
||||||
<h2 id="${property.localName}">${label} <@verboseDisplay property /></h2>
|
<h2 id="${property.localName}" title="${property.publicDescription!}">${label} <@verboseDisplay property /></h2>
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue