Blame view
sources/apps/files/templates/part.list.php
2.66 KB
|
31b7f2792
|
1 2 3 |
<?php $totalfiles = 0; $totaldirs = 0; $totalsize = 0; ?> |
|
03e52840d
|
4 |
<?php foreach($_['files'] as $file): |
|
03e52840d
|
5 |
// the bigger the file, the darker the shade of grey; megabytes*2 |
|
31b7f2792
|
6 |
$simple_size_color = intval(160-$file['size']/(1024*1024)*2); |
|
03e52840d
|
7 8 9 10 |
if($simple_size_color<0) $simple_size_color = 0; $relative_modified_date = OCP\relative_modified_date($file['mtime']); // the older the file, the brighter the shade of grey; days*14 $relative_date_color = round((time()-$file['mtime'])/60/60/24*14); |
|
31b7f2792
|
11 12 13 |
if($relative_date_color>160) $relative_date_color = 160; $name = \OCP\Util::encodePath($file['name']); $directory = \OCP\Util::encodePath($file['directory']); ?> |
|
03e52840d
|
14 15 16 17 |
<tr data-id="<?php p($file['fileid']); ?>"
data-file="<?php p($name);?>"
data-type="<?php ($file['type'] == 'dir')?p('dir'):p('file')?>"
data-mime="<?php p($file['mimetype'])?>"
|
|
31b7f2792
|
18 19 20 |
data-size="<?php p($file['size']);?>" data-etag="<?php p($file['etag']);?>" data-permissions="<?php p($file['permissions']); ?>"> |
|
a293d369c
|
21 |
<?php if(isset($file['isPreviewAvailable']) and $file['isPreviewAvailable']): ?> |
|
31b7f2792
|
22 |
<td class="filename svg preview-icon" |
|
03e52840d
|
23 |
<?php else: ?> |
|
31b7f2792
|
24 |
<td class="filename svg" |
|
03e52840d
|
25 |
<?php endif; ?> |
|
31b7f2792
|
26 |
style="background-image:url(<?php print_unescaped($file['icon']); ?>)" |
|
03e52840d
|
27 |
> |
|
31b7f2792
|
28 29 30 31 |
<?php if(!isset($_['readonly']) || !$_['readonly']): ?> <input id="select-<?php p($file['fileid']); ?>" type="checkbox" /> <label for="select-<?php p($file['fileid']); ?>"></label> <?php endif; ?> |
|
03e52840d
|
32 33 |
<?php if($file['type'] == 'dir'): ?> <a class="name" href="<?php p(rtrim($_['baseURL'],'/').'/'.trim($directory,'/').'/'.$name); ?>" title=""> |
|
31b7f2792
|
34 35 36 |
<span class="nametext"> <?php print_unescaped(htmlspecialchars($file['name']));?> </span> |
|
03e52840d
|
37 |
<?php else: ?> |
|
31b7f2792
|
38 39 40 41 |
<a class="name" href="<?php p(rtrim($_['downloadURL'],'/').'/'.trim($directory,'/').'/'.$name); ?>"> <label class="filetext" title="" for="select-<?php p($file['fileid']); ?>"></label> <span class="nametext"><?php print_unescaped(htmlspecialchars($file['basename']));?><span class='extension'><?php p($file['extension']);?></span></span> </a> |
|
03e52840d
|
42 |
<?php endif; ?> |
|
03e52840d
|
43 44 45 46 47 48 49 |
<?php if($file['type'] == 'dir'):?> <span class="uploadtext" currentUploads="0"> </span> <?php endif;?> </a> </td> <td class="filesize" |
|
03e52840d
|
50 |
style="color:rgb(<?php p($simple_size_color.','.$simple_size_color.','.$simple_size_color) ?>)"> |
|
31b7f2792
|
51 |
<?php print_unescaped(OCP\human_file_size($file['size'])); ?> |
|
03e52840d
|
52 53 54 55 56 57 58 59 60 61 62 63 |
</td> <td class="date"> <span class="modified" title="<?php p($file['date']); ?>" style="color:rgb(<?php p($relative_date_color.',' .$relative_date_color.',' .$relative_date_color) ?>)"> <?php p($relative_modified_date); ?> </span> </td> </tr> <?php endforeach; |