[BUGFIX] Label show link of file info popup correctly 32/43632/2
authorDaniel Goerz <ervaude@gmail.com>
Tue, 29 Sep 2015 18:13:15 +0000 (20:13 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Tue, 29 Sep 2015 21:01:48 +0000 (23:01 +0200)
The info popup of a file shows a download button that does not
trigger a download. Instead the file is opened in a new tab.
This Patch changes the label to "Show" and the icon to the one
used in the filelist for the same action.

Change-Id: Ic1fe8f502d6c5fb38f8007c5394d7105e1daab30
Resolves: #70179
Releases: master
Reviewed-on: http://review.typo3.org/43632
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php

index 3a1ca26..434c0d6 100644 (file)
@@ -276,7 +276,7 @@ class ElementInformationController {
                }
 
                $previewTag = '';
-               $downloadLink = '';
+               $showLink = '';
 
                // check if file is marked as missing
                if ($this->fileObject->isMissing()) {
@@ -321,18 +321,18 @@ class ElementInformationController {
                                }
                        }
 
-                       // Download
+                       // Show
                        if ($url) {
-                               $downloadLink .= '
+                               $showLink .= '
                                        <a class="btn btn-primary" href="' . htmlspecialchars($url) . '" target="_blank">
-                                               ' . $this->iconFactory->getIcon('actions-edit-download', Icon::SIZE_SMALL) . '
-                                               ' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:download', TRUE) . '
+                                               ' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '
+                                               ' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.show', TRUE) . '
                                        </a>';
                        }
                }
 
                return ($previewTag ? '<p>' . $previewTag . '</p>' : '') .
-                               ($downloadLink ? '<p>' . $downloadLink . '</p>' : '');
+                               ($showLink ? '<p>' . $showLink . '</p>' : '');
        }
 
        /**