API Docs

UI for Invenio-Search.

class invenio_search_ui.ext.InvenioSearchUI(app=None)[source]

Invenio-Search-UI extension.

Extension initialization.

Parameters:app – The Flask application.
init_app(app)[source]

Flask application initialization.

Parameters:app – The Flask application.
init_config(app)[source]

Initialize configuration.

Parameters:app – The Flask application.

Bundles

UI for Invenio-Search.

invenio_search_ui.bundles.catalog(domain)[source]

Return glob matching path to tranlated messages for a given domain.

Configuration

Configuration for Invenio-Search-UI.

invenio_search_ui.config.SEARCH_UI_JSTEMPLATE_COUNT = 'templates/invenio_search_ui/count.html'

Configure the count template.

invenio_search_ui.config.SEARCH_UI_JSTEMPLATE_ERROR = 'templates/invenio_search_ui/error.html'

Configure the error page template.

invenio_search_ui.config.SEARCH_UI_JSTEMPLATE_FACETS = 'node_modules/invenio-search-js/dist/templates/facets.html'

Configure the facets template.

invenio_search_ui.config.SEARCH_UI_JSTEMPLATE_LOADING = 'templates/invenio_search_ui/loading.html'

Configure the loading template.

invenio_search_ui.config.SEARCH_UI_JSTEMPLATE_PAGINATION = 'templates/invenio_search_ui/pagination.html'

Configure the pagination template.

invenio_search_ui.config.SEARCH_UI_JSTEMPLATE_RANGE = 'templates/invenio_search_ui/range.html'

Configure the range template.

invenio_search_ui.config.SEARCH_UI_JSTEMPLATE_RANGE_OPTIONS = {'width': 180, 'selectionId': '#year_select', 'name': 'years', 'histogramId': '#year_hist'}

Configure the range template options.

invenio_search_ui.config.SEARCH_UI_JSTEMPLATE_RESULTS = 'templates/invenio_search_ui/marc21/default.html'

Configure the results template.

invenio_search_ui.config.SEARCH_UI_JSTEMPLATE_SELECT_BOX = 'templates/invenio_search_ui/selectbox.html'

Configure the select box template.

invenio_search_ui.config.SEARCH_UI_JSTEMPLATE_SORT_ORDER = 'templates/invenio_search_ui/togglebutton.html'

Configure the toggle button template.

invenio_search_ui.config.SEARCH_UI_SEARCH_API = '/api/records/'

Configure the search engine endpoint.

invenio_search_ui.config.SEARCH_UI_SEARCH_INDEX = 'records'

Name of the search index used.

invenio_search_ui.config.SEARCH_UI_SEARCH_TEMPLATE = 'invenio_search_ui/search.html'

Configure the search page template.

Views

UI for Invenio-Search.

invenio_search_ui.views.format_sortoptions(sort_options)[source]

Create sort options JSON dump for Invenio-Search-JS.

invenio_search_ui.views.search()[source]

Search page ui.

invenio_search_ui.views.sorted_options(sort_options)[source]

Sort sort options for display.

Parameters:sort_options – A dictionary containing the field name as key and asc/desc as value.
Returns:A dictionary with sorting options for Invenio-Search-JS.