Index: typo3/sysext/css_styled_content/static/v3.9/setup.txt
===================================================================
--- typo3/sysext/css_styled_content/static/v3.9/setup.txt (revision 5405)
+++ typo3/sysext/css_styled_content/static/v3.9/setup.txt (working copy)
@@ -654,6 +654,35 @@
20 = USER
20.userFunc = tx_cssstyledcontent_pi1->render_uploads
20.field = media
+
+ 20 {
+ entryRendering = COA
+ entryRendering {
+ wrap =
|
|*| |
|| |
|*|
+
+ 10 = TEXT
+ 10.data = register:linkedIcon
+ 10.if.isTrue.field = layout
+ 10.wrap = | |
+
+ 20 = COA
+ 20.wrap = | |
+ 20.1 = TEXT
+ 20.1.data = register:linkedFilename
+ 20.1.wrap = |
+ 20.2 = TEXT
+ 20.2.data = register:description
+ 20.2.wrap = |
+ 20.2.required = 1
+
+ 30 = TEXT
+ 30.wrap = | |
+ 30.data = register:filesize
+ 30.if.isTrue.field = filelink_size
+ 30.bytes = 1
+ 30.bytes.labels = {$styles.content.uploads.filesizeBytesLabels}
+ }
+ }
20.color {
default =
Index: typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php
===================================================================
--- typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php (revision 5405)
+++ typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php (working copy)
@@ -340,40 +340,33 @@
}
}
- // Now, lets render the list!
- $tRows = array();
- foreach($filesData as $key => $fileD) {
-
- // Setting class of table row for odd/even rows:
- $oddEven = $key%2 ? 'tr-odd' : 'tr-even';
+ // optionSplit applied to conf to allow differnt settings per file
+ $splitConf = $GLOBALS['TSFE']->tmpl->splitConfArray($conf, count($filesData));
- // Render row, based on the "layout" setting
- $tRows[]='
- '.($type>0 ? '
-
- '.$fileD['linkedFilenameParts'][0].'
- | ' : '').'
-
- '.$fileD['linkedFilenameParts'][1].' '.
- ($fileD['description'] ? '
- '.htmlspecialchars($fileD['description']).' ' : '').'
- | '.($this->cObj->data['filelink_size'] ? '
-
- ' . $this->cObj->stdWrap($fileD['filesize'], $conf['filesize.']) . '
- | ' : '').'
-
';
+ // Now, lets render the list!
+ $outputEntries = array();
+ foreach($filesData as $key => $fileData) {
+ $GLOBALS['TSFE']->register['linkedIcon'] = $fileData['linkedFilenameParts'][0];
+ $GLOBALS['TSFE']->register['linkedFileName'] = $fileData['linkedFilenameParts'][1];
+ $GLOBALS['TSFE']->register['path'] = $fileData['path'];
+ $GLOBALS['TSFE']->register['description'] = $fileData['description'];
+ $GLOBALS['TSFE']->register['fileSize'] = $fileData['filesize'];
+ $GLOBALS['TSFE']->register['fileExtension'] = $fileData['fileextension'];
+ $outputEntries[] = $this->cObj->cObjGetSingle($splitConf[$key]['entryRendering'], $splitConf[$key]['entryRendering.']);
}
- // Table tag params.
- $tableTagParams = $this->getTableAttributes($conf,$type);
- $tableTagParams['class'] = 'csc-uploads csc-uploads-'.$type;
-
+ if (isset($conf['outerWrap'])) {
+ // Wrap around the whole content
+ $outerWrap = $conf['outerWrap'];
+ } else {
+ // Table tag params
+ $tableTagParams = $this->getTableAttributes($conf,$type);
+ $tableTagParams['class'] = 'csc-uploads csc-uploads-'.$type;
+ $outerWrap = '';
+ }
// Compile it all into table tags:
- $out = '
-
- '.implode('',$tRows).'
-
';
+ $out = $this->cObj->wrap(implode('',$outputEntries), $outerWrap);;
}
// Calling stdWrap:
Index: typo3/sysext/css_styled_content/static/setup.txt
===================================================================
--- typo3/sysext/css_styled_content/static/setup.txt (revision 5405)
+++ typo3/sysext/css_styled_content/static/setup.txt (working copy)
@@ -736,6 +736,40 @@
20 = USER
20.userFunc = tx_cssstyledcontent_pi1->render_uploads
20.field = media
+
+ 20 {
+ # Rendering for each file (e.g. rows of the table) as a cObject
+ entryRendering = COA
+ entryRendering {
+ wrap = |
|*| |
|| |
|*|
+
+ 10 = TEXT
+ 10.data = register:linkedIcon
+ 10.wrap = | |
+ 10.if.isPositive.field = layout
+
+ 20 = COA
+ 20.wrap = | |
+ 20.1 = TEXT
+ 20.1 {
+ data = register:linkedFileName
+ wrap = |
+ }
+ 20.2 = TEXT
+ 20.2 {
+ data = register:description
+ wrap = |
+ required = 1
+ }
+
+ 30 = TEXT
+ 30.if.isTrue.field = filelink_size
+ 30.data = register:fileSize
+ 30.wrap = | |
+ 30.bytes = 1
+ 30.bytes.labels = {$styles.content.uploads.filesizeBytesLabels}
+ }
+ }
20.color {
default =
Index: typo3/sysext/css_styled_content/static/v3.8/setup.txt
===================================================================
--- typo3/sysext/css_styled_content/static/v3.8/setup.txt (revision 5405)
+++ typo3/sysext/css_styled_content/static/v3.8/setup.txt (working copy)
@@ -563,6 +563,35 @@
20.userFunc = tx_cssstyledcontent_pi1->render_uploads
20.field = media
+ 20 {
+ entryRendering = COA
+ entryRendering {
+ wrap = |
|*| |
|| |
|*|
+
+ 10 = TEXT
+ 10.data = register:linkedIcon
+ 10.if.isTrue.field = layout
+ 10.wrap = | |
+
+ 20 = COA
+ 20.wrap = | |
+ 20.1 = TEXT
+ 20.1.data = register:linkedFilename
+ 20.1.wrap = |
+ 20.2 = TEXT
+ 20.2.data = register:description
+ 20.2.wrap = |
+ 20.2.required = 1
+
+ 30 = TEXT
+ 30.wrap = | |
+ 30.data = register:filesize
+ 30.if.isTrue.field = filelink_size
+ 30.bytes = 1
+ 30.bytes.labels = {$styles.content.uploads.filesizeBytesLabels}
+ }
+ }
+
20.color {
default =
1 = #EDEBF1
Index: typo3/sysext/css_styled_content/static/v4.2/setup.txt
===================================================================
--- typo3/sysext/css_styled_content/static/v4.2/setup.txt (revision 5405)
+++ typo3/sysext/css_styled_content/static/v4.2/setup.txt (working copy)
@@ -671,6 +671,35 @@
20.userFunc = tx_cssstyledcontent_pi1->render_uploads
20.field = media
+ 20 {
+ entryRendering = COA
+ entryRendering {
+ wrap = |
|*| |
|| |
|*|
+
+ 10 = TEXT
+ 10.data = register:linkedIcon
+ 10.if.isTrue.field = layout
+ 10.wrap = | |
+
+ 20 = COA
+ 20.wrap = | |
+ 20.1 = TEXT
+ 20.1.data = register:linkedFilename
+ 20.1.wrap = |
+ 20.2 = TEXT
+ 20.2.data = register:description
+ 20.2.wrap = |
+ 20.2.required = 1
+
+ 30 = TEXT
+ 30.wrap = | |
+ 30.data = register:filesize
+ 30.if.isTrue.field = filelink_size
+ 30.bytes = 1
+ 30.bytes.labels = {$styles.content.uploads.filesizeBytesLabels}
+ }
+ }
+
20.color {
default =
1 = #EDEBF1