Added feature #8487: Enable configuration of filesize labels for CType uploads
authorOliver Hader <oliver.hader@typo3.org>
Mon, 9 Mar 2009 15:03:13 +0000 (15:03 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Mon, 9 Mar 2009 15:03:13 +0000 (15:03 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5164 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php
typo3/sysext/css_styled_content/static/constants.txt
typo3/sysext/css_styled_content/static/setup.txt

index 27339bb..9d2f3f1 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * Fixed bug #10099: Use TYPO3_DB->exec_SELECTcountRows() to determine the number of rows
        * Follow-up to bug #10099: Added additional conversion to integer in tslib_feTCE::checkDoublePostExist()
+       * Added feature #8487: Enable configuration of filesize labels for CType uploads (thanks to Tom Ruether)
 
 2009-03-08  Stanislas Rolland  <typo3@sjbr.ca>
 
index 624bf6c..d331035 100755 (executable)
@@ -359,7 +359,7 @@ class tx_cssstyledcontent_pi1 extends tslib_pibase {
                                                        <p class="csc-uploads-description">'.htmlspecialchars($fileD['description']).'</p>' : '').'
                                                </td>'.($this->cObj->data['filelink_size'] ? '
                                                <td class="csc-uploads-fileSize">
-                                                       <p>'.t3lib_div::formatSize($fileD['filesize']).'</p>
+                                                       <p>' . $this->cObj->stdWrap($fileD['filesize'], $conf['filesize.']) . '</p>
                                                </td>' : '').'
                                        </tr>';
                                }
index 8d13501..6091f02 100755 (executable)
@@ -72,6 +72,8 @@ styles.content.uploads {
   jumpurl_secure =
   jumpurl_secure_mimeTypes = pdf=application/pdf, doc=application/msword
   jumpurl =
+    # cat=content/cUploads; type=string; label=Labels of file sizes: The labels for bytes, kilobytes, megabytes and gigabytes
+  filesizeBytesLabels = " | K| M| G"
 }
 
 styles.content.mailform {
index 4fabfc9..2df217c 100755 (executable)
@@ -743,6 +743,11 @@ tt_content.uploads {
                iconCObject.file.width = 150
        }
 
+       20.filesize {
+               bytes = 1
+               bytes.labels = {$styles.content.uploads.filesizeBytesLabels}
+       }
+
        20.stdWrap {
                editIcons = tt_content: media, layout [table_bgColor|table_border|table_cellspacing|table_cellpadding], filelink_size, imagecaption
                editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.xml:eIcon.filelist