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,179 +1,179 @@
1
- <style type="text/css">
2
- h1#pageName, .newWikiWord a, a.existingWikiWord, .newWikiWord a:hover, #TextileHelp h3 { color: #<%= @web ? @web.color : "393" %>; }
3
-
4
- #Container, #Content {
5
- width: <%= @content_width || "600" %>px;
6
- }
7
-
8
- #Container {
9
- float: none;
10
- margin: 0 auto;
11
- text-align: center;
12
- }
13
-
14
- #Content {
15
- margin: 0;
16
- padding: 5px;
17
- text-align: left;
18
- border-top: none;
19
- float: left;
20
- }
21
-
22
- body { background-color: #fff; }
23
-
24
- body, p, ol, ul, td {
25
- font-family: verdana, arial, helvetica, sans-serif;
26
- color: #333;
27
- font-size: 13px;
28
- line-height: 18px;
29
- }
30
-
31
- a { color: #000; }
32
-
33
- .newWikiWord { background-color: #eee; }
34
- .newWikiWord a:hover { background-color: white; }
35
-
36
- a:visited { color: #666; }
37
- a:hover { color: #fff; background-color:#000; }
38
-
39
- h1, h2, h3 { color: #333; font-family: georgia, verdana; }
40
- h1 { font-size: 28px }
41
- h2 { font-size: 19px }
42
- h3 { font-size: 16px }
43
-
44
- h1#pageName {
45
- margin: 5px 0px 0px 0px;
46
- padding: 0px 0px 0px 0px;
47
- line-height: 28px;
48
- }
49
-
50
- h1#pageName small {
51
- color: grey;
52
- line-height: 10px;
53
- font-size: 10px;
54
- padding: 0px;
55
- }
56
-
57
- a.nav, a.nav:link, a.nav:visited { color: #000; }
58
- a.nav:hover { color: #fff; background-color:#000; }
59
-
60
- li { margin-bottom: 7px }
61
-
62
- .navigation {
63
- margin-top: 5px;
64
- font-size : 12px;
65
- color: #000;
66
- }
67
-
68
- .navigation a:hover { color: #fff; background-color:#000; }
69
-
70
- .navigation a {
71
- font-size: 11px;
72
- color: black;
73
- font-weight: bold;
74
- }
75
-
76
- .navigation small a {
77
- font-weight: normal;
78
- font-size: 11px;
79
- }
80
-
81
- .navOn{
82
- font-size: 11px;
83
- color: grey;
84
- font-weight: bold;
85
- text-decoration: none;
86
- }
87
-
88
- .help {
89
- font-family: verdana, arial, helvetica, sans-serif;
90
- font-size: 11px;
91
- }
92
-
93
- .inputBox {
94
- font-family: verdana, arial, helvetica, sans-serif;
95
- font-size: 11px;
96
- background-color: #eee;
97
- padding: 5px;
98
- margin-bottom: 20px;
99
- }
100
-
101
- blockquote {
102
- display: block;
103
- margin: 0px 0px 20px 0px;
104
- padding: 0px 30px;
105
- font-size:11px;
106
- line-height:17px;
107
- font-style: italic;
108
- }
109
-
110
- pre {
111
- background-color: #eee;
112
- padding: 10px;
113
- font-size: 11px;
114
- }
115
-
116
- ol.setup {
117
- font-size: 19px;
118
- font-family: georgia, verdana;
119
- padding-left: 25px;
120
- }
121
-
122
- ol.setup li {
123
- margin-bottom: 20px
124
- }
125
-
126
- .byline {
127
- font-size: 10px;
128
- font-style: italic;
129
- margin-bottom: 10px;
130
- }
131
-
132
- .references {
133
- font-size: 10px;
134
- }
135
-
136
- #TextileHelp table {
137
- margin-bottom: 0;
138
- }
139
-
140
- #TextileHelp table+h3 {
141
- margin-top: 11px;
142
- }
143
-
144
- #TextileHelp table td {
145
- font-size: 11px;
146
- padding: 3px;
147
- vertical-align: top;
148
- border-top: 1px dotted #ccc;
149
- }
150
-
151
- #TextileHelp table td.arrow {
152
- padding-right: 5px;
153
- padding-left: 10px;
154
- color: #999;
155
- }
156
-
157
- #TextileHelp table td.label {
158
- font-weight: bold;
159
- white-space: nowrap;
160
- font-size: 10px;
161
- padding-right: 15px;
162
- color: #000;
163
- }
164
-
165
- #TextileHelp h3 {
166
- font-size: 11px;
167
- font-weight: bold;
168
- font-weight: normal;
169
- margin: 0 0 5px 0;
170
- padding: 5px 0 0 0;
171
- }
172
-
173
- #TextileHelp p {
174
- font-size: 10px;
175
- }
176
-
177
- <%= @style_additions %>
178
- <%= @web ? web.additional_style : "" %>
1
+ <style type="text/css">
2
+ h1#pageName, .newWikiWord a, a.existingWikiWord, .newWikiWord a:hover, #TextileHelp h3 { color: #<%= @web ? @web.color : "393" %>; }
3
+
4
+ #Container, #Content {
5
+ width: <%= @content_width || "600" %>px;
6
+ }
7
+
8
+ #Container {
9
+ float: none;
10
+ margin: 0 auto;
11
+ text-align: center;
12
+ }
13
+
14
+ #Content {
15
+ margin: 0;
16
+ padding: 5px;
17
+ text-align: left;
18
+ border-top: none;
19
+ float: left;
20
+ }
21
+
22
+ body { background-color: #fff; }
23
+
24
+ body, p, ol, ul, td {
25
+ font-family: verdana, arial, helvetica, sans-serif;
26
+ color: #333;
27
+ font-size: 13px;
28
+ line-height: 18px;
29
+ }
30
+
31
+ a { color: #000; }
32
+
33
+ .newWikiWord { background-color: #eee; }
34
+ .newWikiWord a:hover { background-color: white; }
35
+
36
+ a:visited { color: #666; }
37
+ a:hover { color: #fff; background-color:#000; }
38
+
39
+ h1, h2, h3 { color: #333; font-family: georgia, verdana; }
40
+ h1 { font-size: 28px }
41
+ h2 { font-size: 19px }
42
+ h3 { font-size: 16px }
43
+
44
+ h1#pageName {
45
+ margin: 5px 0px 0px 0px;
46
+ padding: 0px 0px 0px 0px;
47
+ line-height: 28px;
48
+ }
49
+
50
+ h1#pageName small {
51
+ color: grey;
52
+ line-height: 10px;
53
+ font-size: 10px;
54
+ padding: 0px;
55
+ }
56
+
57
+ a.nav, a.nav:link, a.nav:visited { color: #000; }
58
+ a.nav:hover { color: #fff; background-color:#000; }
59
+
60
+ li { margin-bottom: 7px }
61
+
62
+ .navigation {
63
+ margin-top: 5px;
64
+ font-size : 12px;
65
+ color: #000;
66
+ }
67
+
68
+ .navigation a:hover { color: #fff; background-color:#000; }
69
+
70
+ .navigation a {
71
+ font-size: 11px;
72
+ color: black;
73
+ font-weight: bold;
74
+ }
75
+
76
+ .navigation small a {
77
+ font-weight: normal;
78
+ font-size: 11px;
79
+ }
80
+
81
+ .navOn{
82
+ font-size: 11px;
83
+ color: grey;
84
+ font-weight: bold;
85
+ text-decoration: none;
86
+ }
87
+
88
+ .help {
89
+ font-family: verdana, arial, helvetica, sans-serif;
90
+ font-size: 11px;
91
+ }
92
+
93
+ .inputBox {
94
+ font-family: verdana, arial, helvetica, sans-serif;
95
+ font-size: 11px;
96
+ background-color: #eee;
97
+ padding: 5px;
98
+ margin-bottom: 20px;
99
+ }
100
+
101
+ blockquote {
102
+ display: block;
103
+ margin: 0px 0px 20px 0px;
104
+ padding: 0px 30px;
105
+ font-size:11px;
106
+ line-height:17px;
107
+ font-style: italic;
108
+ }
109
+
110
+ pre {
111
+ background-color: #eee;
112
+ padding: 10px;
113
+ font-size: 11px;
114
+ }
115
+
116
+ ol.setup {
117
+ font-size: 19px;
118
+ font-family: georgia, verdana;
119
+ padding-left: 25px;
120
+ }
121
+
122
+ ol.setup li {
123
+ margin-bottom: 20px
124
+ }
125
+
126
+ .byline {
127
+ font-size: 10px;
128
+ font-style: italic;
129
+ margin-bottom: 10px;
130
+ }
131
+
132
+ .references {
133
+ font-size: 10px;
134
+ }
135
+
136
+ #TextileHelp table {
137
+ margin-bottom: 0;
138
+ }
139
+
140
+ #TextileHelp table+h3 {
141
+ margin-top: 11px;
142
+ }
143
+
144
+ #TextileHelp table td {
145
+ font-size: 11px;
146
+ padding: 3px;
147
+ vertical-align: top;
148
+ border-top: 1px dotted #ccc;
149
+ }
150
+
151
+ #TextileHelp table td.arrow {
152
+ padding-right: 5px;
153
+ padding-left: 10px;
154
+ color: #999;
155
+ }
156
+
157
+ #TextileHelp table td.label {
158
+ font-weight: bold;
159
+ white-space: nowrap;
160
+ font-size: 10px;
161
+ padding-right: 15px;
162
+ color: #000;
163
+ }
164
+
165
+ #TextileHelp h3 {
166
+ font-size: 11px;
167
+ font-weight: bold;
168
+ font-weight: normal;
169
+ margin: 0 0 5px 0;
170
+ padding: 5px 0 0 0;
171
+ }
172
+
173
+ #TextileHelp p {
174
+ font-size: 10px;
175
+ }
176
+
177
+ <%= @style_additions %>
178
+ <%= @web ? web.additional_style : "" %>
179
179
  </style>
@@ -1,28 +1,28 @@
1
- <div id="TextileHelp" style="float: right; width: 250px; margin-top: 5px">
2
- <h3>Textile formatting tips (<a href="#" onClick="quickRedReference(); return false;">advanced</a>)</h3>
3
- <table cellspacing="0" cellpadding="0">
4
- <tr><td>_your text_</td><td class="arrow">&rarr;</td><td><em>your text</em></td></tr>
5
- <tr><td>*your text*</td><td class="arrow">&rarr;</td><td><strong>your text</strong></td></tr>
6
- <tr><td>%{color:red}hello%</td><td class="arrow">&rarr;</td><td><span style="color: red;">hello</span></td></tr>
7
- <tr><td>* Bulleted list<br />* Second item</td><td class="arrow">&rarr;</td><td>&#8226; Bulleted list<br />&#8226; Second item</td></tr>
8
- <tr><td># Numbered list<br /># Second item</td><td class="arrow">&rarr;</td><td>1. Numbered list<br />2. Second item</td></tr>
9
- <tr><td>"linkname":URL</td><td class="arrow">&rarr;</td><td><a href="URL">linkname</a></td></tr>
10
- <tr><td>|a|table|row|<br />|b|table|row|</td><td class="arrow">&rarr;</td><td>Table</td></tr>
11
- <tr><td>http://url<br />email@address.com</td><td class="arrow">&rarr;</td><td>Auto-linked</td></tr>
12
- <tr><td>!imageURL!</td><td class="arrow">&rarr;</td><td>Image</td></tr>
13
- </table>
14
-
15
- <%= sub_template "wiki_words_help" %>
16
- </div>
17
-
18
- <script language="JavaScript">
19
- function quickRedReference() {
20
- window.open(
21
- "http://hobix.com/textile/quick.html",
22
- "redRef",
23
- "height=600,width=550,channelmode=0,dependent=0," +
24
- "directories=0,fullscreen=0,location=0,menubar=0," +
25
- "resizable=0,scrollbars=1,status=1,toolbar=0"
26
- );
27
- }
1
+ <div id="TextileHelp" style="float: right; width: 250px; margin-top: 5px">
2
+ <h3>Textile formatting tips (<a href="#" onClick="quickRedReference(); return false;">advanced</a>)</h3>
3
+ <table cellspacing="0" cellpadding="0">
4
+ <tr><td>_your text_</td><td class="arrow">&rarr;</td><td><em>your text</em></td></tr>
5
+ <tr><td>*your text*</td><td class="arrow">&rarr;</td><td><strong>your text</strong></td></tr>
6
+ <tr><td>%{color:red}hello%</td><td class="arrow">&rarr;</td><td><span style="color: red;">hello</span></td></tr>
7
+ <tr><td>* Bulleted list<br />* Second item</td><td class="arrow">&rarr;</td><td>&#8226; Bulleted list<br />&#8226; Second item</td></tr>
8
+ <tr><td># Numbered list<br /># Second item</td><td class="arrow">&rarr;</td><td>1. Numbered list<br />2. Second item</td></tr>
9
+ <tr><td>"linkname":URL</td><td class="arrow">&rarr;</td><td><a href="URL">linkname</a></td></tr>
10
+ <tr><td>|a|table|row|<br />|b|table|row|</td><td class="arrow">&rarr;</td><td>Table</td></tr>
11
+ <tr><td>http://url<br />email@address.com</td><td class="arrow">&rarr;</td><td>Auto-linked</td></tr>
12
+ <tr><td>!imageURL!</td><td class="arrow">&rarr;</td><td>Image</td></tr>
13
+ </table>
14
+
15
+ <%= sub_template "wiki_words_help" %>
16
+ </div>
17
+
18
+ <script language="JavaScript">
19
+ function quickRedReference() {
20
+ window.open(
21
+ "http://hobix.com/textile/quick.html",
22
+ "redRef",
23
+ "height=600,width=550,channelmode=0,dependent=0," +
24
+ "directories=0,fullscreen=0,location=0,menubar=0," +
25
+ "resizable=0,scrollbars=1,status=1,toolbar=0"
26
+ );
27
+ }
28
28
  </script>
@@ -31,9 +31,14 @@
31
31
  <%= @web ? web.additional_style : "" %>
32
32
  </style>
33
33
  </head>
34
- <body>
35
34
 
36
- <%= sub_template "menu" unless @hide_navigation%>
35
+ <% if @web && @page && @web.enable_dclick_edit %>
36
+ <body ondblclick="location.href='../edit/<%= @page.name %>'">
37
+ <% else %>
38
+ <body>
39
+ <% end %>
40
+
41
+ <%= sub_template "menu" unless @hide_navigation %>
37
42
 
38
43
  <div id="Container">
39
44
  <div id="Content">
@@ -1,15 +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" %>
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" %>