diff --git a/kuma/landing/views.py b/kuma/landing/views.py index 645ece0a2bb..8216f563261 100644 --- a/kuma/landing/views.py +++ b/kuma/landing/views.py @@ -87,7 +87,6 @@ def promote_buttons(request): Disallow: /*$translate Disallow: /*$locales Disallow: /*$json -Disallow: /*$styles Disallow: /*$toc Disallow: /*$move Disallow: /*$quick-review diff --git a/kuma/settings/common.py b/kuma/settings/common.py index 9473df4023b..3670b4c3a92 100644 --- a/kuma/settings/common.py +++ b/kuma/settings/common.py @@ -749,72 +749,6 @@ def pipeline_one_scss(slug, **kwargs): 'output_filename': 'build/styles/wiki-compat-tables.css', 'template_name': 'pipeline/javascript-array.jinja', }, - 'zone-addons': { - 'source_filenames': ( - 'styles/zone-addons.scss', - ), - 'output_filename': 'build/styles/zone-addons.css', - }, - 'zone-apps': { - 'source_filenames': ( - 'styles/zone-apps.scss', - ), - 'output_filename': 'build/styles/zone-apps.css', - }, - 'zone-archive': { - 'source_filenames': ( - 'styles/zone-archive.scss', - ), - 'output_filename': 'build/styles/zone-archive.css', - }, - 'zone-b2g': { - 'source_filenames': ( - 'styles/zone-b2g.scss', - ), - 'output_filename': 'build/styles/zone-b2g.css', - }, - 'zone-connect': { - 'source_filenames': ( - 'styles/zone-connect.scss', - ), - 'output_filename': 'build/styles/zone-connect.css', - }, - 'zone-firefox': { - 'source_filenames': ( - 'styles/zone-firefox.scss', - ), - 'output_filename': 'build/styles/zone-firefox.css', - }, - 'zone-games': { - 'source_filenames': ( - 'styles/zone-games.scss', - ), - 'output_filename': 'build/styles/zone-games.css', - }, - 'zone-learn': { - 'source_filenames': ( - 'styles/zone-learn.scss', - ), - 'output_filename': 'build/styles/zone-learn.css', - }, - 'zone-marketplace': { - 'source_filenames': ( - 'styles/zone-marketplace.scss', - ), - 'output_filename': 'build/styles/zone-marketplace.css', - }, - 'zone-ten': { - 'source_filenames': ( - 'styles/zone-ten.scss', - ), - 'output_filename': 'build/styles/zone-ten.css', - }, - 'zones': { - 'source_filenames': ( - 'styles/zones.scss', - ), - 'output_filename': 'build/styles/zones.css', - }, 'users': { 'source_filenames': ( 'styles/users.scss', diff --git a/kuma/static/js/wiki-skinny.js b/kuma/static/js/wiki-skinny.js index 6364a974524..f704f9e068a 100644 --- a/kuma/static/js/wiki-skinny.js +++ b/kuma/static/js/wiki-skinny.js @@ -16,56 +16,6 @@ $quickLinks.find('.toggleable').mozTogglers(); })(); - /* - Set up the zone subnav accordion - */ - $('.subnav').each(function() { - var $subnav = $(this); - var $subnavList = $subnav.find(' > ol'); - var minHeightFn = $('.zone-landing-header-preview-base').length ? setMinHeight : noop; - - if (!$subnavList.length) { - return; // Exit if the subnav isn't set up properly - } - - // Set the list items as togglers where needed - setupTogglers($subnavList.find('li')); - - // Make them toggleable! - $subnavList.find('.toggleable').mozTogglers({ - slideCallback: minHeightFn - }); - - // Try to find the current page in the list, if found, open it - // Need to keep track of the elements we've found so they aren't found twice - var used = []; - var $selected = $subnavList.find('a[href$="' + doc.location.pathname + '"]'); - $selected.each(function() { - var self = this; - var $togglers = $(this).parents('.toggleable').find('.toggler'); - - $togglers.each(function() { - if ($.contains($(this).parent('li').get(0), self) && used.indexOf(this) === -1) { - $(this).trigger('mdn:click'); - used.push(this); - } - }); - }).parent().addClass('current'); - - // Mark this is an accordion so the togglers open/close properly - $subnavList.addClass('accordion'); - - function noop(){} - function setMinHeight() { - if ($('.zone-landing-header-preview-base').css('position') === 'absolute') { - $('.wiki-main-content').css('min-height', $subnav.height()); - } - } - - minHeightFn(); - }); - - /* Subscribe / unsubscribe to an article */ diff --git a/kuma/static/js/wiki.js b/kuma/static/js/wiki.js index 67d6c5498a5..83ce5915bbc 100644 --- a/kuma/static/js/wiki.js +++ b/kuma/static/js/wiki.js @@ -16,56 +16,6 @@ $quickLinks.find('.toggleable').mozTogglers(); })(); - /* - Set up the zone subnav accordion - */ - $('.subnav').each(function() { - var $subnav = $(this); - var $subnavList = $subnav.find(' > ol'); - var minHeightFn = $('.zone-landing-header-preview-base').length ? setMinHeight : noop; - - if (!$subnavList.length) { - return; // Exit if the subnav isn't set up properly - } - - // Set the list items as togglers where needed - setupTogglers($subnavList.find('li')); - - // Make them toggleable! - $subnavList.find('.toggleable').mozTogglers({ - slideCallback: minHeightFn - }); - - // Try to find the current page in the list, if found, open it - // Need to keep track of the elements we've found so they aren't found twice - var used = []; - var $selected = $subnavList.find('a[href$="' + doc.location.pathname + '"]'); - $selected.each(function() { - var self = this; - var $togglers = $(this).parents('.toggleable').find('.toggler'); - - $togglers.each(function() { - if ($.contains($(this).parent('li').get(0), self) && used.indexOf(this) === -1) { - $(this).trigger('mdn:click'); - used.push(this); - } - }); - }).parent().addClass('current'); - - // Mark this is an accordion so the togglers open/close properly - $subnavList.addClass('accordion'); - - function noop(){} - function setMinHeight() { - if ($('.zone-landing-header-preview-base').css('position') === 'absolute') { - $('.wiki-main-content').css('min-height', $subnav.height()); - } - } - - minHeightFn(); - }); - - /* Subscribe / unsubscribe to an article */ diff --git a/kuma/wiki/admin.py b/kuma/wiki/admin.py index da20838cc74..8873aa10bc2 100644 --- a/kuma/wiki/admin.py +++ b/kuma/wiki/admin.py @@ -24,7 +24,7 @@ from .decorators import check_readonly from .forms import RevisionAkismetSubmissionAdminForm from .models import (Document, DocumentDeletionLog, DocumentSpamAttempt, - DocumentTag, DocumentZone, EditorToolbar, Revision, + DocumentTag, EditorToolbar, Revision, RevisionAkismetSubmission, RevisionIP) @@ -378,11 +378,6 @@ class DocumentTagAdmin(admin.ModelAdmin): ordering = ('name',) -@admin.register(DocumentZone) -class DocumentZoneAdmin(admin.ModelAdmin): - raw_id_fields = ('document',) - - @admin.register(DocumentSpamAttempt) class DocumentSpamAttemptAdmin(admin.ModelAdmin): list_display = [ diff --git a/kuma/wiki/jinja2/wiki/document.html b/kuma/wiki/jinja2/wiki/document.html index 06844168244..b4d88896b86 100644 --- a/kuma/wiki/jinja2/wiki/document.html +++ b/kuma/wiki/jinja2/wiki/document.html @@ -1,7 +1,7 @@ {% extends "wiki/base.html" %} {% block title %}{{ page_title(document.title + seo_parent_title) }}{% endblock %} -{% from "wiki/includes/document_macros.html" import build_document_crumbs, get_document_quick_links, get_document_subnav, document_watch, contributor_links with context %} +{% from "wiki/includes/document_macros.html" import build_document_crumbs, get_document_quick_links, document_watch, contributor_links with context %} {% from "wiki/includes/buttons.html" import get_document_buttons with context %} {% from "wiki/includes/approvals.html" import get_approvals_html with context %} @@ -20,11 +20,7 @@ {% set approvals_html = get_approvals_html(document, request.user) %} {% endif %} -{% set nearest_zone = document.nearest_zone %} -{% set is_zone = nearest_zone %} -{% set is_zone_root = document.is_zone_root %} - -{% set show_left = zone_subnav_html or quick_links_html or approvals_html %} +{% set show_left = quick_links_html or approvals_html %} {% set buttons = get_document_buttons(document, help_link, other_translations) %} {% set crumbs = build_document_crumbs(document) %} @@ -43,20 +39,13 @@ {%- endif -%} {% endblock %} -{% block bodyclass %}document {% if is_zone %}zone{% endif %} {% if is_zone_root %}zone-landing{% endif %}{% endblock %} +{% block bodyclass %}document{% endblock %} {% block body_attributes %}data-slug="{{ document.slug }}" contextmenu="edit-history-menu" data-search-url="{{ search_url }}"{% endblock body_attributes %} {% block main_content_id %}document-main{% endblock %} {% block site_css %} {{ super() }} - {% if nearest_zone %} - {% if nearest_zone.css_slug %} - {% stylesheet 'zone-' + nearest_zone.css_slug %} - {% else %} - {% stylesheet 'zones' %} - {% endif %} - {% endif %} {% endblock %} {% block extrahead %} @@ -118,14 +107,6 @@
- {% if is_zone_root %} - - - {% elif is_zone %} - - {{ nearest_zone.document.title }} - {% endif %} -

{{ document.title }}

@@ -144,7 +125,7 @@

{{ document.title }}

{% block content %} -
+
@@ -271,18 +252,11 @@

{{ _('Document Tags and Contributors') }}

{% if show_left %} - +
- {% if not is_zone_root %} - - {{ crumbs }} - {% endif %} - - {% if zone_subnav_html %} - - {{ get_document_subnav(zone_subnav_html) }} - {% endif %} + + {{ crumbs }} {% if quick_links_html %} diff --git a/kuma/wiki/jinja2/wiki/includes/buttons.html b/kuma/wiki/jinja2/wiki/includes/buttons.html index 551ae5a4b63..4ab5b150d46 100644 --- a/kuma/wiki/jinja2/wiki/includes/buttons.html +++ b/kuma/wiki/jinja2/wiki/includes/buttons.html @@ -101,13 +101,6 @@
  • {{ _('Delete this article') }}
  • {% endif %} - {% set zone_links = document_zone_management_links(request.user, document) %} - {% if zone_links['change'] %} -
  • {{ _('Manage content zone') }}
  • - {% endif %} - {% if zone_links['add'] %} -
  • {{ _('Convert to content zone') }}
  • - {% endif %}
  • {{ _('Print this article') }}
  • diff --git a/kuma/wiki/jinja2/wiki/includes/document_macros.html b/kuma/wiki/jinja2/wiki/includes/document_macros.html index 1926896a0cc..62eae355824 100644 --- a/kuma/wiki/jinja2/wiki/includes/document_macros.html +++ b/kuma/wiki/jinja2/wiki/includes/document_macros.html @@ -18,14 +18,6 @@ {% endif %} {%- endmacro %} -{% macro get_document_subnav(html) %} -   -{%- endmacro %} - {% macro get_document_quick_links(html) %}