diff --git a/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_wikipath.py b/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_wikipath.py deleted file mode 100755 index 4c6f6fadd7..0000000000 --- a/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_wikipath.py +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env python - -''' -Wikipath Extension for Python-Markdown -====================================== - -Converts [Link Name](wiki:ArticleName) to relative links pointing to article. Requires Python-Markdown 2.0+ - -Basic usage: - - >>> import markdown - >>> text = "Some text with a [Link Name](wiki:ArticleName)." - >>> html = markdown.markdown(text, ['wikipath(base_url="/wiki/view/")']) - >>> html - u'

Some text with a Link Name.

' - -Dependencies: -* [Python 2.3+](http://python.org) -* [Markdown 2.0+](http://www.freewisdom.org/projects/python-markdown/) -''' - - -import markdown -try: - # Markdown 2.1.0 changed from 2.0.3. We try importing the new version first, - # but import the 2.0.3 version if it fails - from markdown.util import etree -except: - from markdown import etree - - -class WikiPathExtension(markdown.Extension): - def __init__(self, configs): - # set extension defaults - self.config = { - 'base_url' : ['/', 'String to append to beginning of URL.'], - 'html_class' : ['wikipath', 'CSS hook. Leave blank for none.'] - } - - # Override defaults with user settings - for key, value in configs : - # self.config[key][0] = value - self.setConfig(key, value) - - - def extendMarkdown(self, md, md_globals): - self.md = md - - # append to end of inline patterns - WIKI_RE = r'\[(?P.+?)\]\(wiki:(?P[a-zA-Z\d/_-]*)\)' - wikiPathPattern = WikiPath(WIKI_RE, self.config) - wikiPathPattern.md = md - md.inlinePatterns.add('wikipath', wikiPathPattern, " {% wiki_form create_form %} diff --git a/lms/templates/wiki/delete.html b/lms/templates/wiki/delete.html new file mode 100644 index 0000000000..6cb2b36707 --- /dev/null +++ b/lms/templates/wiki/delete.html @@ -0,0 +1,64 @@ +{% extends "wiki/base.html" %} +{% load wiki_tags i18n sekizai_tags %} +{% load url from future %} + +{% block pagetitle %}{% trans "Delete article" %}{% endblock %} + +{% block wiki_contents %} +
+

{% trans "Delete" %} "{{ article.current_revision.title }}"

+ + {% if cannot_delete_root %} +

{% trans "You cannot delete a root article." %}

+

{% trans "Go back" %}

+ {% else %} + + {% if cannot_delete_children %} + +

{% trans "You cannot delete this article because you do not have permission to delete articles with children. Try to remove the children manually one-by-one." %}

+ + {% endif %} + + {% if delete_children %} + +

{% trans "You are deleting an article. This means that its children will be deleted as well. If you choose to purge, children will also be purged!" %}

+ +

{% trans "Articles that will be deleted" %}

+ +
    + {% for child in delete_children %} +
  • {{ child.article }}
  • + {% if delete_children_more %} +
  • {% trans "...and more!" %}
  • + {% endif %} + {% endfor %} +
+ + {% endif %} + + {% if not cannot_delete_children %} +

{% trans "You are deleting an article. Please confirm." %}

+ +
+ {% wiki_form delete_form %} + +
+ + + + {% trans "Go back" %} + +
+
+ {% endif %} + + {% endif %} +
+ +{% endblock %} + diff --git a/lms/templates/wiki/edit.html b/lms/templates/wiki/edit.html index e2c6cb64a5..f4bd7d138f 100644 --- a/lms/templates/wiki/edit.html +++ b/lms/templates/wiki/edit.html @@ -9,14 +9,14 @@
{% include "wiki/includes/editor.html" %}
- + @@ -29,16 +29,17 @@
- +
{% endblock %} diff --git a/repo-requirements.txt b/repo-requirements.txt index fcfb063077..82c0b06b34 100644 --- a/repo-requirements.txt +++ b/repo-requirements.txt @@ -1,6 +1,6 @@ -e git://github.com/MITx/django-staticfiles.git@6d2504e5c8#egg=django-staticfiles -e git://github.com/MITx/django-pipeline.git#egg=django-pipeline --e git://github.com/benjaoming/django-wiki.git@63003aa#egg=django-wiki +-e git://github.com/benjaoming/django-wiki.git@3576a2d#egg=django-wiki -e git://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev -e common/lib/capa -e common/lib/xmodule