Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Thanks with links to downloads, fix bug 654527
Browse files Browse the repository at this point in the history
  • Loading branch information
davedash committed Nov 16, 2011
1 parent 4bab508 commit fb39ce4
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 14 deletions.
14 changes: 11 additions & 3 deletions apps/feedback/templates/feedback/mobile/thanks.html
Expand Up @@ -16,7 +16,7 @@
<a href="{{ url('search') }}">{{ _('Back to Dashboard') }}</a>
</div>
</nav>

<header>
<div class="wrapper">
<h1>{{ _('Give Feedback') }}</h1>
Expand All @@ -29,22 +29,30 @@ <h1>{{ _('Give Feedback') }}</h1>
<p><strong>{{ _('Thanks for sharing your feedback!') }}</strong></p>
<p>{{ _("Want to know what's going on with Firefox for Mobile? We have many ways of staying in touch:") }}</p>
</header>

<ul class="choices">
<li id="thanks-dashboard">
<span>
<small>{{ _('See where your feedback goes.') }}</small>
<a href="{{ url('search') }}">{{ _('Feedback Dashboard') }}</a>
</span>
</li>
<li id="thanks-download">
<span>
<small>{{ _('Shape the future of Firefox.') }}</small>
<a href="https://market.android.com/details?id=org.mozilla.firefox_beta">
{{ _('Download the beta and give us feedback!') }}
</a>
</span>
</li>

<li id="thanks-twitter">
<span>
<small>{{ _('Follow us on Twitter.') }}</small>
<a href="http://twitter.com/MozMobile">@MozMobile</a>
</span>
</li>

<li id="thanks-facebook">
<span>
<small>{{ _("Let's be friends.") }}</small>
Expand Down
11 changes: 6 additions & 5 deletions apps/feedback/templates/feedback/thanks.html
Expand Up @@ -33,11 +33,12 @@ <h3>{{ _('Share your feedback.') }}</h3>
</div>
{% endif %}

<div>
<h3>{{ _('Have more to say?') }}</h3>
<div id="thanks_download">
<h3>{{ _('Shape the future of Firefox.') }}</h3>
<p>
{% trans fb_url='/feedback' %}
Feel free to <a href="{{ fb_url }}">submit more feedback</a>
{% trans download_url="http://www.mozilla.org/firefox/channel" %}
Download
<a href="{{ download_url }}">the build that is right for you</a>.
{% endtrans %}
</p>
</div>
Expand Down Expand Up @@ -69,7 +70,7 @@ <h3>{{ _('Find the latest news about Firefox.') }}</h3>
</ul>
</div>
</div>

<span class="fade"></span>
</article>

Expand Down
18 changes: 16 additions & 2 deletions apps/feedback/tests/test_feedback_views.py
Expand Up @@ -172,9 +172,23 @@ def test_feedback_index(self):

def test_mobile_sumo_url(self):
"""Test the sumo url in the mobile version."""
r = self.client.get(reverse('feedback'),
HTTP_USER_AGENT=(self.FX_UA % '20.0b2'),
r = self.client.get(reverse('feedback'),
HTTP_USER_AGENT=(self.FX_UA % '20.0b2'),
SITE_ID=settings.MOBILE_SITE_ID)
doc = pq(r.content)
sumo_url = doc('#sumo-url')
eq_(sumo_url.attr('href'), 'http://support.mozilla.com/en-US/')

def test_thanks(self):
# test link to android market
r = self.client.get(reverse('thanks'), SITE_ID=settings.MOBILE_SITE_ID)
doc = pq(r.content)
eq_(doc('#thanks-download a').attr('href'),
'https://market.android.com/details?id=org.mozilla.firefox_beta')

# test link to channels page
r = self.client.get(reverse('thanks'))
doc = pq(r.content)
eq_(doc('#thanks_download a').attr('href'),
'http://www.mozilla.org/firefox/channel')

2 changes: 1 addition & 1 deletion apps/feedback/urls.py
Expand Up @@ -7,7 +7,7 @@
url(r'^sad/?', redirect_to, {'url': '/feedback#sad'}),
url(r'^idea/?', redirect_to, {'url': '/feedback#idea'}),

url(r'^thanks/?', 'thanks', name='feedback.thanks'),
url(r'^thanks/?', 'thanks', name='thanks'),
url(r'^feedback/?', 'feedback', name='feedback'),
url(r'^download/?', 'download', name='feedback.download'),
url(r'^opinion/(?P<id>\d+)$', 'opinion_detail', name='opinion.detail'),
Expand Down
2 changes: 1 addition & 1 deletion apps/feedback/views.py
Expand Up @@ -76,7 +76,7 @@ def feedback(request, ua):
request.session['previous_opinion'] = save_opinion_from_form(
request, typ, ua, form)

url = reverse('feedback.thanks')
url = reverse('thanks')
return http.HttpResponseRedirect(url)
else:
forms = {'happy': (form if typ == input.OPINION_PRAISE.id else
Expand Down
5 changes: 3 additions & 2 deletions media/css/feedback-mobile.css
Expand Up @@ -13,7 +13,7 @@ body {
a {
color: #437bc4;
text-decoration: none;
}
}

section {
position: relative;
Expand Down Expand Up @@ -342,7 +342,8 @@ footer p {
#thanks #thanks-twitter:before { background-position: 0 -100px; }
#thanks #thanks-facebook:before { background-position: 0 -150px; }
#thanks #thanks-planet:before { background-position: 0 -200px; }
#thanks #thanks-download:before { background-position: 0 -250px; }

.errorlist {
color: red;
}
}
Binary file modified media/img/thanks.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fb39ce4

Please sign in to comment.