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