Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
807b885a
Commit
807b885a
authored
11 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
reuse file upload as used within files app - remove public upload button
parent
072ef7f0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
apps/files/templates/index.php
+6
-2
6 additions, 2 deletions
apps/files/templates/index.php
apps/files_sharing/public.php
+2
-1
2 additions, 1 deletion
apps/files_sharing/public.php
apps/files_sharing/templates/public.php
+2
-52
2 additions, 52 deletions
apps/files_sharing/templates/public.php
with
10 additions
and
55 deletions
apps/files/templates/index.php
+
6
−
2
View file @
807b885a
...
@@ -18,6 +18,10 @@
...
@@ -18,6 +18,10 @@
<input
type=
"hidden"
name=
"MAX_FILE_SIZE"
id=
"max_upload"
<input
type=
"hidden"
name=
"MAX_FILE_SIZE"
id=
"max_upload"
value=
"
<?php
p
(
$_
[
'uploadMaxFilesize'
])
?>
"
>
value=
"
<?php
p
(
$_
[
'uploadMaxFilesize'
])
?>
"
>
<?php
endif
;
?>
<?php
endif
;
?>
<?php
if
(
isset
(
$_
[
'dirToken'
]))
:
?>
<input
type=
"hidden"
id=
"publicUploadRequestToken"
name=
"requesttoken"
value=
"
<?php
p
(
$_
[
'requesttoken'
])
?>
"
/>
<input
type=
"hidden"
id=
"dirToken"
name=
"dirToken"
value=
"
<?php
p
(
$_
[
'dirToken'
])
?>
"
/>
<?php
endif
;
?>
<input
type=
"hidden"
class=
"max_human_file_size"
<input
type=
"hidden"
class=
"max_human_file_size"
value=
"(max
<?php
p
(
$_
[
'uploadMaxHumanFilesize'
]);
?>
)"
>
value=
"(max
<?php
p
(
$_
[
'uploadMaxHumanFilesize'
]);
?>
)"
>
<input
type=
"hidden"
name=
"dir"
value=
"
<?php
p
(
$_
[
'dir'
])
?>
"
id=
"dir"
>
<input
type=
"hidden"
name=
"dir"
value=
"
<?php
p
(
$_
[
'dir'
])
?>
"
id=
"dir"
>
...
@@ -26,7 +30,7 @@
...
@@ -26,7 +30,7 @@
<a
href=
"#"
class=
"svg"
></a>
<a
href=
"#"
class=
"svg"
></a>
</div>
</div>
<?php
if
(
$_
[
'trash'
])
:
?>
<?php
if
(
$_
[
'trash'
])
:
?>
<input
id=
"trash"
type=
"button"
value=
"
<?php
p
(
$l
->
t
(
'Deleted files'
));
?>
"
class=
"button"
<?php
$_
[
'trashEmpty'
]
?
p
(
'disabled'
)
:
''
?>
>
</input>
<input
id=
"trash"
type=
"button"
value=
"
<?php
p
(
$l
->
t
(
'Deleted files'
));
?>
"
class=
"button"
<?php
$_
[
'trashEmpty'
]
?
p
(
'disabled'
)
:
''
?>
>
<?php
endif
;
?>
<?php
endif
;
?>
<div
id=
"uploadprogresswrapper"
>
<div
id=
"uploadprogresswrapper"
>
<div
id=
"uploadprogressbar"
></div>
<div
id=
"uploadprogressbar"
></div>
...
@@ -44,7 +48,7 @@
...
@@ -44,7 +48,7 @@
<div
id=
"emptycontent"
<?php
if
(
!
$_
[
'emptyContent'
])
:
?>
class=
"hidden"
<?php
endif
;
?>
>
<?php
p
(
$l
->
t
(
'Nothing in here. Upload something!'
))
?>
</div>
<div
id=
"emptycontent"
<?php
if
(
!
$_
[
'emptyContent'
])
:
?>
class=
"hidden"
<?php
endif
;
?>
>
<?php
p
(
$l
->
t
(
'Nothing in here. Upload something!'
))
?>
</div>
<input
type=
"hidden"
id=
"disableSharing"
data-status=
"
<?php
p
(
$_
[
'disableSharing'
]);
?>
"
>
</input>
<input
type=
"hidden"
id=
"disableSharing"
data-status=
"
<?php
p
(
$_
[
'disableSharing'
]);
?>
"
>
<table
id=
"filestable"
data-allow-public-upload=
"
<?php
p
(
$_
[
'publicUploadEnabled'
])
?>
"
data-preview-x=
"36"
data-preview-y=
"36"
>
<table
id=
"filestable"
data-allow-public-upload=
"
<?php
p
(
$_
[
'publicUploadEnabled'
])
?>
"
data-preview-x=
"36"
data-preview-y=
"36"
>
<thead>
<thead>
...
...
This diff is collapsed.
Click to expand it.
apps/files_sharing/public.php
+
2
−
1
View file @
807b885a
...
@@ -225,7 +225,8 @@ if (isset($path)) {
...
@@ -225,7 +225,8 @@ if (isset($path)) {
$folder
->
assign
(
'fileList'
,
$list
->
fetchPage
());
$folder
->
assign
(
'fileList'
,
$list
->
fetchPage
());
$folder
->
assign
(
'breadcrumb'
,
$breadcrumbNav
->
fetchPage
());
$folder
->
assign
(
'breadcrumb'
,
$breadcrumbNav
->
fetchPage
());
$folder
->
assign
(
'dir'
,
$getPath
);
$folder
->
assign
(
'dir'
,
$getPath
);
$folder
->
assign
(
'isCreatable'
,
false
);
$folder
->
assign
(
'isCreatable'
,
$allowPublicUploadEnabled
);
$folder
->
assign
(
'dirToken'
,
$linkItem
[
'token'
]);
$folder
->
assign
(
'permissions'
,
OCP\PERMISSION_READ
);
$folder
->
assign
(
'permissions'
,
OCP\PERMISSION_READ
);
$folder
->
assign
(
'isPublic'
,
true
);
$folder
->
assign
(
'isPublic'
,
true
);
$folder
->
assign
(
'publicUploadEnabled'
,
'no'
);
$folder
->
assign
(
'publicUploadEnabled'
,
'no'
);
...
...
This diff is collapsed.
Click to expand it.
apps/files_sharing/templates/public.php
+
2
−
52
View file @
807b885a
...
@@ -14,57 +14,7 @@
...
@@ -14,57 +14,7 @@
src=
"
<?php
print_unescaped
(
image_path
(
''
,
'logo-wide.svg'
));
?>
"
alt=
"
<?php
p
(
$theme
->
getName
());
?>
"
/></a>
src=
"
<?php
print_unescaped
(
image_path
(
''
,
'logo-wide.svg'
));
?>
"
alt=
"
<?php
p
(
$theme
->
getName
());
?>
"
/></a>
<div
id=
"logo-claim"
style=
"display:none;"
>
<?php
p
(
$theme
->
getLogoClaim
());
?>
</div>
<div
id=
"logo-claim"
style=
"display:none;"
>
<?php
p
(
$theme
->
getLogoClaim
());
?>
</div>
<div
class=
"header-right"
>
<div
class=
"header-right"
>
<?php
if
(
isset
(
$_
[
'folder'
]))
:
?>
<span
id=
"details"
>
<?php
p
(
$l
->
t
(
'shared by %s'
,
array
(
$_
[
'displayName'
])))
?>
</span>
<span
id=
"details"
>
<?php
p
(
$l
->
t
(
'%s shared the folder %s with you'
,
array
(
$_
[
'displayName'
],
$_
[
'filename'
])))
?>
</span>
<?php
else
:
?>
<span
id=
"details"
>
<?php
p
(
$l
->
t
(
'%s shared the file %s with you'
,
array
(
$_
[
'displayName'
],
$_
[
'filename'
])))
?>
</span>
<?php
endif
;
?>
<?php
if
(
!
isset
(
$_
[
'folder'
])
||
$_
[
'allowZipDownload'
])
:
?>
<a
href=
"
<?php
p
(
$_
[
'downloadURL'
]);
?>
"
class=
"button"
id=
"download"
><img
class=
"svg"
alt=
"Download"
src=
"
<?php
print_unescaped
(
OCP\image_path
(
"core"
,
"actions/download.svg"
));
?>
"
/><span>
<?php
p
(
$l
->
t
(
'Download'
))
?>
</span></a>
<?php
endif
;
?>
<?php
if
(
$_
[
'allowPublicUploadEnabled'
])
:
?>
<input
type=
"hidden"
id=
"publicUploadRequestToken"
name=
"requesttoken"
value=
"
<?php
p
(
$_
[
'requesttoken'
])
?>
"
/>
<input
type=
"hidden"
id=
"dirToken"
name=
"dirToken"
value=
"
<?php
p
(
$_
[
'dirToken'
])
?>
"
/>
<input
type=
"hidden"
id=
"uploadMaxFilesize"
name=
"uploadMaxFilesize"
value=
"
<?php
p
(
$_
[
'uploadMaxFilesize'
])
?>
"
/>
<input
type=
"hidden"
id=
"uploadMaxHumanFilesize"
name=
"uploadMaxHumanFilesize"
value=
"
<?php
p
(
$_
[
'uploadMaxHumanFilesize'
])
?>
"
/>
<input
type=
"hidden"
id=
"directory_path"
name=
"directory_path"
value=
"
<?php
p
(
$_
[
'directory_path'
])
?>
"
/>
<?php
if
(
$_
[
'uploadMaxFilesize'
]
>=
0
)
:
?>
<input
type=
"hidden"
name=
"MAX_FILE_SIZE"
id=
"max_upload"
value=
"
<?php
p
(
$_
[
'uploadMaxFilesize'
])
?>
"
>
<?php
endif
;
?>
<div
id=
"data-upload-form"
class=
"button"
title=
"
<?php
p
(
$l
->
t
(
'Upload'
)
.
' max. '
.
$_
[
'uploadMaxHumanFilesize'
])
?>
"
>
<input
id=
"file_upload_start"
type=
"file"
name=
"files[]"
data-url=
"
<?php
print_unescaped
(
OCP\Util
::
linkTo
(
'files'
,
'ajax/upload.php'
));
?>
"
multiple
>
<a
href=
"#"
id=
"publicUploadButtonMock"
class=
"svg"
>
<span>
<?php
p
(
$l
->
t
(
'Upload'
))
?>
</span>
</a>
</div>
</div>
<div
id=
"additional_controls"
style=
"display:none"
>
<div
id=
"uploadprogresswrapper"
>
<div
id=
"uploadprogressbar"
></div>
<input
id=
"cancel_upload_button"
type=
"button"
class=
"stop"
style=
"display:none"
value=
"
<?php
p
(
$l
->
t
(
'Cancel upload'
));
?>
"
/>
</div>
<?php
endif
;
?>
</div>
</div>
</div></header>
</div></header>
<div
id=
"content"
>
<div
id=
"content"
>
...
@@ -96,7 +46,7 @@
...
@@ -96,7 +46,7 @@
</li>
</li>
</ul>
</ul>
<?php
endif
;
?>
<?php
endif
;
?>
<div
class=
"directLink"
><label
for=
"directLink"
>
<?php
p
(
$l
->
t
(
'Direct link'
))
?>
</label><input
id=
"directLink"
type=
"text"
readonly
value=
"
<?php
p
(
$_
[
'downloadURL'
]);
?>
"
></
input></
div>
<div
class=
"directLink"
><label
for=
"directLink"
>
<?php
p
(
$l
->
t
(
'Direct link'
))
?>
</label><input
id=
"directLink"
type=
"text"
readonly
value=
"
<?php
p
(
$_
[
'downloadURL'
]);
?>
"
></div>
<?php
endif
;
?>
<?php
endif
;
?>
</div>
</div>
<footer>
<footer>
...
...
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