[BUGFIX] Render PDFs and MP3s in FSC. 88/44688/5
authorLars Peter Søndergaard <l.soendergaard@lichtflut-medien.de>
Thu, 12 Nov 2015 10:50:06 +0000 (11:50 +0100)
committerSteffen Müller <typo3@t3node.com>
Fri, 13 Nov 2015 07:31:46 +0000 (08:31 +0100)
Add rendering for PDFs by reusing the one for images. MP3s can be
rendered with the video section.

Resolves: #71502
Resolves: #71474
Releases: master
Change-Id: I90b80c2885457bd14de5edfea7a7379fe949e903
Reviewed-on: https://review.typo3.org/44688
Tested-by: Wolfgang Wagner <wolfgang.wagner.fn@gmail.com>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Steffen Müller <typo3@t3node.com>
Tested-by: Steffen Müller <typo3@t3node.com>
typo3/sysext/fluid_styled_content/Resources/Private/Partials/MediaGallery.html

index 5900ab1..ce4ad22 100644 (file)
                                                                        <div class="ce-media">
                                                                </f:else>
                                                        </f:if>
-                                                       <f:if condition="{column.media.type} == 2">
-                                                               <f:render section="imageType" arguments="{_all}" />
-                                                       </f:if>
-                                                       <f:if condition="{column.media.type} == 4">
-                                                               <f:render section="videoType" arguments="{_all}" />
-                                                       </f:if>
+
+                                                       <f:switch expression="{column.media.type}">
+                                                               <f:case default="TRUE">
+                                                                       <f:render section="imageType" arguments="{_all}" />
+                                                               </f:case>
+                                                               <f:case value="3">
+                                                                       <f:render section="audioType" arguments="{_all}" />
+                                                               </f:case>
+                                                               <f:case value="4">
+                                                                       <f:render section="videoType" arguments="{_all}" />
+                                                               </f:case>
+                                                        </f:switch>
 
                                                        <f:if condition="{column.media.description}">
                                                                <f:then>
        </f:if>
 </f:section>
 
+<f:section name="audioType">
+       <f:render section="media" arguments="{_all}" />
+</f:section>
+
 <f:section name="videoType">
        <f:render section="media" arguments="{_all}" />
 </f:section>
@@ -83,4 +93,4 @@
                title="{column.media.title}"
        />
 </f:section>
-</html>
\ No newline at end of file
+</html>