Commit 55a45ee6 authored by Daniel Windloff's avatar Daniel Windloff Committed by Christian Kuhn
Browse files

[FOLLOWUP][TASK] Streamline icons for "new" actions

- actions-add
Link to one new record or a wizard to select the type
of the record
- actions-page-new
Link to one new page record
- actions-document-new
Link to create multiple new records (EditDocumentController)

Resolves: #81428
Releases: master
Change-Id: Ic95a4b3b7727e96a2da818633d03cba7a1c7bde7
Reviewed-on: https://review.typo3.org/53105


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Mona Muzaffar's avatarMona Muzaffar <mona.muzaffar@gmx.de>
Reviewed-by: default avatarMarkus Sommer <markussom@posteo.de>
Tested-by: default avatarMarkus Sommer <markussom@posteo.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 2f5b1896
...@@ -43,7 +43,7 @@ class PageProvider extends RecordProvider ...@@ -43,7 +43,7 @@ class PageProvider extends RecordProvider
], ],
'new' => [ 'new' => [
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.new', 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.new',
'iconIdentifier' => 'actions-document-new', 'iconIdentifier' => 'actions-page-new',
'callbackAction' => 'newRecord' 'callbackAction' => 'newRecord'
], ],
'info' => [ 'info' => [
......
...@@ -63,7 +63,7 @@ class RecordProvider extends AbstractProvider ...@@ -63,7 +63,7 @@ class RecordProvider extends AbstractProvider
], ],
'new' => [ 'new' => [
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.new', 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.new',
'iconIdentifier' => 'actions-document-new', 'iconIdentifier' => 'actions-add',
'callbackAction' => 'newRecord' 'callbackAction' => 'newRecord'
], ],
'info' => [ 'info' => [
...@@ -110,7 +110,7 @@ class RecordProvider extends AbstractProvider ...@@ -110,7 +110,7 @@ class RecordProvider extends AbstractProvider
'childItems' => [ 'childItems' => [
'newWizard' => [ 'newWizard' => [
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_misc.xlf:CM_newWizard', 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_misc.xlf:CM_newWizard',
'iconIdentifier' => 'actions-document-new', 'iconIdentifier' => 'actions-add',
'callbackAction' => 'newContentWizard', 'callbackAction' => 'newContentWizard',
], ],
'openListModule' => [ 'openListModule' => [
......
...@@ -363,7 +363,7 @@ class InlineControlContainer extends AbstractContainer ...@@ -363,7 +363,7 @@ class InlineControlContainer extends AbstractContainer
switch ($type) { switch ($type) {
case 'newRecord': case 'newRecord':
$title = htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.createnew')); $title = htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.createnew'));
$icon = 'actions-document-new'; $icon = 'actions-add';
$className = 'typo3-newRecordLink'; $className = 'typo3-newRecordLink';
$attributes['class'] = 'btn btn-default inlineNewButton ' . $this->inlineData['config'][$nameObject]['md5']; $attributes['class'] = 'btn btn-default inlineNewButton ' . $this->inlineData['config'][$nameObject]['md5'];
$attributes['onclick'] = 'return inline.createNewRecord(' . GeneralUtility::quoteJSvalue($objectPrefix) . ')'; $attributes['onclick'] = 'return inline.createNewRecord(' . GeneralUtility::quoteJSvalue($objectPrefix) . ')';
...@@ -594,7 +594,7 @@ class InlineControlContainer extends AbstractContainer ...@@ -594,7 +594,7 @@ class InlineControlContainer extends AbstractContainer
$item .= ' $item .= '
<span class="input-group-btn"> <span class="input-group-btn">
<a href="#" class="btn btn-default" onclick="' . htmlspecialchars($onChange) . '" title="' . $createNewRelationText . '"> <a href="#" class="btn btn-default" onclick="' . htmlspecialchars($onChange) . '" title="' . $createNewRelationText . '">
' . $this->iconFactory->getIcon('actions-document-new', Icon::SIZE_SMALL)->render() . $createNewRelationText . ' ' . $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL)->render() . $createNewRelationText . '
</a> </a>
</span>'; </span>';
} else { } else {
......
...@@ -585,7 +585,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe ...@@ -585,7 +585,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
$link = '<a href="' . htmlspecialchars($url) . '" title="' $link = '<a href="' . htmlspecialchars($url) . '" title="'
. htmlspecialchars($this->getLanguageService()->getLL('newContentElement')) . '" class="btn btn-default btn-sm">' . htmlspecialchars($this->getLanguageService()->getLL('newContentElement')) . '" class="btn btn-default btn-sm">'
. $this->iconFactory->getIcon('actions-add-placeholder', Icon::SIZE_SMALL)->render() . $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL)->render()
. ' ' . ' '
. htmlspecialchars($this->getLanguageService()->getLL('content')) . '</a>'; . htmlspecialchars($this->getLanguageService()->getLL('content')) . '</a>';
} }
...@@ -699,7 +699,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe ...@@ -699,7 +699,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
$singleElementHTML .= ' $singleElementHTML .= '
<a href="' . htmlspecialchars($url) . '" title="' <a href="' . htmlspecialchars($url) . '" title="'
. htmlspecialchars($this->getLanguageService()->getLL('newContentElement')) . '" class="btn btn-default btn-sm">' . 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', Icon::SIZE_SMALL)->render()
. ' ' . ' '
. htmlspecialchars($this->getLanguageService()->getLL('content')) . '</a> . htmlspecialchars($this->getLanguageService()->getLL('content')) . '</a>
'; ';
...@@ -1086,7 +1086,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe ...@@ -1086,7 +1086,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
$url = BackendUtility::getModuleUrl('record_edit', $urlParameters); $url = BackendUtility::getModuleUrl('record_edit', $urlParameters);
$theData['__cmds__'] = '<a href="' . htmlspecialchars($url) . '" ' $theData['__cmds__'] = '<a href="' . htmlspecialchars($url) . '" '
. 'title="' . htmlspecialchars($this->getLanguageService()->getLL('new')) . '">' . 'title="' . htmlspecialchars($this->getLanguageService()->getLL('new')) . '">'
. $this->iconFactory->getIcon('actions-document-new', Icon::SIZE_SMALL)->render() . '</a>'; . $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL)->render() . '</a>';
} }
$out .= $this->addElement(1, '', $theData, ' class="c-headLine"', 15, '', 'th'); $out .= $this->addElement(1, '', $theData, ' class="c-headLine"', 15, '', 'th');
// Render Items // Render Items
......
...@@ -93,7 +93,7 @@ define(['jquery', 'jquery-ui/droppable'], function ($) { ...@@ -93,7 +93,7 @@ define(['jquery', 'jquery-ui/droppable'], function ($) {
// make the drop zones visible // make the drop zones visible
$(DragDrop.dropZoneIdentifier).each(function () { $(DragDrop.dropZoneIdentifier).each(function () {
if ( if (
$(this).parent().find('.icon-actions-document-new').length $(this).parent().find('.icon-actions-add').length
) { ) {
$(this).addClass(DragDrop.validDropZoneClass); $(this).addClass(DragDrop.validDropZoneClass);
} else { } else {
......
...@@ -46,7 +46,7 @@ define(['jquery', ...@@ -46,7 +46,7 @@ define(['jquery',
*/ */
Paste.activatePasteIcons = function () { Paste.activatePasteIcons = function () {
$('.t3-page-ce-wrapper-new-ce').each(function () { $('.t3-page-ce-wrapper-new-ce').each(function () {
if (!$(this).find('.icon-actions-document-new').length) { if (!$(this).find('.icon-actions-add').length) {
return true; return true;
} }
$('.t3js-page-lang-column .t3-page-ce > .t3-page-ce').removeClass('t3js-page-ce'); $('.t3js-page-lang-column .t3-page-ce > .t3-page-ce').removeClass('t3js-page-ce');
......
...@@ -75,7 +75,7 @@ class Inline1nCest ...@@ -75,7 +75,7 @@ class Inline1nCest
*/ */
public function createInline1nInlineElement(Admin $I) public function createInline1nInlineElement(Admin $I)
{ {
$I->click('span[data-identifier="actions-document-new"]', 'div.typo3-newRecordLink'); $I->click('span[data-identifier="actions-add"]', 'div.typo3-newRecordLink');
$fieldLabel = 'input_1'; $fieldLabel = 'input_1';
$testValue = 'Fo Bar'; $testValue = 'Fo Bar';
......
...@@ -621,7 +621,7 @@ class FileListController extends ActionController ...@@ -621,7 +621,7 @@ class FileListController extends ActionController
] ]
)) ))
->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.new')) ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.new'))
->setIcon($iconFactory->getIcon('actions-add-placeholder', Icon::SIZE_SMALL)); ->setIcon($iconFactory->getIcon('actions-add', Icon::SIZE_SMALL));
$buttonBar->addButton($newButton, ButtonBar::BUTTON_POSITION_LEFT, 1); $buttonBar->addButton($newButton, ButtonBar::BUTTON_POSITION_LEFT, 1);
} }
......
...@@ -893,7 +893,7 @@ class AdminPanelView ...@@ -893,7 +893,7 @@ class AdminPanelView
$params = '&sys_language_uid=' . $tsfe->sys_language_uid; $params = '&sys_language_uid=' . $tsfe->sys_language_uid;
} }
$link = $newContentWizScriptPath . 'id=' . $id . $params . '&returnUrl=' . rawurlencode($returnUrl); $link = $newContentWizScriptPath . 'id=' . $id . $params . '&returnUrl=' . rawurlencode($returnUrl);
$icon = $this->iconFactory->getIcon('actions-document-new', Icon::SIZE_SMALL)->render(); $icon = $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL)->render();
$title = $this->extGetLL('edit_newContentElement'); $title = $this->extGetLL('edit_newContentElement');
$output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '" title="' . $title . '">'; $output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '" title="' . $title . '">';
$output[] = ' ' . $icon; $output[] = ' ' . $icon;
......
...@@ -270,7 +270,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList ...@@ -270,7 +270,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList
$onClick = htmlspecialchars('return jumpExt(' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('db_new', ['id' => $this->id])) . ');'); $onClick = htmlspecialchars('return jumpExt(' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('db_new', ['id' => $this->id])) . ');');
$buttons['new_record'] = '<a href="#" onclick="' . $onClick . '" title="' $buttons['new_record'] = '<a href="#" onclick="' . $onClick . '" title="'
. htmlspecialchars($lang->getLL('newRecordGeneral')) . '">' . htmlspecialchars($lang->getLL('newRecordGeneral')) . '">'
. $this->iconFactory->getIcon('actions-add-placeholder', Icon::SIZE_SMALL)->render() . '</a>'; . $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL)->render() . '</a>';
} }
// If edit permissions are set, see // If edit permissions are set, see
// \TYPO3\CMS\Core\Authentication\BackendUserAuthentication // \TYPO3\CMS\Core\Authentication\BackendUserAuthentication
...@@ -388,7 +388,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList ...@@ -388,7 +388,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList
->setHref('#') ->setHref('#')
->setOnClick($onClick) ->setOnClick($onClick)
->setTitle($lang->getLL('newRecordGeneral')) ->setTitle($lang->getLL('newRecordGeneral'))
->setIcon($this->iconFactory->getIcon('actions-add-placeholder', Icon::SIZE_SMALL)); ->setIcon($this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL));
$buttonBar->addButton($newRecordButton, ButtonBar::BUTTON_POSITION_LEFT, 10); $buttonBar->addButton($newRecordButton, ButtonBar::BUTTON_POSITION_LEFT, 10);
} }
if (!in_array($this->pageRow['doktype'], $noViewDokTypes)) { if (!in_array($this->pageRow['doktype'], $noViewDokTypes)) {
......
...@@ -293,7 +293,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface ...@@ -293,7 +293,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface
$content .= '<p>' . $content .= '<p>' .
'<a class="btn btn-default" href="' . $link . '" title="' . $this->getLanguageService()->getLL('new-sys_action') . '">' . '<a class="btn btn-default" href="' . $link . '" title="' . $this->getLanguageService()->getLL('new-sys_action') . '">' .
$this->iconFactory->getIcon('actions-document-new', Icon::SIZE_SMALL)->render() . ' ' . $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL)->render() . ' ' .
$this->getLanguageService()->getLL('new-sys_action') . $this->getLanguageService()->getLL('new-sys_action') .
'</a></p>'; '</a></p>';
} }
......
...@@ -323,7 +323,7 @@ class TypoScriptTemplateModuleController extends BaseScriptClass ...@@ -323,7 +323,7 @@ class TypoScriptTemplateModuleController extends BaseScriptClass
->setHref(BackendUtility::getModuleUrl('web_ts', $urlParameters)) ->setHref(BackendUtility::getModuleUrl('web_ts', $urlParameters))
->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:db_new.php.pagetitle')) ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:db_new.php.pagetitle'))
->setIcon($this->moduleTemplate->getIconFactory()->getIcon( ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
'actions-document-new', 'actions-add',
Icon::SIZE_SMALL Icon::SIZE_SMALL
)); ));
$buttonBar->addButton($newButton); $buttonBar->addButton($newButton);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment