Pimki 1.3.092 → 1.4.092

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. data/README +145 -131
  2. data/README-PIMKI +15 -5
  3. data/app/controllers/wiki.rb +167 -54
  4. data/app/models/author.rb +3 -3
  5. data/app/models/chunks/chunk.rb +3 -3
  6. data/app/models/chunks/engines.rb +18 -21
  7. data/app/models/chunks/include.rb +29 -29
  8. data/app/models/chunks/literal.rb +20 -20
  9. data/app/models/chunks/match.rb +19 -19
  10. data/app/models/chunks/nowiki.rb +31 -31
  11. data/app/models/chunks/nowiki_test.rb +14 -14
  12. data/app/models/chunks/test.rb +18 -18
  13. data/app/models/chunks/todo.rb +44 -23
  14. data/app/models/chunks/uri.rb +97 -97
  15. data/app/models/chunks/uri_test.rb +92 -92
  16. data/app/models/chunks/wiki.rb +4 -4
  17. data/app/models/chunks/wiki_symbols.rb +22 -22
  18. data/app/models/chunks/wiki_test.rb +36 -36
  19. data/app/models/page.rb +39 -7
  20. data/app/models/page_lock.rb +23 -23
  21. data/app/models/page_set.rb +72 -72
  22. data/app/models/page_test.rb +75 -75
  23. data/app/models/revision.rb +1 -1
  24. data/app/models/revision_test.rb +251 -251
  25. data/app/models/web.rb +19 -6
  26. data/app/models/web_test.rb +52 -52
  27. data/app/models/wiki_content.rb +131 -119
  28. data/app/models/wiki_service.rb +31 -16
  29. data/app/models/wiki_service_test.rb +15 -15
  30. data/app/models/wiki_words.rb +1 -1
  31. data/app/models/wiki_words_test.rb +12 -12
  32. data/app/views/bottom.rhtml +3 -3
  33. data/app/views/markdown_help.rhtml +15 -15
  34. data/app/views/menu.rhtml +20 -20
  35. data/app/views/navigation.rhtml +26 -26
  36. data/app/views/rdoc_help.rhtml +15 -15
  37. data/app/views/static_style_sheet.rhtml +237 -237
  38. data/app/views/style.rhtml +178 -178
  39. data/app/views/textile_help.rhtml +27 -27
  40. data/app/views/top.rhtml +7 -2
  41. data/app/views/wiki/authors.rhtml +15 -15
  42. data/app/views/wiki/bliki.rhtml +101 -101
  43. data/app/views/wiki/bliki_edit.rhtml +3 -0
  44. data/app/views/wiki/bliki_new.rhtml +3 -0
  45. data/app/views/wiki/bliki_revision.rhtml +90 -90
  46. data/app/views/wiki/edit.rhtml +12 -3
  47. data/app/views/wiki/edit_menu.rhtml +64 -47
  48. data/app/views/wiki/edit_web.rhtml +65 -18
  49. data/app/views/wiki/export.rhtml +14 -14
  50. data/app/views/wiki/feeds.rhtml +10 -10
  51. data/app/views/wiki/list.rhtml +17 -15
  52. data/app/views/wiki/locked.rhtml +13 -13
  53. data/app/views/wiki/login.rhtml +10 -10
  54. data/app/views/wiki/mind.rhtml +0 -1
  55. data/app/views/wiki/new.rhtml +8 -3
  56. data/app/views/wiki/new_system.rhtml +77 -77
  57. data/app/views/wiki/new_web.rhtml +63 -63
  58. data/app/views/wiki/page.rhtml +88 -82
  59. data/app/views/wiki/print.rhtml +15 -15
  60. data/app/views/wiki/published.rhtml +2 -1
  61. data/app/views/wiki/recently_revised.rhtml +31 -31
  62. data/app/views/wiki/revision.rhtml +1 -7
  63. data/app/views/wiki/rollback.rhtml +31 -0
  64. data/app/views/wiki/rss_feed.rhtml +21 -21
  65. data/app/views/wiki/search.rhtml +48 -48
  66. data/app/views/wiki/tex.rhtml +22 -22
  67. data/app/views/wiki/tex_web.rhtml +34 -34
  68. data/app/views/wiki/todo.rhtml +90 -67
  69. data/app/views/wiki/web_list.rhtml +12 -12
  70. data/app/views/wiki_words_help.rhtml +1 -1
  71. data/favicon.png +0 -0
  72. data/libraries/action_controller_servlet.rb +17 -2
  73. data/libraries/bluecloth.rb +1127 -1127
  74. data/libraries/diff/diff.rb +474 -474
  75. data/libraries/diff/diff_test.rb +79 -79
  76. data/libraries/erb.rb +490 -490
  77. data/libraries/madeleine/automatic.rb +418 -357
  78. data/libraries/madeleine/clock.rb +94 -94
  79. data/libraries/madeleine/files.rb +19 -0
  80. data/libraries/madeleine/zmarshal.rb +60 -0
  81. data/libraries/madeleine_service.rb +14 -15
  82. data/libraries/rdocsupport.rb +155 -155
  83. data/libraries/redcloth_for_tex.rb +869 -869
  84. data/libraries/redcloth_for_tex_test.rb +40 -40
  85. data/libraries/view_helper.rb +32 -32
  86. data/libraries/web_controller_server.rb +96 -94
  87. data/pimki.rb +47 -6
  88. metadata +18 -4
@@ -1,101 +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") %>, <%= page.revisions.length %> revision(s)]</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
-
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") %>, <%= page.revisions.length %> revision(s)]</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
+
@@ -12,6 +12,9 @@
12
12
  <textarea name="content" style="width: 450px; height: 430px"><%= @page.content %></textarea>
13
13
  </p>
14
14
  <p>
15
+ <% if @web.check_pass_on_edit %>
16
+ Please enter edit password: <input type="password" name="password" id="password"><br />
17
+ <% end %>
15
18
  <input type="submit" value="Update"> as
16
19
  <input type="text" name="author" id="authorName" value="<%= @author %>"
17
20
  onClick="this.value == 'AnonymousCoward' ? this.value = '' : true">
@@ -32,6 +32,9 @@
32
32
  </table>
33
33
 
34
34
  <p>
35
+ <% if @web.check_pass_on_edit %>
36
+ Please enter edit password: <input type="password" name="password" id="password"><br />
37
+ <% end %>
35
38
  <input type="submit" value="Update"> as
36
39
 
37
40
  | <a href="../cancel_bliki_edit/">Cancel</a> <small>(unlocks entry)</small>
@@ -1,91 +1,91 @@
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">
11
- <div id="revision">
12
- <%= @revision.display_content %>
13
- </div>
14
- <div id="changes" style="display: none">
15
- <p style="background: #eee; padding: 3px; border: 1px solid silver">
16
- <small>
17
- Showing changes from revision #<%= @page.number - 1 %> to #<%= @page.number %>:
18
- <ins class="diffins">Added</ins> | <del class="diffdel">Removed</del>
19
- </small>
20
- </p>
21
-
22
- <%= @revision.display_diff %>
23
- </div>
24
- </td>
25
- </tr>
26
- <tr style="background-color:efe">
27
- <th colspan="2" align="right"><small><%= web.make_link(@revision.author, nil, {}) %></small></th>
28
- </tr>
29
- </table>
30
-
31
- <div class="byline">
32
- <%= "Revision from #{@revision.pretty_created_at} by" %>
33
- <%# @page.web.pages[@revision.author] ? WikiWords.existing_page_link(@revision.author) : WikiWords.unexisting_page_link(@revision.author) %>
34
- </div>
35
-
36
- <div class="navigation">
37
- <a href="../bliki_edit/<%= @page.name %>" class="navlink">Edit</a> |
38
- <% if @revision.previous_revision %>
39
- <a href="../bliki_revision/<%= @page.name %>?rev=<%= @revision.previous_revision.number %>" class="navlink">Lower</a>
40
- <% else %>
41
- <span style="color:grey">Lower</span>
42
- <% end %> -
43
- <% if @revision.next_revision %>
44
- <a href="../bliki_revision/<%= @page.name %>?rev=<%= @revision.next_revision.number %>" class="navlink">Higher</a>
45
- <% else %>
46
- <span style="color:grey">Higher</span>
47
- <% end %>
48
-
49
- <%= '|' if @revision.previous_revision or @revision.next_revision %>
50
- <a href="../bliki_delete/<%= @page.name %>" class="navlink" onClick="return confirm('Are you sure you want delete this entry completely?')">Delete All</a>
51
- <% if @revision.next_revision %>
52
- | <a href="../bliki_revision/<%= @page.name %>?rev=<%= @page.revisions.length - 1 %>" class="navlink">Back to current</a>
53
- | <a href="../rollback_bliki/<%= @page.name %>?rev=<%= @revision.number %>"
54
- class="navlink" onClick="return confirm('Are you sure you want reset the page to this revision?')">Rollback to here</a>
55
- <% end %>
56
-
57
-
58
- <% if @page.references.length > 0 %>
59
- <small>
60
- | Referenced by: <%= @page.references.collect { |ref| "<a href='#{ref.name}'>#{ref.name}</a>" }.join(", ") %>
61
- </small>
62
- <% end %>
63
-
64
- <% if @page.revisions.length > 1 %>
65
- <span id="show_changes">
66
- | <a href="#" onClick="toggleChanges(); return false;">See changes</a>
67
- </span>
68
- <span id="hide_changes" style="display: none">
69
- | <a href="#" onClick="toggleChanges(); return false;">Hide changes</a>
70
- </span>
71
- <% end %>
72
-
73
- </div>
74
-
75
- <script language="Javascript">
76
- function toggleChanges() {
77
- if (document.getElementById("changes").style.display == "none") {
78
- document.getElementById("changes").style.display = "block";
79
- document.getElementById("revision").style.display = "none";
80
- document.getElementById("show_changes").style.display = "none";
81
- document.getElementById("hide_changes").style.display = "inline";
82
- } else {
83
- document.getElementById("changes").style.display = "none";
84
- document.getElementById("revision").style.display = "block";
85
- document.getElementById("show_changes").style.display = "inline";
86
- document.getElementById("hide_changes").style.display = "none";
87
- }
88
- }
89
- </script>
90
-
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">
11
+ <div id="revision">
12
+ <%= @revision.display_content %>
13
+ </div>
14
+ <div id="changes" style="display: none">
15
+ <p style="background: #eee; padding: 3px; border: 1px solid silver">
16
+ <small>
17
+ Showing changes from revision #<%= @page.number - 1 %> to #<%= @page.number %>:
18
+ <ins class="diffins">Added</ins> | <del class="diffdel">Removed</del>
19
+ </small>
20
+ </p>
21
+
22
+ <%= @revision.display_diff %>
23
+ </div>
24
+ </td>
25
+ </tr>
26
+ <tr style="background-color:efe">
27
+ <th colspan="2" align="right"><small><%= web.make_link(@revision.author, nil, {}) %></small></th>
28
+ </tr>
29
+ </table>
30
+
31
+ <div class="byline">
32
+ <%= "Revision from #{@revision.pretty_created_at} by" %>
33
+ <%# @page.web.pages[@revision.author] ? WikiWords.existing_page_link(@revision.author) : WikiWords.unexisting_page_link(@revision.author) %>
34
+ </div>
35
+
36
+ <div class="navigation">
37
+ <a href="../bliki_edit/<%= @page.name %>" class="navlink">Edit</a> |
38
+ <% if @revision.previous_revision %>
39
+ <a href="../bliki_revision/<%= @page.name %>?rev=<%= @revision.previous_revision.number %>" class="navlink">Lower</a>
40
+ <% else %>
41
+ <span style="color:grey">Lower</span>
42
+ <% end %> -
43
+ <% if @revision.next_revision %>
44
+ <a href="../bliki_revision/<%= @page.name %>?rev=<%= @revision.next_revision.number %>" class="navlink">Higher</a>
45
+ <% else %>
46
+ <span style="color:grey">Higher</span>
47
+ <% end %>
48
+
49
+ <%= '|' if @revision.previous_revision or @revision.next_revision %>
50
+ <a href="../bliki_delete/<%= @page.name %>" class="navlink" onClick="return confirm('Are you sure you want delete this entry completely?')">Delete All</a>
51
+ <% if @revision.next_revision %>
52
+ | <a href="../bliki_revision/<%= @page.name %>?rev=<%= @page.revisions.length - 1 %>" class="navlink">Back to current</a>
53
+ | <a href="../rollback_bliki/<%= @page.name %>?rev=<%= @revision.number %>"
54
+ class="navlink" onClick="return confirm('Are you sure you want reset the page to this revision?')">Rollback to here</a>
55
+ <% end %>
56
+
57
+
58
+ <% if @page.references.length > 0 %>
59
+ <small>
60
+ | Referenced by: <%= @page.references.collect { |ref| "<a href='#{ref.name}'>#{ref.name}</a>" }.join(", ") %>
61
+ </small>
62
+ <% end %>
63
+
64
+ <% if @page.revisions.length > 1 %>
65
+ <span id="show_changes">
66
+ | <a href="#" onClick="toggleChanges(); return false;">See changes</a>
67
+ </span>
68
+ <span id="hide_changes" style="display: none">
69
+ | <a href="#" onClick="toggleChanges(); return false;">Hide changes</a>
70
+ </span>
71
+ <% end %>
72
+
73
+ </div>
74
+
75
+ <script language="Javascript">
76
+ function toggleChanges() {
77
+ if (document.getElementById("changes").style.display == "none") {
78
+ document.getElementById("changes").style.display = "block";
79
+ document.getElementById("revision").style.display = "none";
80
+ document.getElementById("show_changes").style.display = "none";
81
+ document.getElementById("hide_changes").style.display = "inline";
82
+ } else {
83
+ document.getElementById("changes").style.display = "none";
84
+ document.getElementById("revision").style.display = "block";
85
+ document.getElementById("show_changes").style.display = "inline";
86
+ document.getElementById("hide_changes").style.display = "none";
87
+ }
88
+ }
89
+ </script>
90
+
91
91
  <%= sub_template "bottom" %>
@@ -1,9 +1,8 @@
1
1
  <%
2
2
  @title = "Editing #{@page.plain_name}"
3
- @content_width = 720
3
+ @content_width = 800
4
4
  @hide_navigation = true
5
5
  @style_additions = "#Container, #Content {padding-left:100px;}"
6
-
7
6
  %>
8
7
  <%= sub_template "top" %>
9
8
 
@@ -13,9 +12,19 @@
13
12
 
14
13
  <form style="float:right" id="editForm" action="../save/<%= @page.name %>" method="post" onSubmit="cleanAuthorName();">
15
14
  <p>
16
- <textarea name="content" style="width: 450px; height: 430px"><%= @page.content %></textarea>
15
+ <textarea name="content" style="width: 550px; height: 430px"><%= @page.content %></textarea>
16
+ </p>
17
+ <p style="font-size: smaller;">This change is a...
18
+ <input type="radio" name="edit_type" value="minor">Minor Edit</input>
19
+ <input type="radio" name="edit_type" value="major">Major Edit</input>
20
+ <input type="radio" name="edit_type" value="default" checked>Default</input>
21
+ <br />
22
+ Learn more on the concept of <a href='.' onClick="alert('The default behaviour when revising a page is of a \'Continous Edit\'.\nThis means that if the previous edit was done by the same author and less than 30 minutes ago, this edit is minor and only the latest version will be kept as the revision. Otherwise (different author, more than 30 minutes ago) this is a new revision of the page.\nThis default behaviour can be overriden by specifying a major/minor edit.');return false;">continous edit</a>.
17
23
  </p>
18
24
  <p>
25
+ <% if @web.check_pass_on_edit %>
26
+ <p>Please enter edit password: <input type="password" name="password" id="password"></p>
27
+ <% end %>
19
28
  <input type="submit" value="Update"> as
20
29
  <input type="text" name="author" id="authorName" value="<%= @author %>"
21
30
  onClick="this.value == 'AnonymousCoward' ? this.value = '' : true">
@@ -1,48 +1,65 @@
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="linkers" <%= 'checked' if @menu_type == 'linkers' %>>Only pages that link other pages (default)</p>
13
- <p><input type="radio" name="type" value="all" <%= 'checked' if @menu_type == 'all' %>>All Pages</p>
14
- <p><input type="radio" name="type" value="revised" <%= 'checked' if @menu_type == 'revised' %>>Recently revised pages</p>
15
- <p><input type="radio" name="type" value="recent" <%= 'checked' if @menu_type == 'recent' %>>Recently visited pages</p>
16
- <p><input type="radio" name="type" value="viewed" <%= 'checked' if @menu_type == 'viewed' %>>Most viewed pages</p>
17
- <p><input type="radio" name="type" value="category" <%= 'checked' if @menu_type == 'category' %>>Pages in a specific category:
18
- <select id="category" name="category" size="1" style="width:190">
19
- <option value="noselect">------------
20
- <% for category in web.categories %>
21
- <option value="<%= category %>"><%= category %>
22
- <% end %>
23
- </select>
24
- </p>
25
- <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>
26
- <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):
27
- <textarea name="content" style="width: 400px; height: 300px"><%= @menu_content %></textarea>
28
- </p>
29
-
30
- <table width="400px">
31
- <tr><td align="right">
32
- <small>
33
- Enter system password
34
- <input style="font-size:small;" type="password" id="system_password" name="system_password">
35
- and
36
- <input type="submit" name='action' value="Update">
37
- </small>
38
- </tr></td>
39
- <tr><td align="right">
40
- <small>
41
- ...or forget changes and <input type="submit" name='action' value="Cancel Update">
42
- </small>
43
- </tr></td>
44
- </table>
45
-
46
- </form>
47
-
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="linkers" <%= 'checked' if @menu_type == 'linkers' %>>Only pages that link other pages (default)</p>
13
+ <p><input type="radio" name="type" value="all" <%= 'checked' if @menu_type == 'all' %>>All Pages</p>
14
+ <p><input type="radio" name="type" value="revised" <%= 'checked' if @menu_type == 'revised' %>>Recently revised pages</p>
15
+ <p><input type="radio" name="type" value="recent" <%= 'checked' if @menu_type == 'recent' %>>Recently visited pages</p>
16
+ <p><input type="radio" name="type" value="viewed" <%= 'checked' if @menu_type == 'viewed' %>>Most viewed pages</p>
17
+ <p><input type="radio" name="type" value="category" <%= 'checked' if @menu_type == 'category' %>>Pages in a specific category:
18
+ <select id="category" name="category" size="1" style="width:190">
19
+ <option value="noselect">------------
20
+ <% for category in web.categories %>
21
+ <option value="<%= category %>"><%= category %>
22
+ <% end %>
23
+ </select>
24
+ </p>
25
+ <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>
26
+ <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):
27
+ <textarea name="content" style="width: 400px; height: 300px"><%= @menu_content.content %></textarea>
28
+ </p>
29
+
30
+ <% if Page === @menu_content && @menu_content.revisions.length > 1
31
+ @menu_content.revisions.each_with_index do |rev, i| %>
32
+ <a href='.' onClick="forms.editForm.content.value = unescape('<%= CGI.escape(rev.content).gsub('+', ' ') %>'); return false;">Set menu content to revision <%= i %></a><br />
33
+ <% end
34
+ end
35
+ %>
36
+
37
+ <table width="400px">
38
+ <tr align="right">
39
+ <td>
40
+ <small>Updated by: <input type="text" name="author" id="authorName"
41
+ value="<%= @author || 'AnonymousCoward' %>"
42
+ onClick="this.value == 'AnonymousCoward' ? this.value = '' : true">
43
+ </small>
44
+ </td>
45
+ </tr>
46
+ <tr><td>&nbsp;</td></tr>
47
+ <tr>
48
+ <td align="right">
49
+ <small>
50
+ Enter system password
51
+ <input style="font-size:small;" type="password" id="system_password" name="system_password">
52
+ and
53
+ <input type="submit" name='action' value="Update">
54
+ </small>
55
+ </tr></td>
56
+ <tr><td align="right">
57
+ <small>
58
+ ...or forget changes and <input type="submit" name='action' value="Cancel Update">
59
+ </small>
60
+ </tr></td>
61
+ </table>
62
+
63
+ </form>
64
+
48
65
  <%= sub_template "bottom" %>