]> source.dussan.org Git - nextcloud-server.git/commitdiff
documented file size and date color calculation part
authorJan-Christoph Borchardt <JanCBorchardt@fsfe.org>
Sat, 30 Jul 2011 09:00:25 +0000 (11:00 +0200)
committerJan-Christoph Borchardt <JanCBorchardt@fsfe.org>
Sat, 30 Jul 2011 09:00:25 +0000 (11:00 +0200)
files/templates/part.list.php

index 9ed3494732df6d45007a8afffd5e6efb5a330d25..3713d483b001595e23e0933989ffd974e4210a7d 100644 (file)
@@ -1,10 +1,10 @@
                <?php if(!$_['files']) echo '<span id="emptyfolder">Nothing in here. Upload something!</span><style>.file_upload_filename { background-color:#ffc100; border:#dda600 1px solid; }</style>';
                foreach($_['files'] as $file):
                        $simple_file_size = simple_file_size($file['size']);
-                       $simple_size_color = 200-intval($file['size']/(1024*1024)*2);
+                       $simple_size_color = 200-intval($file['size']/(1024*1024)*2); // the bigger the file, the darker the shade of grey
                        if($simple_size_color<0) $simple_size_color = 0;
                        $relative_modified_date = relative_modified_date($file['mtime']);
-                       $relative_date_color = round((time()-$file['mtime'])/60/60/24*7); //days ago
+                       $relative_date_color = round((time()-$file['mtime'])/60/60/24*14); // the older the file, the brighter the shade of grey
                        if($relative_date_color>200) $relative_date_color = 200; ?>
                        <tr data-file="<?php echo $file['name'];?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mime']?>" data-size='<?php echo $file['size'];?>'>
                                <td class="filename">