Commit 4e7ba6e6 by David Ormsbee

Merge pull request #513 from MITx/feature/bridger/new_wiki

Feature/bridger/new wiki
parents 99614ea3 82ebc14b
...@@ -152,7 +152,7 @@ CodeMirror.defineMode("mitx_markdown", function(cmCfg, modeCfg) { ...@@ -152,7 +152,7 @@ CodeMirror.defineMode("mitx_markdown", function(cmCfg, modeCfg) {
function blockNormal(stream, state) { function blockNormal(stream, state) {
var match; var match;
if (stream.match(circuitRE)) { if (stream.sol() && stream.match(circuitRE)) {
stream.skipToEnd(); stream.skipToEnd();
return circuit_formatter; return circuit_formatter;
} else if (state.indentationDiff >= 4) { } else if (state.indentationDiff >= 4) {
......
...@@ -324,7 +324,10 @@ WIKI_ACCOUNT_HANDLING = False ...@@ -324,7 +324,10 @@ WIKI_ACCOUNT_HANDLING = False
WIKI_EDITOR = 'course_wiki.editors.CodeMirror' WIKI_EDITOR = 'course_wiki.editors.CodeMirror'
WIKI_SHOW_MAX_CHILDREN = 0 # We don't use the little menu that shows children of an article in the breadcrumb WIKI_SHOW_MAX_CHILDREN = 0 # We don't use the little menu that shows children of an article in the breadcrumb
WIKI_ANONYMOUS = False # Don't allow anonymous access until the styling is figured out WIKI_ANONYMOUS = False # Don't allow anonymous access until the styling is figured out
WIKI_CAN_CHANGE_PERMISSIONS = lambda article, user: user.has_perm('wiki.assign') WIKI_CAN_CHANGE_PERMISSIONS = lambda article, user: user.is_staff or user.is_superuser
WIKI_CAN_ASSIGN = lambda article, user: user.is_staff or user.is_superuser
WIKI_USE_BOOTSTRAP_SELECT_WIDGET = False
################################# Jasmine ################################### ################################# Jasmine ###################################
JASMINE_TEST_DIRECTORY = PROJECT_ROOT + '/static/coffee' JASMINE_TEST_DIRECTORY = PROJECT_ROOT + '/static/coffee'
......
...@@ -764,6 +764,10 @@ section.wiki { ...@@ -764,6 +764,10 @@ section.wiki {
overflow: hidden; overflow: hidden;
} }
a.list-children {
margin-left: 3px;
}
tr:nth-child(even) { tr:nth-child(even) {
background: #F6F6F6; background: #F6F6F6;
} }
......
## mako ## mako
<%! from django.core.urlresolvers import reverse %> <%!
from django.core.urlresolvers import reverse
from wiki.core.permissions import can_change_permissions
%>
<li class="${"active" if selected_tab == "view" else ""}"> <li class="${"active" if selected_tab == "view" else ""}">
<a href="${reverse('wiki:get', kwargs={'article_id' : article.id, 'path' : urlpath.path})}"> <a href="${reverse('wiki:get', kwargs={'article_id' : article.id, 'path' : urlpath.path})}">
...@@ -37,9 +40,10 @@ ...@@ -37,9 +40,10 @@
<%doc> <%doc>
The settings link has been disabled because the notifications app hasn't been integrated yet and those are the only useful settings. This should be enabled for all non-anonymous users once the notifications app has been integrated and styled.
</%doc>
%if not user.is_anonymous(): %if can_change_permissions(article,user):
<li class="${"active" if selected_tab == "settings" else ""}"> <li class="${"active" if selected_tab == "settings" else ""}">
<a href="${reverse('wiki:settings', kwargs={'article_id' : article.id, 'path' : urlpath.path})}"> <a href="${reverse('wiki:settings', kwargs={'article_id' : article.id, 'path' : urlpath.path})}">
<span class="icon-settings icon"></span> <span class="icon-settings icon"></span>
...@@ -47,6 +51,6 @@ The settings link has been disabled because the notifications app hasn't been in ...@@ -47,6 +51,6 @@ The settings link has been disabled because the notifications app hasn't been in
</a> </a>
</li> </li>
%endif %endif
</%doc>
-e git://github.com/MITx/django-staticfiles.git@6d2504e5c8#egg=django-staticfiles -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/MITx/django-pipeline.git#egg=django-pipeline
-e git://github.com/benjaoming/django-wiki.git@3576a2d#egg=django-wiki -e git://github.com/benjaoming/django-wiki.git@533c7fc#egg=django-wiki
-e git://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev -e git://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev
-e common/lib/capa -e common/lib/capa
-e common/lib/xmodule -e common/lib/xmodule
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment