Skip to content

Commit

Permalink
implement Traveler's Pack (bug 668536) and Back to School promos (bug…
Browse files Browse the repository at this point in the history
… 668541)
  • Loading branch information
Chris Van committed Jul 28, 2011
1 parent 4ae16c8 commit c4710f7
Show file tree
Hide file tree
Showing 13 changed files with 322 additions and 548 deletions.
39 changes: 39 additions & 0 deletions apps/discovery/modules.py
Expand Up @@ -2,6 +2,7 @@
import jingo
import jinja2
from tower import ugettext_lazy as _
import waffle

from addons.models import Addon
from api.views import addon_filter
Expand Down Expand Up @@ -190,3 +191,41 @@ class ThunderbirdCollection(CollectionPromo):
cls = 'promo'
title = _(u'Thunderbird Collection')
subtitle = _(u'Here are some great add-ons for Thunderbird.')


# TODO(push): Enable the 'summer-promos' switch.
if waffle.switch_is_active('summer-promos'):
class TravelCollection(CollectionPromo):
slug = 'Travelers Pack'
pk = 4
id = 'travel'
cls = 'promo'
title = _(u'Sit Back and Relax')
subtitle = _(u'Add-ons that help you on your travels!')

def get_descriptions(self):
return {
5791: _(u"Displays a country flag depicting the location of the "
"current website's server and more."),
1117: _(u'FoxClocks let you keep an eye on the time around the '
'world.'),
11377: _(u'Automatically get the lowest price when you shop '
'online or search for flights.')
}


class SchoolCollection(CollectionPromo):
slug = 'School'
pk = 2128026 # TODO(push): Change this to 2133887.
id = 'school'
cls = 'promo'
title = _(u'A+ add-ons for School')
subtitle = _(u'Add-ons for teachers, parents, and students heading back '
'to school.')

def get_descriptions(self):
return {
3456: _(u'Would you like to know which websites you can trust?'),
2410: _(u'Xmarks is the #1 bookmarking add-on.'),
2444: _(u'Web page and text translator, dictionary, and more!')
}
2 changes: 1 addition & 1 deletion apps/discovery/templates/discovery/modules/collection.html
@@ -1,6 +1,6 @@
{% set collection = promo.collection %}
<li class="panel">
<div id="{{ promo.id }}" class="feature collection {{ promo.cls }}">
<div id="{{ promo.id }}" class="feature promo-collection {{ promo.cls }}">
<hgroup>
{% if promo.linkify_title %}
<h2>
Expand Down
2 changes: 1 addition & 1 deletion apps/discovery/templates/discovery/pane.html
Expand Up @@ -32,7 +32,7 @@ <h1><img src="{{ media('img/zamboni/discovery_pane/logo-addons.png') }}"

<section id="main">

<section id="main-feature">
<section id="promos">
<ul id="nav-features">
<li class="nav-prev"><a href="#" class="prev">{{ _('Previous') }}</a></li>
<li class="nav-next"><a href="#" class="next">{{ _('Next') }}</a></li>
Expand Down

0 comments on commit c4710f7

Please sign in to comment.