Merge pull request #603 from albig/fix-559
Show all subparts in collection view
This commit is contained in:
commit
17bd286ba1
|
@ -1169,16 +1169,21 @@ abstract class Document
|
|||
$metadata['volume'] = $metadata['year'];
|
||||
}
|
||||
if (empty($metadata['volume_sorting'][0])) {
|
||||
if (!empty($metadata['year_sorting'][0])) {
|
||||
// If METS @ORDER is given it is preferred over year_sorting and year.
|
||||
if (!empty($metadata['mets_order'][0])) {
|
||||
$metadata['volume_sorting'][0] = $metadata['mets_order'][0];
|
||||
} elseif (!empty($metadata['year_sorting'][0])) {
|
||||
$metadata['volume_sorting'][0] = $metadata['year_sorting'][0];
|
||||
} elseif (!empty($metadata['year'][0])) {
|
||||
$metadata['volume_sorting'][0] = $metadata['year'][0];
|
||||
}
|
||||
}
|
||||
// If volume_sorting is still empty, try to use title_sorting finally (workaround for newspapers)
|
||||
// If volume_sorting is still empty, try to use title_sorting or METS @ORDERLABEL finally (workaround for newspapers)
|
||||
if (empty($metadata['volume_sorting'][0])) {
|
||||
if (!empty($metadata['title_sorting'][0])) {
|
||||
$metadata['volume_sorting'][0] = $metadata['title_sorting'][0];
|
||||
} elseif (!empty($metadata['mets_orderlabel'][0])) {
|
||||
$metadata['volume_sorting'][0] = $metadata['mets_orderlabel'][0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1249,6 +1254,7 @@ abstract class Document
|
|||
'collections' => $metadata['collection'],
|
||||
'mets_label' => $metadata['mets_label'][0],
|
||||
'mets_orderlabel' => $metadata['mets_orderlabel'][0],
|
||||
'mets_order' => $metadata['mets_order'][0],
|
||||
'owner' => $metadata['owner'][0],
|
||||
'solrcore' => $core,
|
||||
'status' => 0,
|
||||
|
|
|
@ -131,6 +131,7 @@ final class MetsDocument extends Document
|
|||
{
|
||||
$details = $this->getLogicalStructure($id);
|
||||
if (!empty($details)) {
|
||||
$metadata['mets_order'][0] = $details['order'];
|
||||
$metadata['mets_label'][0] = $details['label'];
|
||||
$metadata['mets_orderlabel'][0] = $details['orderlabel'];
|
||||
}
|
||||
|
|
|
@ -403,7 +403,8 @@ class Collection extends \Kitodo\Dlf\Common\AbstractPlugin
|
|||
'p' => []
|
||||
];
|
||||
} else {
|
||||
$subparts[$resArray['partof']][$resArray['volume_sorting']] = [
|
||||
// volume_sorting should be always set - but it's not a required field. We append the uid to the array key to make it always unique.
|
||||
$subparts[$resArray['partof']][$resArray['volume_sorting'] . str_pad($resArray['uid'], 9, '0', STR_PAD_LEFT)] = [
|
||||
'u' => $resArray['uid'],
|
||||
'h' => '',
|
||||
's' => $sorting,
|
||||
|
|
Laden…
Verwijs in nieuw issue