summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <JanCBorchardt@fsfe.org>2011-07-29 00:45:44 +0200
committerJan-Christoph Borchardt <JanCBorchardt@fsfe.org>2011-07-29 00:46:20 +0200
commitf1616b0e629ec5fd59a859748e64418862691597 (patch)
tree2adfa42fdaa6b905f61ca1d99b53eb2838d4bbef /files
parentc73dd86713de9e249bee432f7728dfd06859fac3 (diff)
downloadnextcloud-server-f1616b0e629ec5fd59a859748e64418862691597.tar.gz
nextcloud-server-f1616b0e629ec5fd59a859748e64418862691597.zip
implemented relative file size and coloring
Diffstat (limited to 'files')
-rw-r--r--files/templates/part.list.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/files/templates/part.list.php b/files/templates/part.list.php
index 1d78b77ae3e..a0ffb4b6073 100644
--- a/files/templates/part.list.php
+++ b/files/templates/part.list.php
@@ -1,6 +1,9 @@
<?php foreach($_['files'] as $file):
$simple_file_size = simple_file_size($file['size']);
- $simple_size_color = 200-intval(pow(($file['size']/(1024*1024)),2)); ?>
+ $simple_size_color = 200-intval(pow(($file['size']/(1024*1024)),2));
+ $relative_modified_date = relative_modified_date($file['mtime']);
+ $relative_date_color = round((time()-$file['mtime'])/60/60/24*5); //days ago
+ 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">
<input type="checkbox" />
@@ -15,6 +18,6 @@
</a>
</td>
<td class="filesize" title="<?php echo human_file_size($file['size']); ?>" style="color:rgb(<?php echo $simple_size_color.','.$simple_size_color.','.$simple_size_color ?>)"><?php echo $simple_file_size; ?></td>
- <td class="date"><span class="modified"><?php echo $file['date']; ?></span></td>
+ <td class="date"><span class="modified" title="<?php echo $file['date']; ?>" style="color:rgb(<?php echo $relative_date_color.','.$relative_date_color.','.$relative_date_color ?>)"><?php echo $relative_modified_date; ?></span></td>
</tr>
<?php endforeach; ?>