diff options
author | Tom Needham <needham.thomas@gmail.com> | 2012-01-02 17:02:30 +0000 |
---|---|---|
committer | Tom Needham <needham.thomas@gmail.com> | 2012-01-02 17:02:30 +0000 |
commit | 39a7bd9c00a66ef82c709eeba72ec71c23e462e6 (patch) | |
tree | 97cec54fba12fa2c353a32ab2d0f82093d80161c /files | |
parent | cbb2db8622dbcff2314204bc548ebdd3005bd0fc (diff) | |
download | nextcloud-server-39a7bd9c00a66ef82c709eeba72ec71c23e462e6.tar.gz nextcloud-server-39a7bd9c00a66ef82c709eeba72ec71c23e462e6.zip |
Added data-read and data-write attributes to file list
Diffstat (limited to 'files')
-rw-r--r-- | files/templates/part.list.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/files/templates/part.list.php b/files/templates/part.list.php index ae3f32b2e9f..81ba24dac9f 100644 --- a/files/templates/part.list.php +++ b/files/templates/part.list.php @@ -1,4 +1,6 @@ <?php foreach($_['files'] as $file): + $read = ($file['readable']) ? 'true' : 'false'; + $write = ($file['writeable']) ? 'true' : 'false'; $simple_file_size = simple_file_size($file['size']); $simple_size_color = intval(200-$file['size']/(1024*1024)*2); // the bigger the file, the darker the shade of grey; megabytes*2 if($simple_size_color<0) $simple_size_color = 0; @@ -9,7 +11,7 @@ $name = str_replace('%2F','/', $name); $directory = str_replace('+','%20',urlencode($file['directory'])); $directory = str_replace('%2F','/', $directory); ?> - <tr data-file="<?php echo $name;?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mime']?>" data-size='<?php echo $file['size'];?>'> + <tr data-file="<?php echo $name;?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mime']?>" data-size='<?php echo $file['size'];?>' data-read='<?php echo $read;?>' data-write='<?php echo $write;?>'> <td class="filename svg" style="background-image:url(<?php if($file['type'] == 'dir') echo mimetype_icon('dir'); else echo mimetype_icon($file['mime']); ?>)"> <?php if(!isset($_['readonly']) || !$_['readonly']) { ?><input type="checkbox" /><?php } ?> <a class="name" href="<?php if($file['type'] == 'dir') echo $_['baseURL'].$directory.'/'.$name; else echo $_['downloadURL'].$directory.'/'.$name; ?>" title=""> |