aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/templates
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-01-11 13:37:30 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-02-21 09:17:57 +0100
commitee2c45d60d60cc083d5a255acabf675f70ac67ed (patch)
treeef3c3c758c7f818e942de60967293a6b0d4c460b /apps/files_sharing/templates
parent10388eab342a46e034eb6bfb89fbfd232d8ec2a5 (diff)
downloadnextcloud-server-ee2c45d60d60cc083d5a255acabf675f70ac67ed.tar.gz
nextcloud-server-ee2c45d60d60cc083d5a255acabf675f70ac67ed.zip
Fix grid toggle button on public page
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/templates')
-rw-r--r--apps/files_sharing/templates/public.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index eccdc49bc31..792b4d23804 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -46,14 +46,16 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
</div>
<?php endif; ?>
-<?php if ($_['showgridview'] && 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 } ?>
-
<?php if (!isset($_['hideFileList']) || (isset($_['hideFileList']) && $_['hideFileList'] === false)) { ?>
+ <!-- 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 } ?>
+
+ <!-- files listing -->
<div id="files-public-content">
<div id="preview">
<?php if (isset($_['folder'])): ?>