enable type dropdown to have subclasses for new individual page,prevent template errors if no addurl for property, show edit link if only one label and no locales

This commit is contained in:
hudajkhan 2013-11-19 13:24:50 -05:00
parent 35251e89f4
commit d5fa8b0613
2 changed files with 6 additions and 5 deletions

View file

@ -548,7 +548,7 @@ public class EditConfigurationTemplateModel extends BaseTemplateModel {
}
for(VClass rangeVClass : rangeVClasses) {
vclasses.add(rangeVClass);
List<String> subURIs = wdf.getVClassDao().getSubClassURIs(rangeVClass.getURI());
List<String> subURIs = wdf.getVClassDao().getAllSubClassURIs(rangeVClass.getURI());
for (String subClassURI : subURIs) {
VClass subClass = wdf.getVClassDao().getVClassByURI(subClassURI);
if (subClass != null) {

View file

@ -118,7 +118,7 @@ name will be used as the label. -->
</#if>
-->
<#if editable>
<h2 id="${property.localName}">${label} ${addLink!} ${verboseDisplay!}</h2>
<h2 id="${property.localName!}">${label} ${addLink!} ${verboseDisplay!}</h2>
</#if>
</#macro>
@ -134,8 +134,8 @@ name will be used as the label. -->
<#local domainUri = "" />
</#if>
<#if editable>
<#if property.addUrl?has_content>
<#local url = property.addUrl>
<#if url?has_content>
<@showAddLink property.localName label url rangeUri domainUri/>
</#if>
</#if>
@ -274,7 +274,8 @@ name will be used as the label. -->
<#assign labelPropertyUri = ("http://www.w3.org/2000/01/rdf-schema#label"?url) />
<#assign useEditLink = false />
<#--edit link used if in edit mode and only one label and one language-->
<#if labelCount = 1 && editable && localesCount = 1 >
<#--locales count may be 0 in case where no languages/selectable locales are specified-->
<#if labelCount = 1 && editable && (localesCount >= 0) >
<#assign useEditLink = true/>
</#if>
<#local label = individual.nameStatement>