Commit f99e8d40 authored by Michael Oehlhof's avatar Michael Oehlhof Committed by Christian Kuhn
Browse files

[TASK] Filelist: Info dialog shows image dimensions

The file info modal now contains the width and height of images

Resolves: #65822
Releases: master, 7.6
Change-Id: Iadb64ae3db4558bf74f15aaeac1fe29848120563
Reviewed-on: https://review.typo3.org/51052


Reviewed-by: default avatarDaniel Goerz <ervaude@gmail.com>
Tested-by: default avatarDaniel Goerz <ervaude@gmail.com>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Frans Saris's avatarFrans Saris <franssaris@gmail.com>
Tested-by: Frans Saris's avatarFrans Saris <franssaris@gmail.com>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 5ea0adfa
......@@ -22,6 +22,7 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Resource\AbstractFile;
use TYPO3\CMS\Core\Resource\Folder;
use TYPO3\CMS\Core\Resource\ResourceFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
......@@ -327,6 +328,10 @@ class ElementInformationController
if ($this->type === 'file') {
$extraFields['creation_date'] = htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.creationDate'));
$extraFields['modification_date'] = htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.timestamp'));
if ($this->fileObject->getType() === AbstractFile::FILETYPE_IMAGE) {
$extraFields['width'] = htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.width'));
$extraFields['height'] = htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.height'));
}
}
$extraFields['storage'] = htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file.storage'));
$extraFields['folder'] = htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:folder'));
......@@ -354,8 +359,12 @@ class ElementInformationController
$rowValue = $resourceObject->getStorage()->getName();
} elseif ($name === 'folder') {
$rowValue = $resourceObject->getParentFolder()->getReadablePath();
} elseif ($name === 'width') {
$rowValue = $this->fileObject->getProperty('width') . 'px';
} elseif ($name === 'height') {
$rowValue = $this->fileObject->getProperty('height') . 'px';
}
} elseif (in_array($name, ['creation_date', 'modification_date'], true)) {
} elseif ($name === 'creation_date' || $name === 'modification_date') {
$rowValue = BackendUtility::datetime($this->row[$name]);
} else {
$rowValue = BackendUtility::getProcessedValueExtra($this->table, $name, $this->row[$name]);
......
......@@ -57,6 +57,12 @@
<trans-unit id="LGL.image">
<source>Image:</source>
</trans-unit>
<trans-unit id="LGL.width">
<source>Width</source>
</trans-unit>
<trans-unit id="LGL.height">
<source>Height</source>
</trans-unit>
<trans-unit id="LGL.caption">
<source>Caption:</source>
</trans-unit>
......
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