summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/templates
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-01-18 13:11:29 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-01-22 15:33:53 +0100
commitd60522893713df7359d0e02c841f35a65d2186aa (patch)
treeb3ad81d7cc9163b3bed08e6ec2ce20dea643822f /apps/files_trashbin/templates
parent8259768732e3456c5cc54cfe43975513881b6124 (diff)
downloadnextcloud-server-d60522893713df7359d0e02c841f35a65d2186aa.tar.gz
nextcloud-server-d60522893713df7359d0e02c841f35a65d2186aa.zip
first version of the trash bin app
Diffstat (limited to 'apps/files_trashbin/templates')
-rw-r--r--apps/files_trashbin/templates/index.php36
-rw-r--r--apps/files_trashbin/templates/part.list.php70
2 files changed, 106 insertions, 0 deletions
diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php
new file mode 100644
index 00000000000..a412379d533
--- /dev/null
+++ b/apps/files_trashbin/templates/index.php
@@ -0,0 +1,36 @@
+<!--[if IE 8]><style>input[type="checkbox"]{padding:0;}table td{position:static !important;}</style><![endif]-->
+<div id="controls">
+ <?php echo($_['breadcrumb']); ?>
+ <div id="file_action_panel"></div>
+</div>
+<div id='notification'></div>
+
+<?php if (isset($_['files']) and $_['isCreatable'] and count($_['files'])==0):?>
+ <div id="emptyfolder"><?php echo $l->t('Nothing in here. Upload something!')?></div>
+<?php endif; ?>
+
+<table>
+ <thead>
+ <tr>
+ <th id='headerName'>
+ <input type="checkbox" id="select_all" />
+ <span class='name'><?php echo $l->t( 'Name' ); ?></span>
+ <span class='selectedActions'>
+ <?php if($_['allowZipDownload']) : ?>
+ <a href="" class="download">
+ <img class="svg" alt="Download"
+ src="<?php echo OCP\image_path("core", "actions/download.svg"); ?>" />
+ <?php echo $l->t('Download')?>
+ </a>
+ <?php endif; ?>
+ </span>
+ </th>
+ <th id="headerDate">
+ <span id="modified"><?php echo $l->t( 'Deleted' ); ?></span>
+ </th>
+ </tr>
+ </thead>
+ <tbody id="fileList">
+ <?php echo($_['fileList']); ?>
+ </tbody>
+</table>
diff --git a/apps/files_trashbin/templates/part.list.php b/apps/files_trashbin/templates/part.list.php
new file mode 100644
index 00000000000..d022854330d
--- /dev/null
+++ b/apps/files_trashbin/templates/part.list.php
@@ -0,0 +1,70 @@
+<script type="text/javascript">
+<?php if ( array_key_exists('disableSharing', $_) && $_['disableSharing'] == true ) :?>
+ var disableSharing = true;
+<?php else: ?>
+ var disableSharing = false;
+<?php endif; ?>
+<?php if ( array_key_exists('disableDownloadActions', $_) && $_['disableDownloadActions'] == true ) :?>
+ var disableDownloadActions = true;
+<?php else: ?>
+ var disableDownloadActions = false;
+<?php endif; ?>
+</script>
+
+<?php foreach($_['files'] as $file):
+ $simple_file_size = OCP\simple_file_size($file['size']);
+ // the bigger the file, the darker the shade of grey; megabytes*2
+ $simple_size_color = intval(200-$file['size']/(1024*1024)*2);
+ if($simple_size_color<0) $simple_size_color = 0;
+ $relative_deleted_date = OCP\relative_modified_date($file['mtime']);
+ // the older the file, the brighter the shade of grey; days*14
+ $relative_date_color = round((time()-$file['mtime'])/60/60/24*14);
+ 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); ?>
+ <tr data-file="<?php echo $file['name'].'.d'.$file['timestamp'];?>"
+ data-filename="<?php echo $file['name'];?>"
+ data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>"
+ data-mime="<?php echo $file['mimetype']?>"
+ data-timestamp='<?php echo $file['timestamp'];?>'
+ data-permissions='<?php echo $file['permissions']; ?>'>
+ <td class="filename svg"
+ <?php if($file['type'] == 'dir'): ?>
+ style="background-image:url(<?php echo OCP\mimetype_icon('dir'); ?>)"
+ <?php else: ?>
+ style="background-image:url(<?php echo OCP\mimetype_icon($file['mimetype']); ?>)"
+ <?php endif; ?>
+ >
+ <?php if(!isset($_['readonly']) || !$_['readonly']): ?><input type="checkbox" /><?php endif; ?>
+ <?php if($file['type'] == 'dir'): ?>
+ <a class="name" href="<?php $_['baseURL'].'/'.$name.'.d'.$file['timestamp']; ?>)" title="">
+ <?php else: ?>
+ <a class="name" href="<?php echo $_['downloadURL'].'/'.$name.'.d'.$file['timestamp']; ?>" title="">
+ <?php endif; ?>
+ <span class="nametext">
+ <?php if($file['type'] == 'dir'):?>
+ <?php echo htmlspecialchars($file['name']);?>
+ <?php else:?>
+ <?php echo htmlspecialchars($file['basename']);?><span
+ class='extension'><?php echo $file['extension'];?></span>
+ <?php endif;?>
+ </span>
+ <?php if($file['type'] == 'dir'):?>
+ <span class="uploadtext" currentUploads="0">
+ </span>
+ <?php endif;?>
+ </a>
+ </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_deleted_date; ?>
+ </span>
+ </td>
+ </tr>
+<?php endforeach;