Pimki 1.0.092
Sign up to get free protection for your applications and to get access to all the features.
- data/README +158 -0
- data/README-PIMKI +87 -0
- data/app/controllers/wiki.rb +563 -0
- data/app/models/author.rb +4 -0
- data/app/models/chunks/category.rb +31 -0
- data/app/models/chunks/category_test.rb +21 -0
- data/app/models/chunks/chunk.rb +20 -0
- data/app/models/chunks/engines.rb +34 -0
- data/app/models/chunks/include.rb +29 -0
- data/app/models/chunks/literal.rb +19 -0
- data/app/models/chunks/match.rb +19 -0
- data/app/models/chunks/nowiki.rb +31 -0
- data/app/models/chunks/nowiki_test.rb +14 -0
- data/app/models/chunks/test.rb +18 -0
- data/app/models/chunks/todo.rb +22 -0
- data/app/models/chunks/uri.rb +97 -0
- data/app/models/chunks/uri_test.rb +92 -0
- data/app/models/chunks/wiki.rb +82 -0
- data/app/models/chunks/wiki_test.rb +36 -0
- data/app/models/page.rb +91 -0
- data/app/models/page_lock.rb +24 -0
- data/app/models/page_set.rb +73 -0
- data/app/models/page_test.rb +76 -0
- data/app/models/revision.rb +91 -0
- data/app/models/revision_test.rb +252 -0
- data/app/models/web.rb +277 -0
- data/app/models/web_test.rb +53 -0
- data/app/models/wiki_content.rb +113 -0
- data/app/models/wiki_service.rb +137 -0
- data/app/models/wiki_service_test.rb +15 -0
- data/app/models/wiki_words.rb +26 -0
- data/app/models/wiki_words_test.rb +12 -0
- data/app/views/bottom.rhtml +4 -0
- data/app/views/markdown_help.rhtml +16 -0
- data/app/views/menu.rhtml +20 -0
- data/app/views/navigation.rhtml +26 -0
- data/app/views/rdoc_help.rhtml +16 -0
- data/app/views/static_style_sheet.rhtml +231 -0
- data/app/views/style.rhtml +179 -0
- data/app/views/textile_help.rhtml +28 -0
- data/app/views/top.rhtml +52 -0
- data/app/views/wiki/authors.rhtml +15 -0
- data/app/views/wiki/bliki.rhtml +101 -0
- data/app/views/wiki/bliki_edit.rhtml +33 -0
- data/app/views/wiki/bliki_new.rhtml +61 -0
- data/app/views/wiki/bliki_revision.rhtml +51 -0
- data/app/views/wiki/edit.rhtml +34 -0
- data/app/views/wiki/edit_menu.rhtml +27 -0
- data/app/views/wiki/edit_web.rhtml +139 -0
- data/app/views/wiki/export.rhtml +14 -0
- data/app/views/wiki/feeds.rhtml +10 -0
- data/app/views/wiki/list.rhtml +164 -0
- data/app/views/wiki/locked.rhtml +14 -0
- data/app/views/wiki/login.rhtml +11 -0
- data/app/views/wiki/mind.rhtml +39 -0
- data/app/views/wiki/new.rhtml +27 -0
- data/app/views/wiki/new_system.rhtml +78 -0
- data/app/views/wiki/new_web.rhtml +64 -0
- data/app/views/wiki/page.rhtml +84 -0
- data/app/views/wiki/print.rhtml +16 -0
- data/app/views/wiki/published.rhtml +10 -0
- data/app/views/wiki/recently_revised.rhtml +31 -0
- data/app/views/wiki/revision.rhtml +87 -0
- data/app/views/wiki/rss_feed.rhtml +22 -0
- data/app/views/wiki/search.rhtml +26 -0
- data/app/views/wiki/tex.rhtml +23 -0
- data/app/views/wiki/tex_web.rhtml +35 -0
- data/app/views/wiki/todo.rhtml +39 -0
- data/app/views/wiki/web_list.rhtml +13 -0
- data/app/views/wiki_words_help.rhtml +8 -0
- data/libraries/action_controller_servlet.rb +177 -0
- data/libraries/bluecloth.rb +1127 -0
- data/libraries/diff/diff.rb +475 -0
- data/libraries/diff/diff_test.rb +80 -0
- data/libraries/erb.rb +490 -0
- data/libraries/madeleine/automatic.rb +357 -0
- data/libraries/madeleine/clock.rb +94 -0
- data/libraries/madeleine_service.rb +69 -0
- data/libraries/rdocsupport.rb +156 -0
- data/libraries/redcloth_for_tex.rb +869 -0
- data/libraries/redcloth_for_tex_test.rb +41 -0
- data/libraries/view_helper.rb +33 -0
- data/libraries/web_controller_server.rb +95 -0
- data/pimki.rb +97 -0
- metadata +169 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
<% @title = "Authors" %><%= sub_template "top" %>
|
2
|
+
|
3
|
+
<p>You can also see a graph of authors->pages in the <a href="../mind/?type=neato&authors_graph=on&Go=Redraw">Mind Map<a> section.<p>
|
4
|
+
|
5
|
+
<ul id="authorList">
|
6
|
+
<% for author in @authors %>
|
7
|
+
<li>
|
8
|
+
<%= @web.make_link(author) %>
|
9
|
+
co- or authored:
|
10
|
+
<%= @web.select.pages_authored_by(author).collect { |page| page.link }.join ", " %>
|
11
|
+
</li>
|
12
|
+
<% end %>
|
13
|
+
</ul>
|
14
|
+
|
15
|
+
<%= sub_template "bottom" %>
|
@@ -0,0 +1,101 @@
|
|
1
|
+
<% @title = "Bliki" %>
|
2
|
+
<%= sub_template "top" %>
|
3
|
+
|
4
|
+
<% if @req.query['authorname'] != 'noselect' and not @req.query['regexp'].nil? and not @req.query['regexp'].empty? %>
|
5
|
+
<p>You are filtering entries by author: <em><%= @req.query['authorname'] %></em>
|
6
|
+
containing: <em><%= @req.query['regexp'] %></em>
|
7
|
+
<br /><a href="../bliki/" class="navlink" accesskey="R">Remove Filter</a>
|
8
|
+
<% elsif not @req.query['authorname'].nil? and @req.query['authorname'] != 'noselect' %>
|
9
|
+
<p>You are filtering entries by: <em><%= @req.query['authorname'] %></em>
|
10
|
+
<br /><a href="../bliki/" class="navlink" accesskey="R">Remove Filter</a>
|
11
|
+
<% elsif not @req.query['regexp'].nil? %>
|
12
|
+
<p>You are filtering entries containing: <em><%= @req.query['regexp'] %></em>
|
13
|
+
<br /><a href="../bliki/" class="navlink" accesskey="R">Remove Filter</a>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<p><a href="../bliki_new/" class="navlink" accesskey="E">New Entry</a></p>
|
17
|
+
|
18
|
+
<% if @entries.length > 0 %>
|
19
|
+
<table width="100%">
|
20
|
+
<% (@entries.length > 3 ? 3 : @entries.length).times do |idx| %>
|
21
|
+
<tr>
|
22
|
+
<td width="70%"><h3 style="color:<%= @color %>"><%= @entries[idx].plain_name %></h3></td>
|
23
|
+
</tr>
|
24
|
+
<tr>
|
25
|
+
<th align="left" style="font-size:10;color:<%= @color %>"><%= @entries[idx].revisions.first.created_at.strftime("%B %d, %Y") %>
|
26
|
+
<% if @entries[idx].revisions.first != @entries[idx].revisions.last %>
|
27
|
+
-- Last revised on: <%= @entries[idx].revisions.last.created_at.strftime("%B %d, %Y") %>
|
28
|
+
<% end %>
|
29
|
+
</th>
|
30
|
+
</tr>
|
31
|
+
<tr>
|
32
|
+
<td colspan="2"><%= @entries[idx].display_content %></td>
|
33
|
+
</tr>
|
34
|
+
<tr><td>
|
35
|
+
<div class="navigation">
|
36
|
+
<a href="../bliki_edit/<%= @entries[idx].name %>" class="navlink" accesskey="E">Edit</a>
|
37
|
+
| <a href="../bliki_delete/<%= @entries[idx].name %>" class="navlink" onClick="return confirm('Are you sure you want delete this entry completely?')">Delete</a>
|
38
|
+
<% if @entries[idx].revisions.length > 1 %>
|
39
|
+
<small>
|
40
|
+
| <a href="../bliki_revision/<%= @entries[idx].name %>?rev=<%= @entries[idx].revisions.length - 1 %>" class="navlink" accesskey="R">Older Revisions</a>
|
41
|
+
(<%= @entries[idx].revisions.length - 1 %>)
|
42
|
+
</small>
|
43
|
+
<% end %>
|
44
|
+
<% if @entries[idx].references.length > 0 %>
|
45
|
+
<small>
|
46
|
+
| Referenced by: <%= @entries[idx].references.collect { |ref| ref.link }.join(", ") %>
|
47
|
+
</small>
|
48
|
+
<% end %>
|
49
|
+
</div>
|
50
|
+
</td>
|
51
|
+
<th align="right"><small><%= @entries[idx].author_link %></small></th>
|
52
|
+
</tr>
|
53
|
+
<tr><td colspan="2"><hr></td></tr>
|
54
|
+
<% end %>
|
55
|
+
</table>
|
56
|
+
<% else %>
|
57
|
+
<p><strong>No entries found.</strong></p>
|
58
|
+
<% end %>
|
59
|
+
|
60
|
+
<h2>All Entries:</h2>
|
61
|
+
<ul>
|
62
|
+
<% @entries.each do |page| %>
|
63
|
+
<li><a href="../bliki_revision/<%= page.name %>?rev=<%= page.revisions.length - 1 %>" class="navlink" accesskey="R"><%= page.plain_name %></a>
|
64
|
+
<small>[<%= page.author_link %>, <%=page.revisions.first.created_at.strftime("%d-%b-%Y") %>]</small>
|
65
|
+
</li>
|
66
|
+
<% end %>
|
67
|
+
</ul>
|
68
|
+
|
69
|
+
<script language="JavaScript1.2">
|
70
|
+
function validateSelection() {
|
71
|
+
var selection = document.getElementById('sel_author').value;
|
72
|
+
var regex = document.getElementById('search_regex').value;
|
73
|
+
if (selection == "noselect" && regex == "") {
|
74
|
+
alert("Please make a selection and/or supply a rexex to search.");
|
75
|
+
return false;
|
76
|
+
}
|
77
|
+
return true;
|
78
|
+
}
|
79
|
+
</script>
|
80
|
+
|
81
|
+
<h2>Apply filter:</h2>
|
82
|
+
<table><tr>
|
83
|
+
<td>Show only pages authored by:</td>
|
84
|
+
<form class="navigation" action="bliki" action="post" onSubmit="return validateSelection();">
|
85
|
+
<td>
|
86
|
+
<select id="sel_author" name="authorname" size="1">
|
87
|
+
<option value="noselect">------------
|
88
|
+
<% for auth in @authors %>
|
89
|
+
<option value="<%= auth %>"><%= auth %>
|
90
|
+
<% end %>
|
91
|
+
</select>
|
92
|
+
</td>
|
93
|
+
</tr><tr>
|
94
|
+
<td>Regexp search on all entries:</td>
|
95
|
+
<td><input type="text" id="search_regex" name="regexp"></td>
|
96
|
+
<td><input type="submit" name="Search" value="Search"></td>
|
97
|
+
</form>
|
98
|
+
</tr></table>
|
99
|
+
|
100
|
+
<%= sub_template "bottom" %>
|
101
|
+
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<%
|
2
|
+
@title = "Editing #{@page.plain_name}"
|
3
|
+
@content_width = 720
|
4
|
+
@hide_navigation = true
|
5
|
+
%>
|
6
|
+
<%= sub_template "top" %>
|
7
|
+
|
8
|
+
<%= render_markup_help %>
|
9
|
+
|
10
|
+
<form action="../bliki_save/<%= @page.name %>" method="post" onSubmit="return validateAuthorName();">
|
11
|
+
<p>
|
12
|
+
<textarea name="content" style="width: 450px; height: 430px"><%= @page.content %></textarea>
|
13
|
+
</p>
|
14
|
+
<p>
|
15
|
+
<input type="submit" value="Update"> as
|
16
|
+
<input type="text" name="author" id="authorName" value="<%= @author %>"
|
17
|
+
onClick="this.value == 'AnonymousCoward' ? this.value = '' : true">
|
18
|
+
| <a href="../cancel_bliki_edit/<%= @page.name %>">Cancel</a> <small>(unlocks entry)</small>
|
19
|
+
</p>
|
20
|
+
</form>
|
21
|
+
|
22
|
+
<script language="JavaScript1.2">
|
23
|
+
function validateAuthorName() {
|
24
|
+
if (/^([A-Z][a-z]+[A-Z]\w+)$/.test(document.getElementById('authorName').value)) {
|
25
|
+
return true;
|
26
|
+
} else {
|
27
|
+
alert('You wrote "' + document.getElementById('authorName').value + '" as your name, but it needs to be a wiki word. Try concating first name and last name, like DavidHeinemeierHansson.');
|
28
|
+
return false;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
</script>
|
32
|
+
|
33
|
+
<%= sub_template "bottom" %>
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<%
|
2
|
+
@title = "Creating new bliki entry"
|
3
|
+
@content_width = 720
|
4
|
+
@hide_navigation = true
|
5
|
+
%>
|
6
|
+
<%= sub_template "top" %>
|
7
|
+
|
8
|
+
<p>
|
9
|
+
<%= render_markup_help %>
|
10
|
+
|
11
|
+
<form action="../bliki_save/" method="post" onSubmit="return validateWikiWords();">
|
12
|
+
<table width="450">
|
13
|
+
<tr style="background-color:dfd">
|
14
|
+
<td width="70%">Title: <input size="40%" type="text" name="pagename" id="newPageName"></td>
|
15
|
+
<th align="right"><small><%= Date.today.strftime("%d %b %Y") %></small></th>
|
16
|
+
</tr>
|
17
|
+
<tr>
|
18
|
+
<td colspan="2"><textarea name="content" style="width: 450px; height: 430px">
|
19
|
+
| / | *Morning* | *Afternoon* |
|
20
|
+
| *Mon* | - | - |
|
21
|
+
| *Tue* | - | - |
|
22
|
+
| *Wed* | - | - |
|
23
|
+
| *Thu* | - | - |
|
24
|
+
| *Fri* | - | - |
|
25
|
+
</textarea></td>
|
26
|
+
</tr>
|
27
|
+
<tr style="background-color:efe">
|
28
|
+
<th colspan="2" align="right">
|
29
|
+
<input type="text" name="author" id="authorName" value="<%= @author || 'AnonymousCoward'%>"
|
30
|
+
onClick="this.value == 'AnonymousCoward' ? this.value = '' : true">
|
31
|
+
</th>
|
32
|
+
</tr>
|
33
|
+
</table>
|
34
|
+
|
35
|
+
<p>
|
36
|
+
<input type="submit" value="Update"> as
|
37
|
+
|
38
|
+
| <a href="../cancel_bliki_edit/">Cancel</a> <small>(unlocks entry)</small>
|
39
|
+
</p>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<script language="JavaScript1.2">
|
43
|
+
function validateWikiWords() {
|
44
|
+
alert(escape(document.getElementById('newPageName').value));
|
45
|
+
return false;
|
46
|
+
if (/^([A-Z][a-z]+[A-Z]\w+)$/.test(document.getElementById('authorName').value)) {
|
47
|
+
// return true; skip to validate page name
|
48
|
+
} else {
|
49
|
+
alert('You wrote "' + document.getElementById('authorName').value + '" as your name, but it needs to be a wiki word. Try concating first name and last name, like DavidHeinemeierHansson.');
|
50
|
+
return false;
|
51
|
+
}
|
52
|
+
if (/^[\w\s\d]+)$/.test(document.getElementById('newPageName').value)) {
|
53
|
+
return true;
|
54
|
+
} else {
|
55
|
+
alert('You wrote "' + document.getElementById('newPageName').value + '" as the entry name, but it can only contain letters, digits and space.');
|
56
|
+
return false;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
</script>
|
60
|
+
|
61
|
+
<%= sub_template "bottom" %>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<% @title = "#{@page.plain_name} (Rev ##{@revision.number})" %>
|
2
|
+
<%= sub_template "top" %>
|
3
|
+
|
4
|
+
<table width="100%">
|
5
|
+
<tr style="background-color:dfd">
|
6
|
+
<td width="70%"><h4><%= @revision.page.name %></h4></td>
|
7
|
+
<th><small><%= @revision.pretty_created_at %></small></th>
|
8
|
+
</tr>
|
9
|
+
<tr>
|
10
|
+
<td colspan="2"><%= @revision.display_content %></td>
|
11
|
+
</tr>
|
12
|
+
<tr style="background-color:efe">
|
13
|
+
<th colspan="2" align="right"><small><%= web.make_link(@revision.author, nil, {}) %></small></th>
|
14
|
+
</tr>
|
15
|
+
</table>
|
16
|
+
|
17
|
+
<div class="byline">
|
18
|
+
<%= "Revision from #{@revision.pretty_created_at} by" %>
|
19
|
+
<%# @page.web.pages[@revision.author] ? WikiWords.existing_page_link(@revision.author) : WikiWords.unexisting_page_link(@revision.author) %>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="navigation">
|
23
|
+
<% if @revision.previous_revision %>
|
24
|
+
<a href="../bliki_revision/<%= @page.name %>?rev=<%= @revision.previous_revision.number %>" class="navlink">Lower</a>
|
25
|
+
<% @lower = true
|
26
|
+
end
|
27
|
+
if @revision.next_revision
|
28
|
+
if @lower %>
|
29
|
+
-
|
30
|
+
<% end %>
|
31
|
+
<a href="../bliki_revision/<%= @page.name %>?rev=<%= @revision.next_revision.number %>" class="navlink">Higher</a>
|
32
|
+
<% end %>
|
33
|
+
|
34
|
+
<%= '|' if @revision.previous_revision or @revision.next_revision %>
|
35
|
+
<a href="../bliki_delete/<%= @page.name %>" class="navlink" onClick="return confirm('Are you sure you want delete this entry completely?')">Delete All</a>
|
36
|
+
<% if @revision.next_revision %>
|
37
|
+
| <a href="../bliki_revision/<%= @page.name %>?rev=<%= @page.revisions.length - 1 %>" class="navlink">Back to current</a>
|
38
|
+
<% else %>
|
39
|
+
| <a href="../rollback_bliki/<%= @page.name %>?rev=<%= @revision.number - 1 %>"
|
40
|
+
class="navlink" onClick="return confirm('Are you sure you want reset the page to this revision?')">Rollback to here</a>
|
41
|
+
<% end %>
|
42
|
+
|
43
|
+
|
44
|
+
<% if @page.references.length > 0 %>
|
45
|
+
<small>
|
46
|
+
| Referenced by: <%= @page.references.collect { |ref| "<a href='#{ref.name}'>#{ref.name}</a>" }.join(", ") %>
|
47
|
+
</small>
|
48
|
+
<% end %>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<%= sub_template "bottom" %>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<%
|
2
|
+
@title = "Editing #{@page.plain_name}"
|
3
|
+
@content_width = 720
|
4
|
+
@hide_navigation = true
|
5
|
+
@style_additions = "#Container, #Content {padding-left:100px;}"
|
6
|
+
|
7
|
+
%>
|
8
|
+
<%= sub_template "top" %>
|
9
|
+
|
10
|
+
<%= "<p style='color:red'>Please correct the error that caused this error in rendering:<br/><small>#{@params["msg"]}</small></p>" if @params["msg"] %>
|
11
|
+
|
12
|
+
<%= render_markup_help %>
|
13
|
+
|
14
|
+
<form style="float:right" id="editForm" action="../save/<%= @page.name %>" method="post" onSubmit="cleanAuthorName();">
|
15
|
+
<p>
|
16
|
+
<textarea name="content" style="width: 450px; height: 430px"><%= @page.content %></textarea>
|
17
|
+
</p>
|
18
|
+
<p>
|
19
|
+
<input type="submit" value="Update"> as
|
20
|
+
<input type="text" name="author" id="authorName" value="<%= @author %>"
|
21
|
+
onClick="this.value == 'AnonymousCoward' ? this.value = '' : true">
|
22
|
+
| <a href="../cancel_edit/<%= @page.name %>">Cancel</a> <small>(unlocks page)</small>
|
23
|
+
</p>
|
24
|
+
</form>
|
25
|
+
|
26
|
+
<script language="JavaScript1.2">
|
27
|
+
function cleanAuthorName() {
|
28
|
+
if (document.getElementById('authorName').value == "") {
|
29
|
+
document.getElementById('authorName').value = 'AnonymousCoward';
|
30
|
+
}
|
31
|
+
}
|
32
|
+
</script>
|
33
|
+
|
34
|
+
<%= sub_template "bottom" %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<%
|
2
|
+
@title = "Editing Left-Side Menu Options"
|
3
|
+
@content_width = 700
|
4
|
+
@hide_navigation = true
|
5
|
+
%>
|
6
|
+
<%= sub_template "top" %>
|
7
|
+
|
8
|
+
<%= render_markup_help %>
|
9
|
+
|
10
|
+
<form id="editForm" action="../save_menu" method="post">
|
11
|
+
<p>Please choose the format you prefer for the left-size menu:</p>
|
12
|
+
<p><input type="radio" name="type" value="all" <%= 'checked' if @menu_type == 'all' %>>All Pages</p>
|
13
|
+
<p><input type="radio" name="type" value="revised" <%= 'checked' if @menu_type == 'revised' %>>Recently revised pages</p>
|
14
|
+
<p><input type="radio" name="type" value="recent" <%= 'checked' if @menu_type == 'recent' %>>Recently visited pages</p>
|
15
|
+
<p><input type="radio" name="type" value="viewed" <%= 'checked' if @menu_type == 'viewed' %>>Most viewed pages</p>
|
16
|
+
<p><input type="radio" name="type" value="linkers" <%= 'checked' if @menu_type == 'linkers' %>>Only pages that link other pages (default)</p>
|
17
|
+
<p>For the above options you can choose if you want to limit the number of results. Enter the number of items you wish, or 0 for all items: <input type="textfield" size="20", name="limit" value="<%= @list_limit %>" /></p>
|
18
|
+
<p><input type="radio" name="type" value="user" <%= 'checked' if @menu_type == 'user' %>>Or just write your own menu contents (as a regular Wiki page):
|
19
|
+
<textarea name="content" style="width: 400px; height: 300px"><%= @menu_content %></textarea>
|
20
|
+
</p>
|
21
|
+
<p>
|
22
|
+
<input type="submit" name='action' value="Update">
|
23
|
+
<input type="submit" name='action' value="Cancel Update">
|
24
|
+
</p>
|
25
|
+
</form>
|
26
|
+
|
27
|
+
<%= sub_template "bottom" %>
|
@@ -0,0 +1,139 @@
|
|
1
|
+
<% @title = "Edit Web" %>
|
2
|
+
<%= sub_template "top" %>
|
3
|
+
|
4
|
+
<form action="../update_web" id="setup" method="post" onSubmit="cleanAddress(); return validateSetup()">
|
5
|
+
<h2 style="margin-bottom: 3px">Name and address</h2>
|
6
|
+
<div class="help">
|
7
|
+
The name of the web is included in the title on all pages. The address is the base path that all pages within the web live beneath.
|
8
|
+
Ex: the address "rails" gives URLs like <i>/rails/show/HomePage</i>.
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="inputBox">
|
12
|
+
Name: <input type="text" id="name" name="name" value="<%= @web.name %>" onChange="proposeAddress();">
|
13
|
+
Address: <input type="text" id="address" name="address" value="<%= @web.address %>" onChange="cleanAddress();">
|
14
|
+
<i>(Letters & digits only)</i>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<h2 style="margin-bottom: 3px">Specialize</h2>
|
18
|
+
<div class="help">
|
19
|
+
Turning safe mode on will strip HTML tags and stylesheet options from the content of all pages.
|
20
|
+
Turning on "brackets only" will require all wiki words to be as [[wiki word]] and WikiWord won't work.
|
21
|
+
Additions to the stylesheet take precedence over the existing styles. <i>Hint:</i> View source on a page you want to
|
22
|
+
style to find ID names on individual tags. <a href="#" onClick="document.getElementById('additionalStyle').style.display='block';return false;">See styles >></a>
|
23
|
+
</div>
|
24
|
+
<div class="inputBox">
|
25
|
+
Markup:
|
26
|
+
<select name="markup">
|
27
|
+
<%= html_options({ "Textile" => :textile, "Markdown" => :markdown, "RDoc" => :rdoc }, @web.markup) %>
|
28
|
+
</select>
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
Color:
|
33
|
+
<select name="color">
|
34
|
+
<%= html_options({ "Green" => "008B26", "Purple" => "504685", "Red" => "DA0006", "Orange" => "FA6F00", "Grey" => "8BA2B0" },
|
35
|
+
@web.color) %>
|
36
|
+
</select>
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
<small>
|
41
|
+
|
42
|
+
<input type="checkbox" name="safe_mode"<%= " CHECKED" if @web.safe_mode %>> Safe mode
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
<input type="checkbox" name="brackets_only"<%= " CHECKED" if @web.brackets_only %>> Brackets only
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
<input type="checkbox" name="count_pages"<%= " CHECKED" if @web.count_pages %>> Count pages
|
51
|
+
|
52
|
+
</small>
|
53
|
+
|
54
|
+
<textarea id="additionalStyle" style="display: none; margin-top: 10px; margin-bottom: 5px; width: 560px; height: 200px" name="additional_style"><%= @web.additional_style %></textarea>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<h2 style="margin-bottom: 3px">Password protection for this web (<%= @web.name %>)</h2>
|
58
|
+
<div class="help">
|
59
|
+
This is the password that visitors need to view and edit this web. Setting the password to nothing will remove the password protection.
|
60
|
+
</div>
|
61
|
+
<div class="inputBox">
|
62
|
+
Password: <input type="password" id="password" name="password" value="<%= @web.password %>">
|
63
|
+
Verify: <input type="password" id="password_check" value="<%= @web.password %>" name="password_check">
|
64
|
+
</div>
|
65
|
+
|
66
|
+
<h2 style="margin-bottom: 3px">Publish read-only version of this web (<%= @web.name %>)</h2>
|
67
|
+
<div class="help">
|
68
|
+
You can turn on a read-only version of this web that's accessible even when the regular web is password protected.
|
69
|
+
The published version is accessible through URLs like /wiki/published/HomePage.
|
70
|
+
</div>
|
71
|
+
<div class="inputBox">
|
72
|
+
<input type="checkbox" name="published"<%= " CHECKED" if @web.published %>> Publish this web
|
73
|
+
</div>
|
74
|
+
|
75
|
+
<p align="right">
|
76
|
+
<small>
|
77
|
+
Enter system password
|
78
|
+
<input type="password" id="system_password" name="system_password">
|
79
|
+
and
|
80
|
+
<input type="submit" value="Update Web">
|
81
|
+
<br/><br/>
|
82
|
+
...or forget changes and <a href="/new_web/">create a new web</a>
|
83
|
+
</small>
|
84
|
+
</p>
|
85
|
+
|
86
|
+
</form>
|
87
|
+
|
88
|
+
<br/>
|
89
|
+
<h1>Other administrative tasks</h1>
|
90
|
+
|
91
|
+
<form action="../remove_orphaned_pages" id="remove_orphaned_pages" method="post">
|
92
|
+
|
93
|
+
<p align="right">
|
94
|
+
<small>
|
95
|
+
Clean up by entering system password
|
96
|
+
<input type="password" id="system_password" name="system_password">
|
97
|
+
and
|
98
|
+
<input type="submit" value="Delete Orphan Pages">
|
99
|
+
</small>
|
100
|
+
</p>
|
101
|
+
|
102
|
+
<script>
|
103
|
+
function proposeAddress() {
|
104
|
+
document.getElementById('address').value =
|
105
|
+
document.getElementById('name').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
106
|
+
}
|
107
|
+
|
108
|
+
function cleanAddress() {
|
109
|
+
document.getElementById('address').value =
|
110
|
+
document.getElementById('address').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
111
|
+
}
|
112
|
+
|
113
|
+
function validateSetup() {
|
114
|
+
if (document.getElementById('system_password').value == "") {
|
115
|
+
alert("You must enter the system password");
|
116
|
+
return false;
|
117
|
+
}
|
118
|
+
|
119
|
+
if (document.getElementById('name').value == "") {
|
120
|
+
alert("You must pick a name for the web");
|
121
|
+
return false;
|
122
|
+
}
|
123
|
+
|
124
|
+
if (document.getElementById('address').value == "") {
|
125
|
+
alert("You must pick an address for the web");
|
126
|
+
return false;
|
127
|
+
}
|
128
|
+
|
129
|
+
if (document.getElementById('password').value != "" &&
|
130
|
+
document.getElementById('password').value != document.getElementById('password_check').value) {
|
131
|
+
alert("The password and its verification doesn't match");
|
132
|
+
return false;
|
133
|
+
}
|
134
|
+
|
135
|
+
return true;
|
136
|
+
}
|
137
|
+
</script>
|
138
|
+
|
139
|
+
<%= sub_template "bottom" %>
|