Pimki 1.7.092 → 1.8.092
Sign up to get free protection for your applications and to get access to all the features.
- data/README-PIMKI +182 -178
- data/app/controllers/wiki.rb +950 -942
- data/app/models/chunks/category.rb +33 -33
- data/app/models/chunks/category_test.rb +21 -21
- data/app/models/chunks/chunk.rb +20 -20
- data/app/models/chunks/engines.rb +48 -48
- data/app/models/chunks/include.rb +1 -1
- data/app/models/chunks/match.rb +1 -1
- data/app/models/chunks/nowiki.rb +1 -1
- data/app/models/chunks/nowiki_test.rb +5 -0
- data/app/models/chunks/todo.rb +1 -0
- data/app/models/chunks/wiki.rb +130 -130
- data/app/models/page.rb +124 -124
- data/app/models/revision.rb +92 -92
- data/app/models/web.rb +314 -316
- data/app/models/wiki_content.rb +2 -2
- data/app/models/wiki_service.rb +170 -166
- data/app/models/wiki_words.rb +28 -28
- data/app/views/error.rhtml +37 -37
- data/app/views/navigation.rhtml +1 -1
- data/app/views/static_style_sheet.rhtml +10 -5
- data/app/views/top.rhtml +1 -1
- data/app/views/wiki/adv_search.rhtml +61 -61
- data/app/views/wiki/bliki.rhtml +7 -6
- data/app/views/wiki/bliki_edit.rhtml +26 -37
- data/app/views/wiki/bliki_new.rhtml +58 -64
- data/app/views/wiki/bliki_revision.rhtml +5 -3
- data/app/views/wiki/edit.rhtml +44 -44
- data/app/views/wiki/edit_menu.rhtml +26 -19
- data/app/views/wiki/edit_web.rhtml +303 -305
- data/app/views/wiki/glossary.rhtml +35 -27
- data/app/views/wiki/list.rhtml +175 -174
- data/app/views/wiki/list.rhtml.bak +175 -0
- data/app/views/wiki/mind.rhtml +70 -70
- data/app/views/wiki/new.rhtml +34 -32
- data/app/views/wiki/published.rhtml +34 -49
- data/app/views/wiki/revision.rhtml +88 -87
- data/app/views/wiki/rollback.rhtml +36 -35
- data/app/views/wiki/todo.rhtml +2 -2
- data/app/views/wiki_words_help.rhtml +8 -8
- data/libraries/action_controller_servlet.rb +202 -202
- data/libraries/madeleine_service.rb +162 -162
- data/pimki.rb +181 -181
- metadata +11 -12
- data/README +0 -172
- data/app/models/chunks/acronym.rb +0 -19
- data/app/views/wiki/test.rhtml +0 -25
- data/libraries/secure_web_controller_server.rb +0 -106
@@ -1,14 +1,17 @@
|
|
1
1
|
<%
|
2
2
|
@title = "Editing Left-Side Menu Options"
|
3
|
-
@content_width =
|
3
|
+
@content_width = 810
|
4
4
|
@hide_navigation = true
|
5
5
|
@hide_menu = true
|
6
|
-
@
|
6
|
+
@inline_style = true
|
7
|
+
@style_additions = "#Content, #Container {width = 820px; padding-left:100px;}"
|
7
8
|
%>
|
8
9
|
<%= sub_template "top" %>
|
9
10
|
|
10
11
|
<%= render_markup_help %>
|
11
12
|
|
13
|
+
<div id='main'>
|
14
|
+
|
12
15
|
<form id="editForm" action="./save_menu" method="post">
|
13
16
|
<p>Please choose the format you prefer for the left-size menu:</p>
|
14
17
|
<p><input type="radio" name="type" value="linkers" <%= 'checked' if @menu_type == 'linkers' %>>Only pages that link other pages (default)</p>
|
@@ -16,17 +19,17 @@
|
|
16
19
|
<p><input type="radio" name="type" value="revised" <%= 'checked' if @menu_type == 'revised' %>>Recently revised pages</p>
|
17
20
|
<p><input type="radio" name="type" value="recent" <%= 'checked' if @menu_type == 'recent' %>>Recently visited pages</p>
|
18
21
|
<p><input type="radio" name="type" value="viewed" <%= 'checked' if @menu_type == 'viewed' %>>Most viewed pages</p>
|
19
|
-
<p><input type="radio" name="type" value="category" <%= 'checked' if @menu_type == 'category' %>>Pages in a specific category:
|
20
|
-
<select id="
|
22
|
+
<p><input type="radio" name="type" value="category" id='menu_rb_categ' <%= 'checked' if @menu_type == 'category' %>>Pages in a specific category:
|
23
|
+
<select id="sel_category" name="sel_category" size="1" style="width:190" onChange="forms.editForm.menu_rb_categ.checked = true;">
|
21
24
|
<option value="noselect">------------
|
22
25
|
<% for category in web.categories %>
|
23
|
-
<option value="<%= category %>"
|
26
|
+
<option value="<%= category %>" <%= 'selected' if category == web.menu_category %>><%= category %></option>
|
24
27
|
<% end %>
|
25
28
|
</select>
|
26
29
|
</p>
|
27
30
|
<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>
|
28
|
-
<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):
|
29
|
-
<textarea name="content" style="width: 400px; height: 300px"><%= !@menu_content.nil? && Page === @menu_content ? @menu_content.content : @menu_content %></textarea>
|
31
|
+
<p><input type="radio" name="type" value="user" id="menu_rb_freetext" <%= 'checked' if @menu_type == 'user' %>>Or just write your own menu contents (as a regular Wiki page):
|
32
|
+
<textarea name="content" style="width: 400px; height: 300px" onClick="forms.editForm.menu_rb_freetext.checked = true;"><%= !@menu_content.nil? && Page === @menu_content ? @menu_content.content : @menu_content %></textarea>
|
30
33
|
</p>
|
31
34
|
|
32
35
|
<% if Page === @menu_content && @menu_content.revisions.length > 1
|
@@ -48,20 +51,24 @@
|
|
48
51
|
<tr><td> </td></tr>
|
49
52
|
<tr>
|
50
53
|
<td align="right">
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
54
|
+
<small>
|
55
|
+
Enter system password
|
56
|
+
<input style="font-size:small;" type="password" id="system_password" name="system_password">
|
57
|
+
and
|
58
|
+
<input type="submit" name='action' value="Update">
|
59
|
+
</small>
|
60
|
+
</td>
|
61
|
+
</tr>
|
62
|
+
<tr>
|
63
|
+
<td align="right">
|
64
|
+
<small>
|
65
|
+
...or forget changes and <input type="submit" name='action' value="Cancel Update">
|
66
|
+
</small>
|
67
|
+
</td>
|
68
|
+
</tr>
|
63
69
|
</table>
|
64
70
|
|
65
71
|
</form>
|
72
|
+
</div>
|
66
73
|
|
67
74
|
<%= sub_template "bottom" %>
|
@@ -1,306 +1,304 @@
|
|
1
|
-
<% @title = "Web Setup"
|
2
|
-
@hide_menu = true
|
3
|
-
@style_additions = "
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<%=
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
</
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
document.getElementById('
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
document.getElementById('
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
<
|
63
|
-
|
64
|
-
<
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
<
|
79
|
-
<
|
80
|
-
|
81
|
-
|
82
|
-
</
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
</
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
</
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
document.getElementById("default_to_published").disabled =
|
121
|
-
}
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
<input type="checkbox" id="
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
</
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
<
|
144
|
-
|
145
|
-
<input type="checkbox" name="
|
146
|
-
|
147
|
-
<
|
148
|
-
|
149
|
-
|
150
|
-
<
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
<td>
|
156
|
-
<td
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
<input type="radio" name="graph_type" value="
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
<input type="radio" name="draw_type" value="
|
168
|
-
<input type="radio" name="draw_type" value="
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
<input type="checkbox" id="
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
<%
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
<
|
194
|
-
|
195
|
-
|
196
|
-
<
|
197
|
-
|
198
|
-
|
199
|
-
<
|
200
|
-
|
201
|
-
<
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
<input type="
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
</
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
<
|
225
|
-
|
226
|
-
<
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
<input type="submit" name='action' value="
|
235
|
-
<input type="submit" name='action' value="
|
236
|
-
|
237
|
-
<input type="submit" name='action' value="
|
238
|
-
<%
|
239
|
-
<
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
<
|
248
|
-
|
249
|
-
<
|
250
|
-
<p style="
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
<input type="
|
255
|
-
|
256
|
-
<input type="
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
</script>
|
305
|
-
|
1
|
+
<% @title = "Web Setup"
|
2
|
+
@hide_menu = true
|
3
|
+
@style_additions = "input { vertical-align: bottom }"
|
4
|
+
@style_additions += "#Container { margin-left: 180px; }" if web.enable_menu
|
5
|
+
%>
|
6
|
+
<%= sub_template "top" %>
|
7
|
+
|
8
|
+
<%= "<p style='font-size: 15px; font-variant: italic; color: red;'>#{@message}</span>" if @message %>
|
9
|
+
|
10
|
+
<form action="../update_web" id="setup" method="post" onSubmit="cleanAddress(); return validateSetup()">
|
11
|
+
<h2 style="margin-bottom: 3px">Name and address</h2>
|
12
|
+
<div class="help">
|
13
|
+
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.
|
14
|
+
Ex: the address "rails" gives URLs like <i>/rails/show/HomePage</i>.
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class="inputBox">
|
18
|
+
Name: <input type="text" id="name" name="name" value="<%= @web.name %>" onChange="proposeAddress();">
|
19
|
+
Address: <input type="text" id="address" name="address" value="<%= @web.address %>" onChange="cleanAddress();">
|
20
|
+
<i>(Letters & digits only)</i>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<h2 style="margin-bottom: 3px">Specialize</h2>
|
24
|
+
<script>
|
25
|
+
function see_styles() {
|
26
|
+
document.getElementById('additionalStyle').style.display='block';
|
27
|
+
document.getElementById('see_styles').style.display='none';
|
28
|
+
document.getElementById('hide_styles').style.display='inline';
|
29
|
+
return false;
|
30
|
+
}
|
31
|
+
function hide_styles() {
|
32
|
+
document.getElementById('additionalStyle').style.display='none';
|
33
|
+
document.getElementById('see_styles').style.display='inline';
|
34
|
+
document.getElementById('hide_styles').style.display='none';
|
35
|
+
return false;
|
36
|
+
}
|
37
|
+
</script>
|
38
|
+
<div class="help">
|
39
|
+
Turning safe mode on will strip HTML tags and stylesheet options from the content of all pages.
|
40
|
+
Turning on "brackets only" will require all wiki words to be as [[wiki word]] and WikiWord won't work.
|
41
|
+
Additions to the stylesheet take precedence over the existing styles. <i>Hint:</i> View source on a page you want to style to find ID names on individual tags.
|
42
|
+
|
43
|
+
</div>
|
44
|
+
<div class="inputBox">
|
45
|
+
Markup:
|
46
|
+
<select name="markup">
|
47
|
+
<%= html_options({ "Textile" => :textile, "Markdown via RedCloth (experimental)" => :red_markdown, "Markdown via BlueCloth" => :blue_markdown, "RDoc" => :rdoc }, @web.markup) %>
|
48
|
+
</select>
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
Color:
|
53
|
+
<select name="color">
|
54
|
+
<%= html_options({ "Green" => "008B26", "Purple" => "504685", "Red" => "DA0006", "Orange" => "FA6F00", "Grey" => "8BA2B0" },
|
55
|
+
@web.color) %>
|
56
|
+
</select>
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
<br />
|
61
|
+
|
62
|
+
<small>
|
63
|
+
|
64
|
+
<input type="checkbox" name="safe_mode"<%= " CHECKED" if @web.safe_mode %>> Safe mode
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
<input type="checkbox" name="brackets_only"<%= " CHECKED" if @web.brackets_only %>> Brackets only
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
<input type="checkbox" name="count_pages"<%= " CHECKED" if @web.count_pages %>> Count pages
|
73
|
+
|
74
|
+
</small>
|
75
|
+
|
76
|
+
<br />
|
77
|
+
<a style='font-size:smaller;' id='see_styles' href="#" onClick="return see_styles();">See styles >></a>
|
78
|
+
<a style='font-size:smaller; display:none;' id='hide_styles' href="#" onClick="return hide_styles();">Hide styles <<</a>
|
79
|
+
<textarea id="additionalStyle" style="display: none; margin-top: 10px; margin-bottom: 5px; width: 100%; height: 200px" name="additional_style"><%= @web.additional_style %></textarea>
|
80
|
+
</div>
|
81
|
+
|
82
|
+
<h2 style="margin-bottom: 3px">Persistence Options (all webs)</h2>
|
83
|
+
<div class="help">
|
84
|
+
You can set how often to take snapshots of the web data. (All incremental changes are saved as command_logs; snapshots supercede those with the full data). Recommended values are 1-2 hours if you turn the web on and off often, or 24-48 hours if this is a long running service.<br />
|
85
|
+
Snapshots will not be taken if there are no incremental changes (in the form of command_logs). You can always force a snapshot in the administrative tasks below.
|
86
|
+
</div>
|
87
|
+
<div class="inputBox">
|
88
|
+
<input align='right' type="text" name="snapshots_interval" value='<%= @snapshot_interval %>' /> hour(s).
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<h2 style="margin-bottom: 3px">Password protection for this PIM (<%= @web.name %>)</h2>
|
92
|
+
<div class="help">
|
93
|
+
This is the password that visitors need to login to view and edit this web. Setting the password to nothing will remove the password protection.
|
94
|
+
</div>
|
95
|
+
<div class="inputBox">
|
96
|
+
Password: <input type="password" id="password" name="password" value="<%= @web.password %>">
|
97
|
+
Verify: <input type="password" id="password_check" value="<%= @web.password %>" name="password_check"><br />
|
98
|
+
<!--
|
99
|
+
<input type="radio" id="check_pass_on_edit" name="check_pass_on_edit" value='each_edit' <%= 'checked' if @web.password && @web.check_pass_on_edit %>>Require password for each edit
|
100
|
+
<input type="radio" id="check_pass_on_edit" name="check_pass_on_edit" value='login_only' <%= 'checked' if @web.password && !@web.check_pass_on_edit %>>Require password once on logon
|
101
|
+
-->
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<h2 style="margin-bottom: 3px">Publish read-only version of this web (<%= @web.name %>)</h2>
|
105
|
+
<div class="help">
|
106
|
+
You can turn on a read-only version of this web that's accessible even when the regular web is password protected.
|
107
|
+
The published version is accessible through URLs like /wiki/published/HomePage.<br /><br />
|
108
|
+
|
109
|
+
Defaulting non-localhost requests to the 'published' version means that requests coming from other machines to the root (e.g. http://host:2500/) will be passed to /web/published and not /web/show.<br />
|
110
|
+
|
111
|
+
Other machines can still explicitly request the /web/show versions, for which you need to set editing password etc. This is just to make referring colleagues to your PIM easier.
|
112
|
+
</div>
|
113
|
+
<div class="inputBox">
|
114
|
+
<script>
|
115
|
+
function checkPublished() {
|
116
|
+
if (!document.getElementById("published").checked) {
|
117
|
+
document.getElementById("default_to_published").checked = false;
|
118
|
+
document.getElementById("default_to_published").disabled = true;
|
119
|
+
} else {
|
120
|
+
document.getElementById("default_to_published").disabled = false;
|
121
|
+
}
|
122
|
+
};
|
123
|
+
function checkPublishedDefault() {
|
124
|
+
if (document.getElementById("default_to_published").checked) {
|
125
|
+
document.getElementById("published").checked = true;
|
126
|
+
}
|
127
|
+
};
|
128
|
+
</script>
|
129
|
+
<input type="checkbox" id="published" name="published" onClick='return checkPublished();' <%= "CHECKED" if @web.published %>> Publish this web
|
130
|
+
<br />
|
131
|
+
<input type="checkbox" id="default_to_published" name="default_to_published" onClick='return checkPublishedDefault();'
|
132
|
+
<%= "disabled" unless @web.published %>
|
133
|
+
<%= "checked" if @web.default_to_published %>> Default non-localhost requests to the 'published' version
|
134
|
+
</div>
|
135
|
+
|
136
|
+
<h2 style="margin-bottom: 3px">Customise this PIM</h2>
|
137
|
+
<div class="help">
|
138
|
+
Here are a few setting you can use to tweak the appearance and behaviour of your Pimki.
|
139
|
+
</div>
|
140
|
+
<div class="inputBox">
|
141
|
+
<h4>Interface Options</h4>
|
142
|
+
|
143
|
+
<input type="checkbox" name="enable_dclick_edit" <%= "checked" if @web.enable_dclick_edit %>> Edit page on double click.<br />
|
144
|
+
|
145
|
+
<input type="checkbox" name="enable_menu" <%= "checked" if @web.enable_menu %>> Enable menu on left. Don't forget to <a href='../edit_menu'>set the menu contents</a>.
|
146
|
+
|
147
|
+
<h4>Mind Map</h4>
|
148
|
+
<i>Size</i>:<br />
|
149
|
+
Limit the size of the Mind Map image. Format is "width,height" in inches. Leave blank for no size limit.<br />
|
150
|
+
<input type="text" name="mind_map_size" id="mind_map_size" value="<%= web.mind_map_size %>">
|
151
|
+
<table>
|
152
|
+
<tr style="font-style:italic;">
|
153
|
+
<td>Graph Type</td>
|
154
|
+
<td style="width:200px">Layout Type</td>
|
155
|
+
<td style="width:500px">Content Options</td>
|
156
|
+
<td>Categories</td>
|
157
|
+
</tr>
|
158
|
+
<tr>
|
159
|
+
<td style="vertical-align:top;" width="30%">
|
160
|
+
<input type="radio" name="graph_type" value="normal" <%= 'checked' if @graph_type == 'normal' %>>Draw Normal Graph<br>
|
161
|
+
<input type="radio" name="graph_type" value="author" <%= 'checked' if @graph_type == 'author' %>>Draw Authors Graph<br>
|
162
|
+
<input type="radio" name="graph_type" value="category" <%= 'checked' if @graph_type == 'category' %>>Draw Category Graph<br>
|
163
|
+
</td>
|
164
|
+
<td width="100" style="vertical-align:top;" >
|
165
|
+
<input type="radio" name="draw_type" value="neato" <% if @prog == 'neato' %> checked <% end %>>Neato<br>
|
166
|
+
<input type="radio" name="draw_type" value="dot" <% if @prog == 'dot' %> checked <% end %>>Dot</br>
|
167
|
+
<input type="radio" name="draw_type" value="circo" <% if @prog == 'circo' %> checked <% end %>>Circo</br>
|
168
|
+
<input type="radio" name="draw_type" value="twopi" <% if @prog == 'twopi' %> checked <% end %>>Twopi</br>
|
169
|
+
</td>
|
170
|
+
<td style="vertical-align:top;width:400px;">
|
171
|
+
<input type="checkbox" id="show_authors" name="show_authors" <%= 'checked' if @show_authors %>>Show author pages<br>
|
172
|
+
<input type="checkbox" id="missing" name="missing" <%= 'checked' if @missing %>>Show missing pages<br>
|
173
|
+
<input type="checkbox" id="show_leaves" name="show_leaves" <%= 'checked' if @show_leaves %>>Show leaf pages<br>
|
174
|
+
</td>
|
175
|
+
<td>
|
176
|
+
<select id="selected_categs" name="selected_categs" size="4" style="width:120px;" multiple>
|
177
|
+
<option value="all" <%= 'selected' if @selected_categories.empty? %>><all categories></option>
|
178
|
+
<option value="none" <%= 'selected' if @selected_categories.include? 'none' %>><no categories></option>
|
179
|
+
<% for category in @categories %>
|
180
|
+
<option value="<%= category %>" <%= 'selected' if @selected_categories.include? category %>><%= category %></option>
|
181
|
+
<% end %>
|
182
|
+
</select>
|
183
|
+
</td>
|
184
|
+
</tr>
|
185
|
+
</table>
|
186
|
+
|
187
|
+
|
188
|
+
<!--
|
189
|
+
|
190
|
+
<br /><br />
|
191
|
+
<h4>Bliki Options</h4>
|
192
|
+
|
193
|
+
<br /><br />
|
194
|
+
<h4>Content & Symbols mapping</h4>
|
195
|
+
|
196
|
+
Extra special symbols. The format of the map is: "code=text" on separate lines. This will map an element of <i><:code></i> to <i>text</i>, e.g. <:cbx> is mapped to <input type="checkbox" disabled /><br />
|
197
|
+
<textarea name="symbols_map" id="symbols_map" style="width: 100%; height: 100px"></textarea>
|
198
|
+
|
199
|
+
<br /><br />
|
200
|
+
|
201
|
+
Extra special links. The format of the map is: "link_name=link_format" on separate lines. This will map an element of <i>[link_name[link_text]]</i> to your specified format. e.g. to use google's redirection enter: <pre>google=http://www.google.com/url?sa=D&q=#{link_text}</pre> and use as: <pre>[[!goggle http://pimki.rubyforge.org/]]</pre> to map to: <pre>http://www.google.com/url?sa=D&q=http://pimki.rubyforge.org/</pre><br />
|
202
|
+
<textarea name="links_map" id="links_map" style="width: 100%; height: 100px"></textarea>
|
203
|
+
|
204
|
+
-->
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<p align="right">
|
208
|
+
<small>
|
209
|
+
Enter system password
|
210
|
+
<input type="password" id="system_password" name="system_password">
|
211
|
+
and
|
212
|
+
<input type="submit" value="Update Web">
|
213
|
+
</small>
|
214
|
+
</p>
|
215
|
+
</form>
|
216
|
+
|
217
|
+
<p style='font-size: 10px; text-align: right;'>...or forget all your changes and <a href="/new_web/">create a new web</a>.<br />
|
218
|
+
<% num_webs = WikiService.instance.webs.length %>
|
219
|
+
(There <%= num_webs > 1 ? 'are' : 'is' %> currently <a href='/web_list/'><%= WikiService.instance.webs.length %> web<%= 's' if num_webs > 1 %></a>)</p>
|
220
|
+
|
221
|
+
<hr />
|
222
|
+
<br/>
|
223
|
+
|
224
|
+
<h2>Other administrative tasks</h2>
|
225
|
+
<form action="../administrate" id="administrate" method="post" class="inputBox">
|
226
|
+
<p style="font-size: 10px;">
|
227
|
+
Clean up by entering system password
|
228
|
+
<input type="password" id="system_password" name="system_password">
|
229
|
+
and...
|
230
|
+
</p>
|
231
|
+
<p align='right'>
|
232
|
+
<input type="submit" name='action' value="Delete Orphan Pages"><br/>
|
233
|
+
<input type="submit" name='action' value="Clear Render Cache"><br/>
|
234
|
+
<input type="submit" name='action' value="Force Data Snapshot"><br/>
|
235
|
+
<input type="submit" name='action' value="Clean Storage"><br/>
|
236
|
+
<% if wiki.webs.size > 1 %>
|
237
|
+
<input type="submit" name='action' value="Make This Web Default"><br/>
|
238
|
+
<% end %>
|
239
|
+
<br/>
|
240
|
+
<input type="submit" name='action' value="Remove This Web" onClick="return confirm('Are you absolutely sure you want to delete the \'<%= web.name %>\' web?')"><br/>
|
241
|
+
</p>
|
242
|
+
</form>
|
243
|
+
|
244
|
+
<hr />
|
245
|
+
<br/>
|
246
|
+
|
247
|
+
<h2>Stop Pimki</h2>
|
248
|
+
<p style="color:red">Please note that stopping the server will stop all pimki webs running on this server!</p>
|
249
|
+
<form action="../stop" id="stop" method="post">
|
250
|
+
<p style="font-size: 10px;" class="inputBox">
|
251
|
+
Enter system password
|
252
|
+
<input type="password" id="system_password" name="system_password">
|
253
|
+
and
|
254
|
+
<input type="submit" name='stop' value="Stop Pimki">
|
255
|
+
in
|
256
|
+
<input type="text" name='seconds' value="3" size='5' style="text-align:right;">
|
257
|
+
seconds.
|
258
|
+
</p>
|
259
|
+
</form>
|
260
|
+
|
261
|
+
<script>
|
262
|
+
function proposeAddress() {
|
263
|
+
document.getElementById('address').value =
|
264
|
+
document.getElementById('name').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
265
|
+
}
|
266
|
+
|
267
|
+
function cleanAddress() {
|
268
|
+
document.getElementById('address').value =
|
269
|
+
document.getElementById('address').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
270
|
+
}
|
271
|
+
|
272
|
+
function validateSetup() {
|
273
|
+
if (document.getElementById('system_password').value == "") {
|
274
|
+
alert("You must enter the system password");
|
275
|
+
return false;
|
276
|
+
}
|
277
|
+
|
278
|
+
if (document.getElementById('name').value == "") {
|
279
|
+
alert("You must pick a name for the web");
|
280
|
+
return false;
|
281
|
+
}
|
282
|
+
|
283
|
+
if (document.getElementById('address').value == "") {
|
284
|
+
alert("You must pick an address for the web");
|
285
|
+
return false;
|
286
|
+
}
|
287
|
+
|
288
|
+
if (document.getElementById('password').value != "" &&
|
289
|
+
document.getElementById('password').value != document.getElementById('password_check').value) {
|
290
|
+
alert("The password and its verification doesn't match");
|
291
|
+
return false;
|
292
|
+
}
|
293
|
+
|
294
|
+
if (document.getElementById('mind_map_size').value != "" &&
|
295
|
+
!(/^\d+,\d+$/.test(document.getElementById('mind_map_size').value))) {
|
296
|
+
alert("The Mind Map size must be in the format of 'digit(s),digit(s)'!");
|
297
|
+
return false;
|
298
|
+
}
|
299
|
+
|
300
|
+
return true;
|
301
|
+
}
|
302
|
+
</script>
|
303
|
+
|
306
304
|
<%= sub_template "bottom" %>
|