Skip to content

Commit

Permalink
Merge pull request #19403 from code-dot-org/hoc-is-here-text-fix
Browse files Browse the repository at this point in the history
Home & Teacher home: show "HOC is coming" until actual HOC
  • Loading branch information
tanyaparker committed Nov 27, 2017
2 parents d3c8c14 + a0d654c commit 25892a0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
17 changes: 17 additions & 0 deletions apps/src/templates/studioHomepages/TeacherHomepage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,23 @@ export default class TeacherHomepage extends Component {
{hocLaunch &&
hocLaunch.special_announcement &&
hocLaunch.special_announcement === "celebs2017" &&
isEnglish && (
<SpecialAnnouncementActionBlock
isRtl={isRtl}
imageUrl={pegasus('/images/fill-540x289/special-announcements/celebs_hoc2017.jpg')}
heading={i18n.specialAnnouncementHeading()}
subHeading={""}
description={i18n.specialAnnouncementDescriptionCelebs()}
buttons={[
{url: pegasus('/challenge'), text: i18n.celebrityChallenge()},
{url: pegasus('/learn'), text: i18n.tryHOC()}
]}
/>
)}

{hocLaunch &&
hocLaunch.special_announcement &&
hocLaunch.special_announcement === "celebs2017actualhoc" &&
isEnglish && (
<SpecialAnnouncementActionBlock
isRtl={isRtl}
Expand Down
3 changes: 2 additions & 1 deletion pegasus/sites.v3/code.org/views/homepage_hero.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- hoc_launch = DCDO.get('hoc_launch', nil)
- census_announcement = DCDO.get('census_announcement', nil)
- hoc_mode = DCDO.get('hoc_mode', nil)

-# Whether we show a HOC launch background
- show_hoc_launch_layout = hoc_launch && hoc_launch["homepage"]
Expand Down Expand Up @@ -59,7 +60,7 @@
- main_actions = capture_haml do
-# Temporary heading text for the Hour of Code
- if request.language == "en"
- if show_hoc_launch_layout && hoc_launch_hero_variation == "celebs"
- if show_hoc_launch_layout && hoc_launch_hero_variation == "celebs" && hoc_mode == 'actual-hoc'
= I18n.t(:homepage_hero_hoc_is_here)
- else
= I18n.t(:homepage_hero_hoc_is_coming)
Expand Down

0 comments on commit 25892a0

Please sign in to comment.