Skip to content

Commit

Permalink
[FEATURE] Use svg files as file-icons for the File Links element
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytro committed Apr 13, 2016
1 parent 1c21060 commit 11b91ca
Show file tree
Hide file tree
Showing 43 changed files with 307 additions and 0 deletions.
55 changes: 55 additions & 0 deletions Resources/Private/Templates/FluidStyledContent/Uploads.html
@@ -0,0 +1,55 @@
{namespace x=T3kit\T3kitExtensionTools\ViewHelpers\Render}
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">

<f:layout name="CustomHeaderContentFooter" />
<f:section name="content">
<f:if condition="{files}">
<ul class="ce-uploads">
<f:for each="{files}" as="file" iteration="fileIterator">
<li>
<f:if condition="{data.uploads_type} == 1">
<x:svg source="{f:uri.resource(path: 'Icons/FileIcons/{file.extension}.svg', extensionName: 'theme_t3kit')}"></x:svg>
</f:if>

<f:if condition="{data.uploads_type} == 2">
<f:if condition="{f:uri.image(src: 'file:{f:if(condition: file.originalFile, then: \'file:{file.originalFile.uid}\', else: \'file:{file.uid}\')}')} != '/'">
<f:then>
<a href="{file.publicUrl}">
<f:media file="{file}" width="150" alt="{file.properties.alternative}" />
</a>
</f:then>
<f:else>
<x:svg source="{f:uri.resource(path: 'Icons/FileIcons/{file.extension}.svg', extensionName: 'theme_t3kit')}"></x:svg>
</f:else>
</f:if>
</f:if>

<div>
<f:if condition="{file.name}">
<a href="{file.publicUrl}">
<span class="ce-uploads-fileName">
{file.name}
</span>
</a>
</f:if>

<f:if condition="{file.properties.description}">
<f:if condition="{data.uploads_description}">
<span class="ce-uploads-description">
{file.properties.description}
</span>
</f:if>
</f:if>

<f:if condition="{data.filelink_size}">
<span class="ce-uploads-filesize">
<f:format.bytes value="{file.properties.size}" />
</span>
</f:if>
</div>
</li>
</f:for>
</ul>
</f:if>
</f:section>
</html>
6 changes: 6 additions & 0 deletions Resources/Public/Icons/FileIcons/3gp.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Resources/Public/Icons/FileIcons/avi.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Resources/Public/Icons/FileIcons/bmp.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Resources/Public/Icons/FileIcons/c.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Resources/Public/Icons/FileIcons/css.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Resources/Public/Icons/FileIcons/dat.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Resources/Public/Icons/FileIcons/dmg.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Resources/Public/Icons/FileIcons/doc.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Resources/Public/Icons/FileIcons/docx.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Resources/Public/Icons/FileIcons/dot.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Resources/Public/Icons/FileIcons/dotx.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 11b91ca

Please sign in to comment.