Skip to content

Commit

Permalink
Need a submit feedback page placeholder for beta - Bug 602683
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansnyder committed Oct 11, 2010
1 parent 2c003f5 commit af87998
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 11 deletions.
6 changes: 3 additions & 3 deletions apps/feedback/helpers.py
Expand Up @@ -23,7 +23,7 @@ def locale_name(locale, native=False, default=_lazy('unknown')):


@register.function
def smiley(style):
def smiley(style, page=None):
"""
Renders a smiley.
Expand All @@ -38,5 +38,5 @@ def smiley(style):
character = '☹'
title = _('Issue')
return jinja2.Markup(
u'<span title="%s" class="smiley %s">%s</span>' % (
title, style, character))
u'<span title="%s" class="smiley %s %s">%s</span>' % (
title, style, page, character))
2 changes: 1 addition & 1 deletion apps/feedback/templates/feedback/feedback.html
Expand Up @@ -5,7 +5,7 @@

{% block content %}

{{ smiley(positive and "happy" or "sad") }}
{{ smiley(positive and "happy" or "sad", "feedback_submit") }}

<div id="feedbackform">
{% if positive %}
Expand Down
26 changes: 26 additions & 0 deletions apps/feedback/templates/feedback/index.html
@@ -0,0 +1,26 @@
{% extends "base_noheader.html" %}

{% block page_title %}{{ _('Submit Feedback') }}{% endblock %}
{% block body_id %}feedback{% endblock %}

{% block content %}
<h1>{{ _('It\'s great to hear you want to help Mozilla make your experience better!') }}</h1>

<h4>{{ _('Please choose one of the following types of feedback that you would like to submit to us:') }}</h4>

<div class="feedback_index happy">
<a href="happy"><div
title="{{ _('Firefox makes me happy because ...') }}"
class="smiley happy feedback_index">&#9786;</div></a>
<p>{{ _('Firefox makes me happy because ...') }}</p>
</div>
<div class="feedback_index sad">
<a href="sad"><div
title="{{ _('Firefox makes me sad because ...') }}"
class="smiley sad feedback_index">&#9786;</div></a>
<p>{{ _('Firefox makes me sad because ...') }}</p>
</div>

<h4><img src="http://mozcom-cdn.mozilla.net/img/tignish/about/logo/download/logo-only-preview.png" align="absmiddle"/>If you need help or have a problem with Firefox, please visit our <a href="http://support.mozilla.com">support page</a>.</h4>

{% endblock %}
2 changes: 1 addition & 1 deletion apps/feedback/templates/feedback/mobile/feedback.html
Expand Up @@ -8,7 +8,7 @@

<div id="feedbackform">
<h2>
{{ smiley(positive and "happy" or "sad") }}
{{ smiley(positive and "happy" or "sad", "feedback_index_mobile") }}
{% if positive %}
{{ _('Super! Please tell us more!') }}
{% else %}
Expand Down
25 changes: 25 additions & 0 deletions apps/feedback/templates/feedback/mobile/index.html
@@ -0,0 +1,25 @@
{% extends "base_mobile_old.html" %}

{% block page_title %}{{ _('Submit Feedback') }}{% endblock %}
{% block body_id %}feedback{% endblock %}
{% block global_header %}{% endblock %}

{% block content %}
<h1>{{ _('Thanks for helping Mozilla make your experience better!') }}</h1>

<p>{{ _('Please choose the type of feedback that you would like to submit to us:') }}</p>

<div class="feedback_index happy">
<a href="happy" title="{{ _('Firefox makes me happy ...') }}"><div
class="smiley happy feedback_index">&#9786;</div></a>
<p>{{ _('Firefox makes me happy ...') }}</p>
</div>
<div class="feedback_index sad">
<a href="sad" title="{{ _('Firefox makes me sad ...') }}"><div
class="smiley sad feedback_index">&#9786;</div></a>
<p>{{ _('Firefox makes me sad ...') }}</p>
</div>

<p style="clear:both;">If you need help or have a problem with Firefox, please visit our <a href="http://support.mozilla.com">support page</a>.</p>

{% endblock %}
1 change: 1 addition & 0 deletions apps/feedback/urls.py
Expand Up @@ -5,6 +5,7 @@
name='feedback.sad'),
url(r'^happy/?', 'give_feedback', {'positive': True},
name='feedback.happy'),
url(r'^feedback/?', 'feedback', name='feedback.index'),
url(r'^thanks/?', 'thanks', name='feedback.thanks'),
url(r'^download/?', 'need_beta', name='feedback.need_beta'),
url(r'^opinion/(?P<id>\d+)$', 'opinion_detail', name='opinion.detail'),
Expand Down
10 changes: 10 additions & 0 deletions apps/feedback/views.py
Expand Up @@ -76,6 +76,16 @@ def give_feedback(request, ua, positive):
return jingo.render(request, template, data)


@cache_page
def feedback(request):
"""The index page for feedback, which shows links to the happy and sad
feedback pages.
"""
template = 'feedback/%sindex.html' % (
'mobile/' if request.mobile_site else '')
return jingo.render(request, template)


@cache_page
def need_beta(request):
"""Encourage people to download a current beta version."""
Expand Down
19 changes: 16 additions & 3 deletions media/css/mobile.css
Expand Up @@ -70,18 +70,18 @@ body.mobile {
}

/** Feedback pages */
.mobile #feedbackform .smiley {
.mobile#feedback .smiley {
background: url(../img/smilies60.png) no-repeat left top;
display: block;
margin-right: 1em;
height: 60px;
width: 60px;
position: static;
}
.mobile #feedbackform .smiley.sad {
.mobile#feedback .smiley.sad {
background-position: 0 0;
}
.mobile #feedbackform .smiley.happy {
.mobile#feedback .smiley.happy {
background-position: 0 -110px;
}
.mobile#feedback #feedbackform {
Expand All @@ -101,6 +101,19 @@ body.mobile {
margin-top: 1em;
margin-right: 15px;
}
.mobile#feedbackform .feedback_index.smiley {
vertical-align: top;
}
.mobile#feedback .feedback_index {
float: left;
margin: 15px 0;
padding: 0 8px !important;
position: relative;
}
.mobile#feedback .feedback_index p {
font-size: 1em;
padding-top: 10px;
}

/** Need Beta */
.mobile#need-beta #doc {
Expand Down
21 changes: 18 additions & 3 deletions media/css/reporter.css
Expand Up @@ -557,16 +557,27 @@ input.placeholder {
background: url(../img/smilies228.png) no-repeat left top;
height: 228px;
width: 228px;
position: absolute;
top: 80px;
left: 0;
}
#feedback .smiley.sad {
background-position: 0 0;
}
#feedback .smiley.happy {
background-position: 0 -278px;
}
#feedback .feedback_submit {
position: absolute;
top: 80px;
left: 0;
}
#feedback .feedback_index {
float: left;
margin: 15px 0;
padding: 0 50px;
position: relative;
}
#feedback .feedback_index p {
font-size: 1.25em;
}
#feedback #feedbackform {
margin: 6em 0 0 30%;
}
Expand Down Expand Up @@ -599,6 +610,10 @@ input.placeholder {
display: block;
padding-top: 10px;
}
#feedback .support {
background: transparent url(http://mozcom-cdn.mozilla.net/img/tignish/about/logo/download/logo-only-preview.png) 5px center no-repeat;
padding-left: 50px;
}
/* }}} */
/* {{{ Thank you page */
#thanks #main-content h1 {
Expand Down

0 comments on commit af87998

Please sign in to comment.