diff --git a/Classes/Controller/PersonController.php b/Classes/Controller/PersonController.php
index 111c1c6..74ac386 100755
--- a/Classes/Controller/PersonController.php
+++ b/Classes/Controller/PersonController.php
@@ -46,6 +46,7 @@ public function showAction(GndPerson $person)
pluck('published_subitems')->
flatten(1)->
pluck('prints_by_date')->
+ flatten(1)->
filter()->
count();
diff --git a/Classes/Controller/PublishedItemController.php b/Classes/Controller/PublishedItemController.php
index dcb58d7..7f76680 100755
--- a/Classes/Controller/PublishedItemController.php
+++ b/Classes/Controller/PublishedItemController.php
@@ -50,27 +50,23 @@ public function showAction(PublishedItem $publishedItem)
( $a->getDateOfAction() == $b->getDateOfAction() ? 0 : 1 );
};
$publisherMikroItems = $publishedItem->getPublishedSubitems()->toArray();
- $publisherActions = [];
- // use collection
- foreach ($publisherMikroItems as $publisherMikroItem) {
- $publisherActions = array_merge(
- $publisherActions,
- $this->publisherActionRepository->findByPublishedsubitem($publisherMikroItem)->toArray()
- );
- }
- usort($publisherActions, $sortByDate);
$document = $this->searchService->
reset()->
setIndex(self::TABLE_INDEX_NAME)->
setId($publishedItem->getMvdbId())->
search();
+ $hasPrints = $document->
+ get('published_subitems')->
+ pluck('prints_by_date')->
+ flatten(1)->
+ count();
$visualizationCall = $this->getJsCall($document, $this->publishers, $publishedItem->getMvdbId());
$publishers = $this->publisherRepository->findAll();
$this->view->assign('publishedItem', $publishedItem);
$this->view->assign('publisherMikroItems', $publisherMikroItems);
- $this->view->assign('publisherActions', $publisherActions);
+ $this->view->assign('hasPrints', $hasPrints);
$this->view->assign('visualizationCall', $visualizationCall);
$this->view->assign('tableTarget', self::TABLE_TARGET);
$this->view->assign('graphTarget', self::GRAPH_TARGET);
diff --git a/Classes/Controller/WorkController.php b/Classes/Controller/WorkController.php
index 55d68d5..bc6dfc7 100755
--- a/Classes/Controller/WorkController.php
+++ b/Classes/Controller/WorkController.php
@@ -61,6 +61,7 @@ public function showAction(GndWork $work)
pluck('published_subitems')->
flatten(1)->
pluck('prints_by_date')->
+ flatten(1)->
filter()->
count();
$publishedItems = $this->publishedItemRepository->findByContainedWorks($work->getUid());
diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript
index 0ece0f2..fc97fcb 100755
--- a/Configuration/TypoScript/setup.typoscript
+++ b/Configuration/TypoScript/setup.typoscript
@@ -94,8 +94,9 @@ page {
d3 = EXT:guv_sitepackage/Resources/Public/JavaScript/Dist/d3.min.js
}
includeJSFooter {
- research = EXT:guv_sitepackage/Resources/Public/JavaScript/Dist/research.js
- lastVisited = EXT:mpdb_presentation/Resources/Public/JavaScript/LastVisitedFe.js
+ translate = EXT:mpdb_presentation/Resources/Public/JavaScript/Translate.js
+ #research = EXT:guv_sitepackage/Resources/Public/JavaScript/Dist/research.js
+ #lastVisited = EXT:mpdb_presentation/Resources/Public/JavaScript/LastVisitedFe.js
visualizationController = EXT:mpdb_presentation/Resources/Public/JavaScript/VisualizationController.js
tableController = EXT:mpdb_presentation/Resources/Public/JavaScript/TableController.js
dashboardController = EXT:mpdb_presentation/Resources/Public/JavaScript/DashboardController.js
diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf
index b2b7f63..fe1474a 100644
--- a/Resources/Private/Language/de.locallang.xlf
+++ b/Resources/Private/Language/de.locallang.xlf
@@ -80,8 +80,8 @@
Ergänzende Titelinformationen
-
- gedruckt in
+
+ zugehörige Verlagsartikel
@@ -153,8 +153,8 @@
Keine Wirtschaftsdaten
-
- Für einige Verlagsartikel konnten keine Wirtschaftsdaten gefunden werden.
+
+ Die ausgewerteten Quellen enthielten keine Wirtschaftsdaten.
diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf
index a3bd08a..e949621 100644
--- a/Resources/Private/Language/locallang.xlf
+++ b/Resources/Private/Language/locallang.xlf
@@ -76,7 +76,7 @@
-
+
@@ -94,7 +94,7 @@
-
+
diff --git a/Resources/Private/Partials/Index/IndexPicker.html b/Resources/Private/Partials/Index/IndexPicker.html
index 8b44ef6..cd5492f 100644
--- a/Resources/Private/Partials/Index/IndexPicker.html
+++ b/Resources/Private/Partials/Index/IndexPicker.html
@@ -23,7 +23,7 @@
{mpdbpres:setConfig(config:searchconfig,key:'index',value:'')}
- X
+
diff --git a/Resources/Private/Partials/Index/PublisherPicker.html b/Resources/Private/Partials/Index/PublisherPicker.html
index 06c0cc3..a0a4252 100644
--- a/Resources/Private/Partials/Index/PublisherPicker.html
+++ b/Resources/Private/Partials/Index/PublisherPicker.html
@@ -23,7 +23,7 @@
{mpdbpres:setConfig(config:searchconfig,key:'publisher',value:'')}
- X
+
diff --git a/Resources/Private/Partials/Index/SearchSlot.html b/Resources/Private/Partials/Index/SearchSlot.html
index 379da0c..c2f2523 100644
--- a/Resources/Private/Partials/Index/SearchSlot.html
+++ b/Resources/Private/Partials/Index/SearchSlot.html
@@ -11,7 +11,7 @@
{mpdbpres:setConfig(config:searchConfig,key:'searchTerm',value:'')}
- X
+
diff --git a/Resources/Private/Templates/Person/Show.html b/Resources/Private/Templates/Person/Show.html
index b437402..d042404 100755
--- a/Resources/Private/Templates/Person/Show.html
+++ b/Resources/Private/Templates/Person/Show.html
@@ -95,12 +95,46 @@ {person.name}
+
+
+
+
+
+
+
+
+ -
+
+ {work.full_title}, op. {work.opus_no}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
{visualizationCall->f:format.raw()}
@@ -117,31 +151,6 @@
{personGraph}
-
-
-
-
-
-
-
- -
-
- {work.full_title}, op. {work.opus_no}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Resources/Private/Templates/PublishedItem/Show.html b/Resources/Private/Templates/PublishedItem/Show.html
index 3ecfe9d..57cbc32 100755
--- a/Resources/Private/Templates/PublishedItem/Show.html
+++ b/Resources/Private/Templates/PublishedItem/Show.html
@@ -183,11 +183,19 @@
{publishedItem.publicComment}
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
{visualizationCall->f:format.raw()}
diff --git a/Resources/Private/Templates/Work/Show.html b/Resources/Private/Templates/Work/Show.html
index 84517b0..3c7bae4 100755
--- a/Resources/Private/Templates/Work/Show.html
+++ b/Resources/Private/Templates/Work/Show.html
@@ -165,11 +165,72 @@
+
+
+
+
+
+
+ -
+ {subWork.subWork.fullTitle}
+
+ op. {subWork.subWork.opusNo}
+
+
+ {subWork.subWork.indexNo}
+
+
+ ({subWork.subWork.gndId})
+
+
+
+
+
+ {makro.mvdbId}: {makro.title}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+ {item.mvdb_id}: {item.title}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
{visualizationCall->f:format.raw()}
@@ -183,60 +244,7 @@
-
-
-
-
-
-
-
- -
- {subWork.subWork.fullTitle}
-
- op. {subWork.subWork.opusNo}
-
-
- {subWork.subWork.indexNo}
-
-
- ({subWork.subWork.gndId})
-
-
-
-
-
- {makro.mvdbId}: {makro.title}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
- {item.mvdb_id}: {item.title}
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/Resources/Public/Icons/x-inv.svg b/Resources/Public/Icons/x-inv.svg
new file mode 100644
index 0000000..ba9d4e2
--- /dev/null
+++ b/Resources/Public/Icons/x-inv.svg
@@ -0,0 +1,51 @@
+
+
+
+
diff --git a/Resources/Public/Icons/x.svg b/Resources/Public/Icons/x.svg
new file mode 100644
index 0000000..16e74ad
--- /dev/null
+++ b/Resources/Public/Icons/x.svg
@@ -0,0 +1,51 @@
+
+
+
+
diff --git a/Resources/Public/JavaScript/DashboardController.js b/Resources/Public/JavaScript/DashboardController.js
index 2419e58..d0d0bc5 100644
--- a/Resources/Public/JavaScript/DashboardController.js
+++ b/Resources/Public/JavaScript/DashboardController.js
@@ -2,23 +2,70 @@ const tx_publisherdb_dashboardExcludedItem = 'excluded-item';
const tx_publisherdb_dashboardExcludedYear = 'excluded-year';
const tx_publisherdb_dashboardPublisher = 'publisher';
+const prefix = 'dashboard';
+const movingAverages = `${prefix}-moving-averages`;
+const setMovingAverage = `${prefix}-set-moving-average`;
+const setCumulative = `${prefix}-set-cumulative`;
+const setPerYear = `${prefix}-set-per-year`;
+const setByDate = `${prefix}-set-by-date`;
+const btnClassList = 'primary button hollow';
+
const tx_publisherdb_dashboardController = {
-
+
set target(target) {
this._target = target;
this.render();
},
- render() {
- const createIncludeButton = type => id => ` + `;
- const createYearIncludeButton = createIncludeButton('year');
- const createElementIncludeButton = createIncludeButton('element');
-
- const target = d3.select(`#${this._target}`);
+ draw(targetElement) {
+ const target = d3.select(targetElement);
target.html('');
+ const movingAverages = target.append('div')
+ .attr('class', 'display')
+ movingAverages.append('h3')
+ .html('Anzeige');
+ const movingAveragesList = movingAverages.append('div')
+ .attr('class', 'tiny button-group');
+ tx_publisherdb_visualizationStatus.movingAverages.forEach( ma => {
+ movingAveragesList
+ .append('a')
+ .attr('data', ma)
+ .attr('type', setMovingAverage)
+ .attr('class', btnClassList)
+ .html(`gleitender MW ${ma}`);
+ });
+ movingAveragesList.append('a')
+ .attr('type', setCumulative)
+ .attr('class', btnClassList)
+ .html('kumulativ');
+ movingAveragesList.append('a')
+ .attr('type', setPerYear)
+ .attr('class', btnClassList)
+ .html('pro Jahr');
+ movingAveragesList.append('a')
+ .attr('type', setByDate)
+ .attr('class', btnClassList)
+ .html('nach Datum');
+
+ if (!tx_publisherdb_visualizationStatus.isPublishedItem) {
+ const publishers = target.append('div')
+ .attr('class', 'dashboard-publishers');
+ publishers.append('h3')
+ .text('Verlage');
+ const publisherList = publishers.append('div')
+ .attr('class', 'tiny button-group');
+ publisherList.selectAll(`a.${tx_publisherdb_dashboardPublisher}`)
+ .data(tx_publisherdb_visualizationStatus.publishers)
+ .join('a')
+ .attr('class', `${tx_publisherdb_dashboardPublisher} primary button hollow include-year`)
+ .attr('class', d => d.id)
+ .html(d => d.id)
+ .attr('title', d => d.name);
+ }
+
const excludedItems = target.append('div')
- .attr('id', 'dashboard-excluded-items');
+ .attr('class', 'dashboard-excluded-items');
excludedItems.append('h3')
.text('Ausgeschlossene Verlagsartikel');
if (tx_publisherdb_visualizationStatus.excludedElements.length) {
@@ -36,57 +83,19 @@ const tx_publisherdb_dashboardController = {
.style('font-style', 'italic')
.style('font-size', '80%')
.attr('id', 'tx_mpdbpresentation_excludeinfo')
- .text('keine Verlagsartikel ausgeschlossen')
+ .text('Sie können in der tabellarischen Ansicht auf das "X" klicken, um einzelne Verlagsteilartikel aus den Ansichten auszuschließen.')
}
- /*
- const excludedYears = target.append('div')
- .attr('id', 'dashboard-excluded-years');
- excludedYears.append('h3')
- .text('Ausgeschlossene Jahre');
- if (tx_publisherdb_visualizationStatus.excludedYears.length) {
- const excludedYearList = excludedYears.append('div')
- .attr('class', 'tiny button-group');
- excludedYearList.selectAll(`a.${tx_publisherdb_dashboardExcludedYear}`)
- .data(tx_publisherdb_visualizationStatus.excludedYears.sort())
- .join('a')
- .attr('class', `${tx_publisherdb_dashboardExcludedYear} primary button hollow include-year`)
- .attr('id', d => d)
- .html(d => d);
- }
- */
+ },
- const movingAverages = target.append('div')
- .attr('id', 'dashboard-moving-averages')
- movingAverages.append('h3')
- .html('Anzeige');
- const movingAveragesList = movingAverages.append('div')
- .attr('class', 'tiny button-group');
- tx_publisherdb_visualizationStatus.movingAverages.forEach( ma => {
- movingAveragesList
- .append('a')
- .attr('id', `dashboard-set-moving-average-${ma}`)
- .attr('class', 'dashboard-set-moving-average primary button hollow')
- .html(`gleitender MW ${ma}`);
- });
- movingAveragesList.append('a')
- .attr('id', 'dashboard-set-cumulative')
- .attr('class', 'primary button hollow dashboard-set-cumulativity')
- .html('kumulativ');
- /*
- movingAveragesList.append('a')
- .attr('id', 'dashboard-set-absolute')
- .attr('class', 'primary button hollow dashboard-set-cumulativity')
- .html('absolut');
- */
- movingAveragesList.append('a')
- .attr('id', 'dashboard-set-per-year')
- .attr('class', 'primary button hollow dashboard-set-granularity')
- .html('pro Jahr');
- movingAveragesList.append('a')
- .attr('id', 'dashboard-set-by-date')
- .attr('class', 'primary button hollow dashboard-set-granularity')
- .html('nach Datum');
+ render() {
+ const createIncludeButton = type => id => ` + `;
+ const createYearIncludeButton = createIncludeButton('year');
+ const createElementIncludeButton = createIncludeButton('element');
+ const displayBtnList = `a[type=${setMovingAverage}], a[type=${setCumulative}], a[type=${setPerYear}], a[type=${setByDate}]`;
+
+ const target = d3.selectAll(`.${this._target}`);
+ target.nodes().forEach(target => this.draw(target));
$('a.include-year').click( e => {
const year = e.currentTarget.id;
@@ -98,62 +107,50 @@ const tx_publisherdb_dashboardController = {
tx_publisherdb_visualizationStatus.includeElement(element);
});
- $('a.dashboard-set-moving-average').click ( e => {
- const ma = e.currentTarget.id.replace('dashboard-set-moving-average-', '');
+ $(`a[type=${setMovingAverage}]`).click ( e => {
+ const ma = e.currentTarget.attributes.data.nodeValue;
tx_publisherdb_visualizationStatus.config = {
granularity: tx_publisherdb_granularity.PER_YEAR,
cumulativity: tx_publisherdb_cumulativity.MOVING_AVERAGE,
movingAverage: ma
};
+
+ $(displayBtnList).addClass('hollow');
+ $(`a[type=${setMovingAverage}][data=${ma}]`).removeClass('hollow');
});
- $('a.dashboard-set-cumulativity').click ( e => {
- if (e.currentTarget.id == 'dashboard-set-cumulative') {
- tx_publisherdb_visualizationStatus.config = {
- granularity: tx_publisherdb_granularity.PER_YEAR,
- cumulativity: tx_publisherdb_cumulativity.CUMULATIVE,
- movingAverage: -1
- }
- } else {
- tx_publisherdb_visualizationStatus.config = {
- granularity: tx_publisherdb_visualizationStatus.config.granularity,
- cumulativity: tx_publisherdb_cumulativity.ABSOLUTE,
- movingAverage: -1
- }
+ $(`a[type=${setCumulative}]`).click ( e => {
+ tx_publisherdb_visualizationStatus.config = {
+ granularity: tx_publisherdb_granularity.PER_YEAR,
+ cumulativity: tx_publisherdb_cumulativity.CUMULATIVE,
+ movingAverage: -1
}
+
+ $(displayBtnList).addClass('hollow');
+ $(`a[type=${setCumulative}]`).removeClass('hollow');
});
- $('a.dashboard-set-granularity').click ( e => {
- if (e.currentTarget.id == 'dashboard-set-per-year') {
- tx_publisherdb_visualizationStatus.config = {
- cumulativity: tx_publisherdb_cumulativity.ABSOLUTE,
- granularity: tx_publisherdb_granularity.PER_YEAR,
- movingAverage: -1
- }
- } else {
- tx_publisherdb_visualizationStatus.config = {
- cumulativity: tx_publisherdb_cumulativity.ABSOLUTE,
- granularity: tx_publisherdb_granularity.BY_DATE,
- movingAverage: -1
- }
+ $(`a[type=${setPerYear}]`).click ( e => {
+ tx_publisherdb_visualizationStatus.config = {
+ cumulativity: tx_publisherdb_cumulativity.ABSOLUTE,
+ granularity: tx_publisherdb_granularity.PER_YEAR,
+ movingAverage: -1
}
+
+ $(displayBtnList).addClass('hollow');
+ $(`a[type=${setPerYear}]`).removeClass('hollow');
});
- if (!tx_publisherdb_visualizationStatus.isPublishedItem) {
- const publishers = target.append('div')
- .attr('id', 'dashboard-publishers');
- publishers.append('h3')
- .text('Verlage');
- const publisherList = publishers.append('div')
- .attr('class', 'tiny button-group');
- publisherList.selectAll(`a.${tx_publisherdb_dashboardPublisher}`)
- .data(tx_publisherdb_visualizationStatus.publishers)
- .join('a')
- .attr('class', `${tx_publisherdb_dashboardPublisher} primary button hollow include-year`)
- .attr('id', d => d.id)
- .html(d => d.id)
- .attr('title', d => d.name);
- }
+ $(`a[type=${setByDate}]`).click ( e => {
+ tx_publisherdb_visualizationStatus.config = {
+ cumulativity: tx_publisherdb_cumulativity.ABSOLUTE,
+ granularity: tx_publisherdb_granularity.BY_DATE,
+ movingAverage: -1
+ }
+
+ $(displayBtnList).addClass('hollow');
+ $(`a[type=${setByDate}]`).removeClass('hollow');
+ });
$(`a.${tx_publisherdb_dashboardPublisher}`).click ( e => {
tx_publisherdb_visualizationStatus.currentPublisher = e.currentTarget.id;
diff --git a/Resources/Public/JavaScript/SubitemController.js b/Resources/Public/JavaScript/SubitemController.js
index 1bf6f89..db515ef 100644
--- a/Resources/Public/JavaScript/SubitemController.js
+++ b/Resources/Public/JavaScript/SubitemController.js
@@ -32,6 +32,7 @@ const tx_publisherdb_subitemController = {
qScale: qScale,
data: data,
title: this.titles[i],
+ subtitle: tx_mpdbpresentation_translate(this.titles[i]),
margin: this.margin,
isMain: false,
type: this.type
diff --git a/Resources/Public/JavaScript/TableController.js b/Resources/Public/JavaScript/TableController.js
index 86cbd89..856a376 100644
--- a/Resources/Public/JavaScript/TableController.js
+++ b/Resources/Public/JavaScript/TableController.js
@@ -1,6 +1,7 @@
const tx_publisherdb_tableClass = 'data-table';
const tx_publisherdb_tableSort = 'datatable-sort';
const tx_publisherdb_tableYear = 'datatable-year';
+const tx_publisherdb_tableTranslation = 'datatable-translation';
const tx_publisherdb_tableItem = 'datatable-item';
const tx_publisherdb_tableRow = 'datatable-row';
const tx_publisherdb_tableData = 'datatable-data';
@@ -45,8 +46,25 @@ const tx_publisherdb_tableController = {
.attr('class', tx_publisherdb_tableClass);
const tableHead = table.append('thead');
- const headRow = tableHead.append('tr');
+ const translationHeadRow = tableHead.append('tr');
+ translationHeadRow.append('th');
+ translationHeadRow.selectAll(`th.${tx_publisherdb_tableTranslation}`)
+ .data(tx_publisherdb_visualizationStatus.subitemIds)
+ .join('th')
+ .attr('scope', 'col')
+ .attr('class', tx_publisherdb_tableTranslation)
+ .attr('id', d => d)
+ .attr('class', 'text-right')
+ .html(d => tx_mpdbpresentation_translate(d));
+ if (
+ !tx_publisherdb_visualizationStatus.singleItem &&
+ tx_publisherdb_visualizationStatus.targetData != 'prints_by_date'
+ ) {
+ translationHeadRow.append('th');
+ }
+
+ const headRow = tableHead.append('tr');
const yearHead = headRow.append('th');
yearHead
.attr('scope', 'col')
diff --git a/Resources/Public/JavaScript/TimeseriesView.js b/Resources/Public/JavaScript/TimeseriesView.js
index a74562e..569e996 100644
--- a/Resources/Public/JavaScript/TimeseriesView.js
+++ b/Resources/Public/JavaScript/TimeseriesView.js
@@ -14,12 +14,13 @@ class TimeseriesView {
this.margin = config.margin;
this.isMain = config.isMain;
this.title = config.title;
+ this.subtitle = config.subtitle;
this.type = config.type;
this.init();
}
get height() {
- return this._height + this.margin;
+ return this._height + 2 * this.margin;
}
init() {
@@ -32,7 +33,12 @@ class TimeseriesView {
render() {
this.target.append('text')
- .text(this.title);
+ .text(this.title)
+ .attr('style', 'font-weight: bold')
+ .attr('transform', 'translate(0,-25)');
+ this.target.append('text')
+ .text(this.subtitle)
+ .attr('transform', 'translate(0,-5)');
const qScale = this.qScale.range([this._height, 0]);
const qAxis = d3.axisRight()
.scale(this.qScale)
diff --git a/Resources/Public/JavaScript/Translate.js b/Resources/Public/JavaScript/Translate.js
new file mode 100644
index 0000000..8e48054
--- /dev/null
+++ b/Resources/Public/JavaScript/Translate.js
@@ -0,0 +1,266 @@
+function tx_mpdbpresentation_translate (input) {
+ let multiPartMap =
+ {
+ 'A': 'Alt',
+ 'B' : 'Bass',
+ 'Ba': 'Bariton',
+ 'BC': 'Basso Continuo',
+ 'C': 'Cembalo',
+ 'Div': 'Diverse',
+ 'Fg': 'Fagott',
+ 'Fl': 'Flöte',
+ 'Gi': 'Gitarre',
+ 'Gs': 'Gesang',
+ 'Hr': 'Horn',
+ 'Kl': 'Klarinette',
+ 'K': 'Klavier',
+ 'K4h': 'Klavier vierhändig',
+ 'Kb': 'Kontrabass',
+ 'Ma': 'Mandola',
+ 'Ml': 'Mandoline',
+ 'Ms': 'Mezzosopran',
+ 'Ob': 'Oboe',
+ 'Or': 'Orgel',
+ 'Pa': 'Pauke',
+ 'Po': 'Posaune',
+ 'S': 'Sopran',
+ 'Tm': 'Tamborin',
+ 'T': 'Tenor',
+ 'Ti': 'Timpani',
+ 'Tn': 'Triangel',
+ 'TnTm': 'Triangel und Tamburin',
+ 'Tr': 'Trompete',
+ 'Tu': 'Tuba',
+ 'Va': 'Viola',
+ 'Vl': 'Violine',
+ 'Vc': 'Violoncello',
+ 'Zi': 'Zither',
+ 'Blä': 'Bläsersatz/-stimmen',
+ 'Qu': 'Quartettstimmen',
+ 'Str': 'Streichersatz',
+ 'Prc': 'Schlag-/Percussionstimmen'
+ };
+
+ const onePartMap =
+ {
+ 'N': '',
+ 'Cplt': 'Complett',
+ 'PStC': 'Partitur und Stimmen',
+ '2K4h': '2 Klaviere (4hd.)',
+ '2K8h': '2 Klaviere (8hd.)',
+ 'K4h': 'Klavier (4hd.)',
+ 'KA4h': 'Klavierauszug vierhändig',
+ 'KAmT': 'Klavierauszug mit Text',
+ 'KAoT': 'Klavierauszug ohne Text',
+ 'KA': 'Klavierauszug',
+ 'StC': 'Stimmen Complett',
+ 'KAB': 'Klavierauszug Begleitung',
+ 'K': 'Klavier (2hd.)',
+ 'P': 'Partitur',
+ 'PCh': 'Chorstimmenpartitur',
+ 'POr': 'Orchesterstimmenpartitur',
+ 'StCOr': 'Kompletter Orchesterstimmensatz',
+ 'StCCh': 'Kompletter Chorstimmensatz',
+ 'StCChSoloGs': 'Kompletter Chorstimmensatz, Solostimme Gesang',
+ 'StCChSATB': 'Kompletter Chorstimmensatz SATB',
+ 'StCChTTBB': 'Kompletter Chorstimmensatz TTBB',
+ 'StCSolo': 'Kompletter Solostimmensatz',
+ 'StInc': 'Inkompletter Stimmensatz',
+ 'hS': 'Hohe Stimme',
+ 'mS': 'Mittlere Stimme',
+ 'tS': 'Tiefe Stimme',
+ 'tA': 'Tiefer Alt',
+ 'Nbsp': 'Notenbeispiele',
+ 'Kad': 'Kadenzen'
+ };
+
+ const voiceMap = {
+ 'N': 1,
+ 'Cplt': 2,
+ 'P': 3,
+ 'K': 11,
+ 'K4h': 12,
+ '2K4h': 13,
+ '2K8h': 14,
+ 'C': 15,
+ 'BC': 16,
+ 'Or': 17,
+ 'KA': 21,
+ 'KA4h': 22,
+ 'KAmT': 23,
+ 'KAoT': 24,
+ 'StC': 31,
+ 'PCh': 101,
+ 'Or': 102,
+ 'POr': 103,
+ 'KAB': 111,
+ 'StCOr': 121,
+ 'StCCh': 122,
+ 'StCChSATB': 123,
+ 'StCChTTBB': 124,
+ 'StCSolo': 125,
+ 'StInc': 126,
+ 'StInst': 127,
+ 'StOber': 128,
+ 'St': 129,
+ 'hS': 131,
+ 'mS': 132,
+ 'tS': 133,
+ 'tA': 134,
+ 'TrA': 141,
+ 'Nbsp': 151,
+ 'Kad': 152,
+ 'S1': 201,
+ 'S2': 202,
+ 'S3': 203,
+ 'EStS': 204,
+ 'EStS1': 205,
+ 'EStS2': 206,
+ 'EStS3': 207,
+ 'Ms1': 211,
+ 'Ms2': 212,
+ 'Ms3': 213,
+ 'EStMs': 214,
+ 'EStMs1': 215,
+ 'EStMs2': 216,
+ 'EStMs3': 217,
+ 'A1': 221,
+ 'A2': 222,
+ 'A3': 223,
+ 'EStA': 224,
+ 'EStA1': 225,
+ 'EStA2': 226,
+ 'EStA3': 227,
+ 'T1': 231,
+ 'T2': 232,
+ 'T3': 233,
+ 'EStT': 234,
+ 'EStT1': 235,
+ 'EStT2': 236,
+ 'EStT3': 237,
+ 'Ba1': 241,
+ 'Ba2': 242,
+ 'Ba3': 243,
+ 'EStBa': 244,
+ 'EStBa1': 245,
+ 'EStBa2': 246,
+ 'EStBa3': 247,
+ 'B1': 251,
+ 'B2': 252,
+ 'B3': 253,
+ 'EStB': 254,
+ 'EStB1': 255,
+ 'EStB2': 256,
+ 'EStB3': 257,
+ 'Vl': 401,
+ 'EStVl': 402,
+ 'EStVl1': 403,
+ 'EStVl2': 404,
+ 'Va': 412,
+ 'EStVa': 413,
+ 'Vc': 414,
+ 'EStVc': 415,
+ 'Kb': 416,
+ 'EStKb': 417,
+ 'Pi': 500,
+ 'EStPi': 501,
+ 'Fl': 502,
+ 'EStFl': 503,
+ 'Kl': 504,
+ 'EStKl': 505,
+ 'Ob': 506,
+ 'EStOb': 507,
+ 'Fg': 508,
+ 'EStFg': 509,
+ 'Tr': 601,
+ 'EStTr': 601,
+ 'Hr': 603,
+ 'EStHr': 604,
+ 'Po': 604,
+ 'EStPo': 606,
+ 'Tu': 609,
+ 'EStTu': 610,
+ 'Gi': 701,
+ 'Gs': 702,
+ 'Ha': 703,
+ 'Ma': 704,
+ 'Ml': 705,
+ 'Zi': 901,
+ 'Pa': 911,
+ 'Tm': 912,
+ 'Ti': 913,
+ 'Tn': 914,
+ 'Div': 990,
+ 'Blä': 1001,
+ 'EStBlä': 1002,
+ 'Qu': 1010,
+ 'EStQu': 1011,
+ 'Str': 1020,
+ 'EStStr': 1021,
+ 'Qui': 1003,
+ 'Str': 1004,
+ 'Prc': 1005 }
+
+ const publisherMap =
+ {
+ 'PE': 'C. F. Peters',
+ 'HO': 'Hofmeister',
+ 'RB': 'Rieter-Biedermann'
+ };
+
+ const keys = input.split('_');
+ let part = '';
+ if (keys[3] == 'NN') {
+ part = '';
+ } else if (keys[3].includes('N')) {
+ part = 'Nummer ' + keys[3].match(/\d+/)[0];
+ } else if (keys[3].includes('H')) {
+ part = 'Heft ' + keys[3].match(/\d+/)[0];
+ } else if (keys[3].includes('Bd')) {
+ part = 'Band ' + keys[3].match(/\d+/)[0];
+ } else if (keys[3] == 'Ouv') {
+ part = 'Ouvertüre' + ', ';
+ } else if (keys[3] == 'Text') {
+ part = 'Textband' + ', ';
+ }
+
+ let voice = '';
+ if (onePartMap[keys[4]] != undefined) {
+ voice = onePartMap[keys[4]];
+ } else {
+ const vs = keys[4].match(
+ /(ESt|Solo|)[A-Z][C\da-z]?[T\da-z]?[a-z]?/g);
+ for (let v of vs) {
+ if (v.includes('ESt')) {
+ voice += 'Einzelstimme ';
+ v = v.replace('ESt', '');
+ } else if (v.includes('Solo')) {
+ voice += 'Solostimme ';
+ v = v.replace('Solo', '');
+ }
+ let number = '';
+ if (v.match(/\d/)) {
+ number = v.match(/\d/);
+ v = v.replace(/\d/, '');
+ }
+ voice += multiPartMap[v] + ' ' + number;
+ }
+ }
+
+ const plateId = keys[2].match(/[1-9]\d*[a-f]?/);
+
+ const publisher = publisherMap[keys[0]];
+
+ let partVoice = part;
+ let parentheses = [ '(', ')' ];
+ if (part == '' && voice == '') {
+ parentheses = [ '', '' ];
+ }
+ if (part != '' && voice != '') {
+ partVoice += ', ';
+ }
+ partVoice += voice;
+
+ return partVoice + ' ' + parentheses[0] + publisher + ', Plattennr. ' + plateId + parentheses[1];
+
+}
diff --git a/ext_localconf.php b/ext_localconf.php
index 0555cef..d3efa66 100755
--- a/ext_localconf.php
+++ b/ext_localconf.php
@@ -117,5 +117,15 @@ function()
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:mpdb_presentation/Resources/Public/Icons/user_plugin_welcome.svg']
);
+ $iconRegistry->registerIcon(
+ 'mpdb_presentation-x',
+ \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
+ ['source' => 'EXT:mpdb_presentation/Resources/Public/Icons/x.svg']
+ );
+ $iconRegistry->registerIcon(
+ 'mpdb_presentation-xinv',
+ \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
+ ['source' => 'EXT:mpdb_presentation/Resources/Public/Icons/x-inv.svg']
+ );
}
);