Skip to content

Commit

Permalink
Merge pull request #6164 from IQSS/6161-basic-search-functionality
Browse files Browse the repository at this point in the history
6161 return basic search functionality
  • Loading branch information
kcondon authored Sep 12, 2019
2 parents d8e3230 + 2d5b9f6 commit 9f41601
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public class SearchIncludeFragment implements java.io.Serializable {
*
* see also https://trello.com/c/jmry3BJR/28-browse-dataverses
*/
public String searchRedirect(String dataverseRedirectPage) {
public String searchRedirect(String dataverseRedirectPage, Dataverse dataverseIn) {
/**
* These are our decided-upon search/browse rules, the way we expect
* users to search/browse and how we want the app behave:
Expand Down Expand Up @@ -206,7 +206,8 @@ public String searchRedirect(String dataverseRedirectPage) {
* selections and what page you are on should be preserved.
*
*/


dataverse = dataverseIn;
dataverseRedirectPage = StringUtils.isBlank(dataverseRedirectPage) ? "dataverse.xhtml" : dataverseRedirectPage;
String optionalDataverseScope = "&alias=" + dataverse.getAlias();

Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/search-include-fragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<h:form>
<p:inputText id="searchBasic" styleClass="search-input" size="40" value="#{SearchIncludeFragment.query}" onkeypress="if (event.keyCode == 13) { submitsearch(); return false; }"/>
<p:watermark for="searchBasic" value="#{dataverseRedirectPage == 'dataverseuser.xhtml' ? bundle['account.search.input.watermark'] : bundle['dataverse.search.input.watermark']}"/>
<p:commandLink id="searchbutton" styleClass="btn btn-default" action="#{SearchIncludeFragment.searchRedirect(dataverseRedirectPage)}">
<p:commandLink id="searchbutton" styleClass="btn btn-default" action="#{SearchIncludeFragment.searchRedirect(dataverseRedirectPage, DataversePage.dataverse)}">
<span class="glyphicon glyphicon-search"/> #{bundle['dataverse.search.btn.find']}
</p:commandLink>
<p:remoteCommand name="submitsearch" action="#{SearchIncludeFragment.searchRedirect(dataverseRedirectPage)}"/>
<p:remoteCommand name="submitsearch" action="#{SearchIncludeFragment.searchRedirect(dataverseRedirectPage, DataversePage.dataverse)}"/>
<h:outputLink id="advsearchlink" value="#{widgetWrapper.wrapURL('/search/advanced.xhtml')}">
<f:param name="dataverseIdentifier" value="#{SearchIncludeFragment.dataverse.alias}"/>
<h:outputText value="#{bundle['dataverse.search.advancedSearch']}"/>
Expand Down

0 comments on commit 9f41601

Please sign in to comment.