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
617aa3cf
Commit
617aa3cf
authored
11 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
Instead of 'No preview available for ...' we simple display the mieme-type icon
parent
799e744a
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/js/public.js
+1
-8
1 addition, 8 deletions
apps/files_sharing/js/public.js
apps/files_sharing/templates/public.php
+8
-12
8 additions, 12 deletions
apps/files_sharing/templates/public.php
with
9 additions
and
20 deletions
apps/files_sharing/js/public.js
+
1
−
8
View file @
617aa3cf
...
...
@@ -15,14 +15,7 @@ $(document).ready(function() {
if
(
mimetype
.
substr
(
0
,
mimetype
.
indexOf
(
'
/
'
))
!=
'
image
'
&&
$
(
'
.publicpreview
'
).
length
===
0
)
{
// Trigger default action if not download TODO
var
action
=
FileActions
.
getDefault
(
mimetype
,
'
file
'
,
OC
.
PERMISSION_READ
);
if
(
typeof
action
===
'
undefined
'
)
{
$
(
'
#noPreview
'
).
show
();
if
(
mimetype
!=
'
httpd/unix-directory
'
)
{
// NOTE: Remove when a better file previewer solution exists
$
(
'
#content
'
).
remove
();
$
(
'
table
'
).
remove
();
}
}
else
{
if
(
typeof
action
!==
'
undefined
'
)
{
action
(
$
(
'
#filename
'
).
val
());
}
}
...
...
This diff is collapsed.
Click to expand it.
apps/files_sharing/templates/public.php
+
8
−
12
View file @
617aa3cf
...
...
@@ -32,16 +32,10 @@
<source
src=
"
<?php
p
(
$_
[
'downloadURL'
]);
?>
"
type=
"
<?php
p
(
$_
[
'mimetype'
]);
?>
"
/>
</video>
</div>
<?php
else
if
(
\OC\Preview
::
isMimeSupported
(
$_
[
'mimetype'
]))
:
?>
<?php
else
:
?>
<div
id=
"imgframe"
>
<img
src=
"
<?php
p
(
OCP\Util
::
linkToRoute
(
'core_ajax_public_preview'
,
array
(
'x'
=>
500
,
'y'
=>
500
,
'file'
=>
urlencode
(
$_
[
'directory_path'
]),
't'
=>
$_
[
'dirToken'
])));
?>
"
class=
"publicpreview"
/>
</div>
<?php
else
:
?>
<ul
id=
"noPreview"
>
<li
class=
"error"
>
<?php
p
(
$l
->
t
(
'No preview available for'
)
.
' '
.
$_
[
'filename'
]);
?>
<br
/>
</li>
</ul>
<?php
endif
;
?>
<div
class=
"directDownload"
>
<a
href=
"
<?php
p
(
$_
[
'downloadURL'
]);
?>
"
id=
"download"
class=
"button"
>
...
...
@@ -55,8 +49,10 @@
</div>
<?php
endif
;
?>
</div>
<footer>
<p
class=
"info"
>
<?php
print_unescaped
(
$theme
->
getLongFooter
());
?>
</p>
</footer>
</div>
<footer>
<p
class=
"info"
>
<?php
print_unescaped
(
$theme
->
getLongFooter
());
?>
</p>
</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