diff --git a/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/record.less b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/record.less index 45a8764..c3d53ba 100644 --- a/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/record.less +++ b/invenio_theme_tugraz/assets/semantic-ui/less/invenio_theme_tugraz/record.less @@ -9,3 +9,18 @@ color: #e9711c; float: right; } + +.title .dropdown { + display: none; +} + +.top-bottom-padded { + margin: unset; +} + +.label.label-keyword { + font-size: 0.71428571rem; + font-weight: 400; + background-color: #E8E8E8; + border: unset; +} diff --git a/invenio_theme_tugraz/config.py b/invenio_theme_tugraz/config.py index 26ab619..f48257a 100644 --- a/invenio_theme_tugraz/config.py +++ b/invenio_theme_tugraz/config.py @@ -9,6 +9,7 @@ """invenio module for TUGRAZ theme.""" from flask_babelex import gettext as _ +from invenio_app_rdm.config import RECORDS_UI_ENDPOINTS INVENIO_THEME_TUGRAZ_DEFAULT_VALUE = _("TU Graz Repository") """Default value for the application.""" @@ -90,9 +91,9 @@ DEPOSITS_HEADER_TEMPLATE = "invenio_theme_tugraz/header.html" # See https://invenio-rdm-records.readthedocs.io/en/latest/configuration.html # Uncomment below to override records landingpage. # from invenio_rdm_records.config import RECORDS_UI_ENDPOINTS -# RECORDS_UI_ENDPOINTS["recid"].update( -# template="invenio_theme_tugraz/record_landing_page.html" -# ) +RECORDS_UI_ENDPOINTS["recid"].update( + template="invenio_theme_tugraz/record_landing_page.html" +) """override the default record landing page""" # Invenio-search-ui diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/record_landing_page.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/record_landing_page.html index 084f4a5..612d47b 100644 --- a/invenio_theme_tugraz/templates/invenio_theme_tugraz/record_landing_page.html +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/record_landing_page.html @@ -13,89 +13,82 @@ {%- block css %} {{ super() }} -{{ webpack['invenio-rdm-records-theme.css'] }} {%- endblock css %} -{%- from "invenio_rdm_records/macros/files.html" import file_list_box, preview_file_box %} +{%- from "invenio_app_rdm/landing_page/macros/files.html" import file_list_box, preview_file_box %} +{%- from "invenio_app_rdm/landing_page/macros/detail.html" import show_detail %} + +{%- set record = record|dereference_record|serialize_ui %} +{%- set metadata = record.metadata %} {%- block page_body %} +
- {%- include "invenio_rdm_records/details/creators.html" %} -
+{%- include "invenio_app_rdm/landing_page/details/creators.html" %}
+{%- include "invenio_app_rdm/landing_page/details/contributors.html" %}
- {%- if record.contributors %} -- {%- include "invenio_rdm_records/details/contributors.html" %} -
- {%- endif %} - -- No associated files. -
+ {%- set files = record.files | make_files_preview_compatible %} + {%- set default_preview_file = files | select_preview_file(default_preview=record.files.default_preview) %} + {{ preview_file_box(default_preview_file, pid) }} + {{ file_list_box(files, pid) }} {% endif %} - {# More details #} - {%- endblock record_body %}