Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Commit

Permalink
always offer search recovery options
Browse files Browse the repository at this point in the history
Rather than only showing the failed search recovery options when there were no search results at all, instead always show these options so that if there were results but those results were not helpful, shows recovery options.
  • Loading branch information
apetro committed Aug 19, 2019
1 parent 3e66929 commit 6dd7571
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 34 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ and this project adheres to

* Removes embedded rest-proxy. Local implementations of uPortal-home needing a
proxy should deploy a proxy alongside rather than within uPortal-home.
* Always shows suggestions for recovering from search not finding what the user
needs, instead of only showing these options when there were no search
results. (There might be results, but those results may not have met the user
need).

## [9.2.0][] - 2019-06-07

Expand Down
2 changes: 1 addition & 1 deletion web/src/main/webapp/css/search-results.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}
}

.no-result {
.other-search-options {
padding: 10px 16px;
}

Expand Down
79 changes: 46 additions & 33 deletions web/src/main/webapp/my-app/search/partials/search-results.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,39 +31,6 @@
<md-tab-body>
<md-content>

<!-- No results and no hope for results;
Offer some failed search recovery suggestions. -->
<div id="no-results" class="search-results-container search-results"
ng-show="!appDirectoryHopeForResults
&& !wiscDirectoryHopeForResults
&& !googleHopeForResults">
<p><strong>No matches.</strong></p>
<p>Suggestions:</p>
<p ng-if="kbSearchUrl">
Search the
<a ng-href="{{kbSearchUrl}}{{searchText}}"
target="_blank" rel="noopener noreferrer">
KnowledgeBase</a>
</p>
<p ng-if="eventsSearchUrl">
Look for
<a ng-href="{{eventsSearchUrl}}{{searchText}}"
target="_blank" rel="noopener noreferrer">
events</a>
</p>
<p ng-if="helpdeskUrl">
Get help from the
<a ng-href="{{helpdeskUrl}}"
target="_blank" rel="noopener noreferrer">
Help Desk</a>
</p>
<p ng-if="feedbackUrl">
<a ng-href="{{feedbackUrl}}"
target="_blank" rel="noopener noreferrer">Give feedback</a>
on {{portal.theme.title}} search
</p>
</div>

<!-- MyUW results -->
<div class="search-results-container">
<marketplace-results></marketplace-results>
Expand All @@ -78,6 +45,52 @@
<div ng-show="googleSearchEnabled" class="search-results-container">
<campus-domain-results></campus-domain-results>
</div>

<!-- Offer some failed search recovery suggestions. -->
<div id="other-search-options"
class="search-results-container search-results">

<h4 class="md-subhead">
<div class="subhead-border" ng-style="{background: primaryColorRgb}"></div>
Not finding what you need?
</h4>

<div class="result" ng-if="kbSearchUrl">
<h4>
<a ng-href="{{kbSearchUrl}}{{searchText}}"
target="_blank" rel="noopener noreferrer">
Search the KnowledgeBase</a>
</h4>
</div>

<div class="result" ng-if="eventsSearchUrl">
<h4>
<a ng-href="{{eventsSearchUrl}}{{searchText}}"
target="_blank" rel="noopener noreferrer">
Look for events</a>
</h4>
</div>

<div class="result" ng-if="helpdeskUrl">
<h4>
<a ng-href="{{helpdeskUrl}}"
target="_blank" rel="noopener noreferrer">
Get help from the Help Desk</a>
</h4>
</div>

<div class="result" ng-if="feedbackUrl">
<h4>
<a ng-href="{{feedbackUrl}}"
target="_blank" rel="noopener noreferrer">
Give feedback on {{portal.theme.title}} search</a>
</h4>
</div>

</div>

</div>

</md-content>
</md-tab-body>
</md-tab>
Expand Down

0 comments on commit 6dd7571

Please sign in to comment.