VIVO-999: when showing the list of classes that have a restriction on a property, hide the display option select and add class button. When no classes, diplay a message to tht effect.
This commit is contained in:
parent
f078bc4931
commit
4e09f96548
6 changed files with 51 additions and 29 deletions
|
@ -885,3 +885,5 @@ faux_property_capitalized = Faux propiedad
|
|||
faux_property_listing = Lista de faux propiedades
|
||||
faux_property_by_base = Faux propiedades por base propriedad
|
||||
faux_property_alpha = Faux propiedades en orden alfabético
|
||||
|
||||
no_class_restrictions=No hay clases con una restricción de esta propiedad.
|
|
@ -46,10 +46,18 @@ public class ListVClassWebappsController extends FreemarkerHttpServlet {
|
|||
|
||||
body.put("displayOption", "all");
|
||||
body.put("pageTitle", "All Classes");
|
||||
body.put("propertyURI", vreq.getParameter("propertyURI"));
|
||||
if ( vreq.getParameter("propertyType").equals("object") ) {
|
||||
body.put("editController", "propertyEdit?uri=");
|
||||
}
|
||||
else {
|
||||
body.put("editController", "datapropEdit?uri=");
|
||||
}
|
||||
|
||||
List<VClass> classes = null;
|
||||
|
||||
if (vreq.getParameter("showPropertyRestrictions") != null) {
|
||||
body.put("propertyName", vreq.getParameter("propertyName"));
|
||||
PropertyDao pdao = vreq.getLanguageNeutralWebappDaoFactory().getObjectPropertyDao();
|
||||
classes = pdao.getClassesWithRestrictionOnProperty(vreq.getParameter("propertyURI"));
|
||||
} else {
|
||||
|
|
|
@ -898,3 +898,5 @@ faux_property_capitalized = Faux Property
|
|||
faux_property_listing = Faux Property Listing
|
||||
faux_property_by_base = faux properties by base property
|
||||
faux_property_alpha = faux properties alphabetically
|
||||
|
||||
no_class_restrictions=There are no classes with a restriction on this property.
|
|
@ -32,6 +32,8 @@
|
|||
<form action="listVClassWebapps" method="get">
|
||||
<input type="hidden" name="showPropertyRestrictions" value="true"/>
|
||||
<input type="hidden" name="propertyURI" value="${datatypeProperty.URI}"/>
|
||||
<input type="hidden" name="propertyName" value="${datatypeProperty.publicName}"/>
|
||||
<input type="hidden" name="propertyType" value="data"/>
|
||||
<input type="submit" class="form-button" value="Show Classes With a Restriction on This Property"/>
|
||||
</form>
|
||||
<form action="listDataPropertyStatements" method="get">
|
||||
|
|
|
@ -41,6 +41,8 @@
|
|||
<form action="listVClassWebapps" method="get">
|
||||
<input type="hidden" name="showPropertyRestrictions" value="true"/>
|
||||
<input type="hidden" name="propertyURI" value="${property.URI}"/>
|
||||
<input type="hidden" name="propertyName" value="${property.domainPublic}"/>
|
||||
<input type="hidden" name="propertyType" value="object"/>
|
||||
<input type="submit" class="form-button" value="Show Classes With a Restriction on This Property"/>
|
||||
</form>
|
||||
<form action="listObjectPropertyStatements" method="get">
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<section role="region">
|
||||
|
||||
<#if propertyName?? >
|
||||
<h2>Classes with a restriction on <em><a href="${editController}${propertyURI?url}">${propertyName!}</a></em></h2>
|
||||
<br/>
|
||||
<#else>
|
||||
<h2>${pageTitle!}</h2>
|
||||
|
||||
<#if !displayOption?has_content>
|
||||
|
@ -26,8 +29,11 @@
|
|||
<#else>
|
||||
<div id="expandLink"><span id="expandAll" ><a href="#" title="${i18n().expand_all}">${i18n().expand_all}</a></span></div>
|
||||
</#if>
|
||||
</#if>
|
||||
<section id="container">
|
||||
|
||||
<#if propertyName?? && !jsonTree?? >
|
||||
${i18n().no_class_restrictions}
|
||||
</#if>
|
||||
</section>
|
||||
</se ction>
|
||||
<script language="javascript" type="text/javascript" >
|
||||
|
|
Loading…
Add table
Reference in a new issue