added marketplace UI prototype
This commit is contained in:
Родитель
3f4982aa6b
Коммит
89139b49a7
|
@ -13,3 +13,6 @@
|
|||
[submodule "vendor"]
|
||||
path = vendor
|
||||
url = git://github.com/mozilla/zamboni-lib.git
|
||||
[submodule "media/marketplace-experiments/bootstrap"]
|
||||
path = media/marketplace-experiments/bootstrap
|
||||
url = git://github.com/mozilla/bootstrap.git
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
from django.conf.urls.defaults import patterns, url
|
||||
|
||||
from jingo.views import direct_to_template
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url('^$', direct_to_template,
|
||||
{'template': 'marketplace-experiments/base.html'},
|
||||
name='mrkt.index'),
|
||||
)
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 5c62c23ebe5e88e89d9a3060e106095a2d7e2094
|
|
@ -0,0 +1,2 @@
|
|||
INSERT INTO waffle_switch (name, active) VALUES ('market-ui-experiments', 0);
|
||||
|
10
settings.py
10
settings.py
|
@ -221,8 +221,9 @@ ADMIN_MEDIA_PREFIX = '/admin-media/'
|
|||
|
||||
# paths that don't require an app prefix
|
||||
SUPPORTED_NONAPPS = ('admin', 'apps', 'blocklist', 'developers', 'editors',
|
||||
'img', 'jsi18n', 'localizers', 'media', 'robots.txt',
|
||||
'statistics', 'services')
|
||||
'img', 'jsi18n', 'localizers', 'media',
|
||||
'marketplace-experiments', 'robots.txt', 'statistics',
|
||||
'services')
|
||||
DEFAULT_APP = 'firefox'
|
||||
|
||||
# paths that don't require a locale prefix
|
||||
|
@ -350,6 +351,7 @@ INSTALLED_APPS = (
|
|||
'files',
|
||||
'jingo_minify',
|
||||
'market',
|
||||
'marketplace-experiments',
|
||||
'localizers',
|
||||
'pages',
|
||||
'perf',
|
||||
|
@ -553,6 +555,8 @@ MINIFY_BUNDLES = {
|
|||
'css/zamboni/admin-mozilla.css',
|
||||
'css/zamboni/admin_features.css'
|
||||
),
|
||||
'marketplace-experiments': (
|
||||
),
|
||||
},
|
||||
'js': {
|
||||
# JS files common to the entire site (pre-impala).
|
||||
|
@ -834,6 +838,8 @@ MINIFY_BUNDLES = {
|
|||
'js/lib/less-1.1.4.js',
|
||||
'js/debug/less_live.js',
|
||||
),
|
||||
'marketplace-experiments': (
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ LANG }}" dir="{{ DIR }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
{% if not settings.ENGAGE_ROBOTS %}
|
||||
<meta name="robots" content="noindex">
|
||||
{% endif %}
|
||||
{% block extrameta %}{% endblock %}
|
||||
<title>{% block title %}{{ _('Mozilla Marketplace') }}{% endblock %}</title>
|
||||
|
||||
<link rel="shortcut icon" type="image/x-icon"
|
||||
href="{{ MEDIA_URL}}img/favicon.ico">
|
||||
|
||||
{# L10n: {0} is an application, like Firefox. #}
|
||||
<link title="{{ _('{0} Add-ons')|f(APP.pretty) }}"
|
||||
rel="search" type="application/opensearchdescription+xml"
|
||||
href="{{ url('amo.opensearch') }}" />
|
||||
|
||||
{% block site_css %}
|
||||
{{ css('marketplace-experiments') }}
|
||||
<!--[if lt IE 9]>
|
||||
<script src="{{ media('js/lib/iepp.min.js') }}"></script>
|
||||
<![endif]-->
|
||||
<!--[if lte IE 9]>
|
||||
<link rel="stylesheet" href="{{ media('css/legacy/ie9.css') }}">
|
||||
<![endif]-->
|
||||
{% endblock %}
|
||||
|
||||
{% block extrahead %}{% endblock %}
|
||||
|
||||
{% if request.user.is_authenticated() %}
|
||||
<meta name="csrf" content="{{ csrf_token }}">
|
||||
{% endif %}
|
||||
</head>
|
||||
<body class="html-{{ DIR }} {% block bodyclass %}{% endblock %}"
|
||||
data-anonymous="{{ (not request.user.is_authenticated())|json }}"
|
||||
data-readonly="{{ settings.READ_ONLY|json }}"
|
||||
data-media-url="{{ MEDIA_URL }}"
|
||||
{% if waffle.switch('marketplace') and request.amo_user %}
|
||||
data-purchases="{{ request.amo_user.purchase_ids()|join(",") }}"
|
||||
{% endif %}
|
||||
data-collect-timings="{{ url('amo.timing.record') }}:{{ collect_timings_percent }}"
|
||||
{% block bodyattrs %}{% endblock %}>
|
||||
|
||||
<header id="#site-header">
|
||||
</header>
|
||||
|
||||
<div id="page" class="c">
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
</footer>
|
||||
|
||||
{# js #}
|
||||
{% block site_js %}
|
||||
<script src="{{ static(url('jsi18n')) }}"></script>
|
||||
{% if settings.APP_PREVIEW %}
|
||||
<script src="https://myapps.mozillalabs.com/jsapi/include.js"></script>
|
||||
{% endif %}
|
||||
{% if waffle.switch('browserid-login') %}
|
||||
<script async defer src="https://browserid.org/include.js"></script>
|
||||
{% endif %}
|
||||
{{ js('marketplace-experiments') }}
|
||||
<script async defer src="{{ static(url('addons.buttons.js')) }}"></script>
|
||||
<script async defer src="{{ settings.PAYPAL_JS_URL }}"></script>
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
7
urls.py
7
urls.py
|
@ -166,6 +166,13 @@ urlpatterns = patterns('',
|
|||
|
||||
)
|
||||
|
||||
# Marketplace UI Experiments
|
||||
if settings.POTCH_MARKETPLACE_EXPERIMENTS:
|
||||
urlpatterns += patterns('',
|
||||
('^marketplace-experiments/', include('marketplace-experiments.urls'))
|
||||
)
|
||||
|
||||
|
||||
urlpatterns += patterns('piston.authentication.oauth.views',
|
||||
url(r'^oauth/request_token/$', 'get_request_token',
|
||||
name='oauth.request_token'),
|
||||
|
|
Загрузка…
Ссылка в новой задаче