list price of add-ons/apps on devhub dashboard (bug 705923)
This commit is contained in:
Родитель
20f581c3a2
Коммит
5a61aefbda
|
@ -1,3 +1,5 @@
|
|||
{% from 'addons/macros.html' import price %}
|
||||
|
||||
{% macro dev_heading(addon, amo) %}
|
||||
<h3>
|
||||
{% set is_complete = not addon.is_incomplete() %}
|
||||
|
@ -27,4 +29,7 @@
|
|||
{% endwith %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if waffle.switch('marketplace') %}
|
||||
<p>{{ price(addon) }}</p>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
|
|
@ -259,6 +259,7 @@ class TestDashboard(HubTest):
|
|||
assert 'Statistics' not in links, ('Unexpected: %r' % links)
|
||||
|
||||
def test_public_addon(self):
|
||||
waffle.models.Switch.objects.create(name='marketplace', active=True)
|
||||
addon = Addon.objects.get(id=self.clone_addon(1)[0])
|
||||
eq_(addon.status, amo.STATUS_PUBLIC)
|
||||
doc = pq(self.client.get(self.url).content)
|
||||
|
@ -266,11 +267,13 @@ class TestDashboard(HubTest):
|
|||
assert item.find('h3 a'), 'Expected link to add-on'
|
||||
assert item.find('p.downloads'), 'Expected weekly downloads'
|
||||
assert item.find('p.users'), 'Expected ADU'
|
||||
assert item.find('.price'), 'Expected price'
|
||||
assert item.find('.item-details'), 'Expected item details'
|
||||
assert not item.find('p.incomplete'), (
|
||||
'Unexpected message about incomplete add-on')
|
||||
|
||||
def test_public_app(self):
|
||||
waffle.models.Switch.objects.create(name='marketplace', active=True)
|
||||
waffle.models.Flag.objects.create(name='accept-webapps', everyone=True)
|
||||
app = Addon.objects.get(id=self.clone_addon(1)[0])
|
||||
app.update(type=amo.ADDON_WEBAPP)
|
||||
|
@ -278,17 +281,20 @@ class TestDashboard(HubTest):
|
|||
item = doc('.item[data-addonid=%s]' % app.id)
|
||||
assert item.find('p.downloads'), 'Expected weekly downloads'
|
||||
assert not item.find('p.users'), 'Unexpected ADU'
|
||||
assert item.find('.price'), 'Expected price'
|
||||
assert item.find('.item-details'), 'Expected item details'
|
||||
assert not item.find('p.incomplete'), (
|
||||
'Unexpected message about incomplete add-on')
|
||||
|
||||
def test_incomplete_addon(self):
|
||||
waffle.models.Switch.objects.create(name='marketplace', active=True)
|
||||
addon = Addon.objects.get(id=self.clone_addon(1)[0])
|
||||
addon.update(status=amo.STATUS_NULL)
|
||||
doc = pq(self.client.get(self.url).content)
|
||||
item = doc('.item[data-addonid=%s]' % addon.id)
|
||||
assert not item.find('h3 a'), 'Unexpected link to add-on'
|
||||
assert not item.find('.item-details'), 'Unexpected item details'
|
||||
assert not item.find('.price'), 'Expected price'
|
||||
assert item.find('p.incomplete'), (
|
||||
'Expected message about incompleted add-on')
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@import 'lib';
|
||||
@import '../impala/lib';
|
||||
|
||||
.compat-error {
|
||||
background: url(../../img/zamboni/notifications.png) 0px -164px no-repeat;
|
|
@ -1,4 +1,4 @@
|
|||
@import 'lib';
|
||||
@import '../impala/lib';
|
||||
|
||||
#dashboard .island {
|
||||
float: left;
|
|
@ -1,4 +1,4 @@
|
|||
@import 'lib';
|
||||
@import '../impala/lib';
|
||||
|
||||
.items:first-child .item:first-child {
|
||||
.info, .action {
|
||||
|
@ -25,9 +25,14 @@
|
|||
padding-left: 2%;
|
||||
width: 30%;
|
||||
.downloads,
|
||||
.users {
|
||||
.users,
|
||||
.price {
|
||||
color: @green;
|
||||
}
|
||||
.price {
|
||||
font-size: 11px;
|
||||
line-height: 13px;
|
||||
}
|
||||
p {
|
||||
font-size: 13px;
|
||||
line-height: 15px;
|
|
@ -1,4 +1,4 @@
|
|||
@import 'lib';
|
||||
@import '../impala/lib';
|
||||
|
||||
.packager aside {
|
||||
background: url(../../img/developers/addon-packager.png) 50% 0 no-repeat;
|
|
@ -1,4 +1,4 @@
|
|||
@import 'lib';
|
||||
@import '../impala/lib';
|
||||
|
||||
.tooltip.ajax-loading {
|
||||
.background-size(auto 12px);
|
18
settings.py
18
settings.py
|
@ -501,19 +501,19 @@ MINIFY_BUNDLES = {
|
|||
'css/zamboni/developers.css',
|
||||
'css/zamboni/docs.less',
|
||||
'css/impala/developers.less',
|
||||
'css/impala/devhub-packager.less',
|
||||
'css/impala/devhub-listing.less',
|
||||
'css/impala/devhub-popups.less',
|
||||
'css/impala/devhub-compat.less',
|
||||
'css/devhub/packager.less',
|
||||
'css/devhub/listing.less',
|
||||
'css/devhub/popups.less',
|
||||
'css/devhub/compat.less',
|
||||
'css/impala/formset.less',
|
||||
'css/devhub/forms.less',
|
||||
),
|
||||
'zamboni/devhub_impala': (
|
||||
'css/impala/developers.less',
|
||||
'css/impala/devhub-listing.less',
|
||||
'css/impala/devhub-popups.less',
|
||||
'css/impala/devhub-compat.less',
|
||||
'css/impala/devhub-dashboard.less',
|
||||
'css/devhub/listing.less',
|
||||
'css/devhub/popups.less',
|
||||
'css/devhub/compat.less',
|
||||
'css/devhub/dashboard.less',
|
||||
'css/devhub/forms.less',
|
||||
),
|
||||
'zamboni/editors': (
|
||||
|
@ -526,7 +526,7 @@ MINIFY_BUNDLES = {
|
|||
'zamboni/mobile': (
|
||||
'css/zamboni/mobile.css',
|
||||
'css/mobile/typography.less',
|
||||
'css/zamboni/mobile-forms.less',
|
||||
'css/mobile/forms.less',
|
||||
'css/mobile/header.less',
|
||||
'css/mobile/search.less',
|
||||
'css/mobile/listing.less',
|
||||
|
|
Загрузка…
Ссылка в новой задаче