2014-09-30 17:23:16 +04:00
|
|
|
<?php
|
2016-10-28 22:46:28 +03:00
|
|
|
/** @var $l \OCP\IL10N */
|
2014-10-15 13:58:44 +04:00
|
|
|
/** @var $_ array */
|
2014-09-30 17:23:16 +04:00
|
|
|
?>
|
2018-07-23 21:14:19 +03:00
|
|
|
<div id="app-content">
|
2015-03-16 13:18:25 +03:00
|
|
|
<?php if ($_['previewSupported']): /* This enables preview images for links (e.g. on Facebook, Google+, ...)*/?>
|
2016-07-22 17:13:26 +03:00
|
|
|
<link rel="image_src" href="<?php p($_['previewImage']); ?>" />
|
2014-05-19 21:53:27 +04:00
|
|
|
<?php endif; ?>
|
|
|
|
|
2016-06-09 13:05:02 +03:00
|
|
|
<input type="hidden" id="sharingUserId" value="<?php p($_['owner']) ?>">
|
2013-10-08 19:19:58 +04:00
|
|
|
<input type="hidden" id="filesApp" name="filesApp" value="1">
|
2013-10-07 18:59:57 +04:00
|
|
|
<input type="hidden" id="isPublic" name="isPublic" value="1">
|
2013-02-28 00:37:14 +04:00
|
|
|
<input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir">
|
2018-10-22 11:54:01 +03:00
|
|
|
<?php if (!$_['hideDownload']): ?>
|
|
|
|
<input type="hidden" name="downloadURL" value="<?php p($_['downloadURL']) ?>" id="downloadURL">
|
|
|
|
<?php endif; ?>
|
2017-11-01 16:49:52 +03:00
|
|
|
<input type="hidden" name="previewURL" value="<?php p($_['previewURL']) ?>" id="previewURL">
|
2013-11-15 19:27:41 +04:00
|
|
|
<input type="hidden" name="sharingToken" value="<?php p($_['sharingToken']) ?>" id="sharingToken">
|
2013-02-28 00:37:14 +04:00
|
|
|
<input type="hidden" name="filename" value="<?php p($_['filename']) ?>" id="filename">
|
|
|
|
<input type="hidden" name="mimetype" value="<?php p($_['mimetype']) ?>" id="mimetype">
|
2015-03-16 13:18:25 +03:00
|
|
|
<input type="hidden" name="previewSupported" value="<?php p($_['previewSupported'] ? 'true' : 'false'); ?>" id="previewSupported">
|
2015-12-18 16:00:20 +03:00
|
|
|
<input type="hidden" name="mimetypeIcon" value="<?php p(\OC::$server->getMimeTypeDetector()->mimeTypeIcon($_['mimetype'])); ?>" id="mimetypeIcon">
|
2018-10-18 13:43:08 +03:00
|
|
|
<input type="hidden" name="hideDownload" value="<?php p($_['hideDownload'] ? 'true' : 'false'); ?>" id="hideDownload">
|
2018-10-28 16:58:21 +03:00
|
|
|
<input type="hidden" id="disclaimerText" value="<?php p($_['disclaimer']) ?>">
|
2016-06-09 22:44:54 +03:00
|
|
|
<?php
|
|
|
|
$upload_max_filesize = OC::$server->getIniWrapper()->getBytes('upload_max_filesize');
|
|
|
|
$post_max_size = OC::$server->getIniWrapper()->getBytes('post_max_size');
|
|
|
|
$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
|
|
|
|
?>
|
|
|
|
<input type="hidden" name="maxFilesizeUpload" value="<?php p($maxUploadFilesize); ?>" id="maxFilesizeUpload">
|
|
|
|
|
2016-06-09 18:45:16 +03:00
|
|
|
<?php if (!isset($_['hideFileList']) || (isset($_['hideFileList']) && $_['hideFileList'] === false)): ?>
|
|
|
|
<input type="hidden" name="filesize" value="<?php p($_['nonHumanFileSize']); ?>" id="filesize">
|
|
|
|
<?php endif; ?>
|
2015-01-17 14:11:52 +03:00
|
|
|
<input type="hidden" name="maxSizeAnimateGif" value="<?php p($_['maxSizeAnimateGif']); ?>" id="maxSizeAnimateGif">
|
2018-07-19 23:38:17 +03:00
|
|
|
<?php if (isset($_['note']) && $_['note'] !== '') : ?>
|
2018-08-24 17:45:40 +03:00
|
|
|
<div id="notemenu" class="hidden">
|
|
|
|
<div class="icon-comment-white menutoggle" tabindex="0" role="button" aria-haspopup="true" aria-controls="note-content" aria-expanded="false">
|
|
|
|
<span class="hidden-visually"><?php p($l->t('Share note'))?></span>
|
|
|
|
</div>
|
|
|
|
<div id="note-content" class="menu" aria-label="Note content">
|
|
|
|
<div class="content">
|
|
|
|
<?php p($_['note']); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-07-19 23:38:17 +03:00
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
2018-01-25 20:53:09 +03:00
|
|
|
<?php if (!isset($_['hideFileList']) || (isset($_['hideFileList']) && $_['hideFileList'] === false)) { ?>
|
2019-01-11 15:37:30 +03:00
|
|
|
<!-- ONLY if this is a folder, we show the grid toggle button -->
|
|
|
|
<?php if (empty($_['dir']) === false) { ?>
|
|
|
|
<input type="checkbox" class="hidden-visually" id="showgridview"
|
|
|
|
<?php if($_['showgridview']) { ?>checked="checked" <?php } ?>/>
|
|
|
|
<label id="view-toggle" for="showgridview" class="button <?php p($_['showgridview'] ? 'icon-toggle-filelist' : 'icon-toggle-pictures') ?>"
|
|
|
|
title="<?php p($l->t('Toggle grid view'))?>"></label>
|
|
|
|
<?php } ?>
|
2020-03-12 19:38:18 +03:00
|
|
|
|
2019-01-11 15:37:30 +03:00
|
|
|
<!-- files listing -->
|
2018-04-05 13:21:39 +03:00
|
|
|
<div id="files-public-content">
|
2018-01-25 20:53:09 +03:00
|
|
|
<div id="preview">
|
2015-10-06 17:17:25 +03:00
|
|
|
<?php if (isset($_['folder'])): ?>
|
|
|
|
<?php print_unescaped($_['folder']); ?>
|
2014-01-23 23:15:10 +04:00
|
|
|
<?php else: ?>
|
2018-01-22 12:58:23 +03:00
|
|
|
<?php if ($_['previewEnabled'] && substr($_['mimetype'], 0, strpos($_['mimetype'], '/')) == 'audio'): ?>
|
2017-11-22 15:37:17 +03:00
|
|
|
<div id="imgframe">
|
|
|
|
<audio tabindex="0" controls="" preload="none" style="width: 100%; max-width: <?php p($_['previewMaxX']); ?>px; max-height: <?php p($_['previewMaxY']); ?>px">
|
|
|
|
<source src="<?php p($_['downloadURL']); ?>" type="<?php p($_['mimetype']); ?>" />
|
|
|
|
</audio>
|
|
|
|
</div>
|
2015-10-06 17:17:25 +03:00
|
|
|
<?php else: ?>
|
|
|
|
<!-- Preview frame is filled via JS to support SVG images for modern browsers -->
|
|
|
|
<div id="imgframe"></div>
|
|
|
|
<?php endif; ?>
|
2018-10-22 11:54:01 +03:00
|
|
|
<?php if ($_['previewURL'] === $_['downloadURL'] && !$_['hideDownload']): ?>
|
2018-01-25 20:53:09 +03:00
|
|
|
<div class="directDownload">
|
|
|
|
<a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
|
|
|
|
<span class="icon icon-download"></span>
|
2020-03-26 11:30:18 +03:00
|
|
|
<?php p($l->t('Download %s', [$_['filename']]))?> (<?php p($_['fileSize']) ?>)
|
2018-01-25 20:53:09 +03:00
|
|
|
</a>
|
|
|
|
</div>
|
2017-08-12 16:14:59 +03:00
|
|
|
<?php endif; ?>
|
2013-07-05 17:07:05 +04:00
|
|
|
<?php endif; ?>
|
2015-10-06 17:17:25 +03:00
|
|
|
</div>
|
2018-01-25 20:53:09 +03:00
|
|
|
</div>
|
|
|
|
<?php } else { ?>
|
|
|
|
<input type="hidden" id="upload-only-interface" value="1"/>
|
|
|
|
<div id="public-upload">
|
2018-10-03 10:40:22 +03:00
|
|
|
<div
|
|
|
|
id="emptycontent"
|
2018-10-28 16:58:21 +03:00
|
|
|
class="<?php if (!empty($_['note'])) { ?>has-note<?php } ?>">
|
2020-03-12 19:38:18 +03:00
|
|
|
<?php if ($_['shareOwner']) { ?>
|
|
|
|
<div id="displayavatar"><div class="avatardiv"></div></div>
|
|
|
|
<h2><?php p($l->t('Upload files to %s', [$_['shareOwner']])) ?></h2>
|
|
|
|
<p><span class="icon-folder"></span> <?php p($_['filename']) ?></p>
|
|
|
|
<?php } else { ?>
|
|
|
|
<div id="displayavatar"><span class="icon-folder"></span></div>
|
|
|
|
<h2><?php p($l->t('Upload files to %s', [$_['filename']])) ?></h2>
|
|
|
|
<?php } ?>
|
2018-10-03 10:40:22 +03:00
|
|
|
|
|
|
|
<?php if (empty($_['note']) === false) { ?>
|
2018-10-28 16:58:21 +03:00
|
|
|
<h3><?php p($l->t('Note')); ?></h3>
|
2018-10-03 10:40:22 +03:00
|
|
|
<p class="note"><?php p($_['note']); ?></p>
|
|
|
|
<?php } ?>
|
|
|
|
|
2018-01-25 20:53:09 +03:00
|
|
|
<input type="file" name="files[]" class="hidden" multiple>
|
|
|
|
<a href="#" class="button icon-upload"><?php p($l->t('Select or drop files')) ?></a>
|
2020-03-31 20:47:22 +03:00
|
|
|
<div id="drop-upload-progress-indicator" style="padding-top: 25px;" class="hidden"><span class="icon-loading-small"></span><?php p($l->t('Uploading files')) ?></div>
|
2018-01-25 20:53:09 +03:00
|
|
|
<div id="drop-upload-done-indicator" style="padding-top: 25px;" class="hidden"><?php p($l->t('Uploaded files:')) ?></div>
|
2018-12-29 13:53:10 +03:00
|
|
|
<ul id="drop-uploaded-files"></ul>
|
2018-10-28 16:58:21 +03:00
|
|
|
|
|
|
|
<?php if (!empty($_['disclaimer'])) { ?>
|
|
|
|
<div>
|
|
|
|
<?php
|
2018-11-06 12:55:32 +03:00
|
|
|
echo $l->t('By uploading files, you agree to the %1$sterms of service%2$s.', [
|
|
|
|
'<span id="show-terms-dialog">', '</span>'
|
2018-10-28 16:58:21 +03:00
|
|
|
]);
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
2016-07-20 19:34:32 +03:00
|
|
|
</div>
|
2018-01-25 20:53:09 +03:00
|
|
|
</div>
|
|
|
|
<?php } ?>
|
2016-06-09 18:45:16 +03:00
|
|
|
|
2016-06-09 13:05:02 +03:00
|
|
|
<?php if (!isset($_['hideFileList']) || (isset($_['hideFileList']) && $_['hideFileList'] !== true)): ?>
|
2016-06-07 13:28:02 +03:00
|
|
|
<input type="hidden" name="dir" id="dir" value="" />
|
|
|
|
<div class="hiddenuploadfield">
|
2018-01-25 20:53:09 +03:00
|
|
|
<input type="file" id="file_upload_start" class="hiddenuploadfield" name="files[]"
|
2018-03-14 00:04:08 +03:00
|
|
|
data-url="<?php p(\OC::$server->getURLGenerator()->linkTo('files', 'ajax/upload.php')); ?>" />
|
2013-07-05 17:07:05 +04:00
|
|
|
</div>
|
2018-01-25 20:53:09 +03:00
|
|
|
<?php endif; ?>
|
2018-10-18 13:43:08 +03:00
|
|
|
</div>
|