[FEATURE] Improve livesearch results 92/20992/4
authorPhilipp Kitzberger <philipp@cron-it.de>
Thu, 23 May 2013 09:32:49 +0000 (11:32 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 25 May 2013 11:47:28 +0000 (13:47 +0200)
* uid and pid are displayed as tooltip in livesearch results
* returnUrl set so closing edit mask won't lead to dummy.php

Resolves: #35358
Releases: 6.2
Change-Id: I9c31cb547c9e9eb82f35a614d6977fca87f339d6
Reviewed-on: https://review.typo3.org/20992
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php

index 6cf6732..eb2b673 100644 (file)
@@ -228,7 +228,7 @@ class LiveSearch {
                                'id' => $tableName . ':' . $row['uid'],
                                'pageId' => $tableName === 'pages' ? $row['uid'] : $row['pid'],
                                'recordTitle' => $isFirst ? $this->getRecordTitlePrep($this->getTitleOfCurrentRecordType($tableName), self::GROUP_TITLE_MAX_LENGTH) : '',
-                               'iconHTML' => IconUtility::getSpriteIconForRecord($tableName, $row),
+                               'iconHTML' => IconUtility::getSpriteIconForRecord($tableName, $row, array('title' => 'id=' . $row['uid'] . ', pid=' . $row['pid'])),
                                'title' => $this->getRecordTitlePrep($this->getTitleFromCurrentRow($tableName, $row), self::RECORD_TITLE_MAX_LENGTH),
                                'editLink' => $this->getEditLink($tableName, $row)
                        );
@@ -259,7 +259,8 @@ class LiveSearch {
                // "Edit" link: ( Only if permissions to edit the page-record of the content of the parent page ($this->id)
                // @todo Is there an existing function to generate this link?
                if ($permsEdit) {
-                       $editLink = 'alt_doc.php?' . '&edit[' . $tableName . '][' . $row['uid'] . ']=edit';
+                       $returnUrl = rawurlencode('mod.php?M=web_list&id=' . $row['pid']);
+                       $editLink = 'alt_doc.php?' . '&edit[' . $tableName . '][' . $row['uid'] . ']=edit&returnUrl=' . $returnUrl;
                }
                return $editLink;
        }