summaryrefslogtreecommitdiffstats
path: root/apps/files/templates/list.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/templates/list.php')
-rw-r--r--apps/files/templates/list.php52
1 files changed, 22 insertions, 30 deletions
diff --git a/apps/files/templates/list.php b/apps/files/templates/list.php
index 32651b261da..15af1970dc3 100644
--- a/apps/files/templates/list.php
+++ b/apps/files/templates/list.php
@@ -1,40 +1,16 @@
<div id="controls">
<div class="actions creatable hidden">
- <?php if(!isset($_['dirToken'])):?>
- <div id="new" class="button">
- <a><?php p($l->t('New'));?></a>
- <ul>
- <li class="icon-filetype-text svg"
- data-type="file" data-newname="<?php p($l->t('New text file')) ?>.txt">
- <p><?php p($l->t('Text file'));?></p>
- </li>
- <li class="icon-filetype-folder svg"
- data-type="folder" data-newname="<?php p($l->t('New folder')) ?>">
- <p><?php p($l->t('Folder'));?></p>
- </li>
- </ul>
- </div>
- <?php endif;?>
- <?php /* Note: the template attributes are here only for the public page. These are normally loaded
- through ajax instead (updateStorageStatistics).
- */ ?>
- <div id="upload" class="button"
+ <?php /*
+ Only show upload button for public page
+ */ ?>
+ <?php if(isset($_['dirToken'])):?>
+ <div id="upload" class="button upload"
title="<?php isset($_['uploadMaxHumanFilesize']) ? p($l->t('Upload (max. %s)', array($_['uploadMaxHumanFilesize']))) : '' ?>">
- <input type="hidden" id="max_upload" name="MAX_FILE_SIZE" value="<?php isset($_['uploadMaxFilesize']) ? p($_['uploadMaxFilesize']) : '' ?>">
- <input type="hidden" id="upload_limit" value="<?php isset($_['uploadLimit']) ? p($_['uploadLimit']) : '' ?>">
- <input type="hidden" id="free_space" value="<?php isset($_['freeSpace']) ? p($_['freeSpace']) : '' ?>">
- <?php if(isset($_['dirToken'])):?>
- <input type="hidden" id="publicUploadRequestToken" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
- <input type="hidden" id="dirToken" name="dirToken" value="<?php p($_['dirToken']) ?>" />
- <?php endif;?>
- <input type="hidden" class="max_human_file_size"
- value="(max <?php isset($_['uploadMaxHumanFilesize']) ? p($_['uploadMaxHumanFilesize']) : ''; ?>)">
- <input type="file" id="file_upload_start" name='files[]'
- data-url="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" />
<label for="file_upload_start" class="svg icon-upload">
<span class="hidden-visually"><?php p($l->t('Upload'))?></span>
</label>
</div>
+ <?php endif; ?>
<div id="uploadprogresswrapper">
<div id="uploadprogressbar"></div>
<button class="stop icon-close" style="display:none">
@@ -48,7 +24,19 @@
<div class="notCreatable notPublic hidden">
<?php p($l->t('You don’t have permission to upload or create files here'))?>
</div>
+ <?php /* Note: the template attributes are here only for the public page. These are normally loaded
+ through ajax instead (updateStorageStatistics).
+ */ ?>
<input type="hidden" name="permissions" value="" id="permissions">
+ <input type="hidden" id="max_upload" name="MAX_FILE_SIZE" value="<?php isset($_['uploadMaxFilesize']) ? p($_['uploadMaxFilesize']) : '' ?>">
+ <input type="hidden" id="upload_limit" value="<?php isset($_['uploadLimit']) ? p($_['uploadLimit']) : '' ?>">
+ <input type="hidden" id="free_space" value="<?php isset($_['freeSpace']) ? p($_['freeSpace']) : '' ?>">
+ <?php if(isset($_['dirToken'])):?>
+ <input type="hidden" id="publicUploadRequestToken" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
+ <input type="hidden" id="dirToken" name="dirToken" value="<?php p($_['dirToken']) ?>" />
+ <?php endif;?>
+ <input type="hidden" class="max_human_file_size"
+ value="(max <?php isset($_['uploadMaxHumanFilesize']) ? p($_['uploadMaxHumanFilesize']) : ''; ?>)">
</div>
<div id="emptycontent" class="hidden">
@@ -101,6 +89,10 @@
</tfoot>
</table>
<input type="hidden" name="dir" id="dir" value="" />
+<div class="hiddenuploadfield">
+ <input type="file" id="file_upload_start" class="hiddenuploadfield" name="files[]"
+ data-url="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" />
+</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>