-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from ucsb/no-results
"Didn't find it" section for search results
- Loading branch information
Showing
6 changed files
with
175 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* Styles for Haven't Found Box */ | ||
#findItBox { | ||
background-color: #f3f3f3; | ||
box-shadow: 0 1px 0 0 rgba(0,0,0,.03), 0 5px 5px -3px rgba(0,0,0,.07); | ||
margin: 10px 0 100px 0; | ||
box-sizing: border-box; | ||
-ms-flex-direction: column; | ||
flex-direction: column; | ||
} | ||
#findItBox .md-headline { | ||
text-align: center; | ||
} | ||
#findItBox .md-subheadline { | ||
display: inline-block; | ||
font-size: 20px; | ||
font-weight: 300; | ||
margin-bottom: 15px; | ||
} | ||
#findItBox md-card-content { | ||
display: flex; | ||
flex-flow: row wrap; | ||
justify-content: center; | ||
align-items: flex-start; | ||
color: #555; | ||
} | ||
#findItBox md-card-content > div { | ||
margin: 10px 20px; | ||
} | ||
#findItBox md-list-item { | ||
align-items: flex-start; | ||
margin-bottom: 15px; | ||
padding-left: 0; | ||
} | ||
#findItBox md-list-item.align-center { | ||
align-items: center; | ||
} | ||
#findItBox md-list-item > div { | ||
float: left; | ||
} | ||
#findItBox md-list-item a { font-size: 17px; } | ||
#findItBox md-list-item p { margin: 0 0 .2em; } | ||
#findItBox img { | ||
margin: 0px 8px -10px 0px; | ||
} | ||
#findItBox a.img:hover, | ||
#findItBox a.img:focus, | ||
#findItBox a.img:active { | ||
box-shadow: none; | ||
} | ||
@media all and (min-width: 600px) { | ||
#findItBox md-card-content { | ||
flex-flow: row nowrap; | ||
} | ||
} | ||
/* Didn't Find it? sidebar jump button */ | ||
#findItButton { | ||
position: fixed; | ||
top: 50vh; | ||
right: -51px; | ||
transform: rotate(90deg); | ||
min-height: auto; | ||
border-radius: 0px; | ||
background-color: #32579b; | ||
color: #fff; | ||
font-weight: bold; | ||
text-transform: none; | ||
line-height: 26px; | ||
z-index: 70; | ||
} | ||
#findItButton:hover { | ||
background-color: #ddd; | ||
color: #32579b; | ||
} | ||
/* Hide the Didn't find it box on the My Favorites page */ | ||
prm-favorites prm-search-result-list-after { | ||
display: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<md-button id='findItButton' class='md-raised' onclick="document.getElementById('findItBox').scrollIntoView({behavior: 'smooth'});">Didn't Find It ?</md-button> | ||
<a name="findItBox"></a> | ||
<md-card id="findItBox"> | ||
<md-card-title> | ||
<md-card-title-text> | ||
<span class="md-headline">Didn't find it?</span> | ||
</md-card-title-text> | ||
</md-card-title> | ||
<md-card-content> | ||
<div> | ||
<span class="md-subheadline">Chat with us for help</span> | ||
<p>We can help you find resources, start your research, cite your sources, and more!</p> | ||
<div id="libchat_955221b59c9df85fdcfe2e2ef0261789"></div> | ||
</div> | ||
<div role="list" class="md-primoExplore-theme"> | ||
<div> | ||
<span class="md-subheadline">Try your search again</span> | ||
<md-list-item role="listitem" class="_md-no-proxy _md"> | ||
<div> | ||
<a href="/discovery/search?query={{$ctrl.queryString}}&tab={{$ctrl.tab}}&search_scope={{$ctrl.search_scope}}&vid={{$ctrl.vid}}&offset=0&pcAvailability=true" target="_self" class="img"><img src="custom/01UCSB_INST-UCSB/img/expandResults.png" width="35" height="35" alt="Article icon" /></a> | ||
</div> | ||
<div> | ||
<p><a href="/discovery/search?query={{$ctrl.queryString}}&tab={{$ctrl.tab}}&search_scope={{$ctrl.search_scope}}&vid={{$ctrl.vid}}&offset=0&pcAvailability=true" target="_self">Expand results</a></p> | ||
<p>Results may not be immediately available at UCSB, but may be available to request via Interlibrary Loan.</p> | ||
</div> | ||
</md-list-item> | ||
<md-list-item> | ||
<div> | ||
<a href="https://scholar-google-com.proxy.library.ucsb.edu/scholar?q={{$ctrl.queryString}}" target="_self" class="img"> | ||
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Google_%22G%22_Logo.svg/200px-Google_%22G%22_Logo.svg.png" width="35" height="35" alt="Google Scholar logo"/> | ||
</a> | ||
</div> | ||
<div> | ||
<p><a href="https://scholar-google-com.proxy.library.ucsb.edu/scholar?q={{$ctrl.queryString}}" target="_self">Search Google Scholar</a></p> | ||
<p>Try your search again in Google Scholar's library</p> | ||
</div> | ||
</md-list-item> | ||
<md-list-item role="listitem" class="_md-no-proxy _md"> | ||
<div> | ||
<a href="/discovery/search?query={{$ctrl.queryString}}&tab=Worldcat&search_scope=Worldcat&vid={{$ctrl.vid}}&offset=0" target="_self" class="img"> | ||
<img src="custom/01UCSB_INST-UCSB/img/worldcat.png" width="35" height="35" alt="Worldcat Logo" /> | ||
</a> | ||
</div> | ||
<div> | ||
<p><a href="https://ucsb.on.worldcat.org/v2/search?queryString={{$ctrl.queryString}}" target="_self">Search Worldcat</a></p> | ||
<p>Find items available by request from libraries worldwide</p> | ||
</div> | ||
</md-list-item> | ||
</div> | ||
<span class="md-subheadline" style="margin-top:15px;">Tell us what you need</span> | ||
<md-list-item role="listitem" class="_md-no-proxy _md align-center"> | ||
<div> | ||
<a href="/discovery/citationlinker?vid={{$ctrl.vid.replace(':', '%3A')}}" class="img"><img src="custom/01UCSB_INST-UCSB/img/citation.png" width="35" height="35" /></a> | ||
</div> | ||
<div> | ||
<p><a href="/discovery/citationlinker?vid={{$ctrl.vid.replace(':', '%3A')}}">Find by citation</a></p> | ||
</div> | ||
</md-list-item> | ||
<md-list-item role="listitem" class="_md-no-proxy _md align-center"> | ||
<div> | ||
<a href="/discovery/blankIll?vid={{$ctrl.vid.replace(':', '%3A')}}" class="img"><img src="custom/01UCSB_INST-UCSB/img/ill.png" width="35" height="35" /></a> | ||
</div> | ||
<div> | ||
<p><a href="/discovery/blankIll?vid={{$ctrl.vid.replace(':', '%3A')}}">Place an Interlibrary Loan request</a></p> | ||
</div> | ||
</md-list-item> | ||
</div> | ||
</md-card-content> | ||
</md-card> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Didn't find it box | ||
* Courtesy of UCSC | ||
*/ | ||
app.controller('SearchResultListAfterController', ['$scope', '$rootScope', function($scope, $rootScope){ | ||
this.$onInit = function () { | ||
var vm = this; | ||
vm.tab = vm.parentCtrl.$stateParams.tab; | ||
vm.vid = vm.parentCtrl.$stateParams.vid; | ||
vm.search_scope = vm.parentCtrl.$stateParams.search_scope; | ||
|
||
if (typeof vm.parentCtrl.$stateParams.query === 'object') { | ||
vm.queryString = vm.parentCtrl.$stateParams.query.join('&query='); | ||
vm.queryString = vm.queryString + '&mode=advanced'; | ||
} else { | ||
vm.queryString = vm.parentCtrl.$stateParams.query; | ||
} | ||
} | ||
|
||
var libchat = document.createElement("script"); | ||
libchat.src = "https://v2.libanswers.com/load_chat.php?hash=955221b59c9df85fdcfe2e2ef0261789"; | ||
document.head.appendChild(libchat); | ||
}]); | ||
|
||
app.component('prmSearchResultListAfter', { | ||
bindings: { parentCtrl: '<' }, | ||
controller: 'SearchResultListAfterController', | ||
templateUrl: 'custom/01UCSB_INST-UCSB/html/prmSearchResultListAfter.html', | ||
}); |