[BUGFIX] Exchange new icon based on context in Web->List 38/44438/2
authorMathias Schreiber <mathias.schreiber@wmdb.de>
Sat, 31 Oct 2015 14:53:06 +0000 (15:53 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 31 Oct 2015 15:27:46 +0000 (16:27 +0100)
Resolves: #71200
Releases: master
Change-Id: I3d31e831e7c17d2c62e7c666fe90d1ae0fbb394c
Reviewed-on: https://review.typo3.org/44438
Reviewed-by: Gernot Schulmeister <gernotschulmeister@gmx.at>
Tested-by: Gernot Schulmeister <gernotschulmeister@gmx.at>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php

index 20a5c23..9573ea3 100644 (file)
@@ -267,7 +267,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList
                 $onClick = htmlspecialchars('return jumpExt(' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('db_new', ['id' => $this->id])) . ');');
                 $buttons['new_record'] = '<a href="#" onclick="' . $onClick . '" title="'
                     . $lang->getLL('newRecordGeneral', true) . '">'
-                    . $this->iconFactory->getIcon('actions-document-new', Icon::SIZE_SMALL)->render() . '</a>';
+                    . $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL)->render() . '</a>';
             }
             // If edit permissions are set, see
             // \TYPO3\CMS\Core\Authentication\BackendUserAuthentication
@@ -1126,7 +1126,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList
                         if ($this->calcPerms & $permsAdditional && $this->showNewRecLink($table)) {
                             $spriteIcon = $table === 'pages'
                                 ? $this->iconFactory->getIcon('actions-page-new', Icon::SIZE_SMALL)
-                                : $this->iconFactory->getIcon('actions-document-new', Icon::SIZE_SMALL);
+                                : $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL);
                             if ($table === 'tt_content' && $this->newWizards) {
                                 // If mod.web_list.newContentWiz.overrideWithExtension is set, use that extension's create new content wizard instead:
                                 $tmpTSc = BackendUtility::getModTSconfig($this->pageinfo['uid'], 'mod.web_list');
@@ -1463,7 +1463,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList
                 if ($table !== 'pages' && $this->calcPerms & Permission::CONTENT_EDIT || $table === 'pages' && $this->calcPerms & Permission::PAGE_NEW) {
                     if ($this->showNewRecLink($table)) {
                         $params = '&edit[' . $table . '][' . -($row['_MOVE_PLH'] ? $row['_MOVE_PLH_uid'] : $row['uid']) . ']=new';
-                        $icon = ($table == 'pages' ? $this->iconFactory->getIcon('actions-page-new', Icon::SIZE_SMALL) : $this->iconFactory->getIcon('actions-document-new', Icon::SIZE_SMALL));
+                        $icon = ($table == 'pages' ? $this->iconFactory->getIcon('actions-page-new', Icon::SIZE_SMALL) : $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL));
                         $newAction = '<a class="btn btn-default" href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params, '', -1))
                             . '" title="' . $this->getLanguageService()->getLL('new' . ($table == 'pages ' ? 'Page' : 'Record'), true) . '">'
                             . $icon->render() . '</a>';