Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Jakob Diel
Stud.IP
Commits
d00dfa6c
Commit
d00dfa6c
authored
2 years ago
by
Rasmus Fuhse
Committed by
Jan-Hendrik Willms
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "OER-Campus: Großer schwarzer Kasten"
Closes #1384 Merge request
studip/studip!906
parent
d638c669
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/views/oer/market/details.php
+4
-2
4 additions, 2 deletions
app/views/oer/market/details.php
lib/models/OERMaterial.php
+15
-0
15 additions, 0 deletions
lib/models/OERMaterial.php
resources/assets/stylesheets/scss/oer.scss
+2
-1
2 additions, 1 deletion
resources/assets/stylesheets/scss/oer.scss
with
21 additions
and
3 deletions
app/views/oer/market/details.php
+
4
−
2
View file @
d00dfa6c
...
...
@@ -25,8 +25,10 @@
src=
"
<?=
htmlReady
(
$url
)
?>
"
></audio>
</div>
<?
elseif
(
$material
->
isPDF
())
:
?>
<iframe
src=
"
<?=
htmlReady
(
$url
)
?>
"
class=
"lernmarktplatz_player"
></iframe>
<?
if
(
$material
->
isPDFInlineDisplayable
())
:
?>
<iframe
src=
"
<?=
htmlReady
(
$url
)
?>
"
class=
"lernmarktplatz_player"
></iframe>
<?
endif
?>
<?
elseif
(
$material
[
'front_image_content_type'
])
:
?>
<div
style=
"background-image: url('
<?=
htmlReady
(
$material
->
getLogoURL
())
?>
');"
class=
"lernmarktplatz_player image"
></div>
<?
endif
?>
...
...
This diff is collapsed.
Click to expand it.
lib/models/OERMaterial.php
+
15
−
0
View file @
d00dfa6c
...
...
@@ -305,6 +305,21 @@ class OERMaterial extends SimpleORMap
return
$this
[
'content_type'
]
===
"application/pdf"
;
}
public
function
isPDFInlineDisplayable
()
{
if
(
!
$this
->
isPDF
())
{
return
false
;
}
$url
=
$this
->
getDownloadUrl
();
$headers
=
get_headers
(
$url
,
true
);
if
(
$headers
[
'Content-Disposition'
]
&&
substr
(
$headers
[
'Content-Disposition'
],
0
,
strlen
(
'attachment'
))
===
'attachment'
)
{
//in this case the server forces to download the document and we cannot display it in an iframe:
return
false
;
}
return
true
;
}
protected
function
getFileEnding
()
{
return
pathinfo
(
$this
[
"filename"
],
PATHINFO_EXTENSION
);
...
...
This diff is collapsed.
Click to expand it.
resources/assets/stylesheets/scss/oer.scss
+
2
−
1
View file @
d00dfa6c
...
...
@@ -396,7 +396,8 @@ ul.reviews, ol.reviews {
width
:
840px
;
max-width
:
100%
;
box-sizing
:
border-box
;
min-height
:
200px
;
height
:
200px
;
max-height
:
200px
;
overflow
:
hidden
;
.intro
{
display
:
flex
;
...
...
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