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 String objectKey;
|
||||
private String sortDirection;
|
||||
private String publicDescription;
|
||||
private int displayLimit;
|
||||
|
||||
ObjectPropertyTemplateModel(ObjectProperty op, Individual subject, VitroRequest vreq,
|
||||
|
@ -92,6 +93,7 @@ public abstract class ObjectPropertyTemplateModel extends PropertyTemplateModel
|
|||
sortDirection = op.getDomainEntitySortDirection();
|
||||
domainUri = op.getDomainVClassURI();
|
||||
rangeUri = op.getRangeVClassURI();
|
||||
publicDescription = op.getPublicDescription();
|
||||
displayLimit = op.getDomainDisplayLimit();
|
||||
|
||||
// Get the config for this object property
|
||||
|
@ -182,6 +184,10 @@ public abstract class ObjectPropertyTemplateModel extends PropertyTemplateModel
|
|||
return displayLimit;
|
||||
}
|
||||
|
||||
public String getPublicDescription() {
|
||||
return publicDescription;
|
||||
}
|
||||
|
||||
public ConfigError checkQuery(String queryString) {
|
||||
if (StringUtils.isBlank(queryString)) {
|
||||
return ConfigError.NO_SELECT_QUERY;
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
Assumes property is non-null. -->
|
||||
<#macro objectPropertyListing property editable template=property.template>
|
||||
<#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">
|
||||
<@objectProperty property editable />
|
||||
</ul>
|
||||
|
@ -114,11 +114,11 @@ name will be used as the label. -->
|
|||
displayLimitAnnot, for example). Otherwise the display looks odd, since neighboring
|
||||
properties have labels.
|
||||
<#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 editable>
|
||||
<h2 id="${property.localName!}">${label} ${addLink!} ${verboseDisplay!}</h2>
|
||||
<h2 id="${property.localName!}" title="${property.publicDescription!}">${label} ${addLink!} ${verboseDisplay!}</h2>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
|
@ -152,7 +152,7 @@ name will be used as the label. -->
|
|||
</#macro>
|
||||
|
||||
<#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>
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue