Inlines the share note for file drops
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
This commit is contained in:
parent
16f379b974
commit
08e681b221
4 changed files with 30 additions and 7 deletions
|
@ -51,4 +51,13 @@ table td.filename .nametext {
|
|||
background-position: center;
|
||||
}
|
||||
|
||||
.disclaimer,
|
||||
.note {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
#emptycontent {
|
||||
margin-top: 10vh;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -92,8 +92,15 @@ thead {
|
|||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#emptycontent.has-disclaimer {
|
||||
margin-top: 10vh;
|
||||
#emptycontent {
|
||||
&.has-disclaimer,
|
||||
&.has-note {
|
||||
margin-top: 10vh;
|
||||
}
|
||||
|
||||
&.has-disclaimer.has-note {
|
||||
margin-top: 5vh;
|
||||
}
|
||||
}
|
||||
|
||||
#public-upload #emptycontent h2 {
|
||||
|
@ -152,8 +159,9 @@ thead {
|
|||
margin-right: 7px;
|
||||
}
|
||||
|
||||
.disclaimer {
|
||||
margin: -20px auto 30px;
|
||||
.disclaimer,
|
||||
.note {
|
||||
margin: 0 auto 30px;
|
||||
max-width: 400px;
|
||||
text-align: left;
|
||||
}
|
||||
|
|
|
@ -409,8 +409,6 @@ class ShareController extends AuthPublicShareController {
|
|||
\OCP\Util::addScript('files', 'file-upload');
|
||||
\OCP\Util::addStyle('files_sharing', 'publicView');
|
||||
\OCP\Util::addScript('files_sharing', 'public');
|
||||
\OCP\Util::addScript('files_sharing', 'templates');
|
||||
\OCP\Util::addScript('files_sharing', 'public_note');
|
||||
\OCP\Util::addScript('files', 'fileactions');
|
||||
\OCP\Util::addScript('files', 'fileactionsmenu');
|
||||
\OCP\Util::addScript('files', 'jquery.fileupload');
|
||||
|
@ -447,6 +445,7 @@ class ShareController extends AuthPublicShareController {
|
|||
$response->setHeaderTitle($shareTmpl['filename']);
|
||||
$response->setHeaderDetails($this->l10n->t('shared by %s', [$shareTmpl['displayName']]));
|
||||
if (!$share->getHideDownload()) {
|
||||
\OCP\Util::addScript('files_sharing', 'public_note');
|
||||
$response->setHeaderActions([
|
||||
new SimpleMenuAction('download', $this->l10n->t('Download'), 'icon-download-white', $shareTmpl['downloadURL'], 0),
|
||||
new SimpleMenuAction('download', $this->l10n->t('Download'), 'icon-download', $shareTmpl['downloadURL'], 10, $shareTmpl['fileSize']),
|
||||
|
|
|
@ -82,13 +82,20 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
|
|||
<?php } else { ?>
|
||||
<input type="hidden" id="upload-only-interface" value="1"/>
|
||||
<div id="public-upload">
|
||||
<div id="emptycontent" class="<?php if (!empty($_['disclaimer'])) { ?>has-disclaimer<?php } ?>">
|
||||
<div
|
||||
id="emptycontent"
|
||||
class="<?php if (!empty($_['disclaimer'])) { ?>has-disclaimer<?php } ?> <?php if (!empty($_['note'])) { ?>has-note<?php } ?>">
|
||||
<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 if (!empty($_['disclaimer'])) { ?>
|
||||
<p class="disclaimer"><?php p($_['disclaimer']); ?></p>
|
||||
<?php } ?>
|
||||
<?php if (empty($_['note']) === false) { ?>
|
||||
<p class="note"><?php p($_['note']); ?></p>
|
||||
<?php } ?>
|
||||
|
||||
<input type="file" name="files[]" class="hidden" multiple>
|
||||
|
||||
<a href="#" class="button icon-upload"><?php p($l->t('Select or drop files')) ?></a>
|
||||
|
|
Loading…
Reference in a new issue