summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-01-15 14:36:18 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-01-15 14:36:18 +0100
commit807b885a0e83841b51b694afbb4b377e39215b0f (patch)
treedad2aeaddaf49d23dc82d0b47e17584db7ff5cd2 /apps/files_sharing
parent072ef7f010ca9f48119bc2397a82fdd0aac76beb (diff)
downloadnextcloud-server-807b885a0e83841b51b694afbb4b377e39215b0f.tar.gz
nextcloud-server-807b885a0e83841b51b694afbb4b377e39215b0f.zip
reuse file upload as used within files app - remove public upload button
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/public.php3
-rw-r--r--apps/files_sharing/templates/public.php54
2 files changed, 4 insertions, 53 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index ae0a62f1034..e3d68955439 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -225,7 +225,8 @@ if (isset($path)) {
$folder->assign('fileList', $list->fetchPage());
$folder->assign('breadcrumb', $breadcrumbNav->fetchPage());
$folder->assign('dir', $getPath);
- $folder->assign('isCreatable', false);
+ $folder->assign('isCreatable', $allowPublicUploadEnabled);
+ $folder->assign('dirToken', $linkItem['token']);
$folder->assign('permissions', OCP\PERMISSION_READ);
$folder->assign('isPublic',true);
$folder->assign('publicUploadEnabled', 'no');
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 1d527dca8eb..d82e567182a 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -14,57 +14,7 @@
src="<?php print_unescaped(image_path('', 'logo-wide.svg')); ?>" alt="<?php p($theme->getName()); ?>" /></a>
<div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div>
<div class="header-right">
- <?php if (isset($_['folder'])): ?>
- <span id="details"><?php p($l->t('%s shared the folder %s with you',
- array($_['displayName'], $_['filename']))) ?></span>
- <?php else: ?>
- <span id="details"><?php p($l->t('%s shared the file %s with you',
- array($_['displayName'], $_['filename']))) ?></span>
- <?php endif; ?>
-
-
- <?php if (!isset($_['folder']) || $_['allowZipDownload']): ?>
- <a href="<?php p($_['downloadURL']); ?>" class="button" id="download"><img
- class="svg" alt="Download" src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>"
- /><span><?php p($l->t('Download'))?></span></a>
- <?php endif; ?>
-
- <?php if ($_['allowPublicUploadEnabled']):?>
-
-
- <input type="hidden" id="publicUploadRequestToken" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
- <input type="hidden" id="dirToken" name="dirToken" value="<?php p($_['dirToken']) ?>" />
- <input type="hidden" id="uploadMaxFilesize" name="uploadMaxFilesize" value="<?php p($_['uploadMaxFilesize']) ?>" />
- <input type="hidden" id="uploadMaxHumanFilesize" name="uploadMaxHumanFilesize" value="<?php p($_['uploadMaxHumanFilesize']) ?>" />
- <input type="hidden" id="directory_path" name="directory_path" value="<?php p($_['directory_path']) ?>" />
- <?php if($_['uploadMaxFilesize'] >= 0):?>
- <input type="hidden" name="MAX_FILE_SIZE" id="max_upload"
- value="<?php p($_['uploadMaxFilesize']) ?>">
- <?php endif;?>
-
-
- <div id="data-upload-form" class="button" title="<?php p($l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize']) ?>">
- <input id="file_upload_start" type="file" name="files[]" data-url="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" multiple>
- <a href="#" id="publicUploadButtonMock" class="svg">
- <span><?php p($l->t('Upload'))?></span>
- </a>
- </div>
-
- </div>
-
- <div id="additional_controls" style="display:none">
- <div id="uploadprogresswrapper">
- <div id="uploadprogressbar"></div>
- <input id="cancel_upload_button" type="button" class="stop" style="display:none"
- value="<?php p($l->t('Cancel upload'));?>"
- />
- </div>
-
-
-
-
- <?php endif; ?>
-
+ <span id="details"><?php p($l->t('shared by %s', array($_['displayName']))) ?></span>
</div>
</div></header>
<div id="content">
@@ -96,7 +46,7 @@
</li>
</ul>
<?php endif; ?>
- <div class="directLink"><label for="directLink"><?php p($l->t('Direct link')) ?></label><input id="directLink" type="text" readonly value="<?php p($_['downloadURL']); ?>"></input></div>
+ <div class="directLink"><label for="directLink"><?php p($l->t('Direct link')) ?></label><input id="directLink" type="text" readonly value="<?php p($_['downloadURL']); ?>"></div>
<?php endif; ?>
</div>
<footer>