From a740ced334b104ac77e269911375289eea8c4942 Mon Sep 17 00:00:00 2001 From: Miroslav Bauer Date: Wed, 18 Dec 2024 18:16:48 +0100 Subject: [PATCH 1/2] feat(files): display fileNote in FilesViewer --- .../components/datafields/files/FilesViewer.jinja | 7 +++++-- .../less/oarepo_ui/themes/default/globals/site.overrides | 6 ++++++ setup.cfg | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/oarepo_ui/templates/components/datafields/files/FilesViewer.jinja b/oarepo_ui/templates/components/datafields/files/FilesViewer.jinja index 8cf3954c..d3e11fbf 100644 --- a/oarepo_ui/templates/components/datafields/files/FilesViewer.jinja +++ b/oarepo_ui/templates/components/datafields/files/FilesViewer.jinja @@ -16,8 +16,11 @@ {% for file in array(files.entries) %} - - {{ file.key }} + +

{{ file.key }}

+ {%- if file.metadata.fileNote -%} + {{ file.metadata.fileNote }} + {%- endif -%} {{ (file.size or 0) | filesizeformat }} diff --git a/oarepo_ui/theme/assets/semantic-ui/less/oarepo_ui/themes/default/globals/site.overrides b/oarepo_ui/theme/assets/semantic-ui/less/oarepo_ui/themes/default/globals/site.overrides index d2dbf6ca..6f06ebbf 100644 --- a/oarepo_ui/theme/assets/semantic-ui/less/oarepo_ui/themes/default/globals/site.overrides +++ b/oarepo_ui/theme/assets/semantic-ui/less/oarepo_ui/themes/default/globals/site.overrides @@ -40,3 +40,9 @@ .invenio-page-body { padding-bottom: @defaultPadding; } + +.file-info { + small { + color: rgba(0, 0, 0, 0.4); + } +} \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 7f18e1b9..144b7687 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = oarepo-ui -version = 5.2.31 +version = 5.2.32 description = UI module for invenio 3.5+ long_description = file: README.md long_description_content_type = text/markdown From 6ac78601f21d1f07a53053f048443f9fe9677da3 Mon Sep 17 00:00:00 2001 From: Miroslav Bauer Date: Wed, 18 Dec 2024 18:37:31 +0100 Subject: [PATCH 2/2] fix(tests): fix resolution too deep error --- run-tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/run-tests.sh b/run-tests.sh index 0aaf38c8..c4620571 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -16,6 +16,7 @@ python3 -m venv $VENV pip install -U setuptools pip wheel echo "Installing oarepo version $OAREPO_VERSION" +pip install pytest-invenio==2.* pip install "oarepo==${OAREPO_VERSION}.*" pip install -e ".[tests]"