inspirehep.modules.theme package¶
Submodules¶
inspirehep.modules.theme.bundles module¶
Inspire bundles.
inspirehep.modules.theme.ext module¶
Invenio standard theme.
inspirehep.modules.theme.jinja2filters module¶
Jinja utilities for INSPIRE.
-
inspirehep.modules.theme.jinja2filters.
apply_template_on_array
(array, template_path, **common_context)[source]¶ Render a template specified by ‘template_path’.
For every item in array, renders the template passing the item as ‘content’ parameter. Additionally attaches ‘common_context’ as other rendering arguments.
Returns list of rendered html strings.
Parameters: - array – iterable with specific context
- template_path – path to the template
Return type: list of strings
Return array of rendered links to authors.
-
inspirehep.modules.theme.jinja2filters.
back_to_search_link
(referer, collection)[source]¶ Creates link to go back to search results in detailed pages.
-
inspirehep.modules.theme.jinja2filters.
collection_select_current
(collection_name, current_collection)[source]¶ Returns the active collection based on the current collection page.
-
inspirehep.modules.theme.jinja2filters.
email_link
(value)[source]¶ Return single email rendered (mailto).
-
inspirehep.modules.theme.jinja2filters.
email_links
(value)[source]¶ Return array of rendered links to emails.
-
inspirehep.modules.theme.jinja2filters.
find_collection_from_url
(url)[source]¶ Returns the collection based on the URL.
-
inspirehep.modules.theme.jinja2filters.
format_date
(date)[source]¶ Displays a date in a human-friendly format.
-
inspirehep.modules.theme.jinja2filters.
institutes_links
(record)[source]¶ Return array of rendered links to institutes.
-
inspirehep.modules.theme.jinja2filters.
is_cataloger
(user)[source]¶ Check if user has a cataloger role.
-
inspirehep.modules.theme.jinja2filters.
is_external_link
(url)[source]¶ Checks if given url is an external link.
-
inspirehep.modules.theme.jinja2filters.
publication_info
(record)[source]¶ Display inline publication and conference information.
The record is a LiteratureRecord instance
-
inspirehep.modules.theme.jinja2filters.
sanitize_arxiv_pdf
(arxiv_value)[source]¶ Sanitizes the arXiv PDF link so it is always correct
-
inspirehep.modules.theme.jinja2filters.
sanitize_collection_name
(collection_name)[source]¶ Changes ‘hep’ to ‘literature’ and ‘hepnames’ to ‘authors’.
-
inspirehep.modules.theme.jinja2filters.
show_citations_number
(citation_count)[source]¶ Shows citations number
inspirehep.modules.theme.views module¶
Theme views.
-
exception
inspirehep.modules.theme.views.
UnhealthCeleryTestException
[source]¶ Bases:
exceptions.Exception
-
exception
inspirehep.modules.theme.views.
UnhealthTestException
[source]¶ Bases:
exceptions.Exception
-
inspirehep.modules.theme.views.
ajax_citations
()[source]¶ Handler for datatables citations view
Deprecated since version 2018-08-23.
-
inspirehep.modules.theme.views.
ajax_conference_contributions
()[source]¶ Handler for other conference contributions
-
inspirehep.modules.theme.views.
ajax_experiment_contributions
()[source]¶ Handler for experiment contributions
-
inspirehep.modules.theme.views.
ajax_experiments_people
()[source]¶ Datatable handler to get people working in an experiment.
-
inspirehep.modules.theme.views.
ajax_institutions_experiments
()[source]¶ Datatable handler to get experiments in an institution.
-
inspirehep.modules.theme.views.
ajax_institutions_papers
()[source]¶ Datatable handler to get papers from an institution.
-
inspirehep.modules.theme.views.
ajax_institutions_people
()[source]¶ Datatable handler to get people working in an institution.
-
inspirehep.modules.theme.views.
ajax_other_conferences
()[source]¶ Handler for other conferences in the series
-
inspirehep.modules.theme.views.
ajax_references
()[source]¶ Handler for datatables references view.
Deprecated since version 2018-06-07.
-
inspirehep.modules.theme.views.
get_experiment_publications
(experiment_name)[source]¶ Get paper count for a given experiment.
Parameters: experiment_name (string) – canonical name of the experiment.
-
inspirehep.modules.theme.views.
get_institution_experiments_datatables_rows
(hits)[source]¶ Row used by datatables to render institution experiments.
-
inspirehep.modules.theme.views.
get_institution_experiments_from_es
(icn)[source]¶ Get experiments from a given institution.
To avoid killing ElasticSearch the number of experiments is limited.
Parameters: icn (string) – Institution canonical name.
-
inspirehep.modules.theme.views.
get_institution_papers_datatables_rows
(hits)[source]¶ Row used by datatables to render institution papers.
-
inspirehep.modules.theme.views.
get_institution_papers_from_es
(recid)[source]¶ Get papers where some author is affiliated with institution.
Parameters: recid (string) – id of the institution.
-
inspirehep.modules.theme.views.
get_institution_people_datatables_rows
(recid)[source]¶ Datatable rows to render people working in an institution.
Parameters: recid (string) – id of the institution.
-
inspirehep.modules.theme.views.
institutions
()[source]¶ View for institutions collection landing page.
-
inspirehep.modules.theme.views.
linkedaccounts
()[source]¶ Redirect to the homepage when logging in with ORCID.
-
inspirehep.modules.theme.views.
login_success
()[source]¶ Injects current user to the template and passes it to the parent tab.
-
inspirehep.modules.theme.views.
postfeedback
()[source]¶ Handler to create a ticket from user feedback.
Hack to remove children of Settings menu
Module contents¶
INSPIRE theme and filters.