Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
fix sc view test
Browse files Browse the repository at this point in the history
  • Loading branch information
collin committed May 16, 2016
1 parent f1e071b commit a219f5d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,39 @@ <h1>{{ special_coverage.name }}</h1>
</div>
</div>

<div class='sc-video-player'>
<bulbs-video
src='{{ VIDEOHUB_BASE_URL }}/video/{{current_video}}.json'
no-endcard
>
</bulbs-video>
<div class='sc-video-meta'>
{% if special_coverage.tunic_campaign_id %}
{% comment %}
TODO bulbs-elements dependency should be explicitly set by this repo.
At this point, we are pushing this responsibility downstream.
{% endcomment %}
<campaign-display
class="sc-player-campaign"
data-track-action="Sponsor Logo"
data-track-category="Special Coverage Landing"
placement="detail"
preamble-text="Presented by"
src="{% content_tunic_campaign_url special_coverage.tunic_campaign_id %}"
name-only
{% if current_video %}
<div class='sc-video-player'>
<bulbs-video
src='{{ VIDEOHUB_BASE_URL }}/video/{{current_video}}.json'
no-endcard
>
</bulbs-video>
<div class='sc-video-meta'>
{% if special_coverage.tunic_campaign_id %}
{% comment %}
TODO bulbs-elements dependency should be explicitly set by this repo.
At this point, we are pushing this responsibility downstream.
{% endcomment %}
<campaign-display
class="sc-player-campaign"
data-track-action="Sponsor Logo"
data-track-category="Special Coverage Landing"
placement="detail"
preamble-text="Presented by"
src="{% content_tunic_campaign_url special_coverage.tunic_campaign_id %}"
name-only
>
</campaign-display>
{% endif %}
<bulbs-video-meta
src='{{ VIDEOHUB_BASE_URL }}/video/{{current_video}}.json'
twitter-handle='{{ twitter_handle }}'
email-share-message='{{ share_message }}'
>
</campaign-display>
{% endif %}
<bulbs-video-meta
src='{{ VIDEOHUB_BASE_URL }}/video/{{current_video}}.json'
twitter-handle='{{ twitter_handle }}'
email-share-message='{{ share_message }}'
>
</bulbs-video-meta>
</div>
</div>
</bulbs-video-meta>
</div>
</div>
{% endif %}

{% if special_coverage.videos.1 %}
<div class='sc-divider'>
Expand Down
6 changes: 5 additions & 1 deletion bulbs/special_coverage/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ def get_context_data(self, *args, **kwargs):
context["content_list"] = self.special_coverage.get_content()
context["special_coverage"] = self.special_coverage
context["targeting"] = {}
context["current_video"] = self.special_coverage.videos[0]
try:
context["current_video"] = self.special_coverage.videos[0]
except IndexError:
context["current_video"] = None

if self.special_coverage:
context["targeting"]["dfp_specialcoverage"] = self.special_coverage.slug
if self.special_coverage.tunic_campaign_id:
Expand Down

0 comments on commit a219f5d

Please sign in to comment.