diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-01-15 14:57:23 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-01-15 14:57:23 +0100 |
commit | 9bf367e7f803d6968dc2c639624ce191d538a5bc (patch) | |
tree | 5ef8bec79c46d548d198ca87bbbc9b16974bb5a5 /apps/files/templates | |
parent | 3a9ec452729bf9b6a51d36750b095d9ef80a5f7e (diff) | |
parent | bb9cc227c2583adc6b51a1f6d75a9fc8333836b9 (diff) | |
download | nextcloud-server-9bf367e7f803d6968dc2c639624ce191d538a5bc.tar.gz nextcloud-server-9bf367e7f803d6968dc2c639624ce191d538a5bc.zip |
merge master into filesystem
Diffstat (limited to 'apps/files/templates')
-rw-r--r-- | apps/files/templates/index.php | 8 | ||||
-rw-r--r-- | apps/files/templates/part.breadcrumb.php | 20 | ||||
-rw-r--r-- | apps/files/templates/part.list.php | 136 |
3 files changed, 81 insertions, 83 deletions
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index edf048c7e13..2e0772443f2 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -14,7 +14,8 @@ data-type='web'><p><?php echo $l->t('From link');?></p></li> </ul> </div> - <div id="upload" class="button"> + <div id="upload" class="button" + title="<?php echo $l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize'] ?>"> <form data-upload-id='1' id="data-upload-form" class="file_upload_form" @@ -31,10 +32,7 @@ value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)"> <input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir"> <input type="file" id="file_upload_start" name='files[]'/> - <a href="#" class="svg" onclick="return false;" - title="<?php echo $l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize'] ?>"></a> - - <iframe name="file_upload_target_1" class="file_upload_target" src=""></iframe> + <a href="#" class="svg" onclick="return false;"></a> </form> </div> <div id="uploadprogresswrapper"> diff --git a/apps/files/templates/part.breadcrumb.php b/apps/files/templates/part.breadcrumb.php index a298f1ccc4b..7df2afc1f52 100644 --- a/apps/files/templates/part.breadcrumb.php +++ b/apps/files/templates/part.breadcrumb.php @@ -1,10 +1,10 @@ - <?php for($i=0; $i<count($_["breadcrumb"]); $i++): - $crumb = $_["breadcrumb"][$i]; - $dir = str_replace('+', '%20', urlencode($crumb["dir"])); - $dir = str_replace('%2F', '/', $dir); ?> - <div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg" - data-dir='<?php echo $dir;?>' - style='background-image:url("<?php echo OCP\image_path('core', 'breadcrumb.png');?>")'> - <a href="<?php echo $_['baseURL'].$dir; ?>"><?php echo OCP\Util::sanitizeHTML($crumb["name"]); ?></a> - </div> - <?php endfor;
\ No newline at end of file +<?php for($i=0; $i<count($_["breadcrumb"]); $i++): + $crumb = $_["breadcrumb"][$i]; + $dir = str_replace('+', '%20', urlencode($crumb["dir"])); + $dir = str_replace('%2F', '/', $dir); ?> + <div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg" + data-dir='<?php echo $dir;?>' + style='background-image:url("<?php echo OCP\image_path('core', 'breadcrumb.png');?>")'> + <a href="<?php echo $_['baseURL'].$dir; ?>"><?php echo OCP\Util::sanitizeHTML($crumb["name"]); ?></a> + </div> +<?php endfor;
\ No newline at end of file diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php index 764fd8850ff..98fc60954fa 100644 --- a/apps/files/templates/part.list.php +++ b/apps/files/templates/part.list.php @@ -1,70 +1,70 @@ - <script type="text/javascript"> - <?php if ( array_key_exists('publicListView', $_) && $_['publicListView'] == true ) :?> - var publicListView = true; +<script type="text/javascript"> +<?php if ( array_key_exists('publicListView', $_) && $_['publicListView'] == true ) :?> + var publicListView = true; +<?php else: ?> + var publicListView = 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_modified_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-id="<?php echo $file['fileid']; ?>" + 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']; ?>'> + <td class="filename svg" + <?php if($file['type'] == 'dir'): ?> + style="background-image:url(<?php echo OCP\mimetype_icon('dir'); ?>)" <?php else: ?> - var publicListView = false; + style="background-image:url(<?php echo OCP\mimetype_icon($file['mimetype']); ?>)" <?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_modified_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-id="<?php echo $file['fileid']; ?>" - 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']; ?>'> - <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'].$directory.'/'.$name; ?>)" title=""> - <?php else: ?> - <a class="name" href="<?php echo $_['downloadURL'].$directory.'/'.$name; ?>" 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="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> - <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> - </tr> - <?php endforeach; + > + <?php if(!isset($_['readonly']) || !$_['readonly']): ?><input type="checkbox" /><?php endif; ?> + <?php if($file['type'] == 'dir'): ?> + <a class="name" href="<?php echo $_['baseURL'].$directory.'/'.$name; ?>)" title=""> + <?php else: ?> + <a class="name" href="<?php echo $_['downloadURL'].$directory.'/'.$name; ?>" 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="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> + <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> + </tr> +<?php endforeach; |