Pimki 1.3.092 → 1.4.092
Sign up to get free protection for your applications and to get access to all the features.
- data/README +145 -131
- data/README-PIMKI +15 -5
- data/app/controllers/wiki.rb +167 -54
- data/app/models/author.rb +3 -3
- data/app/models/chunks/chunk.rb +3 -3
- data/app/models/chunks/engines.rb +18 -21
- data/app/models/chunks/include.rb +29 -29
- data/app/models/chunks/literal.rb +20 -20
- data/app/models/chunks/match.rb +19 -19
- data/app/models/chunks/nowiki.rb +31 -31
- data/app/models/chunks/nowiki_test.rb +14 -14
- data/app/models/chunks/test.rb +18 -18
- data/app/models/chunks/todo.rb +44 -23
- data/app/models/chunks/uri.rb +97 -97
- data/app/models/chunks/uri_test.rb +92 -92
- data/app/models/chunks/wiki.rb +4 -4
- data/app/models/chunks/wiki_symbols.rb +22 -22
- data/app/models/chunks/wiki_test.rb +36 -36
- data/app/models/page.rb +39 -7
- data/app/models/page_lock.rb +23 -23
- data/app/models/page_set.rb +72 -72
- data/app/models/page_test.rb +75 -75
- data/app/models/revision.rb +1 -1
- data/app/models/revision_test.rb +251 -251
- data/app/models/web.rb +19 -6
- data/app/models/web_test.rb +52 -52
- data/app/models/wiki_content.rb +131 -119
- data/app/models/wiki_service.rb +31 -16
- data/app/models/wiki_service_test.rb +15 -15
- data/app/models/wiki_words.rb +1 -1
- data/app/models/wiki_words_test.rb +12 -12
- data/app/views/bottom.rhtml +3 -3
- data/app/views/markdown_help.rhtml +15 -15
- data/app/views/menu.rhtml +20 -20
- data/app/views/navigation.rhtml +26 -26
- data/app/views/rdoc_help.rhtml +15 -15
- data/app/views/static_style_sheet.rhtml +237 -237
- data/app/views/style.rhtml +178 -178
- data/app/views/textile_help.rhtml +27 -27
- data/app/views/top.rhtml +7 -2
- data/app/views/wiki/authors.rhtml +15 -15
- data/app/views/wiki/bliki.rhtml +101 -101
- data/app/views/wiki/bliki_edit.rhtml +3 -0
- data/app/views/wiki/bliki_new.rhtml +3 -0
- data/app/views/wiki/bliki_revision.rhtml +90 -90
- data/app/views/wiki/edit.rhtml +12 -3
- data/app/views/wiki/edit_menu.rhtml +64 -47
- data/app/views/wiki/edit_web.rhtml +65 -18
- data/app/views/wiki/export.rhtml +14 -14
- data/app/views/wiki/feeds.rhtml +10 -10
- data/app/views/wiki/list.rhtml +17 -15
- data/app/views/wiki/locked.rhtml +13 -13
- data/app/views/wiki/login.rhtml +10 -10
- data/app/views/wiki/mind.rhtml +0 -1
- data/app/views/wiki/new.rhtml +8 -3
- data/app/views/wiki/new_system.rhtml +77 -77
- data/app/views/wiki/new_web.rhtml +63 -63
- data/app/views/wiki/page.rhtml +88 -82
- data/app/views/wiki/print.rhtml +15 -15
- data/app/views/wiki/published.rhtml +2 -1
- data/app/views/wiki/recently_revised.rhtml +31 -31
- data/app/views/wiki/revision.rhtml +1 -7
- data/app/views/wiki/rollback.rhtml +31 -0
- data/app/views/wiki/rss_feed.rhtml +21 -21
- data/app/views/wiki/search.rhtml +48 -48
- data/app/views/wiki/tex.rhtml +22 -22
- data/app/views/wiki/tex_web.rhtml +34 -34
- data/app/views/wiki/todo.rhtml +90 -67
- data/app/views/wiki/web_list.rhtml +12 -12
- data/app/views/wiki_words_help.rhtml +1 -1
- data/favicon.png +0 -0
- data/libraries/action_controller_servlet.rb +17 -2
- data/libraries/bluecloth.rb +1127 -1127
- data/libraries/diff/diff.rb +474 -474
- data/libraries/diff/diff_test.rb +79 -79
- data/libraries/erb.rb +490 -490
- data/libraries/madeleine/automatic.rb +418 -357
- data/libraries/madeleine/clock.rb +94 -94
- data/libraries/madeleine/files.rb +19 -0
- data/libraries/madeleine/zmarshal.rb +60 -0
- data/libraries/madeleine_service.rb +14 -15
- data/libraries/rdocsupport.rb +155 -155
- data/libraries/redcloth_for_tex.rb +869 -869
- data/libraries/redcloth_for_tex_test.rb +40 -40
- data/libraries/view_helper.rb +32 -32
- data/libraries/web_controller_server.rb +96 -94
- data/pimki.rb +47 -6
- metadata +18 -4
@@ -1,64 +1,64 @@
|
|
1
|
-
<% @title = "New Wiki Web"; @content_width = 500 %><%= sub_template "top" %>
|
2
|
-
|
3
|
-
<p>
|
4
|
-
Each web serves as an isolated name space for wiki pages, so different subjects or projects can write about different <i>MuppetShows</i>.
|
5
|
-
</p>
|
6
|
-
|
7
|
-
<form action="../create_web" id="setup" method="post" onSubmit="cleanAddress(); return validateSetup()">
|
8
|
-
<ol class="setup">
|
9
|
-
<li>
|
10
|
-
<h2 style="margin-bottom: 3px">Name and address for your new web</h2>
|
11
|
-
<div class="help">
|
12
|
-
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. Ex: the address "rails" gives URLs like <i>/rails/show/HomePage</i>. The address can only consist of letters & digits.
|
13
|
-
</div>
|
14
|
-
<div class="inputBox">
|
15
|
-
Name: <input type="text" id="web_name" name="name" onChange="proposeAddress();" />
|
16
|
-
Address: <input type="text" id="web_address" name="address" onChange="cleanAddress();" />
|
17
|
-
</div>
|
18
|
-
</li>
|
19
|
-
</ol>
|
20
|
-
|
21
|
-
|
22
|
-
<p align="right">
|
23
|
-
<small>
|
24
|
-
Enter system password
|
25
|
-
<input type="password" id="system_password" name="system_password">
|
26
|
-
and
|
27
|
-
<input type="submit" value="Create Web">
|
28
|
-
</small>
|
29
|
-
</p>
|
30
|
-
|
31
|
-
</form>
|
32
|
-
|
33
|
-
<script>
|
34
|
-
function proposeAddress() {
|
35
|
-
document.getElementById('web_address').value =
|
36
|
-
document.getElementById('web_name').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
37
|
-
}
|
38
|
-
|
39
|
-
function cleanAddress() {
|
40
|
-
document.getElementById('web_address').value =
|
41
|
-
document.getElementById('web_address').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
42
|
-
}
|
43
|
-
|
44
|
-
function validateSetup() {
|
45
|
-
if (document.getElementById('web_name').value == "") {
|
46
|
-
alert("You must pick a name for the new web");
|
47
|
-
return false;
|
48
|
-
}
|
49
|
-
|
50
|
-
if (document.getElementById('web_address').value == "") {
|
51
|
-
alert("You must pick an address for the new web");
|
52
|
-
return false;
|
53
|
-
}
|
54
|
-
|
55
|
-
if (document.getElementById('system_password').value == "") {
|
56
|
-
alert("You must enter the system password");
|
57
|
-
return false;
|
58
|
-
}
|
59
|
-
|
60
|
-
return true;
|
61
|
-
}
|
62
|
-
</script>
|
63
|
-
|
1
|
+
<% @title = "New Wiki Web"; @content_width = 500 %><%= sub_template "top" %>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
Each web serves as an isolated name space for wiki pages, so different subjects or projects can write about different <i>MuppetShows</i>.
|
5
|
+
</p>
|
6
|
+
|
7
|
+
<form action="../create_web" id="setup" method="post" onSubmit="cleanAddress(); return validateSetup()">
|
8
|
+
<ol class="setup">
|
9
|
+
<li>
|
10
|
+
<h2 style="margin-bottom: 3px">Name and address for your new web</h2>
|
11
|
+
<div class="help">
|
12
|
+
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. Ex: the address "rails" gives URLs like <i>/rails/show/HomePage</i>. The address can only consist of letters & digits.
|
13
|
+
</div>
|
14
|
+
<div class="inputBox">
|
15
|
+
Name: <input type="text" id="web_name" name="name" onChange="proposeAddress();" />
|
16
|
+
Address: <input type="text" id="web_address" name="address" onChange="cleanAddress();" />
|
17
|
+
</div>
|
18
|
+
</li>
|
19
|
+
</ol>
|
20
|
+
|
21
|
+
|
22
|
+
<p align="right">
|
23
|
+
<small>
|
24
|
+
Enter system password
|
25
|
+
<input type="password" id="system_password" name="system_password">
|
26
|
+
and
|
27
|
+
<input type="submit" value="Create Web">
|
28
|
+
</small>
|
29
|
+
</p>
|
30
|
+
|
31
|
+
</form>
|
32
|
+
|
33
|
+
<script>
|
34
|
+
function proposeAddress() {
|
35
|
+
document.getElementById('web_address').value =
|
36
|
+
document.getElementById('web_name').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
37
|
+
}
|
38
|
+
|
39
|
+
function cleanAddress() {
|
40
|
+
document.getElementById('web_address').value =
|
41
|
+
document.getElementById('web_address').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
42
|
+
}
|
43
|
+
|
44
|
+
function validateSetup() {
|
45
|
+
if (document.getElementById('web_name').value == "") {
|
46
|
+
alert("You must pick a name for the new web");
|
47
|
+
return false;
|
48
|
+
}
|
49
|
+
|
50
|
+
if (document.getElementById('web_address').value == "") {
|
51
|
+
alert("You must pick an address for the new web");
|
52
|
+
return false;
|
53
|
+
}
|
54
|
+
|
55
|
+
if (document.getElementById('system_password').value == "") {
|
56
|
+
alert("You must enter the system password");
|
57
|
+
return false;
|
58
|
+
}
|
59
|
+
|
60
|
+
return true;
|
61
|
+
}
|
62
|
+
</script>
|
63
|
+
|
64
64
|
<%= sub_template "bottom" %>
|
data/app/views/wiki/page.rhtml
CHANGED
@@ -1,83 +1,89 @@
|
|
1
|
-
<% @title = @page.plain_name %>
|
2
|
-
<%= sub_template "top" %>
|
3
|
-
|
4
|
-
<div id="revision">
|
5
|
-
<%= @page.display_content %>
|
6
|
-
</div>
|
7
|
-
|
8
|
-
<div id="changes" style="display: none">
|
9
|
-
<p style="background: #eee; padding: 3px; border: 1px solid silver">
|
10
|
-
<small>
|
11
|
-
Showing changes from revision #<%= @page.number - 1 %> to #<%= @page.number %>:
|
12
|
-
<ins class="diffins">Added</ins> | <del class="diffdel">Removed</del>
|
13
|
-
</small>
|
14
|
-
</p>
|
15
|
-
|
16
|
-
<%= @page.display_diff %>
|
17
|
-
</div>
|
18
|
-
|
19
|
-
<div class="byline">
|
20
|
-
<%= @page.revisions? ? "Revised" : "Created" %> on <%= @page.pretty_created_at %>
|
21
|
-
by <%= @page.author_link %>
|
22
|
-
<%= "(#{@page.author.ip})" if @page.author.respond_to?(:ip) %>
|
23
|
-
<% if @web.count_pages %>
|
24
|
-
<% total_chars = @page.content.length %>
|
25
|
-
(<%= total_chars %> characters / <%= sprintf("%-.1f", (total_chars / 2275 rescue 0)) %> pages)
|
26
|
-
<% end %>
|
27
|
-
</div>
|
28
|
-
|
29
|
-
<div class="navigation">
|
30
|
-
<a href="../edit/<%= @page.name %>" class="navlink" accesskey="E">Edit Page</a>
|
31
|
-
|
32
|
-
<% if @page.revisions.length > 1 %>
|
33
|
-
| <a href="../revision/<%= @page.name %>?rev=<%= @page.revisions.length - 2 %>" class="navlink" accesskey="R">Back in time</a>
|
34
|
-
<small>(<%= @page.revisions.length - 1 %> revisions)</small>
|
35
|
-
<% end %>
|
36
|
-
|
37
|
-
<% if @page.revisions.length > 1 %>
|
38
|
-
<span id="show_changes">
|
39
|
-
| <a href="#" onClick="toggleChanges(); return false;">See changes</a>
|
40
|
-
</span>
|
41
|
-
<span id="hide_changes" style="display: none">
|
42
|
-
| <a href="#" onClick="toggleChanges(); return false;">Hide changes</a>
|
43
|
-
</span>
|
44
|
-
<% end %>
|
45
|
-
|
46
|
-
<small>
|
47
|
-
| Views: <a href="../print/<%= @page.name %>">Print</a>
|
48
|
-
<% if OPTIONS[:pdflatex] && @web.markup == :textile %>
|
49
|
-
| <a href="../tex/<%= @page.name %>">TeX</a> | <a href="../pdf/<%= @page.name %>">PDF</a>
|
50
|
-
<% end %>
|
51
|
-
</small>
|
52
|
-
|
53
|
-
<% if @page.references.length > 0 %>
|
54
|
-
<small>
|
55
|
-
|
56
|
-
</small>
|
57
|
-
<% end %>
|
58
|
-
|
59
|
-
<% if @page.
|
60
|
-
<
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
document.getElementById("
|
77
|
-
document.getElementById("
|
78
|
-
document.getElementById("
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
1
|
+
<% @title = @page.plain_name %>
|
2
|
+
<%= sub_template "top" %>
|
3
|
+
|
4
|
+
<div id="revision">
|
5
|
+
<%= @page.display_content %>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div id="changes" style="display: none">
|
9
|
+
<p style="background: #eee; padding: 3px; border: 1px solid silver">
|
10
|
+
<small>
|
11
|
+
Showing changes from revision #<%= @page.number - 1 %> to #<%= @page.number %>:
|
12
|
+
<ins class="diffins">Added</ins> | <del class="diffdel">Removed</del>
|
13
|
+
</small>
|
14
|
+
</p>
|
15
|
+
|
16
|
+
<%= @page.display_diff %>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="byline">
|
20
|
+
<%= @page.revisions? ? "Revised" : "Created" %> on <%= @page.pretty_created_at %>
|
21
|
+
by <%= @page.author_link %>
|
22
|
+
<%= "(#{@page.author.ip})" if @page.author.respond_to?(:ip) %>
|
23
|
+
<% if @web.count_pages %>
|
24
|
+
<% total_chars = @page.content.length %>
|
25
|
+
(<%= total_chars %> characters / <%= sprintf("%-.1f", (total_chars / 2275 rescue 0)) %> pages)
|
26
|
+
<% end %>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="navigation">
|
30
|
+
<a href="../edit/<%= @page.name %>" class="navlink" accesskey="E">Edit Page</a>
|
31
|
+
|
32
|
+
<% if @page.revisions.length > 1 %>
|
33
|
+
| <a href="../revision/<%= @page.name %>?rev=<%= @page.revisions.length - 2 %>" class="navlink" accesskey="R">Back in time</a>
|
34
|
+
<small>(<%= @page.revisions.length - 1 %> revisions)</small>
|
35
|
+
<% end %>
|
36
|
+
|
37
|
+
<% if @page.revisions.length > 1 %>
|
38
|
+
<span id="show_changes">
|
39
|
+
| <a href="#" onClick="toggleChanges(); return false;">See changes</a>
|
40
|
+
</span>
|
41
|
+
<span id="hide_changes" style="display: none">
|
42
|
+
| <a href="#" onClick="toggleChanges(); return false;">Hide changes</a>
|
43
|
+
</span>
|
44
|
+
<% end %>
|
45
|
+
|
46
|
+
<small>
|
47
|
+
| Views: <a href="../print/<%= @page.name %>">Print</a>
|
48
|
+
<% if OPTIONS[:pdflatex] && @web.markup == :textile %>
|
49
|
+
| <a href="../tex/<%= @page.name %>">TeX</a> | <a href="../pdf/<%= @page.name %>">PDF</a>
|
50
|
+
<% end %>
|
51
|
+
</small>
|
52
|
+
|
53
|
+
<% if @page.references.length > 0 %>
|
54
|
+
<small>
|
55
|
+
<br />| Linked from: <%= @page.references.collect { |ref| ref.link }.join(", ") %>
|
56
|
+
</small>
|
57
|
+
<% end %>
|
58
|
+
|
59
|
+
<% if @page.bliki_references.length > 0 %>
|
60
|
+
<small>
|
61
|
+
<br />| Bliki Linked from: <%= @page.bliki_references.collect { |ref| link_to_bliki(ref) }.join(", ") %>
|
62
|
+
</small>
|
63
|
+
<% end %>
|
64
|
+
|
65
|
+
<% if @page.name == "HomePage" %>
|
66
|
+
<br /><a href="../edit_web/" class="navlink">Edit Web</a>
|
67
|
+
| <%= list_item "Authors", "../authors/", "Who wrote what" %>
|
68
|
+
| <%= list_item "Feeds", "../feeds/", "Subscribe to changes by RSS" %>
|
69
|
+
| <%= list_item "Export", "../export/", "Download a zip with all the pages in this wiki", "X" %>
|
70
|
+
<% end %>
|
71
|
+
</div>
|
72
|
+
|
73
|
+
<script language="Javascript">
|
74
|
+
function toggleChanges() {
|
75
|
+
if (document.getElementById("changes").style.display == "none") {
|
76
|
+
document.getElementById("changes").style.display = "block";
|
77
|
+
document.getElementById("revision").style.display = "none";
|
78
|
+
document.getElementById("show_changes").style.display = "none";
|
79
|
+
document.getElementById("hide_changes").style.display = "inline";
|
80
|
+
} else {
|
81
|
+
document.getElementById("changes").style.display = "none";
|
82
|
+
document.getElementById("revision").style.display = "block";
|
83
|
+
document.getElementById("show_changes").style.display = "inline";
|
84
|
+
document.getElementById("hide_changes").style.display = "none";
|
85
|
+
}
|
86
|
+
}
|
87
|
+
</script>
|
88
|
+
|
83
89
|
<%= sub_template "bottom" %>
|
data/app/views/wiki/print.rhtml
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
<%
|
2
|
-
@title = @page.plain_name
|
3
|
-
@hide_navigation = true
|
4
|
-
@style_additions = ".newWikiWord { background-color: white; font-style: italic; }"
|
5
|
-
@inline_style = true
|
6
|
-
%><%= sub_template "top" %>
|
7
|
-
|
8
|
-
<%= @page.display_content_for_export %>
|
9
|
-
|
10
|
-
<div class="byline">
|
11
|
-
<%= @page.revisions? ? "Revised" : "Created" %> on <%= @page.pretty_created_at %>
|
12
|
-
by
|
13
|
-
<%= @page.author_link({ :mode => :export }) %>
|
14
|
-
</div>
|
15
|
-
|
1
|
+
<%
|
2
|
+
@title = @page.plain_name
|
3
|
+
@hide_navigation = true
|
4
|
+
@style_additions = ".newWikiWord { background-color: white; font-style: italic; }"
|
5
|
+
@inline_style = true
|
6
|
+
%><%= sub_template "top" %>
|
7
|
+
|
8
|
+
<%= @page.display_content_for_export %>
|
9
|
+
|
10
|
+
<div class="byline">
|
11
|
+
<%= @page.revisions? ? "Revised" : "Created" %> on <%= @page.pretty_created_at %>
|
12
|
+
by
|
13
|
+
<%= @page.author_link({ :mode => :export }) %>
|
14
|
+
</div>
|
15
|
+
|
16
16
|
<%= sub_template "bottom" %>
|
@@ -1,7 +1,8 @@
|
|
1
1
|
<%
|
2
2
|
@title = @page.plain_name
|
3
3
|
@hide_navigation = true
|
4
|
-
@style_additions = ".newWikiWord { background-color: white; font-style: italic; }
|
4
|
+
@style_additions = ".newWikiWord { background-color: white; font-style: italic; }
|
5
|
+
#Container, #Content { width: 600px; padding-left: 180px;}"
|
5
6
|
@inline_style = true
|
6
7
|
%><%= sub_template "top" %>
|
7
8
|
|
@@ -1,31 +1,31 @@
|
|
1
|
-
<% @title = "Recently Revised" %>
|
2
|
-
<%= sub_template "top" %>
|
3
|
-
|
4
|
-
<% unless @categories.empty? %>
|
5
|
-
<div id="categories">
|
6
|
-
<strong>Categories</strong>:
|
7
|
-
[<a href=".">Any</a>]
|
8
|
-
<%= @category_links.join(', ') %>
|
9
|
-
</div>
|
10
|
-
<% end %>
|
11
|
-
|
12
|
-
<% revision_date = Date.new(2100) %>
|
13
|
-
<ul>
|
14
|
-
<% for page in @pages_by_revision %>
|
15
|
-
<% if page.revised_on < revision_date %>
|
16
|
-
</ul><b><%= page.pretty_revised_on %></b><ul>
|
17
|
-
<% end %>
|
18
|
-
|
19
|
-
<li>
|
20
|
-
<a href="../show/<%= page.name %>"><%= page.plain_name %></a>
|
21
|
-
<div class="byline" style="margin-bottom: 0px">
|
22
|
-
by <%= page.author_link %>
|
23
|
-
at <%= page.created_at.strftime "%H:%M" %>
|
24
|
-
<%= "from #{page.author.ip}" if page.author.respond_to?(:ip) %>
|
25
|
-
</div>
|
26
|
-
</li>
|
27
|
-
|
28
|
-
<% revision_date = page.revised_on %>
|
29
|
-
<% end %>
|
30
|
-
|
31
|
-
<%= sub_template "bottom" %>
|
1
|
+
<% @title = "Recently Revised" %>
|
2
|
+
<%= sub_template "top" %>
|
3
|
+
|
4
|
+
<% unless @categories.empty? %>
|
5
|
+
<div id="categories">
|
6
|
+
<strong>Categories</strong>:
|
7
|
+
[<a href=".">Any</a>]
|
8
|
+
<%= @category_links.join(', ') %>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<% revision_date = Date.new(2100) %>
|
13
|
+
<ul>
|
14
|
+
<% for page in @pages_by_revision %>
|
15
|
+
<% if page.revised_on < revision_date %>
|
16
|
+
</ul><b><%= page.pretty_revised_on %></b><ul>
|
17
|
+
<% end %>
|
18
|
+
|
19
|
+
<li>
|
20
|
+
<a href="../show/<%= page.name %>"><%= page.plain_name %></a>
|
21
|
+
<div class="byline" style="margin-bottom: 0px">
|
22
|
+
by <%= page.author_link %>
|
23
|
+
at <%= page.created_at.strftime "%H:%M" %>
|
24
|
+
<%= "from #{page.author.ip}" if page.author.respond_to?(:ip) %>
|
25
|
+
</div>
|
26
|
+
</li>
|
27
|
+
|
28
|
+
<% revision_date = page.revised_on %>
|
29
|
+
<% end %>
|
30
|
+
|
31
|
+
<%= sub_template "bottom" %>
|
@@ -53,7 +53,7 @@
|
|
53
53
|
</span>
|
54
54
|
<% end %>
|
55
55
|
|
56
|
-
| <a href="
|
56
|
+
| <a href="../rollback/<%= @page.name %>?rev=<%= @revision.number %>" class="navlink">Rollback</a>
|
57
57
|
|
58
58
|
<% if @page.references.length > 0 %>
|
59
59
|
<small>
|
@@ -76,12 +76,6 @@
|
|
76
76
|
document.getElementById("hide_changes").style.display = "none";
|
77
77
|
}
|
78
78
|
}
|
79
|
-
|
80
|
-
function confirmRollback() {
|
81
|
-
if (confirm('Are you sure you want reset the page to this revision?')) {
|
82
|
-
location.href = '../rollback/<%= @page.name %>?rev=<%= @revision.number %>';
|
83
|
-
}
|
84
|
-
}
|
85
79
|
</script>
|
86
80
|
|
87
81
|
<%= sub_template "bottom" %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<%
|
2
|
+
@title = "Rollback to #{@page.plain_name} Rev ##{@revision.number}"
|
3
|
+
@content_width = 720
|
4
|
+
@hide_navigation = true
|
5
|
+
%><%= sub_template "top" %>
|
6
|
+
|
7
|
+
<%= "<p style='color:red'>Please correct the error that caused this error in rendering:<br/><small>#{@params["msg"]}</small></p>" if @params["msg"] %>
|
8
|
+
|
9
|
+
<form id="editForm" action="../save/<%= @page.name %>" method="post" onSubmit="cleanAuthorName();">
|
10
|
+
<p>
|
11
|
+
<textarea name="content" style="font-size: 12px; width: 450px; height: 500px"><%= @revision.content %></textarea>
|
12
|
+
</p>
|
13
|
+
<p>
|
14
|
+
<input type="submit" value="Update"> as
|
15
|
+
<input type="text" name="author" id="authorName" value="<%= @author %>"
|
16
|
+
onClick="this.value == 'AnonymousCoward' ? this.value = '' : true">
|
17
|
+
| <a href="../cancel_edit/<%= @page.name %>">Cancel</a> <small>(unlocks page)</small>
|
18
|
+
</p>
|
19
|
+
</form>
|
20
|
+
|
21
|
+
<%= render_markup_help %>
|
22
|
+
|
23
|
+
<script language="JavaScript1.2">
|
24
|
+
function cleanAuthorName() {
|
25
|
+
if (document.getElementById('authorName').value == "") {
|
26
|
+
document.getElementById('authorName').value = 'AnonymousCoward';
|
27
|
+
}
|
28
|
+
}
|
29
|
+
</script>
|
30
|
+
|
31
|
+
<%= sub_template "bottom" %>
|