diff --git a/apps/discovery/modules.py b/apps/discovery/modules.py index 2c62d98aa0..a39117dfc3 100644 --- a/apps/discovery/modules.py +++ b/apps/discovery/modules.py @@ -2,6 +2,7 @@ import caching.base as caching import jingo import jinja2 from tower import ugettext_lazy as _ +import waffle from addons.models import Addon from api.views import addon_filter @@ -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!') + } diff --git a/apps/discovery/templates/discovery/modules/collection.html b/apps/discovery/templates/discovery/modules/collection.html index f694613b5b..b4b7f8b324 100644 --- a/apps/discovery/templates/discovery/modules/collection.html +++ b/apps/discovery/templates/discovery/modules/collection.html @@ -1,6 +1,6 @@ {% set collection = promo.collection %}
  • -
    +
    {% if promo.linkify_title %}

    diff --git a/apps/discovery/templates/discovery/pane.html b/apps/discovery/templates/discovery/pane.html index 88dfe03259..20dcebd571 100644 --- a/apps/discovery/templates/discovery/pane.html +++ b/apps/discovery/templates/discovery/pane.html @@ -32,7 +32,7 @@ data-upandcoming-url="{{ services_url('discovery.pane.more_addons', 'up-and-comi
    -
    +