From 31889c3ac1f70fc78d2e1143930ee2c97d7dee6f Mon Sep 17 00:00:00 2001 From: Chris Van Date: Mon, 28 Nov 2011 19:55:46 -0800 Subject: [PATCH] get rid of pretty apps devhub landing page (bug 705976) --- apps/amo/context_processors.py | 7 +- apps/amo/templates/amo/breadcrumbs.html | 2 +- apps/amo/tests/__init__.py | 15 +- apps/devhub/helpers.py | 8 +- apps/devhub/templates/devhub/index.html | 16 ++ apps/devhub/templates/devhub/index_apps.html | 156 ------------------- apps/devhub/templates/devhub/nav.html | 2 +- apps/devhub/tests/test_views.py | 53 ++++++- apps/devhub/tests/test_views_validation.py | 3 +- apps/devhub/views.py | 13 +- apps/users/tests/test_views.py | 2 +- apps/users/views.py | 4 +- templates/impala/user_login.html | 4 +- 13 files changed, 95 insertions(+), 190 deletions(-) delete mode 100644 apps/devhub/templates/devhub/index_apps.html diff --git a/apps/amo/context_processors.py b/apps/amo/context_processors.py index c8828ac0dd..6ef7bc0a92 100644 --- a/apps/amo/context_processors.py +++ b/apps/amo/context_processors.py @@ -75,7 +75,7 @@ def global_settings(request): 'href': reverse('devhub.submit.1')}) if waffle.flag_is_active(request, 'accept-webapps'): - if request.amo_user.is_developer: + if settings.APP_PREVIEW or request.amo_user.is_developer: tools_links.append({'text': _('Manage My Apps'), 'href': reverse('devhub.apps')}) tools_links.append({'text': _('Submit a New App'), @@ -86,8 +86,9 @@ def global_settings(request): tools_links.append({'text': 'Submit a New Persona', 'href': reverse('devhub.personas.submit')}) - tools_links.append({'text': _('Developer Hub'), - 'href': reverse('devhub.index')}) + if not settings.APP_PREVIEW: + tools_links.append({'text': _('Developer Hub'), + 'href': reverse('devhub.index')}) if acl.action_allowed(request, 'Editors', '%'): tools_links.append({'text': _('Editor Tools'), diff --git a/apps/amo/templates/amo/breadcrumbs.html b/apps/amo/templates/amo/breadcrumbs.html index f59bd30720..2d8976f33e 100644 --- a/apps/amo/templates/amo/breadcrumbs.html +++ b/apps/amo/templates/amo/breadcrumbs.html @@ -1,5 +1,5 @@ {% if breadcrumbs %} -