From 5d1bd90c93c1055fd880578770b7de3904ae1992 Mon Sep 17 00:00:00 2001 From: Nick Budak Date: Wed, 8 Aug 2018 17:13:54 -0400 Subject: [PATCH] remove publisher, translator, and filters --- sitemedia/js/components/FilterChoice.js | 25 ---------------- sitemedia/js/components/SearchFilter.js | 31 -------------------- sitemedia/js/components/books/BooksSearch.js | 19 ++---------- winthrop/books/forms.py | 2 +- 4 files changed, 3 insertions(+), 74 deletions(-) delete mode 100644 sitemedia/js/components/FilterChoice.js delete mode 100644 sitemedia/js/components/SearchFilter.js diff --git a/sitemedia/js/components/FilterChoice.js b/sitemedia/js/components/FilterChoice.js deleted file mode 100644 index c15d1e2..0000000 --- a/sitemedia/js/components/FilterChoice.js +++ /dev/null @@ -1,25 +0,0 @@ -export default Vue.component ('FilterChoice', { - template: ` - - `, - props: { - name: String, - label: String, - value: String - }, - data() { - return { - active: false - } - } -}) \ No newline at end of file diff --git a/sitemedia/js/components/SearchFilter.js b/sitemedia/js/components/SearchFilter.js deleted file mode 100644 index f7558c4..0000000 --- a/sitemedia/js/components/SearchFilter.js +++ /dev/null @@ -1,31 +0,0 @@ -import FilterChoice from './FilterChoice' - -export default Vue.component('SearchFilter', { - template: ` - - - - - - `, - components: { - FilterChoice - }, - props: { - label: String, - fieldLabels: Object, - choices: Array - }, - data() { - return { - activeFilters: [] - } - } -}) \ No newline at end of file diff --git a/sitemedia/js/components/books/BooksSearch.js b/sitemedia/js/components/books/BooksSearch.js index 5a9465c..525bbd0 100644 --- a/sitemedia/js/components/books/BooksSearch.js +++ b/sitemedia/js/components/books/BooksSearch.js @@ -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', { @@ -57,14 +56,13 @@ export default Vue.component('BooksSearch', { `, 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'] ], @@ -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', @@ -119,7 +105,6 @@ export default Vue.component('BooksSearch', { }, computed: { ...mapState([ - 'filters', 'totalResults', 'facetChoices', ]), diff --git a/winthrop/books/forms.py b/winthrop/books/forms.py index 7699e0a..8ff5fe5 100644 --- a/winthrop/books/forms.py +++ b/winthrop/books/forms.py @@ -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()