diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-09-16 10:42:37 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-09-16 10:42:37 +0200 |
commit | 82cbbb8ab8cfe81559c45905d7fca819d71df346 (patch) | |
tree | 947d58076dae8d5c4d0bd001ccebbe079448e057 /apps/files/templates | |
parent | 1558cb860c2fb26fdde14fce2a16acbb29d12b3e (diff) | |
parent | 46f59b165e5bd1908509e8a62b67bf983cfd6224 (diff) | |
download | nextcloud-server-82cbbb8ab8cfe81559c45905d7fca819d71df346.tar.gz nextcloud-server-82cbbb8ab8cfe81559c45905d7fca819d71df346.zip |
Merge branch 'master' into encryption_improved_error_messages_4617
Conflicts:
apps/files/index.php
Diffstat (limited to 'apps/files/templates')
-rw-r--r-- | apps/files/templates/index.php | 39 | ||||
-rw-r--r-- | apps/files/templates/part.list.php | 27 |
2 files changed, 20 insertions, 46 deletions
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index e17273e47b1..2e4ca82c62f 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -1,8 +1,7 @@ <!--[if IE 8]><style>input[type="checkbox"]{padding:0;}table td{position:static !important;}</style><![endif]--> <div id="controls"> <?php print_unescaped($_['breadcrumb']); ?> - <?php if ($_['isCreatable']):?> - <div class="actions <?php if (isset($_['files']) and count($_['files'])==0):?>emptyfolder<?php endif; ?>"> + <div class="actions creatable <?php if (!$_['isCreatable']):?>hidden<?php endif; ?> <?php if (isset($_['files']) and count($_['files'])==0):?>emptycontent<?php endif; ?>"> <div id="new" class="button"> <a><?php p($l->t('New'));?></a> <ul> @@ -16,29 +15,23 @@ </div> <div id="upload" class="button" title="<?php p($l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize']) ?>"> - <form data-upload-id='1' - id="data-upload-form" - class="file_upload_form" - action="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" - method="post" - enctype="multipart/form-data" - target="file_upload_target_1"> <?php if($_['uploadMaxFilesize'] >= 0):?> <input type="hidden" name="MAX_FILE_SIZE" id="max_upload" value="<?php p($_['uploadMaxFilesize']) ?>"> <?php endif;?> <!-- Send the requesttoken, this is needed for older IE versions because they don't send the CSRF token via HTTP header in this case --> - <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" id="requesttoken"> <input type="hidden" class="max_human_file_size" value="(max <?php p($_['uploadMaxHumanFilesize']); ?>)"> <input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir"> - <input type="file" id="file_upload_start" name='files[]'/> + <input type="file" id="file_upload_start" name='files[]' + data-url="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" /> <a href="#" class="svg"></a> - </form> </div> <?php if ($_['trash'] ): ?> - <input id="trash" type="button" value="<?php p($l->t('Deleted files'));?>" class="button" <?php $_['trashEmpty'] ? p('disabled') : '' ?>></input> + <div id="trash" class="button" <?php $_['trashEmpty'] ? p('disabled') : '' ?>> + <a><?php p($l->t('Deleted files'));?></a> + </div> <?php endif; ?> <div id="uploadprogresswrapper"> <div id="uploadprogressbar"></div> @@ -48,16 +41,15 @@ </div> </div> <div id="file_action_panel"></div> - <?php elseif( !$_['isPublic'] ):?> - <div class="actions"><input type="button" disabled value="<?php p($l->t('You don’t have write permissions here.'))?>"></div> - <input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir"> - <?php endif;?> + <div class="notCreatable notPublic <?php if ($_['isCreatable'] or $_['isPublic'] ):?>hidden<?php endif; ?>"> + <div class="actions"><input type="button" disabled value="<?php p($l->t('You don’t have write permissions here.'))?>"></div> + </div> <input type="hidden" name="permissions" value="<?php p($_['permissions']); ?>" id="permissions"> </div> -<?php if (isset($_['files']) and $_['isCreatable'] and count($_['files'])==0):?> - <div id="emptycontent"><?php p($l->t('Nothing in here. Upload something!'))?></div> -<?php endif; ?> +<div id="emptycontent" <?php if (!isset($_['files']) or !$_['isCreatable'] or count($_['files']) > 0 or !$_['ajaxLoad']):?>class="hidden"<?php endif; ?>><?php p($l->t('Nothing in here. Upload something!'))?></div> + +<input type="hidden" id="disableSharing" data-status="<?php p($_['disableSharing']); ?>"></input> <table id="filestable" data-allow-public-upload="<?php p($_['publicUploadEnabled'])?>" data-preview-x="36" data-preview-y="36"> <thead> @@ -82,7 +74,7 @@ <th id="headerDate"> <span id="modified"><?php p($l->t( 'Modified' )); ?></span> <?php if ($_['permissions'] & OCP\PERMISSION_DELETE): ?> -<!-- NOTE: Temporary fix to allow unsharing of files in root of Shared folder --> +<!-- NOTE: Temporary fix to allow unsharing of files in root of Shared folder --> <?php if ($_['dir'] == '/Shared'): ?> <span class="selectedActions"><a href="" class="delete-selected"> <?php p($l->t('Unshare'))?> @@ -104,7 +96,7 @@ <?php print_unescaped($_['fileList']); ?> </tbody> </table> -<div id="editor"></div> +<div id="editor"></div><!-- FIXME Do not use this div in your app! It is deprecated and will be removed in the future! --> <div id="uploadsize-message" title="<?php p($l->t('Upload too large'))?>"> <p> <?php p($l->t('The files you are trying to upload exceed the maximum size for file uploads on this server.'));?> @@ -120,7 +112,8 @@ </div> <!-- config hints for javascript --> +<input type="hidden" name="ajaxLoad" id="ajaxLoad" value="<?php p($_['ajaxLoad']); ?>" /> <input type="hidden" name="allowZipDownload" id="allowZipDownload" value="<?php p($_['allowZipDownload']); ?>" /> <input type="hidden" name="usedSpacePercent" id="usedSpacePercent" value="<?php p($_['usedSpacePercent']); ?>" /> <input type="hidden" name="encryptedFiles" id="encryptedFiles" value="<?php $_['encryptedFiles'] ? p('1') : p('0'); ?>" /> -<input type="hidden" name="encryptedFiles" id="encryptionInitStatus" value="<?php p($_['encryptionInitStatus']) ?>" />
\ No newline at end of file +<input type="hidden" name="encryptedFiles" id="encryptionInitStatus" value="<?php p($_['encryptionInitStatus']) ?>" /> diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php index 4076c1bb331..1e4d4d11c98 100644 --- a/apps/files/templates/part.list.php +++ b/apps/files/templates/part.list.php @@ -1,7 +1,7 @@ -<input type="hidden" id="disableSharing" data-status="<?php p($_['disableSharing']); ?>"> +<?php $totalfiles = 0; +$totaldirs = 0; +$totalsize = 0; ?> <?php foreach($_['files'] as $file): - //strlen('files/') => 6 - $relativePath = substr($file['path'], 6); // the bigger the file, the darker the shade of grey; megabytes*2 $simple_size_color = intval(160-$file['size']/(1024*1024)*2); if($simple_size_color<0) $simple_size_color = 0; @@ -22,26 +22,7 @@ <?php else: ?> <td class="filename svg" <?php endif; ?> - <?php if($file['type'] == 'dir'): ?> - style="background-image:url(<?php print_unescaped(OCP\mimetype_icon('dir')); ?>)" - <?php else: ?> - <?php if($_['isPublic']): ?> - <?php - $relativePath = substr($relativePath, strlen($_['sharingroot'])); - ?> - <?php if($file['isPreviewAvailable']): ?> - style="background-image:url(<?php print_unescaped(OCP\publicPreview_icon($relativePath, $_['sharingtoken'])); ?>)" - <?php else: ?> - style="background-image:url(<?php print_unescaped(OCP\mimetype_icon($file['mimetype'])); ?>)" - <?php endif; ?> - <?php else: ?> - <?php if($file['isPreviewAvailable']): ?> - style="background-image:url(<?php print_unescaped(OCP\preview_icon($relativePath)); ?>)" - <?php else: ?> - style="background-image:url(<?php print_unescaped(OCP\mimetype_icon($file['mimetype'])); ?>)" - <?php endif; ?> - <?php endif; ?> - <?php endif; ?> + style="background-image:url(<?php print_unescaped($file['icon']); ?>)" > <?php if(!isset($_['readonly']) || !$_['readonly']): ?> <input id="select-<?php p($file['fileid']); ?>" type="checkbox" /> |