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
],
'new' => [
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.new',
'iconIdentifier' => 'actions-document-new',
'iconIdentifier' => 'actions-page-new',
'callbackAction' => 'newRecord'
],
'info' => [
......
......@@ -63,7 +63,7 @@ class RecordProvider extends AbstractProvider
],
'new' => [
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.new',
'iconIdentifier' => 'actions-document-new',
'iconIdentifier' => 'actions-add',
'callbackAction' => 'newRecord'
],
'info' => [
......@@ -110,7 +110,7 @@ class RecordProvider extends AbstractProvider
'childItems' => [
'newWizard' => [
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_misc.xlf:CM_newWizard',
'iconIdentifier' => 'actions-document-new',
'iconIdentifier' => 'actions-add',
'callbackAction' => 'newContentWizard',
],
'openListModule' => [
......
......@@ -363,7 +363,7 @@ class InlineControlContainer extends AbstractContainer
switch ($type) {
case 'newRecord':
$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';
$attributes['class'] = 'btn btn-default inlineNewButton ' . $this->inlineData['config'][$nameObject]['md5'];
$attributes['onclick'] = 'return inline.createNewRecord(' . GeneralUtility::quoteJSvalue($objectPrefix) . ')';
......@@ -594,7 +594,7 @@ class InlineControlContainer extends AbstractContainer
$item .= '
<span class="input-group-btn">
<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>
</span>';
} else {
......
......@@ -585,7 +585,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-add-placeholder', Icon::SIZE_SMALL)->render()
. $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL)->render()
. ' '
. htmlspecialchars($this->getLanguageService()->getLL('content')) . '</a>';
}
......@@ -699,7 +699,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
$singleElementHTML .= '
<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', Icon::SIZE_SMALL)->render()
. ' '
. htmlspecialchars($this->getLanguageService()->getLL('content')) . '</a>
';
......@@ -1086,7 +1086,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
$url = BackendUtility::getModuleUrl('record_edit', $urlParameters);
$theData['__cmds__'] = '<a href="' . htmlspecialchars($url) . '" '
. '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');
// Render Items
......
......@@ -93,7 +93,7 @@ define(['jquery', 'jquery-ui/droppable'], function ($) {
// make the drop zones visible
$(DragDrop.dropZoneIdentifier).each(function () {
if (
$(this).parent().find('.icon-actions-document-new').length
$(this).parent().find('.icon-actions-add').length
) {
$(this).addClass(DragDrop.validDropZoneClass);
} else {
......
......@@ -46,7 +46,7 @@ define(['jquery',
*/
Paste.activatePasteIcons = 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;
}
$('.t3js-page-lang-column .t3-page-ce > .t3-page-ce').removeClass('t3js-page-ce');
......
......@@ -75,7 +75,7 @@ class Inline1nCest
*/
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';
$testValue = 'Fo Bar';
......
......@@ -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-add-placeholder', Icon::SIZE_SMALL));
->setIcon($iconFactory->getIcon('actions-add', Icon::SIZE_SMALL));
$buttonBar->addButton($newButton, ButtonBar::BUTTON_POSITION_LEFT, 1);
}
......
......@@ -893,7 +893,7 @@ class AdminPanelView
$params = '&sys_language_uid=' . $tsfe->sys_language_uid;
}
$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');
$output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '" title="' . $title . '">';
$output[] = ' ' . $icon;
......
......@@ -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-placeholder', 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
......@@ -388,7 +388,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList
->setHref('#')
->setOnClick($onClick)
->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);
}
if (!in_array($this->pageRow['doktype'], $noViewDokTypes)) {
......
......@@ -293,7 +293,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface
$content .= '<p>' .
'<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') .
'</a></p>';
}
......
......@@ -323,7 +323,7 @@ class TypoScriptTemplateModuleController extends BaseScriptClass
->setHref(BackendUtility::getModuleUrl('web_ts', $urlParameters))
->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:db_new.php.pagetitle'))
->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
'actions-document-new',
'actions-add',
Icon::SIZE_SMALL
));
$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