= ({
+ parentRecord,
+}) => (
+
+ Part of
+ {renderBook(parentRecord)}
+
+);
+
+export default ParentRecordInfo;
diff --git a/ui/src/literature/components/ReferenceDiffInterface/ReferenceDiffInterface.tsx b/ui/src/literature/components/ReferenceDiffInterface/ReferenceDiffInterface.tsx
index b0237dc7ee..94b35f3b74 100644
--- a/ui/src/literature/components/ReferenceDiffInterface/ReferenceDiffInterface.tsx
+++ b/ui/src/literature/components/ReferenceDiffInterface/ReferenceDiffInterface.tsx
@@ -86,7 +86,7 @@ function ReferenceDiffInterface({
const urls = metadata.get('urls');
const collaborations = metadata.get('collaborations');
const collaborationsWithSuffix = metadata.get('collaborations_with_suffix');
- const linkedBook = metadata.get('linked_book');
+ const linkedBooks = metadata.get('linked_books');
const bookSeries = metadata.get('book_series');
const PDGkeywords = metadata.get('pdg_keywords');
const authorCount = metadata.get('author_count');
@@ -214,10 +214,9 @@ function ReferenceDiffInterface({
page="Literature detail"
/>
- {linkedBook && (
+ {linkedBooks && (
)}
{bookSeries && }
diff --git a/ui/src/literature/components/ReferenceDiffInterface/__tests__/ReferenceDiffInterface.test.tsx b/ui/src/literature/components/ReferenceDiffInterface/__tests__/ReferenceDiffInterface.test.tsx
index 5f7b3e30e4..2431f1f854 100644
--- a/ui/src/literature/components/ReferenceDiffInterface/__tests__/ReferenceDiffInterface.test.tsx
+++ b/ui/src/literature/components/ReferenceDiffInterface/__tests__/ReferenceDiffInterface.test.tsx
@@ -30,7 +30,7 @@ describe('ReferenceDiffInterface', () => {
urls: null,
collaborations: [{ value: 'CMS' }],
collaborations_with_suffix: [{ value: 'CMS' }],
- linked_book: null,
+ linked_books: null,
book_series: null,
pdg_keywords: null,
author_count: 1,
diff --git a/ui/src/literature/components/__tests__/ParentRecordInfo.test.jsx b/ui/src/literature/components/__tests__/ParentRecordInfo.test.jsx
index 6b194a9c03..e8ed57cdc1 100644
--- a/ui/src/literature/components/__tests__/ParentRecordInfo.test.jsx
+++ b/ui/src/literature/components/__tests__/ParentRecordInfo.test.jsx
@@ -6,20 +6,22 @@ import ParentRecordInfo from '../ParentRecordInfo';
describe('ParentRecordInfo', () => {
it('renders with parent record', () => {
- const parentRecord = fromJS({
+ const parentRecord = fromJS([{
title: 'A title of book',
record: { $ref: 'http://localhost:5000/api/literature/1234' },
- });
+ }]);
const wrapper = shallow();
expect(wrapper).toMatchSnapshot();
});
- it('renders with parent record', () => {
- const parentRecord = fromJS({
+ it('renders with subtitle and pages in parent record', () => {
+ const parentRecord = fromJS([{
title: 'A title of book',
subtitle: 'A subtitle',
+ page_start: '1',
+ page_end: '10',
record: { $ref: 'http://localhost:5000/api/literature/1234' },
- });
+ }]);
const wrapper = shallow();
expect(wrapper).toMatchSnapshot();
});
diff --git a/ui/src/literature/components/__tests__/__snapshots__/ParentRecordInfo.test.jsx.snap b/ui/src/literature/components/__tests__/__snapshots__/ParentRecordInfo.test.jsx.snap
index 39727473f1..1f167084f5 100644
--- a/ui/src/literature/components/__tests__/__snapshots__/ParentRecordInfo.test.jsx.snap
+++ b/ui/src/literature/components/__tests__/__snapshots__/ParentRecordInfo.test.jsx.snap
@@ -13,7 +13,7 @@ exports[`ParentRecordInfo renders with parent record 1`] = `
`;
-exports[`ParentRecordInfo renders with parent record 2`] = `
+exports[`ParentRecordInfo renders with subtitle and pages in parent record 1`] = `
Part of
@@ -27,5 +27,11 @@ exports[`ParentRecordInfo renders with parent record 2`] = `
A subtitle
+
+ ,
+ 1
+ -
+ 10
+
`;
diff --git a/ui/src/literature/containers/DetailPageContainer/DetailPageContainer.tsx b/ui/src/literature/containers/DetailPageContainer/DetailPageContainer.tsx
index 7a3467a7a9..eacee74241 100644
--- a/ui/src/literature/containers/DetailPageContainer/DetailPageContainer.tsx
+++ b/ui/src/literature/containers/DetailPageContainer/DetailPageContainer.tsx
@@ -47,7 +47,10 @@ import ReferenceSearchLinkAction from '../../../common/components/ReferenceSearc
import { getPapersQueryString } from '../../utils';
import ParentRecordInfo from '../../components/ParentRecordInfo';
import BookSeriesInfoList from '../../components/BookSeriesInfoList';
-import { CURATE_REFERENCE_NS, LITERATURE_SEMINARS_NS } from '../../../search/constants';
+import {
+ CURATE_REFERENCE_NS,
+ LITERATURE_SEMINARS_NS,
+} from '../../../search/constants';
import LiteratureSeminars from '../../components/LiteratureSeminars';
import { newSearch, searchBaseQueriesUpdate } from '../../../actions/search';
import ImprintInfo from '../../components/ImprintInfo';
@@ -103,7 +106,8 @@ function DetailPage({
const urls = metadata.get('urls');
const collaborations = metadata.get('collaborations');
const collaborationsWithSuffix = metadata.get('collaborations_with_suffix');
- const linkedBook = metadata.get('linked_book');
+ const linkedBooks = metadata.get('linked_books');
+
const bookSeries = metadata.get('book_series');
const hiddenCollection = metadata.get('is_collection_hidden');
const keywords = metadata.get('keywords');
@@ -294,11 +298,8 @@ function DetailPage({
page="Literature detail"
/>
- {linkedBook && (
-
+ {linkedBooks && (
+
)}
{bookSeries && }
{publicationInfoWithTitle &&