diff --git a/problem.js b/problem.js
index f7d864ad09..e5bc56e3ab 100644
--- a/problem.js
+++ b/problem.js
@@ -5,6 +5,7 @@ function ${ id }_load() {
update_schematics();
$('#check_${ id }').click(function() {
+ $("input.schematic").each(function(index,element){ element.schematic.update_value(); });
var submit_data={};
$.each($("[id^=input_${ id }_]"), function(index,value){
submit_data[value.id]=value.value;
@@ -36,7 +37,7 @@ function ${ id }_load() {
$('#show_${ id }').click(function() {
postJSON('/modx/problem/${ id }/problem_show', {}, function(data) {
for (var key in data) {
- $("#answer_${ id }_"+key).text(data[key]);
+ $("#answer_"+key).text(data[key]);
}
});
@@ -44,6 +45,7 @@ function ${ id }_load() {
});
$('#save_${ id }').click(function() {
+ $("input.schematic").each(function(index,element){ element.schematic.update_value(); });
var submit_data={};
$.each($("[id^=input_${ id }_]"), function(index,value){
submit_data[value.id]=value.value;});
diff --git a/schematicinput.html b/schematicinput.html
new file mode 100644
index 0000000000..06f27db1c1
--- /dev/null
+++ b/schematicinput.html
@@ -0,0 +1,19 @@
+
+
+
+${value}
+
+
+
+% if state == 'unsubmitted':
+
+% elif state == 'correct':
+
+% elif state == 'incorrect':
+
+% elif state == 'incomplete':
+
+% endif
+
diff --git a/simplewiki_base.html b/simplewiki_base.html
index 954d7a7d2f..714edf5a9b 100644
--- a/simplewiki_base.html
+++ b/simplewiki_base.html
@@ -80,9 +80,24 @@
<%block name="wiki_panel">
-
+ <%
+ if (wiki_article is not UNDEFINED):
+ baseURL = reverse("wiki_view", args=[wiki_article.get_url()])
+ else:
+ baseURL = reverse("wiki_view", args=[""])
+ %>
+ -
+
Search
+
+
-
@@ -136,12 +151,15 @@
%if wiki_article is not UNDEFINED:
+
-
+
-
+
-
diff --git a/simplewiki_base.html.orig b/simplewiki_base.html.orig
new file mode 100644
index 0000000000..714edf5a9b
--- /dev/null
+++ b/simplewiki_base.html.orig
@@ -0,0 +1,177 @@
+##This file is based on the template from the SimpleWiki source which carries the GPL license
+
+<%inherit file="main.html"/>
+
+<%block name="title">${"wiki_title"}%block>
+
+<%block name="headextra">
+
+
+
+
+
+
+ <%!
+ from django.core.urlresolvers import reverse
+ %>
+
+
+
+
+
+
+<%block name="bodyextra">
+ <%block name="wiki_head"/>
+%block>
+
+<%include file="navigation.html" />
+
+
+
+ <%block name="wiki_panel">
+
+
+ <%
+ if (wiki_article is not UNDEFINED):
+ baseURL = reverse("wiki_view", args=[wiki_article.get_url()])
+ else:
+ baseURL = reverse("wiki_view", args=[""])
+ %>
+
+
+
+
+ %block>
+
+
+
+ %if wiki_article is not UNDEFINED:
+ %if wiki_article.locked:
+ This article has been locked
+ %endif
+ Last modified: ${wiki_article.modified_on.strftime("%b %d, %Y, %I:%M %p")}
+ %endif
+
+ %if wiki_article is not UNDEFINED:
+
+ %endif
+
+
+ <%block name="wiki_page_title"/>
+
+ <%block name="wiki_body"/>
+
+
+
+
+%block>
diff --git a/simplewiki_error.html b/simplewiki_error.html
index faf1b0dbd8..f251f8d411 100644
--- a/simplewiki_error.html
+++ b/simplewiki_error.html
@@ -2,6 +2,10 @@
<%inherit file="simplewiki_base.html"/>
+<%!
+ from django.core.urlresolvers import reverse
+%>
+
<%block name="wiki_page_title">
Oops...
%block>
diff --git a/simplewiki_history.html b/simplewiki_history.html
index 6dbe487e64..936459354b 100644
--- a/simplewiki_history.html
+++ b/simplewiki_history.html
@@ -2,6 +2,10 @@
<%inherit file="simplewiki_base.html"/>
+<%!
+ from django.core.urlresolvers import reverse
+%>
+
<%block name="wiki_page_title">
${ wiki_article.title }
%block>
diff --git a/simplewiki_searchresults.html b/simplewiki_searchresults.html
index 17832b00be..a96a7a1a97 100644
--- a/simplewiki_searchresults.html
+++ b/simplewiki_searchresults.html
@@ -2,6 +2,10 @@
<%inherit file="simplewiki_base.html"/>
+<%!
+ from django.core.urlresolvers import reverse
+%>
+
<%block name="wiki_page_title">
%if wiki_search_query:
Search results for ${wiki_search_query | h}
@@ -12,7 +16,7 @@
<%block name="wiki_body">
%for article in wiki_search_results:
- %if article.get_url:
+ %if article is not UNDEFINED:
${article.get_url()}
%else:
/
@@ -20,6 +24,6 @@
%endfor
%if not wiki_search_results:
- No articles were found!
+ No articles matching ${wiki_search_query if wiki_search_query is not UNDEFINED else ""} !
%endif
%block>
diff --git a/simplewiki_updateprogressbar.html b/simplewiki_updateprogressbar.html
index 279eaa5ef3..a7739d6bf1 100644
--- a/simplewiki_updateprogressbar.html
+++ b/simplewiki_updateprogressbar.html
@@ -1,5 +1,5 @@
##This file is based on the template from the SimpleWiki source which carries the GPL license
-
+##This file has been converted to Mako, but not tested. It is because uploads are disabled for the wiki. If they are reenabled, this may contain bugs.
<%!
from django.template.defaultfilters import filesizeformat
%>
diff --git a/textinput.html b/textinput.html
new file mode 100644
index 0000000000..fbe9090df8
--- /dev/null
+++ b/textinput.html
@@ -0,0 +1,13 @@
+
+
+
+% if state == 'unsubmitted':
+
+% elif state == 'correct':
+
+% elif state == 'incorrect':
+
+% elif state == 'incomplete':
+
+% endif
+