[TASK] Use SVG icons in EXT:redirects 56/55456/2
authorJigal van Hemert <jigal.van.hemert@typo3.org>
Thu, 25 Jan 2018 15:01:35 +0000 (16:01 +0100)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 26 Jan 2018 14:21:59 +0000 (15:21 +0100)
The module icon is in SVG format with a background color from
the TYPO3 icon set. A similar icon for the record type has been
added too. The old PNG icons were removed.
In a future clean-up of the TYPO3 icon set these will be added to the
collection.

Resolves: #83653
Releases: master
Change-Id: Iec1a8b0344b91c43e501efa4deea9584ddf8b561
Reviewed-on: https://review.typo3.org/55456
Reviewed-by: Reiner Teubner <rteubner@me.com>
Tested-by: Reiner Teubner <rteubner@me.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/redirects/Configuration/TCA/sys_redirect.php
typo3/sysext/redirects/Resources/Public/Icons/Extension.png [deleted file]
typo3/sysext/redirects/Resources/Public/Icons/Extension.svg [new file with mode: 0644]
typo3/sysext/redirects/Resources/Public/Icons/mimetypes-x-sys_redirect.svg [new file with mode: 0644]
typo3/sysext/redirects/Resources/Public/Icons/repeat_64x64.png [deleted file]
typo3/sysext/redirects/ext_localconf.php
typo3/sysext/redirects/ext_tables.php

index 8a858d5..6a32c72 100644 (file)
@@ -22,8 +22,10 @@ return [
             'starttime' => 'starttime',
             'endtime' => 'endtime',
         ],
+        'typeicon_classes' => [
+            'default' => 'mimetypes-x-sys_redirect',
+        ],
         'searchFields' => 'source_host,source_path,target,target_statuscode',
-        'iconfile' => 'EXT:redirects/Resources/Public/Icons/repeat_64x64.png',
     ],
     'interface' => [
         'showRecordFieldList' => 'disabled, source_host, source_path, is_regexp, force_https, keep_query_parameters, target, target_statuscode, hitcount, lasthiton, disable_hitcount',
diff --git a/typo3/sysext/redirects/Resources/Public/Icons/Extension.png b/typo3/sysext/redirects/Resources/Public/Icons/Extension.png
deleted file mode 100644 (file)
index 98bb005..0000000
Binary files a/typo3/sysext/redirects/Resources/Public/Icons/Extension.png and /dev/null differ
diff --git a/typo3/sysext/redirects/Resources/Public/Icons/Extension.svg b/typo3/sysext/redirects/Resources/Public/Icons/Extension.svg
new file mode 100644 (file)
index 0000000..c24eb02
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+        width="64px" height="64px" viewBox="0 0 64 64" style="enable-background:new 0 0 64 64;" xml:space="preserve">
+<path style="fill:#5599FF;" d="M-0.5-0.5h64v64h-64V-0.5z"/>
+<path style="fill:#FFFFFF;" d="M31.9,18.254c3.639,0.008,6.943,1.439,9.385,3.771l1.961-1.959c0.828-0.832,2.25-0.244,2.25,0.932
+       v7.363c0,0.729-0.594,1.316-1.32,1.316h-7.359c-1.176,0-1.758-1.42-0.93-2.252l2.289-2.291c-1.695-1.584-3.887-2.469-6.219-2.484
+       c-5.076-0.045-9.354,4.061-9.309,9.303c0.039,4.977,4.072,9.148,9.227,9.148c2.258,0,4.395-0.806,6.082-2.281
+       c0.258-0.228,0.648-0.215,0.898,0.031l2.176,2.18c0.266,0.262,0.254,0.703-0.027,0.953c-2.414,2.18-5.617,3.508-9.129,3.508
+       c-7.523,0-13.619-6.094-13.619-13.617C18.252,24.361,24.385,18.242,31.9,18.254z"/>
+</svg>
diff --git a/typo3/sysext/redirects/Resources/Public/Icons/mimetypes-x-sys_redirect.svg b/typo3/sysext/redirects/Resources/Public/Icons/mimetypes-x-sys_redirect.svg
new file mode 100644 (file)
index 0000000..23c2e21
--- /dev/null
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve"><path style="fill:#5599FF;" d="M15,12c0,1.657-1.344,3-3,3H4c-1.657,0-3-1.343-3-3V4c0-1.657,1.343-3,3-3h8c1.656,0,3,1.343,3,3V12z"/><path style="fill:#FFFFFF;" d="M8.007,4c1.069,0.002,2.039,0.423,2.757,1.107l0.576-0.575C11.582,4.287,12,4.46,12,4.805v2.162 c0,0.215-0.175,0.386-0.388,0.386H9.451c-0.345,0-0.517-0.417-0.273-0.66l0.673-0.673c-0.498-0.465-1.143-0.726-1.827-0.73 C6.533,5.278,5.276,6.484,5.29,8.023C5.302,9.484,6.486,10.709,8,10.709c0.663,0,1.292-0.236,1.787-0.668 c0.075-0.067,0.191-0.065,0.264,0.008l0.639,0.641c0.078,0.076,0.075,0.205-0.008,0.279C9.972,11.609,9.032,12,8,12 c-2.209,0-4-1.792-4-4C3.999,5.793,5.8,3.996,8.007,4z"/></svg>
diff --git a/typo3/sysext/redirects/Resources/Public/Icons/repeat_64x64.png b/typo3/sysext/redirects/Resources/Public/Icons/repeat_64x64.png
deleted file mode 100644 (file)
index 98bb005..0000000
Binary files a/typo3/sysext/redirects/Resources/Public/Icons/repeat_64x64.png and /dev/null differ
index 4c91813..2ded481 100644 (file)
@@ -15,6 +15,13 @@ $GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['formDataGroup']['tcaDatabaseRe
     ],
 ];
 
+\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class)
+    ->registerIcon(
+        'mimetypes-x-sys_redirect',
+        \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
+        ['source' => 'EXT:redirects/Resources/Public/Icons/mimetypes-x-sys_redirect.svg']
+    );
+
 // Add validation call for form field source_host and source_path
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][\TYPO3\CMS\Redirects\Evaluation\SourcePath::class] = '';
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][\TYPO3\CMS\Redirects\Evaluation\SourceHost::class] = '';
index a6debe7..9b215c7 100644 (file)
@@ -10,7 +10,7 @@ defined('TYPO3_MODE') or die();
         'routeTarget' => \TYPO3\CMS\Redirects\Controller\ManagementController::class . '::handleRequest',
         'access' => 'group,user',
         'name' => 'site_redirects',
-        'icon' => 'EXT:redirects/Resources/Public/Icons/repeat_64x64.png',
+        'icon' => 'EXT:redirects/Resources/Public/Icons/Extension.svg',
         'labels' => 'LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf'
     ]
 );