Skip to content
This repository has been archived by the owner on Aug 12, 2021. It is now read-only.

Commit

Permalink
remove publisher, translator, and filters
Browse files Browse the repository at this point in the history
  • Loading branch information
thatbudakguy committed Aug 9, 2018
1 parent 9e06c33 commit 6219d8a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 79 deletions.
25 changes: 0 additions & 25 deletions sitemedia/js/components/FilterChoice.js

This file was deleted.

31 changes: 0 additions & 31 deletions sitemedia/js/components/SearchFilter.js

This file was deleted.

19 changes: 2 additions & 17 deletions sitemedia/js/components/books/BooksSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { mapGetters, mapActions, mapState, mapMutations } from 'vuex'
import { isEmpty } from 'lodash'

import SearchFacet from '../SearchFacet'
import SearchFilter from '../SearchFilter'
import SearchSort from '../SearchSort'

export default Vue.component('BooksSearch', {
Expand Down Expand Up @@ -57,14 +56,13 @@ export default Vue.component('BooksSearch', {
</div>`,
components: {
SearchFacet,
SearchFilter,
SearchSort,
},
data() {
return {
tabs: [ // array of arrays specifying how facets should be grouped into tabs
['author', 'editor', 'translator'],
['publisher', 'pub_year'],
['author', 'editor'],
['pub_year'],
['language', 'subject'],
['annotator']
],
Expand All @@ -82,18 +80,6 @@ export default Vue.component('BooksSearch', {
label: 'Editor',
type: 'text',
},
{
name: 'translator',
label: 'Translator',
type: 'text',
},
{
name: 'publisher',
label: 'Publisher',
type: 'text',
search: true,
width: 6
},
{
name: 'pub_year',
label: 'Publication Year',
Expand All @@ -119,7 +105,6 @@ export default Vue.component('BooksSearch', {
},
computed: {
...mapState([
'filters',
'totalResults',
'facetChoices',
]),
Expand Down
2 changes: 1 addition & 1 deletion winthrop/books/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class SearchForm(forms.Form):
# Solr facet choice fields
author = FacetChoiceField()
editor = FacetChoiceField()
translator = FacetChoiceField()
# translator = FacetChoiceField() NOTE temp disabled as not lv1 feature
language = FacetChoiceField()
subject = FacetChoiceField()
annotator = FacetChoiceField()
Expand Down
10 changes: 5 additions & 5 deletions winthrop/books/tests/test_book_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ def test_book_list(self):
assert response.context['object_list'][0]['title'] == \
books.get(creator__person__authorized_name='Heinsius, Daniel').title

# by translator
response = self.client.get(url, {'translator': ['Tellus, Sylvester']})
assert len(response.context['object_list']) == 1
assert response.context['object_list'][0]['title'] == \
books.get(creator__person__authorized_name='Tellus, Sylvester').title
# by translator NOTE disabled as not lv1 feature
# response = self.client.get(url, {'translator': ['Tellus, Sylvester']})
# assert len(response.context['object_list']) == 1
# assert response.context['object_list'][0]['title'] == \
# books.get(creator__person__authorized_name='Tellus, Sylvester').title

# by annotator
# create annotation on first book with a canvas
Expand Down

0 comments on commit 6219d8a

Please sign in to comment.