Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
ee68e8f4
Unverified
Commit
ee68e8f4
authored
6 years ago
by
Morris Jobke
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #13514 from nextcloud/fix-public-grid-toggle
Fix grid toggle button on public page
parents
25bb0918
ee2c45d6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/files_sharing/lib/Controller/ShareController.php
+2
-0
2 additions, 0 deletions
apps/files_sharing/lib/Controller/ShareController.php
apps/files_sharing/templates/public.php
+9
-7
9 additions, 7 deletions
apps/files_sharing/templates/public.php
with
11 additions
and
7 deletions
apps/files_sharing/lib/Controller/ShareController.php
+
2
−
0
View file @
ee68e8f4
...
@@ -361,6 +361,7 @@ class ShareController extends AuthPublicShareController {
...
@@ -361,6 +361,7 @@ class ShareController extends AuthPublicShareController {
$folder
->
assign
(
'isPublic'
,
true
);
$folder
->
assign
(
'isPublic'
,
true
);
$folder
->
assign
(
'hideFileList'
,
$hideFileList
);
$folder
->
assign
(
'hideFileList'
,
$hideFileList
);
$folder
->
assign
(
'publicUploadEnabled'
,
'no'
);
$folder
->
assign
(
'publicUploadEnabled'
,
'no'
);
// default to list view
$folder
->
assign
(
'showgridview'
,
false
);
$folder
->
assign
(
'showgridview'
,
false
);
$folder
->
assign
(
'uploadMaxFilesize'
,
$maxUploadFilesize
);
$folder
->
assign
(
'uploadMaxFilesize'
,
$maxUploadFilesize
);
$folder
->
assign
(
'uploadMaxHumanFilesize'
,
\OCP\Util
::
humanFileSize
(
$maxUploadFilesize
));
$folder
->
assign
(
'uploadMaxHumanFilesize'
,
\OCP\Util
::
humanFileSize
(
$maxUploadFilesize
));
...
@@ -372,6 +373,7 @@ class ShareController extends AuthPublicShareController {
...
@@ -372,6 +373,7 @@ class ShareController extends AuthPublicShareController {
$shareIsFolder
=
false
;
$shareIsFolder
=
false
;
}
}
// default to list view
$shareTmpl
[
'showgridview'
]
=
false
;
$shareTmpl
[
'showgridview'
]
=
false
;
$shareTmpl
[
'hideFileList'
]
=
$hideFileList
;
$shareTmpl
[
'hideFileList'
]
=
$hideFileList
;
...
...
This diff is collapsed.
Click to expand it.
apps/files_sharing/templates/public.php
+
9
−
7
View file @
ee68e8f4
...
@@ -46,14 +46,16 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
...
@@ -46,14 +46,16 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
</div>
</div>
<?php
endif
;
?>
<?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
))
{
?>
<?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=
"files-public-content"
>
<div
id=
"preview"
>
<div
id=
"preview"
>
<?php
if
(
isset
(
$_
[
'folder'
]))
:
?>
<?php
if
(
isset
(
$_
[
'folder'
]))
:
?>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment