Skip to content

Commit

Permalink
add navigation feature and translations
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkubina-subhh authored and chrizzor committed Nov 21, 2024
1 parent 43183cc commit 6826c86
Show file tree
Hide file tree
Showing 7 changed files with 336 additions and 163 deletions.
8 changes: 8 additions & 0 deletions Classes/Controller/NavigationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ public function mainAction(): void
$this->viewData['requestData'] = $this->requestData;
}

// get the closest previous sibling or leaf node
$prevDocumentUid = $this->documentRepository->getPreviousDocumentUid($this->document->getUid());
$this->view->assign('documentBack', $prevDocumentUid);

// get the closest next sibling or leaf node
$nextDocumentUid = $this->documentRepository->getNextDocumentUid($this->document->getUid());
$this->view->assign('documentForward', $nextDocumentUid);

// Steps for X pages backward / forward. Double page view uses double steps.
$pageSteps = $this->settings['pageStep'] * ($this->requestData['double'] + 1);

Expand Down
18 changes: 17 additions & 1 deletion Configuration/FlexForms/Navigation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,24 @@
<numIndex index="0">LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:plugins.navigation.flexform.features.rotation</numIndex>
<numIndex index="1">rotation</numIndex>
</numIndex>
<numIndex index="11">
<numIndex index="0">LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:plugins.navigation.flexform.features.measureForward</numIndex>
<numIndex index="1">measureForward</numIndex>
</numIndex>
<numIndex index="12">
<numIndex index="0">LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:plugins.navigation.flexform.features.measureBack</numIndex>
<numIndex index="1">measureBack</numIndex>
</numIndex>
<numIndex index="13">
<numIndex index="0">LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:plugins.navigation.flexform.features.documentBack</numIndex>
<numIndex index="1">documentBack</numIndex>
</numIndex>
<numIndex index="14">
<numIndex index="0">LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:plugins.navigation.flexform.features.documentForward</numIndex>
<numIndex index="1">documentForward</numIndex>
</numIndex>
</items>
<default>doublePage,pageFirst,pageBack,pageStepBack,pageSelect,pageForward,pageStepForward,pageLast,listView,zoom,rotation</default>
<default>doublePage,pageFirst,pageBack,pageStepBack,pageSelect,pageForward,pageStepForward,pageLast,listView,zoom,rotation,measureForward,measureBack,documentBack,documentForward</default>
<minitems>1</minitems>
</config>
</TCEforms>
Expand Down
16 changes: 16 additions & 0 deletions Resources/Private/Language/de.locallang.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,22 @@
<source><![CDATA[Rotate Right]]></source>
<target><![CDATA[Ansicht nach rechts drehen]]></target>
</trans-unit>
<trans-unit id="prevMeasure">
<source><![CDATA[Previus Measure]]></source>
<target><![CDATA[Vorheriger Takt]]></target>
</trans-unit>
<trans-unit id="nextMeasure">
<source><![CDATA[Next Measure]]></source>
<target><![CDATA[Nächster Takt]]></target>
</trans-unit>
<trans-unit id="navigation.documentBack" approved="yes">
<source><![CDATA[Previous document]]></source>
<target><![CDATA[Vorheriges Dokument]]></target>
</trans-unit>
<trans-unit id="navigation.documentForward" approved="yes">
<source><![CDATA[Next document]]></source>
<target><![CDATA[Nächstes Dokument]]></target>
</trans-unit>
<trans-unit id="search.dateFrom" approved="yes">
<source><![CDATA[From]]></source>
<target><![CDATA[Von]]></target>
Expand Down
Loading

0 comments on commit 6826c86

Please sign in to comment.