Skip to content

Commit

Permalink
Merge pull request #4 from slub/going-kitodo-presentation-4
Browse files Browse the repository at this point in the history
Make compatible with Kitodo.Presentation 4.0
  • Loading branch information
Alexander Bigga authored Mar 30, 2022
2 parents ea6dc29 + 0ae1926 commit ff24c52
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 132 deletions.
17 changes: 10 additions & 7 deletions Classes/Controller/SearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
/**
* Class SearchController
*/
class SearchController extends AbstractController {
class SearchController extends AbstractController
{

/**
* searchRepository
Expand All @@ -48,7 +49,8 @@ class SearchController extends AbstractController {
*
* @return void
*/
public function listAction() {
public function listAction()
{
$userUid = $this->user->getUid();

$this->view->assignMultiple([
Expand All @@ -63,7 +65,8 @@ public function listAction() {
*
* @return void
*/
public function saveAction() {
public function saveAction()
{

}

Expand All @@ -76,16 +79,16 @@ public function createAction()
{
if($this->user !==NULL && $this->user->getUid()) {

$searchParams = GeneralUtility::_GP('tx_dlf');
$searchParams = GeneralUtility::_GP('tx_dlf_search');

if(array_key_exists('query',$searchParams) && array_key_exists('fulltext',$searchParams)) {
if (is_array($searchParams) && array_key_exists('query',$searchParams['searchParameter']) && array_key_exists('fulltext',$searchParams['searchParameter'])) {
$arguments = $this->request->getArguments();

$searchRequest = new Search();
$title = $arguments['title'] ? $arguments['title'] : LocalizationUtility::translate('search', 'DigasFeManagement').': '.strftime('%d.%m.%y - %H:%M');

$searchRequest->setTitle($title);
$searchRequest->setSearchParams($searchParams);
$searchRequest->setSearchParams($searchParams['searchParameter']);
$searchRequest->setFeUser($this->user->getUid());

$this->searchRepository->add($searchRequest);
Expand All @@ -95,7 +98,7 @@ public function createAction()
'DigasFeManagement'
);

if(GeneralUtility::_GET('type')>0) {
if (GeneralUtility::_GET('type')>0) {
return $statusMessage;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
data-namespace-typo3-fluid="true"
lang="en">

<dv:titleTag
title="<dc:xpath xpath='(//mets:dmdSec/mets:mdWrap/mets:xmlData/mods:mods/mods:titleInfo[not(@type=\"alternative\")]/mods:nonSort | //mets:dmdSec/mets:mdWrap/mets:xmlData/mods:mods/mods:titleInfo[not(@type=\"alternative\")]/mods:title | //mets:dmdSec/mets:mdWrap/mets:xmlData/mods:mods/mods:titleInfo[not(@type=\"alternative\")]/mods:partNumber | //mets:dmdSec/mets:mdWrap/mets:xmlData/mods:mods/mods:titleInfo[not(@type=\"alternative\")]/mods:partName)[1]' />"
/>

<f:comment>
<!--
check if access on certain document id is granted
Expand Down
Loading

0 comments on commit ff24c52

Please sign in to comment.