Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-02-10 21:31:55 +0300
committerGitHub <noreply@github.com>2022-02-10 21:31:55 +0300
commit24349b913081bf944fbc49db03bb9785d247cc4e (patch)
treef0f6691c8370857f3d378a58177375646c4707f6
parent639d4b6a154f1d9a6f636340a67d59fcb70f9cc2 (diff)
parent6bbfaee8bd3b055b8a8465b30ed4379f479db055 (diff)
Merge pull request #31108 from nextcloud/backport/31077/stable23
[stable23] Revert the 'broken' public page changes
-rw-r--r--apps/files_sharing/lib/Controller/ShareController.php2
-rw-r--r--apps/files_sharing/templates/public.php4
-rw-r--r--apps/files_sharing/tests/Controller/ShareControllerTest.php8
-rw-r--r--core/css/public.scss40
4 files changed, 17 insertions, 37 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php
index b4a332d7419..614dae7ffba 100644
--- a/apps/files_sharing/lib/Controller/ShareController.php
+++ b/apps/files_sharing/lib/Controller/ShareController.php
@@ -385,7 +385,7 @@ class ShareController extends AuthPublicShareController {
$shareTmpl['protected'] = $share->getPassword() !== null ? 'true' : 'false';
$shareTmpl['dir'] = '';
$shareTmpl['nonHumanFileSize'] = $shareNode->getSize();
- $shareTmpl['fileSize'] = str_replace(' ', '&nbsp;', \OCP\Util::humanFileSize($shareNode->getSize()));
+ $shareTmpl['fileSize'] = \OCP\Util::humanFileSize($shareNode->getSize());
$shareTmpl['hideDownload'] = $share->getHideDownload();
$hideFileList = false;
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 677f015ce81..33dd6ecd189 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -75,7 +75,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
<?php if (isset($_['mimetype']) && strpos($_['mimetype'], 'image') === 0) { ?>
<div class="directDownload">
<div>
- <?php p($_['filename'])?> (<?php echo($_['fileSize']) ?>)
+ <?php p($_['filename'])?> (<?php p($_['fileSize']) ?>)
</div>
<a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
<span class="icon icon-download"></span>
@@ -87,7 +87,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
<?php if ($_['previewURL'] === $_['downloadURL'] && !$_['hideDownload']): ?>
<div class="directDownload">
<div>
- <?php p($_['filename'])?> (<?php echo($_['fileSize']) ?>)
+ <?php p($_['filename'])?>&nbsp;(<?php p($_['fileSize']) ?>)
</div>
<a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
<span class="icon icon-download"></span>
diff --git a/apps/files_sharing/tests/Controller/ShareControllerTest.php b/apps/files_sharing/tests/Controller/ShareControllerTest.php
index 512a61d811e..be2616f70fc 100644
--- a/apps/files_sharing/tests/Controller/ShareControllerTest.php
+++ b/apps/files_sharing/tests/Controller/ShareControllerTest.php
@@ -329,7 +329,7 @@ class ShareControllerTest extends \Test\TestCase {
'protected' => 'true',
'dir' => '',
'downloadURL' => 'downloadURL',
- 'fileSize' => '33&nbsp;B',
+ 'fileSize' => '33 B',
'nonHumanFileSize' => 33,
'maxSizeAnimateGif' => 10,
'previewSupported' => true,
@@ -480,7 +480,7 @@ class ShareControllerTest extends \Test\TestCase {
'protected' => 'true',
'dir' => '',
'downloadURL' => 'downloadURL',
- 'fileSize' => '33&nbsp;B',
+ 'fileSize' => '33 B',
'nonHumanFileSize' => 33,
'maxSizeAnimateGif' => 10,
'previewSupported' => true,
@@ -631,7 +631,7 @@ class ShareControllerTest extends \Test\TestCase {
'protected' => 'true',
'dir' => '',
'downloadURL' => 'downloadURL',
- 'fileSize' => '33&nbsp;B',
+ 'fileSize' => '33 B',
'nonHumanFileSize' => 33,
'maxSizeAnimateGif' => 10,
'previewSupported' => true,
@@ -756,7 +756,7 @@ class ShareControllerTest extends \Test\TestCase {
'protected' => 'false',
'dir' => null,
'downloadURL' => '',
- 'fileSize' => '1&nbsp;KB',
+ 'fileSize' => '1 KB',
'nonHumanFileSize' => 1337,
'maxSizeAnimateGif' => null,
'previewSupported' => null,
diff --git a/core/css/public.scss b/core/css/public.scss
index e0ca670fcdb..b171dd4970d 100644
--- a/core/css/public.scss
+++ b/core/css/public.scss
@@ -1,34 +1,8 @@
-#body-public {
- min-height: 100vh;
- display: flex;
- flex-direction: column;
-
- #content {
- flex-grow: 2;
- min-height: initial;
-
- /** Center the shared content inside the page */
- &.app-files_sharing {
- #app-content {
- min-height: 100%;
- display: flex;
- }
-
- #files-public-content {
- flex-grow: 2;
- display: grid;
- }
-
- #preview {
- justify-self: center;
- align-self: center;
- padding-left: 1rem;
- padding-right: 1rem;
- }
- }
- }
+$footer-height: 65px;
+#body-public {
.header-right {
+
#header-primary-action a {
color: var(--color-primary-text);
}
@@ -61,6 +35,12 @@
}
}
+ #content {
+ // 100% - footer
+ min-height: calc(100% - #{$footer-height});
+
+ }
+
/** don't apply content header padding on the base layout */
&.layout-base #content {
padding-top: 0;
@@ -92,8 +72,8 @@
display: flex;
align-items: center;
justify-content: center;
+ height: $footer-height;
flex-direction: column;
- padding: 0.5rem;
p {
text-align: center;
color: var(--color-text-lighter);