Skip to content

Commit

Permalink
Add subtype filtering to bibs search pages (#1497)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronhelton authored Jul 26, 2024
1 parent 50c3867 commit 8d50d7d
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion dlx_rest/static/js/search/sort.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export let sortcomponent = {
<div class="row d-flex w-100 justify-content-center">
<div class="col">Results per page</div>
<div class="col">Sort</div>
<div class="col" v-if="['bibs','speeches','votes'].includes(vcoll)">Filter</div>
<div class="col">Direction</div>
</div>
<div class="row d-flex w-100 justify-content-center">
Expand All @@ -24,6 +25,26 @@ export let sortcomponent = {
</li>
</ul>
</div>
<div class="col" v-if="['bibs','speeches','votes'].includes(vcoll)">
<ul class="list-inline">
<li class="list-inline-item">
<a id="subtype" data-searchString="all" class="nav-link disabled result-link sortcomponent small p-0" v-if="params.subtype==='all'">All</a>
<a id="subtype" data-searchString="all" class="nav-link result-link sortcomponent small p-0" v-else>All</a>
</li>
<li class="list-inline-item">
<a id="subtype" data-searchString="default" class="nav-link disabled result-link sortcomponent small p-0" v-if="params.subtype==='default'">Docs & Pubs</a>
<a id="subtype" data-searchString="default" class="nav-link result-link sortcomponent small p-0" v-else>Docs & Pubs</a>
</li>
<li class="list-inline-item">
<a id="subtype" data-searchString="speech" class="nav-link disabled result-link sortcomponent small p-0" v-if="params.subtype==='speech'">Speeches</a>
<a id="subtype" data-searchString="speech" class="nav-link result-link sortcomponent small p-0" v-else>Speeches</a>
</li>
<li class="list-inline-item">
<a id="subtype" data-searchString="vote" class="nav-link disabled result-link sortcomponent small p-0" v-if="params.subtype==='vote'">Votes</a>
<a id="subtype" data-searchString="vote" class="nav-link result-link sortcomponent small p-0" v-else>Votes</a>
</li>
</ul>
</div>
<div class="col">
<ul class="list-inline">
<li v-for="o in sortDirections" class="list-inline-item">
Expand Down Expand Up @@ -90,7 +111,8 @@ export let sortcomponent = {
{"displayName": "asc", "searchString": "asc"},
{"displayName": "desc", "searchString": "desc"}
],
freeText: this.isFreeText
freeText: this.isFreeText,
vcoll: vcoll
}
},
mounted: function() {
Expand Down

0 comments on commit 8d50d7d

Please sign in to comment.