Skip to content
Snippets Groups Projects
Commit b9a8b195 authored by esikkala's avatar esikkala
Browse files

Update sdbm links

parent e239a89c
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ import TableHead from '@material-ui/core/TableHead'; ...@@ -12,6 +12,7 @@ import TableHead from '@material-ui/core/TableHead';
import Tooltip from '@material-ui/core/Tooltip'; import Tooltip from '@material-ui/core/Tooltip';
import FacetDialog from './FacetDialog'; import FacetDialog from './FacetDialog';
import ResultTablePaginationActions from './ResultTablePaginationActions'; import ResultTablePaginationActions from './ResultTablePaginationActions';
import { has } from 'lodash';
const styles = () => ({ const styles = () => ({
root: { root: {
...@@ -90,20 +91,18 @@ class ResultTable extends React.Component { ...@@ -90,20 +91,18 @@ class ResultTable extends React.Component {
}; };
idRenderer = (row) => { idRenderer = (row) => {
let cell = row.id.replace('http://ldf.fi/mmm/manifestation_singleton/', ''); let sdbmLink = '';
let sdbmUrl = ''; let id = row.id.replace('http://ldf.fi/mmm/manifestation_singleton/', '');
let id = ''; if (has(row, 'manuscriptRecord')) {
if (row.manuscriptRecord == '-') { sdbmLink = row.manuscriptRecord;
id = cell.replace('orphan_', '');
sdbmUrl = 'https://sdbm.library.upenn.edu/entries/' + id;
} else { } else {
id = cell; sdbmLink = row.entry;
sdbmUrl = row.manuscriptRecord; id = id.replace('orphan_', '');
} }
id = id.replace('part_', ''); id = id.replace('part_', '');
return ( return (
<div className={this.props.classes.tableColumn}> <div className={this.props.classes.tableColumn}>
<a target='_blank' rel='noopener noreferrer' href={sdbmUrl}>{id}</a> <a target='_blank' rel='noopener noreferrer' href={sdbmLink}>{id}</a>
</div> </div>
); );
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment