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
680e3da1
Commit
680e3da1
authored
Jan 10, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Getting simplewiki search to work.
parent
61a713f2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
8 deletions
+42
-8
simplewiki_base.html
+27
-5
simplewiki_error.html
+4
-0
simplewiki_history.html
+4
-0
simplewiki_searchresults.html
+6
-2
simplewiki_updateprogressbar.html
+1
-1
No files found.
simplewiki_base.html
View file @
680e3da1
...
...
@@ -72,8 +72,35 @@ update_schematics();});
<hr
/>
<
%
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=
[""])
%
>
<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"
>
<div
class=
"wiki_box_title"
>
Search
</div>
<form
method=
"POST"
action=
'${reverse("wiki_search_articles", args=[""])}'
>
<div
style=
"display:none"
>
<input
type=
"hidden"
name=
"csrfmiddlewaretoken"
value=
"${csrf_token}"
/>
</div>
<input
type=
"text"
name=
"value"
id=
"wiki_search_input"
style=
"width: 72%"
value=
"${wiki_search_query if wiki_search_query is not UNDEFINED else '' |h}"
/>
<input
type=
"submit"
id=
"wiki_search_input_submit"
value=
Go!
style=
"width: 20%"
/>
</form>
</div>
<div
class=
"wiki_box_footer"
>
<div
class=
"wiki_box_corner"
></div>
<div
class=
"wiki_box_bar"
></div>
</div>
</div>
<div
class=
"wiki_box"
>
<div
class=
"wiki_box_header"
>
<div
class=
"wiki_box_corner"
></div>
...
...
@@ -84,11 +111,6 @@ update_schematics();});
<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>
...
...
simplewiki_error.html
View file @
680e3da1
...
...
@@ -2,6 +2,10 @@
<
%
inherit
file=
"simplewiki_base.html"
/>
<
%!
from
django
.
core
.
urlresolvers
import
reverse
%
>
<
%
block
name=
"wiki_page_title"
>
Oops...
</
%
block>
...
...
simplewiki_history.html
View file @
680e3da1
...
...
@@ -2,6 +2,10 @@
<
%
inherit
file=
"simplewiki_base.html"
/>
<
%!
from
django
.
core
.
urlresolvers
import
reverse
%
>
<
%
block
name=
"wiki_page_title"
>
${ wiki_article.title }
</
%
block>
...
...
simplewiki_searchresults.html
View file @
680e3da1
...
...
@@ -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
:
<a
href=
"${reverse("
wiki_view
",
args=
[article.get_url()])}"
>
${article.get_url()}
</a><br/>
%else:
<a
href=
"${reverse("
wiki_view
",
args=
[''])}"
>
/
</a><br/>
...
...
@@ -20,6 +24,6 @@
%endfor
%if not wiki_search_results:
No articles
were found
!
No articles
matching
<b>
${wiki_search_query if wiki_search_query is not UNDEFINED else ""}
</b>
!
%endif
</
%
block>
simplewiki_updateprogressbar.html
View file @
680e3da1
##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
%
>
...
...
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