diff --git a/Configuration/FlexForms/Recommender.xml b/Configuration/FlexForms/Recommender.xml new file mode 100644 index 0000000000000000000000000000000000000000..d4419a43390d827dd7a312519f6099753c5bb067 --- /dev/null +++ b/Configuration/FlexForms/Recommender.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<T3DataStructure> + <sheets> + <sDEF> + <ROOT> + <TCEforms> + <sheetTitle>LLL:EXT:bison/Resources/Private/Language/locallang_be.xlf:flexform.recommender_title</sheetTitle> + </TCEforms> + <type>array</type> + <el> + <settings.pidJournal> + <TCEforms> + <exclude>1</exclude> + <label>LLL:EXT:slub_events/Resources/Private/Language/locallang_be.xlf:flexform.page_journal</label> + <config> + <type>group</type> + <internal_type>db</internal_type> + <allowed>pages</allowed> + <size>1</size> + <maxitems>1</maxitems> + <minitems>0</minitems> + <show_thumbs>1</show_thumbs> + <wizards> + <suggest> + <type>suggest</type> + </suggest> + </wizards> + </config> + </TCEforms> + </settings.pidJournal> + </el> + </ROOT> + </sDEF> + </sheets> +</T3DataStructure> \ No newline at end of file diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index 6e8afaddc07aec1c193c70bfe5214756a81046a4..740d985ec93b060adb3a8f0fa911e80183ed8f3e 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -7,6 +7,13 @@ defined('TYPO3') || die(); 'Recommender' ); +$pluginSignature = 'bison_recommender'; +$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['bison_recommender'] = 'pi_flexform'; +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( + $pluginSignature, + 'FILE:EXT:bison/Configuration/FlexForms/Recommender.xml' +); + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'Bison', 'Journal', diff --git a/Resources/Private/Language/de.locallang_be.xlf b/Resources/Private/Language/de.locallang_be.xlf index f5030ccb98988a5bf15589b17272265d5e24e440..fc72ba4633f62d011f468e415c7d34e57a33123d 100644 --- a/Resources/Private/Language/de.locallang_be.xlf +++ b/Resources/Private/Language/de.locallang_be.xlf @@ -66,6 +66,14 @@ <source>User-Agent</source> <target>User-Agent</target> </trans-unit> + <trans-unit id="flexform.recommender_title" xml:space="preserve" approved="yes"> + <source>Recommender Plugin Settings</source> + <target>Recommender-Plugin Einstellungen</target> + </trans-unit> + <trans-unit id="flexform.page_journal" xml:space="preserve" approved="yes"> + <source>Page UID for Journal plugin</source> + <target>Seiten-UID für Journal-Plugin</source> + </trans-unit> </body> </file> </xliff> diff --git a/Resources/Private/Language/locallang_be.xlf b/Resources/Private/Language/locallang_be.xlf index 4b473e74f4c9a19c9e1a5db378e1f25faf89ffa6..40372c30d2db8f15d3b9f7d08d9b9e1462aa671a 100644 --- a/Resources/Private/Language/locallang_be.xlf +++ b/Resources/Private/Language/locallang_be.xlf @@ -51,6 +51,12 @@ <trans-unit id="config.systemUserAgent" xml:space="preserve"> <source>User-Agent:INSTITUTION/bison-extension</source> </trans-unit> + <trans-unit id="flexform.recommender_title" xml:space="preserve"> + <source>Recommender Plugin Settings</source> + </trans-unit> + <trans-unit id="flexform.page_journal" xml:space="preserve"> + <source>Page UID for Journal plugin</source> + </trans-unit> </body> </file> </xliff> diff --git a/Resources/Private/Partials/Recommender/ResultListItem.html b/Resources/Private/Partials/Recommender/ResultListItem.html index 6619fc6ec11cf3780ee137b919a34a666a310bd5..b3ff599571a28dbb92f057c777b2a82579e21315 100644 --- a/Resources/Private/Partials/Recommender/ResultListItem.html +++ b/Resources/Private/Partials/Recommender/ResultListItem.html @@ -28,7 +28,7 @@ </div> <div class="col relative"> <h5 class="card-title"> - <f:link.page pageUid="4" additionalParams="{tx_bison: {id: '{result.id}'}}" class="stretched-link">{result.title}</f:link.page> + <f:link.page pageUid="{settings.pidJournal}" additionalParams="{tx_bison: {id: '{result.id}'}}" class="stretched-link">{result.title}</f:link.page> <f:if condition="{displayMismatchedResults} && {result.filter}"> <span class="badge text-bg-success"><f:translate key="badge.matched"/></span> </f:if> diff --git a/Resources/Private/Partials/Recommender/ResultTableRow.html b/Resources/Private/Partials/Recommender/ResultTableRow.html index f9deb894361c343a62b335194bc8d295a71eff0b..3e0a256fe59630dd08e71bfb861ea1846805630e 100644 --- a/Resources/Private/Partials/Recommender/ResultTableRow.html +++ b/Resources/Private/Partials/Recommender/ResultTableRow.html @@ -19,7 +19,7 @@ <tr data-score="{result.score.value}" data-title="{result.title}" data-publisher="{result.publisher.name}" data-apc="{dataApc}" data-publication-time="{result.publicationTimeWeeks}" data-copyright="{result.retainsCopyrightAuthor}" data-keywords="{dataKeywords}" data-languages="{dataLanguages}" data-subjects="{dataSubjects}"> <th scope="row"> - <f:link.page pageUid="4" additionalParams="{tx_bison: {id: '{result.id}'}}" class="stretched-link">{result.title}</f:link.page> + <f:link.page pageUid="{settings.pidJournal}" additionalParams="{tx_bison: {id: '{result.id}'}}" class="stretched-link">{result.title}</f:link.page> <f:if condition="{displayMismatchedResults} && {result.filter}"> <span class="badge text-bg-success"><f:translate key="badge.matchedShort"/></span> </f:if>