- {{ r.metadata.titles[0] }} + {{ r.metadata.title }}
{%- for creator in r.metadata.creators %} - {{ creator }} + {{ creator.person_or_org.name }} {%- endfor %}
diff --git a/invenio_theme_iform/ext.py b/invenio_theme_iform/ext.py index 6507589..9a203bc 100644 --- a/invenio_theme_iform/ext.py +++ b/invenio_theme_iform/ext.py @@ -10,7 +10,6 @@ from flask import g, has_request_context from flask_login import login_required -from invenio_records_marc21.ui.theme import current_identity_can_view from . import config from .views import index, locked, require_iform_authenticated @@ -33,19 +32,6 @@ class InvenioThemeIform(object): app.register_error_handler(423, locked) - @app.context_processor - def inject_visibility(): - def can_view_marc21(): - try: - # Only check if we're in a request context and identity exists - if has_request_context() and hasattr(g, "identity") and g.identity: - return current_identity_can_view() - return False - except (AttributeError, RuntimeError): - return False - - return {"can_view_marc21": can_view_marc21()} - app.extensions["invenio-theme-iform"] = self def init_config(self, app): @@ -69,8 +55,6 @@ def create_quick_upload_submenu(app): quick_upload_submenu._text = "Quick upload" quick_upload_submenu._order = 1 quick_upload_submenu.register("records.upload", "Upload Research Data") - quick_upload_submenu.register("invenio_records_marc21.uploads", "Upload Publication") - quick_upload_submenu.register("invenio_records_lom.uploads", "Upload Educational Resource") def modify_user_dashboard(app): diff --git a/invenio_theme_iform/search.py b/invenio_theme_iform/search.py deleted file mode 100644 index d5d0fe9..0000000 --- a/invenio_theme_iform/search.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2020-2023 Graz University of Technology. -# -# invenio-theme-iform is free software; you can redistribute it and/or -# modify it under the terms of the MIT License; see LICENSE file for more -# details. - -"""Frontpage records.""" - -from invenio_search.api import RecordsSearch - - -class FrontpageRecordsSearch(RecordsSearch): - """Search class for records that goes on the frontpage.""" - - class Meta: - """Default index and filter for frontpage search.""" - - index = "global-search" diff --git a/invenio_theme_iform/templates/invenio_theme_iform/navbar.html b/invenio_theme_iform/templates/invenio_theme_iform/navbar.html index f04f6cb..d2de2be 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/navbar.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/navbar.html @@ -18,16 +18,6 @@ "text": "Research Results", "value": "/records/search", "title": "Research Data", - },{ - "key": "marc21", - "text": "Publications", - "value": url_for("invenio_records_marc21.search"), - "title": "publication", - },{ - "key": "lom", - "text": "Educational Resources", - "value": url_for("invenio_records_lom.search"), - "title": "oer", } ] %} diff --git a/invenio_theme_iform/templates/invenio_theme_iform/overview.html b/invenio_theme_iform/templates/invenio_theme_iform/overview.html index b36c244..3266094 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/overview.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/overview.html @@ -121,34 +121,6 @@ {% endif %} - {% if can_view_marc21 %} -
{%- for creator in r.metadata.creators %} - {{ creator }} + {{ creator.person_or_org.name }} {%- endfor %}