From 6189219a09698c94712170793863750d1503b81d Mon Sep 17 00:00:00 2001
From: Daniel Windloff <daniel.jc.windloff@googlemail.com>
Date: Sat, 3 Jun 2017 10:14:00 +0200
Subject: [PATCH] [TASK] Streamline icons for "new" actions

Usage:
- actions-add-placeholder
Link to wizards / controller where the selection
between serveral kinds of new records can be made
- actions-add
Link to creation form for all records
except pages (EditDocumentController)
-actions-page-new
Link to creation form for page record
-actions-document-new
Link to create multiple new records

Resolves: #81428
Releases: master
Change-Id: I10ced54f5cd8c09c095a699fd0994a9dd5fa0f05
Reviewed-on: https://review.typo3.org/53073
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Tested-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
---
 typo3/sysext/backend/Classes/View/PageLayoutView.php          | 2 +-
 .../beuser/Classes/Controller/BackendUserActionController.php | 4 ++--
 .../sysext/filelist/Classes/Controller/FileListController.php | 2 +-
 .../sysext/form/Classes/Controller/FormManagerController.php  | 2 +-
 .../recordlist/Classes/RecordList/DatabaseRecordList.php      | 4 ++--
 .../Classes/Controller/SchedulerModuleController.php          | 2 +-
 .../Private/Templates/Backend/SchedulerModule/InfoScreen.html | 2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/typo3/sysext/backend/Classes/View/PageLayoutView.php b/typo3/sysext/backend/Classes/View/PageLayoutView.php
index 57b394d38f32..4b51e6d42b69 100644
--- a/typo3/sysext/backend/Classes/View/PageLayoutView.php
+++ b/typo3/sysext/backend/Classes/View/PageLayoutView.php
@@ -583,7 +583,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
 
                     $link = '<a href="' . htmlspecialchars($url) . '" title="'
                         . htmlspecialchars($this->getLanguageService()->getLL('newContentElement')) . '" class="btn btn-default btn-sm">'
-                        . $this->iconFactory->getIcon('actions-document-new', Icon::SIZE_SMALL)->render()
+                        . $this->iconFactory->getIcon('actions-add-placeholder', Icon::SIZE_SMALL)->render()
                         . ' '
                         . htmlspecialchars($this->getLanguageService()->getLL('content')) . '</a>';
                 }
diff --git a/typo3/sysext/beuser/Classes/Controller/BackendUserActionController.php b/typo3/sysext/beuser/Classes/Controller/BackendUserActionController.php
index e184c6ee297c..fe9bce3f6a9a 100644
--- a/typo3/sysext/beuser/Classes/Controller/BackendUserActionController.php
+++ b/typo3/sysext/beuser/Classes/Controller/BackendUserActionController.php
@@ -134,7 +134,7 @@ class BackendUserActionController extends ActionController
                 $parameters = GeneralUtility::explodeUrl2Array('edit[be_users][0]=new&returnUrl=' . $returnUrl);
                 $addUserLink = BackendUtility::getModuleUrl('record_edit', $parameters);
                 $title = $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:newRecordGeneral');
-                $icon = $this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-document-new', Icon::SIZE_SMALL);
+                $icon = $this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-add', Icon::SIZE_SMALL);
                 $addUserButton = $buttonBar->makeLinkButton()
                     ->setHref($addUserLink)
                     ->setTitle($title)
@@ -166,7 +166,7 @@ class BackendUserActionController extends ActionController
             $parameters = GeneralUtility::explodeUrl2Array('edit[be_groups][0]=new&returnUrl=' . $returnUrl);
             $addUserLink = BackendUtility::getModuleUrl('record_edit', $parameters);
             $title = $this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:newRecordGeneral');
-            $icon = $this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-document-new', Icon::SIZE_SMALL);
+            $icon = $this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-add', Icon::SIZE_SMALL);
             $addUserGroupButton = $buttonBar->makeLinkButton()
                 ->setHref($addUserLink)
                 ->setTitle($title)
diff --git a/typo3/sysext/filelist/Classes/Controller/FileListController.php b/typo3/sysext/filelist/Classes/Controller/FileListController.php
index 5a41e13fed61..275fb54581c2 100644
--- a/typo3/sysext/filelist/Classes/Controller/FileListController.php
+++ b/typo3/sysext/filelist/Classes/Controller/FileListController.php
@@ -621,7 +621,7 @@ class FileListController extends ActionController
                     ]
                 ))
                 ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.new'))
-                ->setIcon($iconFactory->getIcon('actions-document-new', Icon::SIZE_SMALL));
+                ->setIcon($iconFactory->getIcon('actions-add-placeholder', Icon::SIZE_SMALL));
             $buttonBar->addButton($newButton, ButtonBar::BUTTON_POSITION_LEFT, 1);
         }
 
diff --git a/typo3/sysext/form/Classes/Controller/FormManagerController.php b/typo3/sysext/form/Classes/Controller/FormManagerController.php
index 42035ba8814c..dd65f7f0eaa8 100644
--- a/typo3/sysext/form/Classes/Controller/FormManagerController.php
+++ b/typo3/sysext/form/Classes/Controller/FormManagerController.php
@@ -443,7 +443,7 @@ class FormManagerController extends AbstractBackendController
                 ->setDataAttributes(['identifier' => 'newForm'])
                 ->setHref('#')
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.create_new_form'))
-                ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-document-new', Icon::SIZE_SMALL));
+                ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-add', Icon::SIZE_SMALL));
             $buttonBar->addButton($addFormButton, ButtonBar::BUTTON_POSITION_LEFT);
         }
     }
diff --git a/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php b/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
index a6b986665365..25489c08b0e9 100644
--- a/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
+++ b/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
@@ -270,7 +270,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="'
                     . htmlspecialchars($lang->getLL('newRecordGeneral')) . '">'
-                    . $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL)->render() . '</a>';
+                    . $this->iconFactory->getIcon('actions-add-placeholder', Icon::SIZE_SMALL)->render() . '</a>';
             }
             // If edit permissions are set, see
             // \TYPO3\CMS\Core\Authentication\BackendUserAuthentication
@@ -388,7 +388,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList
                     ->setHref('#')
                     ->setOnClick($onClick)
                     ->setTitle($lang->getLL('newRecordGeneral'))
-                    ->setIcon($this->iconFactory->getIcon('actions-document-new', Icon::SIZE_SMALL));
+                    ->setIcon($this->iconFactory->getIcon('actions-add-placeholder', Icon::SIZE_SMALL));
                 $buttonBar->addButton($newRecordButton, ButtonBar::BUTTON_POSITION_LEFT, 10);
             }
             if (!in_array($this->pageRow['doktype'], $noViewDokTypes)) {
diff --git a/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php b/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
index 516259f91fb8..9f1c005e68b2 100644
--- a/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
+++ b/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
@@ -1524,7 +1524,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
             if ($this->MOD_SETTINGS['function'] === 'scheduler' && !empty($this->getRegisteredClasses())) {
                 $addButton = $buttonBar->makeLinkButton()
                     ->setTitle($this->getLanguageService()->getLL('action.add'))
-                    ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-new', Icon::SIZE_SMALL))
+                    ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-add', Icon::SIZE_SMALL))
                     ->setHref($this->moduleUri . '&CMD=add');
                 $buttonBar->addButton($addButton, ButtonBar::BUTTON_POSITION_LEFT, 2);
             }
diff --git a/typo3/sysext/scheduler/Resources/Private/Templates/Backend/SchedulerModule/InfoScreen.html b/typo3/sysext/scheduler/Resources/Private/Templates/Backend/SchedulerModule/InfoScreen.html
index b1a71b48a7ff..0c018abf4a1e 100644
--- a/typo3/sysext/scheduler/Resources/Private/Templates/Backend/SchedulerModule/InfoScreen.html
+++ b/typo3/sysext/scheduler/Resources/Private/Templates/Backend/SchedulerModule/InfoScreen.html
@@ -32,7 +32,7 @@
 						<div class="btn-group" role="group">
 							<span class="btn btn-default">
 								<a href="{s:moduleLink(controller:'scheduler', action: 'add', arguments: '{class: class}')}" title="{f:translate(key:'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:new')}">
-									<core:icon identifier="actions-document-new" />
+									<core:icon identifier="actions-add" />
 								</a>
 							</span>
 						</div>
-- 
GitLab