]> source.dussan.org Git - nextcloud-server.git/commitdiff
move icon generation logic out of the template
authorThomas Müller <thomas.mueller@tmit.eu>
Wed, 11 Sep 2013 22:13:19 +0000 (00:13 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Wed, 11 Sep 2013 22:13:19 +0000 (00:13 +0200)
apps/files/templates/part.list.php

index 4076c1bb3313ed892905ba1088453b0ea0f21425..7d1b317e01692d780885aece04caec340be11985 100644 (file)
                <?php else: ?>
                <td class="filename svg"
                <?php endif; ?>
-               <?php if($file['type'] == 'dir'): ?>
-                       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; ?>
+                   style="background-image:url(<?php print_unescaped($file['icon']); ?>)"
                        >
                <?php if(!isset($_['readonly']) || !$_['readonly']): ?>
                        <input id="select-<?php p($file['fileid']); ?>" type="checkbox" />