Commit b01bcc92 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

1256: Migrate extended search

Task-Url: https://pm.winseda.de/issues/1256
parent 02597c3f
......@@ -6,29 +6,26 @@
<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>
<li class="active"><s:message code="~eu.dariah.de.minfba.search.view.titles.extended_search" /></li>
</ul>
<div id="main-content">
<div class="container<c:if test="${fluidLayout==true}">-fluid</c:if>">
<div class="row">
<div class="col-lg-12">
<h2 class="pull-left">
<s:message code="~eu.dariah.de.minfba.search.view.titles.extended_search" />
</h2>
<div class="col-12">
<h1><s:message code="~eu.dariah.de.minfba.search.view.titles.extended_search" /></h1>
</div>
<div id="search-facets-container" class="col-lg-12"></div>
<div class="col-lg-12">
<div class="pull-right">
<button onClick="queryHandler.insertSearchFacet();" class="btn btn-default btn-sm"><s:message code="~eu.dariah.de.minfba.search.view.labels.add_facet" /></button>
<button onClick="queryHandler.doSearch();" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-search"></span></button>
<div id="search-facets-container" class="col-12"></div>
<div class="col-12">
<div class="float-right">
<button onClick="queryHandler.insertSearchFacet();" class="btn btn-primary"><s:message code="~eu.dariah.de.minfba.search.view.labels.add_facet" /></button>
<button onClick="queryHandler.doSearch();" class="btn btn-primary"><i class="fas fa-search"></i></button>
</div>
<p class="mt-1 float-left">
<a href='<s:url value="/search/simple/"></s:url>' target="_self"><s:message code="~eu.dariah.de.minfba.search.view.titles.simple_search" /></a>
</p>
</div>
<div class="col-lg-12">
<div class="col-12">
<%@ include file="incl/applied_filters_container.jsp" %>
</div>
<div class="col-lg-12">
<div class="col-12">
<%@ include file="incl/tabs_results.jsp" %>
</div>
</div>
......
......@@ -2,12 +2,11 @@
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<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>
<nav class="sidebar-block pb-2">
<h2><s:message code="~eu.dariah.de.minfba.search.options.structures" /></h2>
<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>
......@@ -18,22 +17,21 @@
<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">
</div> -->
</c:if>
</div>
</c:when>
</nav>
</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
......@@ -3,13 +3,9 @@
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<div id="facets${index}" class="search-facet" style="margin: 8px 0; overflow: hidden;">
<input type="hidden" class="facet-fieldselect-hiddenindex" value="${index}" />
<div class="col-md-1">
<a onclick="queryHandler.removeSearchFacet(this);" class="btn btn-link btn-remove-search-facet"><span class="glyphicon glyphicon-trash"></span></a>
</div>
<div class="col-md-5">
<select name="facets[${index}].elementId" id="facets${index}.elementId" class="form-control col-md-6 search-facet-element">
<div id="facets${index}" class="search-facet d-flex">
<div class="flex-grow-1">
<select name="facets[${index}].elementId" id="facets${index}.elementId" class="form-control search-facet-element">
<c:forEach items="${availableFacets}" var="availFacet">
<c:choose>
<c:when test="${availFacet.elementId==facet.elementId}">
......@@ -23,8 +19,12 @@
</c:forEach>
</select>
</div>
<div class="col-md-6">
<input onkeypress="if (event.which==13) { queryHandler.doSearch(); }" name="facets[${index}].value" id="facets${index}.value" class="form-control col-md-6 search-facet-expression" type="text" placeholder="<s:message code="~eu.dariah.de.minfba.search.view.labels.query_expression" />" value="${facet.value}" />
<div class="flex-grow-1 pl-2">
<input onkeypress="if (event.which==13) { queryHandler.doSearch(); }" name="facets[${index}].value" id="facets${index}.value" class="form-control search-facet-expression" type="text" placeholder="<s:message code="~eu.dariah.de.minfba.search.view.labels.query_expression" />" value="${facet.value}" />
</div>
<div class="mt-2">
<input type="hidden" class="facet-fieldselect-hiddenindex" value="${index}" />
<a onclick="queryHandler.removeSearchFacet(this);" class="btn btn-link btn-remove-search-facet"><i class="far fa-times-circle fa-color-danger"></i></a>
</div>
<!-- <div class="col-md-2">
<label class="checkbox"><input type="checkbox" value="false" name="search-facet-not-${index}" class="search-facet-not-flag"><s:message code="~eu.dariah.de.minfba.search.view.labels.not" /></label>
......
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<div class="col-12">
<div class="search-results-image" id="search-results-image-~{index}">
<div class="no-preview-overlay">
<s:message code="~eu.dariah.de.minfba.search.view.result.resources.no_preview" />
</div>
<div id="search-results-image-carousel-~{index}" class="carousel slide hide" data-interval="false">
<div class="carousel-inner" role="listbox"></div>
<!-- Controls -->
<a class="left carousel-control" href="#search-results-image-carousel-~{index}" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#search-results-image-carousel-~{index}" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div style="margin-left: 170px;">
<div class="panel panel-search-result search-results-resource-item">
<div class="panel-heading">
<div class="search-results-resources-collection">~{datasource}<span class="score pull-right">~{score}</span></div>
<!-- <h3 class="panel-title"><a href='<s:url value="/item/~{type}/~{resultId}/" />'>~{title} <i class="fa fa-link" aria-hidden="true"></i></a></h3> -->
<h3 class="panel-title">~{title}</h3>
</div>
<div class="panel-body">
<div>
~{link}
<div class="search-result-objects" id="search-result-objects-~{index}">
</div>
<div class="panel-group search-result-subpanel" id="search-results-content-~{index}-accordion">
<div class="panel panel-default">
<div class="panel-heading">
<a class="collapsed" data-toggle="collapse" data-parent="search-results-content-~{index}-accordion" href="#search-results-content-~{index}-body">
<s:message code="~eu.dariah.de.minfba.search.view.result.resources.content" />
</a>
</div>
<div style="height: 0px;" id="search-results-content-~{index}-body" class="panel-collapse collapse">
<div class="panel-body">~{snippet}</div>
</div>
</div>
</div>
<div class="panel-group search-result-subpanel original-data-panel" id="search-results-original-~{index}-accordion">
<div class="panel panel-default">
<div class="panel-heading">
<a class="collapsed" data-toggle="collapse" data-parent="search-results-original-~{index}-accordion" href="#search-results-original-~{index}-body">
<s:message code="~eu.dariah.de.minfba.search.view.result.original.content" />
</a>
</div>
<div style="height: 0px;" id="search-results-original-~{index}-body" class="panel-collapse collapse">
<div class="panel-body">~{original}</div>
</div>
</div>
</div>
<c:if test="${explain}">
<div class="panel-group search-result-subpanel"
id="search-results-resources-~{index}-accordion">
<div class="panel panel-default">
<div class="panel-heading">
<a class="collapsed" data-toggle="collapse" data-parent="search-results-resources-~{index}-accordion" href="#search-results-resources-~{index}-body">
<s:message code="~eu.dariah.de.minfba.search.view.result.resources.explanation" />
</a>
</div>
<div style="height: 0px;" id="search-results-resources-~{index}-body" class="panel-collapse collapse">
<div class="panel-body">~{explanation}</div>
</div>
</div>
</div>
</c:if>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -19,7 +19,7 @@
<button id="btn-exec-search" class="btn btn-primary" value="true" name="exec-search" type="submit"><i class="fas fa-search"></i></button>
</div>
</div>
<p class="text-right mt-1">
<p class="mt-1">
<a href='<s:url value="/search/extended/"></s:url>' target="_self"><s:message code="~eu.dariah.de.minfba.search.view.titles.extended_search" /></a>
</p>
</div>
......
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