Commit 307029cd authored by ssp's avatar ssp
Browse files

support display of MSC classification information

parent e3348eff
......@@ -460,6 +460,7 @@ private function renderDetails ($result) {
$this->appendInfoToContainer( $this->detailLineAuto('doi', $result), $detailsList);
$this->appendInfoToContainer( $this->detailLineAuto('creator', $result), $detailsList);
$this->appendInfoToContainer( $this->detailLineAuto('mapscale', $result), $detailsList);
$this->appendInfoToContainer( $this->MSCDetailLine($result), $detailsList);
$this->appendInfoToContainer( $this->keywordsDetailLine($result), $detailsList);
$this->appendInfoToContainer( $this->locationDetails($result), $detailsList);
......@@ -943,6 +944,45 @@ private function keywordsDetailLine ($result) {
/**
*
* @param array $result
* @return array of DOM Elements
*/
private function MSCDetailLine ($result) {
$infoElements = Null;
$MSCInfo = Array();
$notes = Array();
foreach($result['location'] as $locationAll) {
$location = $locationAll['ch'];
if ($location['md-classification-msc']) {
foreach($location['md-classification-msc'] as $MSCAll) {
$MSCInfo[$MSCAll['values'][0]] = TRUE;
if (array_key_exists('attrs', $MSCAll) && array_key_exists('accordingto', $MSCAll['attrs'])) {
$notes[$MSCAll['attrs']['accordingto']] = TRUE;
}
}
}
}
$MSCStrings = array_keys($MSCInfo);
if (count($MSCStrings) > 0 ) {
$MSCString = implode(', ', $MSCStrings);
$MSCNotes = array_keys($notes);
if (count($MSCNotes) > 0) {
$MSCString .= ' (' . Tx_Extbase_Utility_Localization::translate('gemäß', 'Pazpar2') . ' ' . implode(', ', $MSCNotes) . ')';
}
$infoElements = Array($this->doc->createTextNode($MSCString));
}
return $this->detailLine('classification-msc', $infoElements);
}
// Not implemented in the PHP version.
private function mapDetailLine ($result) {
......
......@@ -149,6 +149,7 @@ Fields used to display data:
* catalogue-url (URL linking to the catalogue web page for that record, built using the stylesheets and setup for the various targets.)
* parent-catalogue-url (URL linking to the catalogue web page for related records to the current record, typically the containing parent collection.)
* subject
* classification-msc (not part of standard tmarc.xsl)
* mapscale (not part of standard tmarc.xsl), display the scale of maps and potentially draw the region covered by the map on an interactive map on the web page
For the 'medium' field, the supported types (with a localised name and icon) are. Most of them come from standard tmarc.xsl analysis of Marc records. A few depend on our refinements of tmarc.xsl and additional information/analysis.
......
......@@ -69,11 +69,14 @@ Please run the search from a German university network for more complete results
<label index="detail-label-doi-plural">DOIs</label>
<label index="detail-label-keyword">Keyword</label>
<label index="detail-label-keyword-plural">Keywords</label>
<label index="detail-label-classification-msc">MSC</label>
<label index="detail-label-acronym-classification-msc">Mathematics Subject Classification</label>
<label index="detail-label-map">Location</label>
<label index="detail-label-mapscale">Scale</label>
<label index="detail-label-creator">catalogued by</label>
<label index="elektronisch">electronic</label>
<label index="gedruckt">printed</label>
<label index="gemäß">according to</label>
<label index="Ausgabe">Edition</label>
<label index="In">In</label>
<label index="Im Katalog ansehen">View in catalogue.</label>
......@@ -200,11 +203,14 @@ Bei Zugriff aus einem deutschen Universitätsnetzwerk umfaßt Ihre Abfrage zusä
<label index="detail-label-doi-plural">DOIs</label>
<label index="detail-label-keyword">Schlagwort</label>
<label index="detail-label-keyword-plural">Schlagwörter</label>
<label index="detail-label-classification-msc">MSC</label>
<label index="detail-label-acronym-classification-msc">Mathematics Subject Classification</label>
<label index="detail-label-map">Ort</label>
<label index="detail-label-mapscale">Maßstab</label>
<label index="detail-label-creator">erfasst von</label>
<label index="elektronisch">digital</label>
<label index="gedruckt">gedruckt</label>
<label index="gemäß">according to</label>
<label index="Ausgabe">Ausgabe</label>
<label index="In">In</label>
<label index="Im Katalog ansehen">Im Katalog ansehen.</label>
......
Subproject commit 01fe06db144ba704f7c781a038122270d64831ea
Subproject commit 1000200f6f110fe52bf22f3f2401d0c057b59fbf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment