Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
67fc2586
Commit
67fc2586
authored
Jan 08, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bugs in templates. Now working as they were originally, but with Mako.
parent
4ca87c44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
19 deletions
+23
-19
simplewiki_base.html
+12
-5
simplewiki_error.html
+11
-14
No files found.
simplewiki_base.html
View file @
67fc2586
...
...
@@ -22,6 +22,7 @@
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
=
{
...
...
@@ -36,6 +37,7 @@
if
(
typeof
x
==
'function'
)
x
();
}
%
endif
</script>
<script
type=
"text/x-mathjax-config"
>
MathJax
.
Hub
.
Config
({
...
...
@@ -188,14 +190,19 @@ text-decoration: none;
<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='${
reverse("
wiki_view
",
args=
[wiki_article.get_url()])}/'
+
${
theaction
};"
>
<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=
${
"
yes
"
if
wiki_article
else
"
no
"
}
>
<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';"
/>
...
...
@@ -205,15 +212,15 @@ text-decoration: none;
</div>
<p>
%if wiki_article:
%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%;"
/><br
/>
<input
type=
"button"
onclick=
"javascript:location.href='${reverse("
wiki_edit
",
args=
[wiki_article.get_url()])}'"
value=
"Edit"
style=
"width: 100%;"
${'
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%;"
/>
%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_article.get_url()
])}'"
value=
"Random 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:
%if wiki_article
is not UNDEFINED
:
%if wiki_article.locked:
<p><strong>
This article has been locked
</strong></p>
%endif
...
...
simplewiki_error.html
View file @
67fc2586
...
...
@@ -7,15 +7,12 @@ Oops...
<
%
block
name=
"wiki_body"
>
<div
class=
"wiki_error"
>
%if wiki_error is not UNDEFINED:
${wiki_error}
%if wiki_err_notfound:
%endif
%if wiki_err_notfound:
%if wiki_url:
%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.
...
...
@@ -29,7 +26,7 @@ Click <a href="{% url wiki_create "" %}">here</a> to create it.
</p>
%endif
%else:
%if wiki_err_noparent:
%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>
...
...
@@ -37,43 +34,43 @@ to create it.
</p>
%else:
%if wiki_err_keyword:
%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:
%if wiki_err_locked
is not UNDEFINED
:
<p>
The article you are trying to modify is locked.
</p>
%else:
%if wiki_err_noread:
%if wiki_err_noread
is not UNDEFINED
:
<p>
You do not have access to read this article.
</p>
%else:
%if wiki_err_nowrite:
%if wiki_err_nowrite
is not UNDEFINED
:
<p>
You do not have access to edit this article.
</p>
%else:
%if wiki_err_noanon:
%if wiki_err_noanon
is not UNDEFINED
:
<p>
Anonymous attachments are not allowed. Try logging in.
</p>
%else:
%if wiki_err_create:
%if wiki_err_create
is not UNDEFINED
:
<p>
You do not have access to create this article.
</p>
%else:
%if wiki_err_encode:
%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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment