Skip to content
Snippets Groups Projects
Commit b49f43c3 authored by Thomas Müller's avatar Thomas Müller
Browse files

move icon generation logic out of the template

parent 8543951c
Branches
No related tags found
No related merge requests found
...@@ -22,26 +22,7 @@ ...@@ -22,26 +22,7 @@
<?php else: ?> <?php else: ?>
<td class="filename svg" <td class="filename svg"
<?php endif; ?> <?php endif; ?>
<?php if($file['type'] == 'dir'): ?> style="background-image:url(<?php print_unescaped($file['icon']); ?>)"
style="background-image:url(<?php print_unescaped(OCP\mimetype_icon('dir')); ?>)"
<?php else: ?>
<?php if($_['isPublic']): ?>
<?php
$relativePath = substr($relativePath, strlen($_['sharingroot']));
?>
<?php if($file['isPreviewAvailable']): ?>
style="background-image:url(<?php print_unescaped(OCP\publicPreview_icon($relativePath, $_['sharingtoken'])); ?>)"
<?php else: ?>
style="background-image:url(<?php print_unescaped(OCP\mimetype_icon($file['mimetype'])); ?>)"
<?php endif; ?>
<?php else: ?>
<?php if($file['isPreviewAvailable']): ?>
style="background-image:url(<?php print_unescaped(OCP\preview_icon($relativePath)); ?>)"
<?php else: ?>
style="background-image:url(<?php print_unescaped(OCP\mimetype_icon($file['mimetype'])); ?>)"
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
> >
<?php if(!isset($_['readonly']) || !$_['readonly']): ?> <?php if(!isset($_['readonly']) || !$_['readonly']): ?>
<input id="select-<?php p($file['fileid']); ?>" type="checkbox" /> <input id="select-<?php p($file['fileid']); ?>" type="checkbox" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment