Commit 1fc4ab7d by Kyle Fiedler

Merged in default

--HG--
branch : kf-courseware
parents fceb44ea c217432a
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>MITX 6.002</title> <%block name="title"><title>MITX 6.002</title></%block>
<link rel="stylesheet" href="/static/lib/jquery.treeview.css" type="text/css" media="all" /> <link rel="stylesheet" href="/static/lib/jquery.treeview.css" type="text/css" media="all" />
<link rel="stylesheet" href="/static/css/application.css" type="text/css" media="all" /> <link rel="stylesheet" href="/static/css/application.css" type="text/css" media="all" />
...@@ -33,11 +33,16 @@ $(function() { ...@@ -33,11 +33,16 @@ $(function() {
}); });
}); });
</script> </script>
<%block name="headextra"/>
</head> </head>
<body> <body>
${self.body()} ${self.body()}
<%block name="bodyextra"/>
<footer> <footer>
<p> Copyright (c). 2011. MIT. <a href=http://creativecommons.org/licenses/by-sa/3.0/>Some rights reserved.</a> Please give us <a id="inline" <p> Copyright (c). 2011. MIT. <a href=http://creativecommons.org/licenses/by-sa/3.0/>Some rights reserved.</a> Please give us <a id="inline"
......
##This file is based on the template from the SimpleWiki source which carries the GPL license
<%inherit file="main.html"/>
<%block name="title"><title>${"wiki_title"}</title></%block>
<%block name="headextra">
<link rel="stylesheet" media="screen,print" href="/static/simplewiki/css/base.css" />
<link rel="stylesheet" media="print" href="/static/simplewiki/css/base_print.css" />
<link rel="stylesheet" href="/static/simplewiki/css/autosuggest_inquisitor.css" />
<link rel="stylesheet" href="/static/css/local.css" type="text/css" media="all" />
<script type="text/javascript" src="/static/simplewiki/js/bsn.AutoSuggest_c_2.0.js"></script>
<%!
from django.core.urlresolvers import reverse
%>
<script type="text/javascript">
function set_related_article_id(s) {
document.getElementById('wiki_related_input_id').value = s.id;
document.getElementById('wiki_related_input_submit').disabled=false;
}
%if wiki_article is not UNDEFINED:
var x = window.onload;
window.onload = function(){
var options = {
script: "${reverse("search_related", args=[wiki_article.get_url()] )}/?self=${wiki_article.pk}&",
json: true,
varname: "query",
maxresults: 35,
callback: set_related_article_id,
noresults: "Nothing found!"
};
var as = new AutoSuggest('wiki_related_input', options);
if (typeof x == 'function')
x();
}
%endif
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [ ['$','$'], ["\\(","\\)"]],
displayMath: [ ['$$','$$'], ["\\[","\\]"]]}
});
</script> <script type="text/javascript" src="/static/lib/mathjax/MathJax.js?config=TeX-AMS_HTML-full"></script>
<script>
$(function(){
$.ajaxSetup ({
// Disable caching of AJAX responses
cache: false
});
$(".div_wiki_circuit").each(function(d,e) {
id = $(this).attr("id");
name = id.substring(17);
//alert(name);
$("#"+id).load("/edit_circuit/"+name);
f=this;
});
update_schematics();});
</script>
<%block name="wiki_head"/>
</%block>
<%block name="bodyextra">
<%include file="navigation.html" />
<section class="main-content">
<h1><%block name="wiki_page_title"/></h1>
<hr />
<%block name="wiki_panel">
<div id="wiki_panel">
<div class="wiki_box">
<div class="wiki_box_header">
<div class="wiki_box_corner"></div>
<div class="wiki_box_bar"></div>
</div>
<div class="wiki_box_contents" style="position: relative;">
<div style="border: 2px outset #CCC; width: 250px; padding: 10px; background-color: #FFF; position: absolute; right: 100px; top: -80px; display: none; color: #000;" id="wiki_create_form">
<%
theaction = "this.wiki_article_name.value.replace(/([^a-zA-Z0-9\-])/g, '')+'/_create/'"
if (wiki_article is not UNDEFINED):
baseURL = reverse("wiki_view", args=[wiki_article.get_url()])
else:
baseURL = reverse("wiki_view", args=[""])
%>
<form method="GET" onsubmit="this.action='${baseURL + "/' + " + theaction};">
<h2>Create article</h2>
<p>
<label for="id_wiki_article_name">Title of article</label>
<input type="text" name="wiki_article_name" id="id_wiki_article_name" /><br/>
<label for="id_wiki_article_is_child">Create as a child of current article</label>
<input type="checkbox" name="wiki_article_is_child" id="id_wiki_artcile_is_child" disabled="true" ${ 'checked="checked"' if wiki_article is not UNDEFINED else ""}>
</p>
<p>
<input type="button" class="button" value="Cancel" style="display: inline-block; margin-right: 2px;" onclick="document.getElementById('wiki_create_form').style.display='none';" />
<input type="submit" class="button" value="Next &gt;" style="display: inline-block; margin-right: 2px; font-weight: bold;" />
</p>
</form>
</div>
<p>
%if wiki_article is not UNDEFINED:
<input type="button" onclick="javascript:location.href='${reverse("wiki_view", args=[wiki_article.get_url()])}'" value="View" style="width: 100%;" class="button" /><br />
<input type="button" onclick="javascript:location.href='${reverse("wiki_edit", args=[wiki_article.get_url()])}'" value="Edit" style="width: 100%;" class="button" ${'disabled="true"' if not wiki_write else ""}/><br />
<input type="button" onclick="javascript:location.href='${reverse("wiki_history", args=[wiki_article.get_url(),1])}'" value="History" style="width: 100%;" class="button" />
%endif
<input type="button" onclick="document.getElementById('wiki_create_form').style.display='block';" value="Create article" style="width: 100%; margin-bottom: 2px;" class="button" />
<input type="button" onclick="javascript:location.href='${reverse("wiki_random", args=["wiki_articleget_url"])}'" value="Random article" style="width: 100%; margin-bottom: 2px;" class="button" />
</p>
%if wiki_article is not UNDEFINED:
%if wiki_article.locked:
<p><strong>This article has been locked</strong></p>
%endif
<p>
<i>Last modified: ${wiki_article.modified_on.strftime("%b %d, %Y, %I:%M %p")}</i>
</p>
%endif
</div>
<div class="wiki_box_footer">
<div class="wiki_box_corner"></div>
<div class="wiki_box_bar"></div>
</div>
</div>
</div>
</%block>
<%block name="wiki_body"/>
</section>
</%block>
\ No newline at end of file
##This file is based on the template from the SimpleWiki source which carries the GPL license
<%inherit file="simplewiki_base.html"/>
<%block name="wiki_page_title">
Create article
</%block>
<%block name="wiki_body">
<form method="POST" id="wiki_revision">
<div style="display:none">
<input type="hidden" name="csrfmiddlewaretoken" value="${csrf_token}"/>
</div>
<table id="wiki_revision_table">
${ wiki_form }
<tr>
<td colspan="2" align="right">
<input type="submit" value="Create article" /></td>
</tr>
</table>
</form>
</%block>
##This file is based on the template from the SimpleWiki source which carries the GPL license
<%inherit file="simplewiki_base.html"/>
<%block name="wiki_page_title">
${ wiki_article.title }
</%block>
<%block name="wiki_body">
<form method="POST" id="wiki_revision">
<div style="display:none">
<input type="hidden" name="csrfmiddlewaretoken" value="${csrf_token}"/>
</div>
<table id="wiki_revision_table">
${wiki_form}
<tr>
<td colspan="2" align="right">
<input type="submit" value="Edit article" /></td>
</tr>
</table>
</form>
</%block>
##This file is based on the template from the SimpleWiki source which carries the GPL license
<%inherit file="simplewiki_base.html"/>
<%block name="wiki_page_title">
Oops...
</%block>
<%block name="wiki_body">
<div class="wiki_error">
%if wiki_error is not UNDEFINED:
${wiki_error}
%endif
%if wiki_err_notfound is not UNDEFINED:
%if wiki_url is not UNDEFINED:
<p>
The page you requested could not be found.
Click <a href="{% url wiki_create wiki_url %}">here</a> to create it.
</p>
%else:
<p>
Or maybe rather: Congratulations! It seems that there's no root
article, which is probably because you just installed simple-wiki
and your installation is working. Now you can create the root article.
Click <a href="{% url wiki_create "" %}">here</a> to create it.
</p>
%endif
%else:
%if wiki_err_noparent is not UNDEFINED:
<p>
You cannot create this page, because its parent
does not exist. Click <a href="${reverse("wiki_create", args=[wiki_url_parent])}">here</a>
to create it.
</p>
%else:
%if wiki_err_keyword is not UNDEFINED:
<p>
The page you're trying to create <b>${wiki_url}</b> starts with <b>_</b>, which is reserved for internal use.
</p>
%else:
%if wiki_err_locked is not UNDEFINED:
<p>
The article you are trying to modify is locked.
</p>
%else:
%if wiki_err_noread is not UNDEFINED:
<p>
You do not have access to read this article.
</p>
%else:
%if wiki_err_nowrite is not UNDEFINED:
<p>
You do not have access to edit this article.
</p>
%else:
%if wiki_err_noanon is not UNDEFINED:
<p>
Anonymous attachments are not allowed. Try logging in.
</p>
%else:
%if wiki_err_create is not UNDEFINED:
<p>
You do not have access to create this article.
</p>
%else:
%if wiki_err_encode is not UNDEFINED:
<p>
The url you requested could not be handled by the wiki.
Probably you used a bad character in the URL.
Only use digits, English letters, underscore and dash. For instance
/wiki/An_Article-1
</p>
%else:
<p>
An error has occured.
</p>
%endif
%endif
%endif
%endif
%endif
%endif
%endif
%endif
%endif
</div>
</%block>
##This file is based on the template from the SimpleWiki source which carries the GPL license
<%inherit file="simplewiki_base.html"/>
<%block name="wiki_page_title">
${ wiki_article.title }
</%block>
<%block name="wiki_body">
<form method="POST">
<div style="display:none">
<input type="hidden" name="csrfmiddlewaretoken" value="${csrf_token}"/>
</div>
<table id="wiki_history_table">
<thead>
<tr>
<th id="revision">Revision</th>
<th id="comment">Comment</th>
<th id="diff">Diff</th>
<th id="modified">Modified</th>
</tr>
</thead>
<tbody>
<% loopCount = 0 %>
%for revision in wiki_history:
<% loopCount += 1 %>
<tr style="border-top: 1px" ${'class="dark"' if (loopCount % 2) == 0 else ''}>
<td width="15px">
<input type="radio" name="revision" id="${revision.id}" value="${revision.id}"${"checked" if wiki_article.current_revision.id == revision.id else ""}/>
<label for="${revision.id}">
${ revision }
%if revision.previous_revision:
%if not revision.counter == revision.previous_revision.counter + 1:
<br/>(based on ${revision.previous_revision})
%endif
%endif
</label>
</td>
<td>
${ revision.revision_text if revision.revision_text else "<i>None</i>" }</td>
<td class="diff">
%for x in revision.get_diff():
${x|h}<br/>
%endfor </td>
<td>${revision.get_user}
<br/>
${revision.revision_date.strftime("%b %d, %Y, %I:%M %p")}
</td>
</tr>
%endfor
</tbody>
%if wiki_prev_page or wiki_next_page:
<tfoot>
<tr>
<td colspan="4">
%if wiki_prev_page:
<a href="${reverse("wiki_history", args=[wiki_article.get_url(), wiki_prev_page])}">trans "Previous page"</a>
%endif
%if wiki_next_page:
<a href="${reverse("wiki_history", args=[wiki_article.get_url(), wiki_next_page])}">"Next page"</a>
%endif
</td>
</tr>
</tfoot>
%endif
</table>
<input type="submit" value="Change revision"
%if not wiki_write:
disabled="true"
%endif
/>
</form>
</%block>
##This file is based on the template from the SimpleWiki source which carries the GPL license
<%inherit file="simplewiki_base.html"/>
<%block name="wiki_page_title">
%if wiki_search_query:
Search results for ${wiki_search_query | h}
%else:
Displaying all articles
%endif
</%block>
<%block name="wiki_body">
%for article in wiki_search_results:
%if article.get_url:
<a href="${reverse("wiki_view", args=[article.get_url()])}">${article.get_url()}</a><br/>
%else:
<a href="${reverse("wiki_view", args=[''])}">/</a><br/>
%endif
%endfor
%if not wiki_search_results:
No articles were found!
%endif
</%block>
##This file is based on the template from the SimpleWiki source which carries the GPL license
<%!
from django.template.defaultfilters import filesizeformat
%>
%if started:
<script type="text/javascript">
parent.document.getElementById("wiki_attach_progress_container").style.display='block';
</script>
%else:
%if finished:
<script type="text/javascript">
parent.document.getElementById("wiki_attach_progress_container").style.display='none';
parent.location.reload();
</script>
%else:
%if overwrite_warning:
<script type="text/javascript">
if (confirm('Warning: The filename already exists? Really overwrite ${ filename }?'))
parent.document.getElementById("wiki_attach_overwrite").checked=true;
parent.document.getElementById("wiki_attach_overwrite").form.submit();
</script>
%else:
%if too_big:
<script type="text/javascript">
alert('File is too big. Maximum: ${filesizeformat(max_size)}\nYour file was: ${filesizeformat(file.size)}');
</script>
%else:
<script type="text/javascript">
parent.document.getElementById("wiki_attach_progress").style.width='${progress_width}%';
</script>
%endif
%endif
%endif
%endif
##This file is based on the template from the SimpleWiki source which carries the GPL license
<%inherit file="simplewiki_base.html"/>
<%block name="wiki_page_title">
${ wiki_article.title }
</%block>
<%block name="wiki_body">
<div id="wiki_article">
${ wiki_article.current_revision.contents_parsed| n}
</div>
</%block>
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