-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
frontsite: DocumentDetails: Display multipart above Literature Title #624
base: master
Are you sure you want to change the base?
frontsite: DocumentDetails: Display multipart above Literature Title #624
Conversation
render() { | ||
const { metadata } = this.props; | ||
const volume = _get(metadata, 'relations.multipart_monograph[0].volume'); | ||
|
||
return ( | ||
<> | ||
<Header> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you don't check if the volume number and relation metadata exists before rendering the Header component, you will most likely end up with an empty space on top of the column (for regular books without multipart and serials)
<Link key={rel.pid_value} to={this.getLinkTo(rel)}> | ||
{rel.record_metadata.title} | ||
</Link> | ||
{index === relationsData.length - 1 ? ' featuring:' : ' and '} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure I understand why we need "and"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it is a list, there can be multiple relations, can also use ,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
normally, a volume can belong only to one multipart monograph (but multiple serials, that's why it is modelled as a list), but for this particular case we should display only one multipart
❤️ Thank you for your contribution!
Description
closes: CERNDocumentServer/cds-ils#734