forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openedx#471 from MITx/feature/bridger/new_wiki
New wiki update
- Loading branch information
Showing
8 changed files
with
63 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,38 @@ | ||
{% load i18n %}{% load url from future %} | ||
{% if urlpath %} | ||
## mako | ||
<%! from django.core.urlresolvers import reverse %> | ||
|
||
%if urlpath is not Undefined and urlpath: | ||
<header> | ||
<ul class="breadcrumb pull-left" class=""> | ||
{% for ancestor in urlpath.get_ancestors.all %} | ||
<li><a href="{% url 'wiki:get' path=ancestor.path %}">{{ ancestor.article.current_revision.title }}</a></li> | ||
{% endfor %} | ||
<li class="active"><a href="{% url 'wiki:get' path=urlpath.path %}">{{ article.current_revision.title }}</a></li> | ||
<% | ||
# The create button links to the highest ancestor we have edit priveleges to | ||
create_article_root = None | ||
%> | ||
%for ancestor in urlpath.cached_ancestors: | ||
<li><a href="${reverse('wiki:get', kwargs={'path' : ancestor.path})}">${ancestor.article.current_revision.title}</a></li> | ||
<% | ||
if not create_article_root and ancestor.article.can_write(user): | ||
create_article_root = ancestor | ||
%> | ||
%endfor | ||
<li class="active"><a href="${reverse('wiki:get', kwargs={'path' : urlpath.path})}">${article.current_revision.title}</a></li> | ||
<% | ||
if not create_article_root and urlpath.article.can_write(user): | ||
create_article_root = urlpath | ||
%> | ||
</ul> | ||
|
||
|
||
<div class="pull-left" style="margin-left: 10px;"> | ||
<div class="btn-group"> | ||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#" style="padding: 7px;" title="{% trans "Sub-articles for" %} {{ article.current_revision.title }}"> | ||
<span class="icon-list"></span> | ||
<span class="caret"></span> | ||
</a> | ||
<ul class="dropdown-menu"> | ||
{% for child in children_slice %} | ||
<li> | ||
<a href="{% url 'wiki:get' path=child.path %}"> | ||
{{ child.article.current_revision.title }} | ||
</a> | ||
</li> | ||
{% empty %} | ||
<li><a href="#"><em>{% trans "No sub-articles" %}</em></a></li> | ||
{% endfor %} | ||
{% if children_slice_more %} | ||
<li><a href="#"><em>{% trans "...and more" %}</em></a></li> | ||
{% endif %} | ||
<li class="divider"></li> | ||
<li> | ||
<a href="" onclick="alert('TODO')">{% trans "List sub-pages" %} »</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
|
||
<div class="global-functions pull-right"> | ||
<form class="search-wiki pull-left"> | ||
<!-- <form class="search-wiki pull-left"> | ||
<input type="search" placeholder="search wiki" /> | ||
</form> | ||
<a class="add-article-btn btn pull-left" href="{% url 'wiki:create' path=urlpath.path %}" style="padding: 7px;"> | ||
</form> --> | ||
%if create_article_root: | ||
<a class="add-article-btn btn pull-left" href="${reverse('wiki:create', kwargs={'path' : create_article_root.path})}" style="padding: 7px;"> | ||
<span class="icon-plus"></span> | ||
{% trans "Add article" %} | ||
Add article | ||
</a> | ||
%endif | ||
</div> | ||
</header> | ||
|
||
{% endif %} | ||
%endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{% extends "wiki/base.html" %} | ||
{% load wiki_tags i18n %} | ||
{% load url from future %} | ||
|
||
{% block pagetitle %}{{ article.current_revision.title }}{% endblock %} | ||
|
||
{% block wiki_breadcrumbs %} | ||
{% include "wiki/includes/breadcrumbs.html" %} | ||
{% endblock %} | ||
|
||
{% block wiki_contents %} | ||
|
||
<div class="missing-wrapper"> | ||
<p>This article was not found, and neither was the parent. <a href="#">Go back to the main wiki article.</a></p> | ||
<button type="submit">Create a new article</button> | ||
</div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
-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@c145596#egg=django-wiki | ||
-e git://github.com/dementrock/pystache_custom.git#egg=pystache_custom | ||
-e git://github.com/benjaoming/django-wiki.git@e237b2ac#egg=django-wiki | ||
-e common/lib/capa | ||
-e common/lib/xmodule |