mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Merge pull request #1057 from KevinVdV/DS-2701-service-api-jspui-search-browse
[DS-2701-service-api-jspui-search-browse] Migrating the search & brow…
This commit is contained in:
@@ -233,6 +233,7 @@ public class DiscoverySearchRequestProcessor implements SearchRequestProcessor
|
||||
HttpServletResponse response) throws SearchProcessorException,
|
||||
IOException, ServletException
|
||||
{
|
||||
init();
|
||||
List<Item> resultsItems;
|
||||
List<Collection> resultsCollections;
|
||||
List<Community> resultsCommunities;
|
||||
@@ -514,6 +515,7 @@ public class DiscoverySearchRequestProcessor implements SearchRequestProcessor
|
||||
public void doItemMapSearch(Context context, HttpServletRequest request,
|
||||
HttpServletResponse response) throws SearchProcessorException, ServletException, IOException
|
||||
{
|
||||
init();
|
||||
String queryString = (String) request.getParameter("query");
|
||||
Collection collection = (Collection) request.getAttribute("collection");
|
||||
int page = UIUtil.getIntParameter(request, "page")-1;
|
||||
|
@@ -70,11 +70,11 @@
|
||||
|
||||
if (community != null)
|
||||
{
|
||||
scope = "\"" + community.getMetadata("name") + "\"";
|
||||
scope = "\"" + community.getName() + "\"";
|
||||
}
|
||||
if (collection != null)
|
||||
{
|
||||
scope = "\"" + collection.getMetadata("name") + "\"";
|
||||
scope = "\"" + collection.getName() + "\"";
|
||||
}
|
||||
|
||||
type = bix.getName();
|
||||
|
@@ -48,14 +48,14 @@
|
||||
{
|
||||
collection = (Collection) bi.getBrowseContainer();
|
||||
}
|
||||
|
||||
|
||||
if (community != null)
|
||||
{
|
||||
scope = "\"" + community.getMetadata("name") + "\"";
|
||||
scope = "\"" + community.getName() + "\"";
|
||||
}
|
||||
if (collection != null)
|
||||
{
|
||||
scope = "\"" + collection.getMetadata("name") + "\"";
|
||||
scope = "\"" + collection.getName() + "\"";
|
||||
}
|
||||
|
||||
type = bix.getName();
|
||||
|
@@ -407,9 +407,9 @@
|
||||
<%
|
||||
|
||||
DiscoverResult qResults = (DiscoverResult)request.getAttribute("queryresults");
|
||||
Item [] items = (Item[] )request.getAttribute("items");
|
||||
Community [] communities = (Community[] )request.getAttribute("communities");
|
||||
Collection[] collections = (Collection[])request.getAttribute("collections");
|
||||
List<Item> items = (List<Item> )request.getAttribute("items");
|
||||
List<Community> communities = (List<Community> )request.getAttribute("communities");
|
||||
List<Collection>collections = (List<Collection>)request.getAttribute("collections");
|
||||
|
||||
if( error )
|
||||
{
|
||||
@@ -531,21 +531,21 @@ else if( qResults != null)
|
||||
<!-- give a content to the div -->
|
||||
</div>
|
||||
<div class="discovery-result-results">
|
||||
<% if (communities.length > 0 ) { %>
|
||||
<% if (communities.size() > 0 ) { %>
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading"><fmt:message key="jsp.search.results.comhits"/></div>
|
||||
<dspace:communitylist communities="<%= communities %>" />
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<% if (collections.length > 0 ) { %>
|
||||
<% if (collections.size() > 0 ) { %>
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading"><fmt:message key="jsp.search.results.colhits"/></div>
|
||||
<dspace:collectionlist collections="<%= collections %>" />
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<% if (items.length > 0) { %>
|
||||
<% if (items.size() > 0) { %>
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading"><fmt:message key="jsp.search.results.itemhits"/></div>
|
||||
<dspace:itemlist items="<%= items %>" authorLimit="<%= etAl %>" />
|
||||
@@ -553,7 +553,7 @@ else if( qResults != null)
|
||||
<% } %>
|
||||
</div>
|
||||
<%-- if the result page is enought long... --%>
|
||||
<% if ((communities.length + collections.length + items.length) > 10) {%>
|
||||
<% if ((communities.size() + collections.size() + items.size()) > 10) {%>
|
||||
<%-- show again the navigation info/links --%>
|
||||
<div class="discovery-result-pagination row container">
|
||||
<%-- <p align="center">Results <//%=qResults.getStart()+1%>-<//%=qResults.getStart()+qResults.getHitHandles().size()%> of --%>
|
||||
|
Reference in New Issue
Block a user