diff --git a/apps/addons/buttons.py b/apps/addons/buttons.py
index c4a528ed527..0f1db754cb6 100644
--- a/apps/addons/buttons.py
+++ b/apps/addons/buttons.py
@@ -34,7 +34,8 @@ def install_button(context, addon, version=None, show_eula=True,
addon.id in request.amo_user.mobile_addons)
c = {'button': button, 'addon': addon, 'version': button.version,
'installed': installed}
- t = jingo.render_to_string(request, 'addons/button.html', c)
+ template = 'addons/mobile/button.html' if request.MOBILE else 'addons/button.html'
+ t = jingo.render_to_string(request, template, c)
return jinja2.Markup(t)
diff --git a/apps/addons/templates/addons/button.html b/apps/addons/templates/addons/button.html
index c64a8623842..9c9966a7bb0 100644
--- a/apps/addons/templates/addons/button.html
+++ b/apps/addons/templates/addons/button.html
@@ -2,7 +2,7 @@
{% set _obj = version if amo.HAS_COMPAT[addon.type] else addon %}
{% set compat = _obj.compatible_apps[APP] if _obj else None %}
-
+
+ {% set links = b.links() %}
+ {% if not links %}
+
+ {{ _('No compatible versions') }}
+
+ {% endif %}
+ {% for link in links %}
+ {% set extra = "platform " + link.os.shortname if link.os else "" %}
+
+ {% endfor %}
+
+ {% if False %}
+ - {{ _('Requires Newer Version of Firefox') }}
+ {% endif %}
+ {% if settings.PERF_THRESHOLD and addon.ts_slowness >= settings.PERF_THRESHOLD %}
+ - {{ _('May Slow Down Your Browser') }}
+ {% endif %}
+ {% if files and files[0].no_restart %}
+ - {{ _('No Restart Required') }}
+ {% endif %}
+
+ {% if addon.privacy_policy %}
+
+ {{ _('View privacy policy') }}
+
+ {% endif %}
+
{# install #}
+
diff --git a/apps/addons/templates/addons/mobile/details.html b/apps/addons/templates/addons/mobile/details.html
index aaa0714c231..b95cd108413 100644
--- a/apps/addons/templates/addons/mobile/details.html
+++ b/apps/addons/templates/addons/mobile/details.html
@@ -8,10 +8,8 @@
{{ addon.name }}
{# TODO: make this a secret link #}
{{ _('by') }} {{ users_list(addon.listed_authors) }}
-
-
Add to Firefox
- {# TODO: privacy policy (in button.html right now) #}
-
+ {{ big_install_button(addon, show_warning=False) }}
+ {# TODO: privacy policy (in button.html right now) #}
diff --git a/apps/versions/helpers.py b/apps/versions/helpers.py
index 953a39f0a1d..b4a694537b2 100644
--- a/apps/versions/helpers.py
+++ b/apps/versions/helpers.py
@@ -12,5 +12,6 @@ def version_detail(context, addon, version, src,
@jingo.register.inclusion_tag('versions/mobile/version.html')
-def mobile_version_detail(addon, version, src):
- return locals()
+@jinja2.contextfunction
+def mobile_version_detail(context, addon, version, src):
+ return new_context(**locals())
diff --git a/apps/versions/templates/versions/mobile/version.html b/apps/versions/templates/versions/mobile/version.html
index 68986938e8e..63fcecf7ee3 100644
--- a/apps/versions/templates/versions/mobile/version.html
+++ b/apps/versions/templates/versions/mobile/version.html
@@ -35,8 +35,5 @@
{{ _('Works with:') }}
{% endif %}
-
-
Add to Firefox
- {# TODO: privacy policy (in button.html right now) #}
-
+ {{ big_install_button(addon, version=version) }}
diff --git a/media/css/zamboni/mobile.css b/media/css/zamboni/mobile.css
index a3e698b81c7..419b4332809 100644
--- a/media/css/zamboni/mobile.css
+++ b/media/css/zamboni/mobile.css
@@ -77,8 +77,15 @@ h1, h2, h3,
.moz-menu {
font-family: Georgia, serif;
}
+a:link {
+ font-family: Georgia, serif;
+ color: #447bc4;
+ text-decoration: none;
+}
.num_ratings,
-.review .old-version {
+.review .old-version,
+.install-wrapper,
+.install-wrapper a {
font-family: "Droid Sans", sans-serif;
}
#content h2 {
@@ -93,11 +100,6 @@ h1, h2, h3,
.copy p {
color: #444;
}
-a:link {
- font-family: Georgia, serif;
- color: #447bc4;
- text-decoration: none;
-}
/************************************/
/* GRADIENTS */
@@ -836,17 +838,19 @@ td .versions li a {
/* BUTTONS */
/************************************/
-.installer {
+.install-wrapper {
margin: 10px 0 4px;
padding-top: 8px;
+ text-align: center;
+ font-weight: bold;
}
-.infobox .installer {
+.infobox .install-wrapper {
border-top: 2px solid #fff;
box-shadow: 0 -1px #ccc;
}
-.button {
+.button, a.button {
-moz-transition: -moz-box-shadow 0.3s ease 0s;
background-image: -moz-linear-gradient(#669BE1, #5784BF) repeat scroll 0 0 transparent;
background-image: -webkit-gradient(
@@ -910,7 +914,7 @@ td .versions li a {
0 0 100px rgba(255, 255, 255, 0.2) inset;
}
-.button.install {
+.button.add {
background-color: #84C63C;
background-image: -moz-linear-gradient(#84C63C, #489615);
background-image: -webkit-gradient(
@@ -923,7 +927,7 @@ td .versions li a {
color: #fff;
padding-left: 40px;
}
-.button.install:before {
+.button.add:before {
content: " ";
display: block;
width: 24px;
@@ -931,16 +935,79 @@ td .versions li a {
position: absolute;
left: 14px;
top: 10px;
- background: url(../../img/zamboni/mobile/install.svg) no-repeat center center;
-}
-
-.button.install.disabled {
+ background: url(../../img/zamboni/mobile/install.svg) no-repeat top left;
+}
+
+.button.warning {
+ background-attachment: scroll, scroll;
+ background-clip: border-box, border-box;
+ background-color: transparent;
+ background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.25)),
+ url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGlJREFUeNqc0cEJACEMRFFNARaw/RexFe1dG3AjCBJJYDL/kNtjDqn9lRLUnlrixjd5qVdo6WNQOhiXN05Jg7PyYEJuzMmFaRn+GZG6KrQMlxHpY1A6GJc3TkmDs/JgQm7MyYVpqf0CDABVcj3T2ITzOAAAAABJRU5ErkJggg==);
+ background-origin: padding-box, padding-box;
+ background-position: 0 0%, 0 0;
+ background-repeat: repeat, repeat;
+ background-size: auto auto, auto auto;
+ color: #333333;
+ text-shadow: 0 -1px 0 rgba(255, 255, 255, 0.5);
+ top: 0;
+}
+.button.add.warning:before {
+ background: url(../../img/zamboni/mobile/install.svg) no-repeat 0 -50px;
+}
+.button.disabled {
background: -moz-linear-gradient(#d1d4d7, #c1c5ca);
color: #fff;
-moz-box-shadow: 0 3px rgba(0, 0, 0, 0.05),
0 -4px rgba(0, 0, 0, 0.05) inset;
top: 0;
}
+.button.add.disabled:before {
+ background: url(../../img/zamboni/mobile/install.svg) no-repeat top left;
+}
+
+/** Button Badges */
+
+.badges {
+ margin-top: 8px;
+}
+.badges a, .badges li {
+ display: block;
+ color: black;
+}
+.badges li {
+ border: 1px solid #ddd;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ margin-bottom: 8px;
+ font-size: .8em;
+ line-height: 20px;
+ height: 20px;
+ background: #fff;
+}
+.badges .error {
+ background-color: #edd4d2;
+ border-color: #ac9a98;
+}
+.badges .warning {
+ background-color: #fef9d7;
+ border-color: #bebaa1;
+}
+.install .privacy-policy {
+ display: block;
+ margin-top: 12px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ height: 27px;
+ font-size: .9em;
+ color: black;
+ line-height: 25px;
+ border: 1px solid #ccc;
+ background-color: #e6e6e6;
+ background-image: -moz-linear-gradient(#e6e6e6, #d3d3d3);
+}
/************************************/
/* REVIEWS */
diff --git a/media/img/zamboni/mobile/install.svg b/media/img/zamboni/mobile/install.svg
index c8f00bfee36..46b0ea44064 100644
--- a/media/img/zamboni/mobile/install.svg
+++ b/media/img/zamboni/mobile/install.svg
@@ -1,3 +1,5 @@
-