Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
b5ddcb39
Commit
b5ddcb39
authored
Oct 19, 2017
by
Matt Tuchfarber
Committed by
GitHub
Oct 19, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16263 from edx/tuchfarber/program_marketing_fix
Fix program marketing page when it doesn't have a video.
parents
8c8edd2c
75e3845d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
lms/static/sass/views/_program-marketing-page.scss
+5
-2
lms/templates/courseware/program_marketing.html
+4
-2
openedx/core/djangoapps/catalog/tests/factories.py
+6
-0
No files found.
lms/static/sass/views/_program-marketing-page.scss
View file @
b5ddcb39
...
...
@@ -3,6 +3,7 @@
.program_title
{
font-weight
:
bold
;
margin-top
:
$baseline
}
.logo
{
...
...
@@ -23,10 +24,12 @@
.main-banner
{
color
:
white
;
margin-bottom
:
1px
;
background-size
:
cover
;
background-repeat
:
no-repeat
;
background-position
:
center
;
.authoring-org-logo
{
background-color
:
$white
;
margin-bottom
:
$baseline
;
}
.btn
{
...
...
@@ -34,7 +37,6 @@
}
.btn
,
.authoring-org-logo
,
h1
,
h2
,
a
{
...
...
@@ -48,6 +50,7 @@
button
{
background-color
:
transparent
;
color
:
$white
}
iframe
{
...
...
lms/templates/courseware/program_marketing.html
View file @
b5ddcb39
...
...
@@ -44,7 +44,7 @@ expected_learning_items = program['expected_learning_items']
authoring_organizations =
program['authoring_organizations']
min_hours_effort_per_week =
program['min_hours_effort_per_week']
max_hours_effort_per_week =
program['max_hours_effort_per_week']
video_url =
program
.get('video',
{}).
get
('
src
',
'')
video_url =
program
['video'].get('src')
if
program
['
video
']
else
''
banner_image =
program.get('banner_image',
{}).
get
('
large
',
{}).
get
('
url
',
'')
%
>
...
...
@@ -54,7 +54,7 @@ banner_image = program.get('banner_image', {}).get('large', {}).get('url', '')
<
%
block
name=
"pagetitle"
>
${program['title']}
</
%
block>
<div
id=
"program-details-page"
class=
"container"
>
<div
class=
"row main-banner"
style=
"background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) ), url(${banner_image})
no-repeat center
;"
>
<div
class=
"row main-banner"
style=
"background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) ), url(${banner_image});"
>
<div
class=
"col col-12 col-md-8"
>
% if authoring_organizations and authoring_organizations[0]['logo_image_url']:
<div>
...
...
@@ -80,12 +80,14 @@ banner_image = program.get('banner_image', {}).get('large', {}).get('url', '')
</div>
</div>
<div
class=
"col col-12 col-md-4"
>
% if video_url:
<div
id=
"program_video"
>
<button
type=
"button"
class=
"btn"
aria-label=
"${_('Play')}"
onclick=
"playVideo('${video_url}')"
>
<span
class=
"icon fa fa-4x fa-play-circle"
aria-hidden=
"true"
></span>
</button>
<iframe
class=
"align-middle"
title=
"${_('YouTube Video')}"
src=
""
frameborder=
"0"
allowfullscreen
style=
"display:none;"
></iframe>
</div>
% endif
</div>
</div>
<div
class=
"row quick-nav"
>
...
...
openedx/core/djangoapps/catalog/tests/factories.py
View file @
b5ddcb39
...
...
@@ -81,6 +81,11 @@ class StdImageFactory(ImageFactoryBase):
url
=
factory
.
Faker
(
'image_url'
)
class
VideoFactory
(
DictFactoryBase
):
src
=
factory
.
Faker
(
'url'
)
description
=
factory
.
Faker
(
'sentence'
)
def
generate_sized_stdimage
():
return
{
size
:
StdImageFactory
()
for
size
in
[
'large'
,
'medium'
,
'small'
,
'x-small'
]
...
...
@@ -188,6 +193,7 @@ class ProgramFactory(DictFactoryBase):
title
=
factory
.
Faker
(
'catch_phrase'
)
type
=
factory
.
Faker
(
'word'
)
uuid
=
factory
.
Faker
(
'uuid4'
)
video
=
VideoFactory
()
weeks_to_complete
=
fake
.
random_int
(
1
,
45
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment