2012-10-10 15:43:09 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
<?php if ( array_key_exists('publicListView', $_) && $_['publicListView'] == true ) {
|
|
|
|
echo "var publicListView = true;";
|
|
|
|
} else {
|
|
|
|
echo "var publicListView = false;";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</script>
|
|
|
|
|
2011-07-30 12:42:58 +00:00
|
|
|
<?php foreach($_['files'] as $file):
|
2012-05-06 21:00:36 +00:00
|
|
|
$simple_file_size = OCP\simple_file_size($file['size']);
|
2011-07-30 13:42:34 +00:00
|
|
|
$simple_size_color = intval(200-$file['size']/(1024*1024)*2); // the bigger the file, the darker the shade of grey; megabytes*2
|
2011-07-29 01:09:30 +00:00
|
|
|
if($simple_size_color<0) $simple_size_color = 0;
|
2012-05-06 21:00:36 +00:00
|
|
|
$relative_modified_date = OCP\relative_modified_date($file['mtime']);
|
2011-07-30 13:31:11 +00:00
|
|
|
$relative_date_color = round((time()-$file['mtime'])/60/60/24*14); // the older the file, the brighter the shade of grey; days*14
|
2011-12-28 17:47:27 +00:00
|
|
|
if($relative_date_color>200) $relative_date_color = 200;
|
|
|
|
$name = str_replace('+','%20',urlencode($file['name']));
|
|
|
|
$name = str_replace('%2F','/', $name);
|
|
|
|
$directory = str_replace('+','%20',urlencode($file['directory']));
|
|
|
|
$directory = str_replace('%2F','/', $directory); ?>
|
2012-08-24 14:01:01 +00:00
|
|
|
<tr data-id="<?php echo $file['id']; ?>" data-file="<?php echo $name;?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mimetype']?>" data-size='<?php echo $file['size'];?>' data-permissions='<?php echo $file['permissions']; ?>'>
|
2012-05-06 21:00:36 +00:00
|
|
|
<td class="filename svg" style="background-image:url(<?php if($file['type'] == 'dir') echo OCP\mimetype_icon('dir'); else echo OCP\mimetype_icon($file['mimetype']); ?>)">
|
2011-09-23 07:46:13 +00:00
|
|
|
<?php if(!isset($_['readonly']) || !$_['readonly']) { ?><input type="checkbox" /><?php } ?>
|
2011-12-28 17:47:27 +00:00
|
|
|
<a class="name" href="<?php if($file['type'] == 'dir') echo $_['baseURL'].$directory.'/'.$name; else echo $_['downloadURL'].$directory.'/'.$name; ?>" title="">
|
2011-07-28 10:14:55 +00:00
|
|
|
<span class="nametext">
|
2011-07-07 00:41:22 +00:00
|
|
|
<?php if($file['type'] == 'dir'):?>
|
2011-07-29 00:47:02 +00:00
|
|
|
<?php echo htmlspecialchars($file['name']);?>
|
2011-07-07 00:41:22 +00:00
|
|
|
<?php else:?>
|
2012-04-15 11:32:45 +00:00
|
|
|
<?php echo htmlspecialchars($file['basename']);?><span class='extension'><?php echo $file['extension'];?></span>
|
2011-07-07 00:41:22 +00:00
|
|
|
<?php endif;?>
|
2011-07-28 10:14:55 +00:00
|
|
|
</span>
|
2012-03-27 19:38:55 +00:00
|
|
|
<?php if($file['type'] == 'dir'):?>
|
|
|
|
<span class="uploadtext" currentUploads="0">
|
|
|
|
</span>
|
|
|
|
<?php endif;?>
|
2011-07-07 00:41:22 +00:00
|
|
|
</a>
|
|
|
|
</td>
|
2012-05-06 21:00:36 +00:00
|
|
|
<td class="filesize" title="<?php echo OCP\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>
|
2011-07-28 22:45:44 +00:00
|
|
|
<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>
|
2011-04-17 14:19:21 +00:00
|
|
|
</tr>
|
2011-07-06 22:20:40 +00:00
|
|
|
<?php endforeach; ?>
|