mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-23 05:01:58 +00:00
Merge pull request #141 from utnapischtim/feature/override-landing-page
override landing page
This commit is contained in:
@@ -9,3 +9,18 @@
|
|||||||
color: #e9711c;
|
color: #e9711c;
|
||||||
float: right;
|
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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
"""invenio module for TUGRAZ theme."""
|
"""invenio module for TUGRAZ theme."""
|
||||||
|
|
||||||
from flask_babelex import gettext as _
|
from flask_babelex import gettext as _
|
||||||
|
from invenio_app_rdm.config import RECORDS_UI_ENDPOINTS
|
||||||
|
|
||||||
INVENIO_THEME_TUGRAZ_DEFAULT_VALUE = _("TU Graz Repository")
|
INVENIO_THEME_TUGRAZ_DEFAULT_VALUE = _("TU Graz Repository")
|
||||||
"""Default value for the application."""
|
"""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
|
# See https://invenio-rdm-records.readthedocs.io/en/latest/configuration.html
|
||||||
# Uncomment below to override records landingpage.
|
# Uncomment below to override records landingpage.
|
||||||
# from invenio_rdm_records.config import RECORDS_UI_ENDPOINTS
|
# from invenio_rdm_records.config import RECORDS_UI_ENDPOINTS
|
||||||
# RECORDS_UI_ENDPOINTS["recid"].update(
|
RECORDS_UI_ENDPOINTS["recid"].update(
|
||||||
# template="invenio_theme_tugraz/record_landing_page.html"
|
template="invenio_theme_tugraz/record_landing_page.html"
|
||||||
# )
|
)
|
||||||
"""override the default record landing page"""
|
"""override the default record landing page"""
|
||||||
|
|
||||||
# Invenio-search-ui
|
# Invenio-search-ui
|
||||||
|
|||||||
@@ -13,89 +13,82 @@
|
|||||||
|
|
||||||
{%- block css %}
|
{%- block css %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
{{ webpack['invenio-rdm-records-theme.css'] }}
|
|
||||||
{%- endblock 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 %}
|
{%- block page_body %}
|
||||||
|
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui padded relaxed grid">
|
<div class="ui padded relaxed grid">
|
||||||
<div class="two column row">
|
<div class="two column row">
|
||||||
<div class="ten wide column">
|
<div class="ten wide column">
|
||||||
{%- block record_body %}
|
{%- block record_body %}
|
||||||
|
|
||||||
<div class="left floated left aligned column">
|
<div class="badges">
|
||||||
<span class="ui label teal" title="Publication date">
|
<span class="ui label record-version" title="{{_('Publication date')}}">
|
||||||
{{ record.publication_date|to_date|format_date(format='long') }}
|
{{ record.metadata.publication_date }} {{ '(' ~ record.metadata.version ~ ')' if record.metadata.version }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="ui label record-version">
|
<!--Resource type badge-->
|
||||||
Version {{ record.version }}
|
<span class="ui label teal" title="{{_('Resource type')}}">
|
||||||
</span>
|
{{record.ui.resource_type }}
|
||||||
|
|
||||||
<span class="ui label grey">
|
|
||||||
{{ record.resource_type | vocabulary_title('resource_type') }}
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h1>{{ record.titles[0].title }}</h1>
|
<h1 style="margin-top: -6px">{{ record.metadata.title }}</h1>
|
||||||
<p>
|
<p>{%- include "invenio_app_rdm/landing_page/details/creators.html" %}</p>
|
||||||
{%- include "invenio_rdm_records/details/creators.html" %}
|
<p>{%- include "invenio_app_rdm/landing_page/details/contributors.html" %}</p>
|
||||||
</p>
|
|
||||||
|
|
||||||
{%- if record.contributors %}
|
<div class="ui grid" style="margin-bottom: 10px;">
|
||||||
<p>
|
|
||||||
{%- include "invenio_rdm_records/details/contributors.html" %}
|
|
||||||
</p>
|
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
<div class="ui grid">
|
|
||||||
<div class="two column row">
|
<div class="two column row">
|
||||||
<div class="left floated column">
|
<div class="left floated column">
|
||||||
{%- include "invenio_theme_tugraz/details/doi.html" %}
|
{%- for s in record.metadata.subjects %}
|
||||||
|
<div class="ui tiny label">{{s.subject}}</div>
|
||||||
|
{%- endfor %}
|
||||||
|
<div style="margin-top: 5px;">
|
||||||
|
<b>Created:</b> {{ record.ui.created_date_l10n_long }} | <b>Modified:</b> {{ record.ui.updated_date_l10n_long }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right floated column">
|
<div class="right floated column">
|
||||||
{#
|
|
||||||
{%- include "invenio_rdm_records/details/contact.html" %}
|
|
||||||
#}
|
|
||||||
|
|
||||||
<span class="access-right">
|
<span class="access-right">
|
||||||
{{ record | vocabulary_title('access_right') | lower_case }}
|
<i class="icon lock open"></i>
|
||||||
|
{{ record.access.access_right | make_dict_like('access_right') | vocabulary_title('access_right') }}
|
||||||
|
{%- for right in record.metadata.rights %}
|
||||||
|
<a target="_blank" href="{{right.url}}">{{ '(' ~ right.identifier ~ ')' }}</a>
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{%- include "invenio_rdm_records/details/citation.html" %}
|
{%- include "invenio_app_rdm/landing_page/details/description.html" %}
|
||||||
{%- include "invenio_rdm_records/details/keywords.html" %}
|
|
||||||
{%- include "invenio_rdm_records/details/description.html" %}
|
|
||||||
{%- include "invenio_rdm_records/details/licenses.html" %}
|
|
||||||
|
|
||||||
{# files #}
|
{# files #}
|
||||||
{%- if record.files and record | can_list_files %}
|
{%- if record.files and record | can_list_files %}
|
||||||
{%- set files = record.files %}
|
{%- set files = record.files | make_files_preview_compatible %}
|
||||||
{{ preview_file_box(files | select_preview_file, pid) }}
|
{%- set default_preview_file = files | select_preview_file(default_preview=record.files.default_preview) %}
|
||||||
{{ file_list_box(files.dumps(), pid) }}
|
{{ preview_file_box(default_preview_file, pid) }}
|
||||||
{%- else %}
|
{{ file_list_box(files, pid) }}
|
||||||
<br>
|
|
||||||
|
|
||||||
<p style="text-align: center;">
|
|
||||||
No associated files.
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# More details #}
|
|
||||||
|
|
||||||
{%- endblock record_body %}
|
{%- endblock record_body %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="six wide column">
|
<div class="six wide column">
|
||||||
{% block sidebar %}
|
<div id="recordManagement"
|
||||||
<div class="ui segment rdm-sidebar">
|
class="ui container"
|
||||||
{%- include "invenio_rdm_records/details/side_bar.html" %}
|
data-recid='{{ record["id"] | tojson }}'>
|
||||||
</div>
|
</div>
|
||||||
|
{% block sidebar %}
|
||||||
|
{%- include "invenio_app_rdm/landing_page/details/side_bar.html" %}
|
||||||
{% endblock sidebar %}
|
{% endblock sidebar %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -106,8 +99,9 @@
|
|||||||
|
|
||||||
{%- block javascript %}
|
{%- block javascript %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
{{ webpack['invenio-rdm-records-js.js'] }}
|
{{ webpack['invenio-app-rdm-records.js'] }}
|
||||||
{# Communities management #}
|
{# Communities management #}
|
||||||
{{ webpack['invenio-communities-records.js'] }}
|
{{ webpack['invenio-communities-records.js'] }}
|
||||||
{{ webpack['previewer_theme.js'] }}
|
{{ webpack['previewer_theme.js'] }}
|
||||||
|
{{ webpack['invenio-app-rdm-record-management.js'] }}
|
||||||
{%- endblock javascript %}
|
{%- endblock javascript %}
|
||||||
|
|||||||
4
setup.py
4
setup.py
@@ -17,7 +17,7 @@ history = open("CHANGES.rst").read()
|
|||||||
|
|
||||||
tests_require = [
|
tests_require = [
|
||||||
"pytest-invenio>=1.4.0",
|
"pytest-invenio>=1.4.0",
|
||||||
'invenio-app>=1.3.0,<2.0.0',
|
"invenio-app>=1.3.0,<2.0.0",
|
||||||
"psycopg2-binary>=2.8.6",
|
"psycopg2-binary>=2.8.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -53,6 +53,8 @@ install_requires = [
|
|||||||
"invenio-i18n>=1.2.0",
|
"invenio-i18n>=1.2.0",
|
||||||
"elasticsearch_dsl>=7.2.1",
|
"elasticsearch_dsl>=7.2.1",
|
||||||
"invenio_search>=1.3.1",
|
"invenio_search>=1.3.1",
|
||||||
|
"invenio_app_rdm>=0.18.8",
|
||||||
|
"sqlalchemy-continuum>=1.3.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
packages = find_packages()
|
packages = find_packages()
|
||||||
|
|||||||
Reference in New Issue
Block a user