Commit 2c0a6995 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

977: Limit queries to custom search to predefined datamodel

Task-Url: https://pm.winseda.de/issues/977
parent 36bc7aaf
......@@ -56,6 +56,21 @@
<sf:errors path="prefix" cssClass="error" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="group_name"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.datamodel" />:</label>
<div class="col-sm-10 checkbox">
<label>
<sf:checkbox path="isDatamodelFixed" onchange="$(this).prop('checked') ? $('#datamodelId').removeProp('disabled') : $('#datamodelId').prop('disabled', 'disabled')" /> <s:message code="~eu.dariah.de.minfba.search.model.custom_search.has_datamodel" />?
</label>
</div>
</div>
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2">
<sf:select disabled="${!cs.isDatamodelFixed}" cssClass="form-control" path="datamodelId" items="${datamodels}" itemLabel="name" itemValue="id" />
</div>
</div>
<legend><s:message code="~eu.dariah.de.minfba.search.view.custom_search.view.theming" /></legend>
<div class="form-group">
<label class="control-label col-sm-2" for="userCollectionPojo_darkThemeColor"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.theme_dark_color" />:</label>
<div class="col-sm-2">
......
......@@ -81,6 +81,10 @@
<th style="white-space: nowrap;"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.prefix" />:</th>
<td><span id="user-collection-detail-uri_prefix"></span></td>
</tr>
<tr>
<th style="white-space: nowrap;"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.datamodel" />:</th>
<td><span id="user-collection-detail-datamodel"></span></td>
</tr>
<tr>
<th style="white-space: nowrap;"><s:message code="~eu.dariah.de.minfba.search.model.custom_search.theme_dark_color" />:</th>
<td><span id="user-collection-detail-dark_color"></span></td>
......
......@@ -4,7 +4,7 @@
<tiles:importAttribute name="fluidLayout" />
<input type="hidden" id="customSearchPrefix" value="${customSearch!=null ? customSearch.uriPrefix : null}" />
<input type="hidden" id="customSearchPrefix" value="${customSearch!=null ? customSearch.prefix : null}" />
<ul class="breadcrumb">
<li class="active"><s:message code="~eu.dariah.de.minfba.search.view.titles.generic_search" /></li>
......
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<div class="list-group options active">
<h4 class="sidebar-title"><s:message code="~eu.dariah.de.minfba.search.options.extended" /></h4>
<c:if test="${schemas!=null}">
<div class="list-group-item">
<label class="control-label" for="schemaId"><s:message code="~eu.dariah.de.minfba.search.options.structures" /></label>
<select class="form-control" id="schemaId" name="schemaId">
<c:forEach items="${schemas}" var="s">
<c:choose>
<c:when test="${s.schemaId==selectedModel}">
<c:set var="selected">selected="selected"</c:set>
</c:when>
<c:otherwise>
<c:set var="selected"></c:set>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${datamodelFixed==null || datamodelFixed==false}">
<div class="list-group options active">
<h4 class="sidebar-title"><s:message code="~eu.dariah.de.minfba.search.options.extended" /></h4>
<c:if test="${schemas!=null}">
<div class="list-group-item">
<label class="control-label" for="schemaId"><s:message code="~eu.dariah.de.minfba.search.options.structures" /></label>
<select class="form-control" id="schemaId" name="schemaId">
<c:forEach items="${schemas}" var="s">
<c:choose>
<c:when test="${s.schemaId==selectedModel}">
<c:set var="selected">selected="selected"</c:set>
</c:when>
<c:otherwise>
<c:set var="selected"></c:set>
</c:otherwise>
</c:choose>
<option ${selected} value="${s.schemaId}">
${s.label}
</option>
</c:forEach>
</select>
</div>
<!-- <div id="facet-schema-info" class="list-group-item">
<option ${selected} value="${s.schemaId}">
${s.label}
</option>
</c:forEach>
</select>
</div> -->
</c:if>
</div>
<!-- <div id="facet-schema-info" class="list-group-item">
</div> -->
</c:if>
</div>
<%@ include file="simple_options.jsp" %>
</c:when>
<c:otherwise>
<input type="hidden" id="schemaId" value="${selectedModel}" />
</c:otherwise>
</c:choose>
<%@ include file="simple_options.jsp" %>
\ No newline at end of file
......@@ -4,7 +4,7 @@
<tiles:importAttribute name="fluidLayout" />
<input type="hidden" id="customSearchPrefix" value="${customSearch!=null ? customSearch.uriPrefix : null}" />
<input type="hidden" id="customSearchPrefix" value="${customSearch!=null ? customSearch.prefix : null}" />
<ul class="breadcrumb">
<li class="active"><s:message code="~eu.dariah.de.minfba.search.view.titles.generic_search" /></li>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment