Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion assets/js/components/record_details/RecordVersionItem.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useMemo } from "react";
import { Icon, List } from "semantic-ui-react";
import { Icon, Label, List } from "semantic-ui-react";
import { i18next } from "@translations/invenio_app_rdm/i18next";
import PropTypes from "prop-types";
import { CopyButton } from "@js/invenio_app_rdm/components/CopyButton";
Expand Down Expand Up @@ -34,6 +34,8 @@ export const RecordVersionItemContent = ({ item, activeVersion, doi }) => {
// If approved and public-source are the same version, show only the public record link.
const sameVersion = isApprovedVersion && isPublicSourceVersion;

const showAccessStatus = item.access_status.id === "restricted";

return (
<List.Item key={item.id} {...(activeVersion && { className: "version active" })}>
<List.Content floated="left">
Expand Down Expand Up @@ -100,6 +102,21 @@ export const RecordVersionItemContent = ({ item, activeVersion, doi }) => {
{item.publication_date}
</small>
</List.Content>
<List.Content className="clear-both">
<Label horizontal size="small" className="neutral">
{item.resource_type.title_l10n}
</Label>
{showAccessStatus && (
<Label
horizontal
size="small"
className={`access-status ${item.access_status.id}`}
>
<Icon name={item.access_status.icon} />
{item.access_status.title_l10n}
</Label>
)}
</List.Content>
</List.Item>
);
};
Expand Down
4 changes: 4 additions & 0 deletions assets/less/cds-rdm/globals/site.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@
display: inline-flex !important;
}

.clear-both {
clear: both;
}

#skip-to-main {
opacity: 0;

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = [
license = "GPL-2.0"
requires-python = ">=3.9"
dependencies = [
"invenio-app-rdm[opensearch2, profiler]>=v15.0.0b4.dev0 ",
"invenio-app-rdm[opensearch2, profiler]>=v15.0.0b5.dev0",
"invenio-cern-sync",
"invenio-preservation-sync==0.5.0",
"invenio-vcs>=0.0.1",
Expand Down
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading