2013-02-27 20:46:37 +00:00
|
|
|
<input type="hidden" id="disableSharing" data-status="<?php p($_['disableSharing']); ?>">
|
2013-01-18 12:11:29 +00:00
|
|
|
<?php foreach($_['files'] as $file):
|
2013-01-22 11:30:12 +00:00
|
|
|
$relative_deleted_date = OCP\relative_modified_date($file['timestamp']);
|
2013-01-18 12:11:29 +00:00
|
|
|
// the older the file, the brighter the shade of grey; days*14
|
2013-02-19 09:23:34 +00:00
|
|
|
$relative_date_color = round((time()-$file['date'])/60/60/24*14);
|
2013-01-18 12:11:29 +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); ?>
|
2013-02-27 20:46:37 +00:00
|
|
|
<tr data-filename="<?php p($file['name']);?>"
|
2013-03-04 11:12:27 +00:00
|
|
|
data-type="<?php ($file['type'] == 'dir')?p('dir'):p('file')?>"
|
2013-02-27 20:46:37 +00:00
|
|
|
data-mime="<?php p($file['mimetype'])?>"
|
|
|
|
data-permissions='<?php p($file['permissions']); ?>'
|
2013-01-22 11:00:04 +00:00
|
|
|
<?php if ( $_['dirlisting'] ): ?>
|
2013-02-27 20:46:37 +00:00
|
|
|
id="<?php p($file['directory'].'/'.$file['name']);?>"
|
|
|
|
data-file="<?php p($file['directory'].'/'.$file['name']);?>"
|
2013-01-22 11:00:04 +00:00
|
|
|
data-timestamp=''
|
|
|
|
data-dirlisting=1
|
|
|
|
<?php else: ?>
|
2013-02-27 20:46:37 +00:00
|
|
|
id="<?php p($file['name'].'.d'.$file['timestamp']);?>"
|
|
|
|
data-file="<?php p($file['name'].'.d'.$file['timestamp']);?>"
|
|
|
|
data-timestamp='<?php p($file['timestamp']);?>'
|
2013-01-22 11:00:04 +00:00
|
|
|
data-dirlisting=0
|
|
|
|
<?php endif; ?>>
|
2013-01-18 12:11:29 +00:00
|
|
|
<td class="filename svg"
|
|
|
|
<?php if($file['type'] == 'dir'): ?>
|
2013-02-27 20:46:37 +00:00
|
|
|
style="background-image:url(<?php print_unescaped(OCP\mimetype_icon('dir')); ?>)"
|
2013-01-18 12:11:29 +00:00
|
|
|
<?php else: ?>
|
2013-02-27 20:46:37 +00:00
|
|
|
style="background-image:url(<?php print_unescaped(OCP\mimetype_icon($file['mimetype'])); ?>)"
|
2013-01-18 12:11:29 +00:00
|
|
|
<?php endif; ?>
|
|
|
|
>
|
|
|
|
<?php if(!isset($_['readonly']) || !$_['readonly']): ?><input type="checkbox" /><?php endif; ?>
|
|
|
|
<?php if($file['type'] == 'dir'): ?>
|
2013-01-21 12:07:43 +00:00
|
|
|
<?php if( $_['dirlisting'] ): ?>
|
2013-02-27 20:46:37 +00:00
|
|
|
<a class="name" href="<?php p($_['baseURL'].'/'.$name); ?>" title="">
|
2013-01-21 12:07:43 +00:00
|
|
|
<?php else: ?>
|
2013-02-27 20:46:37 +00:00
|
|
|
<a class="name" href="<?php p($_['baseURL'].'/'.$name.'.d'.$file['timestamp']); ?>" title="">
|
2013-01-21 12:07:43 +00:00
|
|
|
<?php endif; ?>
|
2013-01-18 12:11:29 +00:00
|
|
|
<?php else: ?>
|
2013-01-21 12:07:43 +00:00
|
|
|
<?php if( $_['dirlisting'] ): ?>
|
2013-02-27 20:46:37 +00:00
|
|
|
<a class="name" href="<?php p($_['downloadURL'].'/'.$name); ?>" title="">
|
2013-01-21 12:07:43 +00:00
|
|
|
<?php else: ?>
|
2013-02-27 20:46:37 +00:00
|
|
|
<a class="name" href="<?php p($_['downloadURL'].'/'.$name.'.d'.$file['timestamp']);?>" title="">
|
2013-01-21 12:07:43 +00:00
|
|
|
<?php endif; ?>
|
2013-01-18 12:11:29 +00:00
|
|
|
<?php endif; ?>
|
|
|
|
<span class="nametext">
|
|
|
|
<?php if($file['type'] == 'dir'):?>
|
2013-02-27 20:46:37 +00:00
|
|
|
<?php print_unescaped(htmlspecialchars($file['name']));?>
|
2013-01-18 12:11:29 +00:00
|
|
|
<?php else:?>
|
2013-02-27 20:46:37 +00:00
|
|
|
<?php print_unescaped(htmlspecialchars($file['basename']));?><span
|
|
|
|
class='extension'><?php p($file['extension']);?></span>
|
2013-01-18 12:11:29 +00:00
|
|
|
<?php endif;?>
|
|
|
|
</span>
|
|
|
|
<?php if($file['type'] == 'dir'):?>
|
|
|
|
<span class="uploadtext" currentUploads="0">
|
|
|
|
</span>
|
|
|
|
<?php endif;?>
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td class="date">
|
|
|
|
<span class="modified"
|
2013-02-27 20:46:37 +00:00
|
|
|
title="<?php p($file['date']); ?>"
|
|
|
|
style="color:rgb(<?php p($relative_date_color.','
|
2013-01-18 12:11:29 +00:00
|
|
|
.$relative_date_color.','
|
2013-02-27 20:46:37 +00:00
|
|
|
.$relative_date_color) ?>)">
|
|
|
|
<?php p($relative_deleted_date); ?>
|
2013-01-18 12:11:29 +00:00
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach;
|