instiki 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +165 -0
- data/README +68 -172
- data/app/controllers/admin_controller.rb +94 -0
- data/app/controllers/application.rb +131 -0
- data/app/controllers/file_controller.rb +129 -0
- data/app/controllers/wiki_controller.rb +354 -0
- data/{libraries/view_helper.rb → app/helpers/application_helper.rb} +68 -33
- data/app/models/author.rb +3 -3
- data/app/models/chunks/category.rb +33 -31
- data/app/models/chunks/chunk.rb +86 -20
- data/app/models/chunks/engines.rb +54 -38
- data/app/models/chunks/include.rb +41 -29
- data/app/models/chunks/literal.rb +31 -19
- data/app/models/chunks/nowiki.rb +28 -31
- data/app/models/chunks/test.rb +18 -18
- data/app/models/chunks/uri.rb +182 -97
- data/app/models/chunks/wiki.rb +141 -82
- data/app/models/file_yard.rb +58 -0
- data/app/models/page.rb +112 -86
- data/app/models/page_lock.rb +22 -23
- data/app/models/page_set.rb +89 -64
- data/app/models/revision.rb +123 -90
- data/app/models/web.rb +176 -89
- data/app/models/wiki_content.rb +207 -105
- data/app/models/wiki_service.rb +233 -83
- data/app/models/wiki_words.rb +23 -25
- data/app/views/{wiki/new_system.rhtml → admin/create_system.rhtml} +83 -78
- data/app/views/{wiki/new_web.rhtml → admin/create_web.rhtml} +69 -64
- data/app/views/admin/edit_web.rhtml +136 -0
- data/app/views/file/file.rhtml +19 -0
- data/app/views/file/import.rhtml +23 -0
- data/app/views/layouts/default.rhtml +85 -0
- data/app/views/markdown_help.rhtml +12 -16
- data/app/views/mixed_help.rhtml +7 -0
- data/app/views/navigation.rhtml +30 -19
- data/app/views/rdoc_help.rhtml +12 -16
- data/app/views/textile_help.rhtml +24 -28
- data/app/views/wiki/authors.rhtml +11 -13
- data/app/views/wiki/edit.rhtml +39 -31
- data/app/views/wiki/export.rhtml +12 -14
- data/app/views/wiki/feeds.rhtml +14 -10
- data/app/views/wiki/list.rhtml +64 -57
- data/app/views/wiki/locked.rhtml +23 -14
- data/app/views/wiki/login.rhtml +14 -11
- data/app/views/wiki/new.rhtml +31 -27
- data/app/views/wiki/page.rhtml +115 -81
- data/app/views/wiki/print.rhtml +14 -16
- data/app/views/wiki/published.rhtml +9 -10
- data/app/views/wiki/recently_revised.rhtml +27 -30
- data/app/views/wiki/revision.rhtml +103 -81
- data/app/views/wiki/rollback.rhtml +14 -9
- data/app/views/wiki/rss_feed.rhtml +22 -22
- data/app/views/wiki/search.rhtml +38 -15
- data/app/views/wiki/tex.rhtml +22 -22
- data/app/views/wiki/tex_web.rhtml +34 -34
- data/app/views/wiki/web_list.rhtml +18 -13
- data/app/views/wiki_words_help.rhtml +9 -8
- data/config/environment.rb +82 -0
- data/config/environments/development.rb +5 -0
- data/config/environments/production.rb +4 -0
- data/config/environments/test.rb +17 -0
- data/config/routes.rb +18 -0
- data/instiki +6 -67
- data/instiki.rb +3 -0
- data/lib/active_record_stub.rb +31 -0
- data/{libraries/diff → lib}/diff.rb +444 -475
- data/lib/instiki_errors.rb +15 -0
- data/{libraries → lib}/rdocsupport.rb +151 -155
- data/lib/redcloth_for_tex.rb +736 -0
- data/natives/osx/desktop_launcher/AppDelegate.h +18 -0
- data/natives/osx/desktop_launcher/AppDelegate.mm +109 -0
- data/natives/osx/desktop_launcher/Credits.html +16 -0
- data/natives/osx/desktop_launcher/English.lproj/InfoPlist.strings +0 -0
- data/natives/osx/desktop_launcher/English.lproj/MainMenu.nib/classes.nib +13 -0
- data/natives/osx/desktop_launcher/English.lproj/MainMenu.nib/info.nib +24 -0
- data/natives/osx/desktop_launcher/English.lproj/MainMenu.nib/objects.nib +0 -0
- data/natives/osx/desktop_launcher/Info.plist +13 -0
- data/natives/osx/desktop_launcher/Instiki.xcode/project.pbxproj +592 -0
- data/natives/osx/desktop_launcher/Instiki_Prefix.pch +7 -0
- data/natives/osx/desktop_launcher/MakeDMG.sh +9 -0
- data/natives/osx/desktop_launcher/main.mm +14 -0
- data/natives/osx/desktop_launcher/version.plist +16 -0
- data/public/404.html +6 -0
- data/public/500.html +6 -0
- data/public/dispatch.rb +10 -0
- data/public/favicon.ico +0 -0
- data/public/javascripts/edit_web.js +52 -0
- data/public/javascripts/prototype.js +336 -0
- data/{app/views/static_style_sheet.rhtml → public/stylesheets/instiki.css} +221 -198
- data/script/breakpointer +4 -0
- data/script/server +93 -0
- metadata +59 -32
- data/app/controllers/wiki.rb +0 -389
- data/app/models/chunks/match.rb +0 -19
- data/app/views/bottom.rhtml +0 -4
- data/app/views/top.rhtml +0 -49
- data/app/views/wiki/edit_web.rhtml +0 -138
- data/libraries/action_controller_servlet.rb +0 -177
- data/libraries/erb.rb +0 -490
- data/libraries/madeleine_service.rb +0 -68
- data/libraries/redcloth_for_tex.rb +0 -869
- data/libraries/web_controller_server.rb +0 -81
data/app/models/wiki_words.rb
CHANGED
@@ -1,25 +1,23 @@
|
|
1
|
-
# Contains all the methods for finding and replacing wiki words
|
2
|
-
module WikiWords
|
3
|
-
# In order of appearance: Latin, greek, cyrillian, armenian
|
4
|
-
I18N_HIGHER_CASE_LETTERS =
|
5
|
-
"
|
6
|
-
"
|
7
|
-
"
|
8
|
-
"
|
9
|
-
|
10
|
-
I18N_LOWER_CASE_LETTERS =
|
11
|
-
"
|
12
|
-
"
|
13
|
-
"
|
14
|
-
"
|
15
|
-
|
16
|
-
WIKI_WORD_PATTERN = '[A-Z' + I18N_HIGHER_CASE_LETTERS + '][a-z' + I18N_LOWER_CASE_LETTERS + ']+[A-Z' + I18N_HIGHER_CASE_LETTERS + ']\w+'
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
1
|
+
# Contains all the methods for finding and replacing wiki words
|
2
|
+
module WikiWords
|
3
|
+
# In order of appearance: Latin, greek, cyrillian, armenian
|
4
|
+
I18N_HIGHER_CASE_LETTERS =
|
5
|
+
"À�?ÂÃÄÅĀĄĂÆÇĆČĈĊĎ�?ÈÉÊËĒĘĚĔĖĜĞĠĢĤĦÌ�?Î�?ĪĨĬĮİIJĴĶ�?ĽĹĻĿÑŃŇŅŊÒÓÔÕÖØŌ�?ŎŒŔŘŖŚŠŞŜȘŤŢŦȚÙÚÛÜŪŮŰŬŨŲŴ�?ŶŸŹŽŻ" +
|
6
|
+
"ΑΒΓΔΕΖΗΘΙΚΛΜ�?ΞΟΠΡΣΤΥΦΧΨΩ" +
|
7
|
+
"ΆΈΉΊΌΎ�?ѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎ�?ҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾ�?ӃӅӇӉӋ�?�?ӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӸЖ" +
|
8
|
+
"ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀ�?ՂՃՄՅՆՇՈՉՊՋՌ�?�?�?ՑՒՓՔՕՖ"
|
9
|
+
|
10
|
+
I18N_LOWER_CASE_LETTERS =
|
11
|
+
"àáâãäå�?ąăæçć�?ĉċ�?đèéêëēęěĕėƒ�?ğġģĥħìíîïīĩĭįıijĵķĸłľĺļŀñńňņʼnŋòóôõöø�?ő�?œŕřŗśšş�?șťţŧțùúûüūůűŭũųŵýÿŷžżźÞþßſ�?ð" +
|
12
|
+
"άέήίΰαβγδεζηθικλμνξοπ�?ςστυφχψωϊϋό�?ώ�?" +
|
13
|
+
"абвгдежзийклмнопр�?туфхцчшщъыь�?ю�?�?ёђѓєѕіїјљћќ�?ўџѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿ�?ҋ�?�?ґғҕҗҙқ�?ҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӀӂӄӆӈӊӌӎӑӓӕӗәӛ�?ӟӡӣӥӧөӫӭӯӱӳӵӹ" +
|
14
|
+
"աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտր�?ւփքօֆև"
|
15
|
+
|
16
|
+
WIKI_WORD_PATTERN = '[A-Z' + I18N_HIGHER_CASE_LETTERS + '][a-z' + I18N_LOWER_CASE_LETTERS + ']+[A-Z' + I18N_HIGHER_CASE_LETTERS + ']\w+'
|
17
|
+
CAMEL_CASED_WORD_BORDER = /([a-z#{I18N_LOWER_CASE_LETTERS}])([A-Z#{I18N_HIGHER_CASE_LETTERS}])/u
|
18
|
+
|
19
|
+
def self.separate(wiki_word)
|
20
|
+
wiki_word.gsub(CAMEL_CASED_WORD_BORDER, '\1 \2')
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -1,78 +1,83 @@
|
|
1
|
-
<% @title = "Instiki Setup"; @content_width = 500
|
2
|
-
|
3
|
-
<p>
|
4
|
-
Congratulations on succesfully installing and starting Instiki.
|
5
|
-
Since this is the first time Instiki has been run on this port,
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
</
|
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
|
-
|
1
|
+
<% @title = "Instiki Setup"; @content_width = 500 %>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
Congratulations on succesfully installing and starting Instiki.
|
5
|
+
Since this is the first time Instiki has been run on this port,
|
6
|
+
you'll need to do a brief one-time setup.
|
7
|
+
</p>
|
8
|
+
|
9
|
+
<form action="../create_system" id="setup" method="post" onSubmit="return validateSetup()">
|
10
|
+
<ol class="setup">
|
11
|
+
<li>
|
12
|
+
|
13
|
+
<h2 style="margin-bottom: 3px">Name and address for your first web</h2>
|
14
|
+
<div class="help">
|
15
|
+
The name of the web is included in the title on all pages.
|
16
|
+
The address is the base path that all pages within the web live beneath.
|
17
|
+
Ex: the address "rails" gives URLs like <i>/rails/show/HomePage</i>.
|
18
|
+
The address can only consist of letters and digits.
|
19
|
+
</div>
|
20
|
+
<div class="inputBox">
|
21
|
+
Name: <input type="text" id="web_name" name="web_name" value="Wiki"
|
22
|
+
onChange="proposeAddress();" onClick="this.value == 'Wiki' ? this.value = '' : true" />
|
23
|
+
|
24
|
+
Address: <input type="text" id="web_address" name="web_address" onChange="cleanAddress();"
|
25
|
+
value="wiki" />
|
26
|
+
</div>
|
27
|
+
</li>
|
28
|
+
|
29
|
+
<li>
|
30
|
+
<h2 style="margin-bottom: 3px">Password for creating and changing webs</h2>
|
31
|
+
<div class="help">
|
32
|
+
Administrative access allows you to make new webs and change existing ones.<br/>
|
33
|
+
Everyone with this password will be able to do this, so pick it carefully.
|
34
|
+
</div>
|
35
|
+
<div class="inputBox">
|
36
|
+
Password: <input type="password" id="password" name="password" />
|
37
|
+
|
38
|
+
Verify: <input type="password" id="password_check" name="password_check" />
|
39
|
+
</div>
|
40
|
+
</li>
|
41
|
+
</ol>
|
42
|
+
|
43
|
+
<p align="right">
|
44
|
+
<input type="submit" value="Setup" style="margin-left: 40px" />
|
45
|
+
</p>
|
46
|
+
</form>
|
47
|
+
|
48
|
+
<script>
|
49
|
+
function proposeAddress() {
|
50
|
+
document.getElementById('web_address').value =
|
51
|
+
document.getElementById('web_name').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
52
|
+
}
|
53
|
+
|
54
|
+
function cleanAddress() {
|
55
|
+
document.getElementById('web_address').value =
|
56
|
+
document.getElementById('web_address').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
57
|
+
}
|
58
|
+
|
59
|
+
function validateSetup() {
|
60
|
+
if (document.getElementById('web_name').value == "") {
|
61
|
+
alert("You must pick a name for the first web");
|
62
|
+
return false;
|
63
|
+
}
|
64
|
+
|
65
|
+
if (document.getElementById('web_address').value == "") {
|
66
|
+
alert("You must pick an address for the first web");
|
67
|
+
return false;
|
68
|
+
}
|
69
|
+
|
70
|
+
if (document.getElementById('password').value == "") {
|
71
|
+
alert("You must pick a system password");
|
72
|
+
return false;
|
73
|
+
}
|
74
|
+
|
75
|
+
if (document.getElementById('password_check').value == "" ||
|
76
|
+
document.getElementById('password').value != document.getElementById('password_check').value) {
|
77
|
+
alert("The password and its verification doesn't match");
|
78
|
+
return false;
|
79
|
+
}
|
80
|
+
|
81
|
+
return true;
|
82
|
+
}
|
83
|
+
</script>
|
@@ -1,64 +1,69 @@
|
|
1
|
-
<% @title = "New Wiki Web"; @content_width = 500
|
2
|
-
|
3
|
-
<p>
|
4
|
-
Each web serves as an isolated name space for wiki pages,
|
5
|
-
</
|
6
|
-
|
7
|
-
|
8
|
-
<
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
</
|
14
|
-
<div class="
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
</
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
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
|
-
|
1
|
+
<% @title = "New Wiki Web"; @content_width = 500 %>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
Each web serves as an isolated name space for wiki pages,
|
5
|
+
so different subjects or projects can write about different <i>MuppetShows</i>.
|
6
|
+
</p>
|
7
|
+
|
8
|
+
<form action="../create_web" id="setup" method="post" onSubmit="cleanAddress();
|
9
|
+
return validateSetup()">
|
10
|
+
|
11
|
+
<ol class="setup">
|
12
|
+
<li>
|
13
|
+
<h2 style="margin-bottom: 3px">Name and address for your new web</h2>
|
14
|
+
<div class="help">
|
15
|
+
The name of the web is included in the title on all pages.
|
16
|
+
The address is the base path that all pages within the web live beneath.
|
17
|
+
Ex: the address "rails" gives URLs like <i>/rails/show/HomePage</i>.
|
18
|
+
The address can only consist of letters and digits.
|
19
|
+
</div>
|
20
|
+
<div class="inputBox">
|
21
|
+
Name: <input type="text" id="web_name" name="name" onChange="proposeAddress();" />
|
22
|
+
|
23
|
+
Address: <input type="text" id="web_address" name="address" onChange="cleanAddress();" />
|
24
|
+
</div>
|
25
|
+
</li>
|
26
|
+
</ol>
|
27
|
+
|
28
|
+
|
29
|
+
<p align="right">
|
30
|
+
<small>
|
31
|
+
Enter system password
|
32
|
+
<input type="password" id="system_password" name="system_password" />
|
33
|
+
and
|
34
|
+
<input type="submit" value="Create Web" />
|
35
|
+
</small>
|
36
|
+
</p>
|
37
|
+
|
38
|
+
</form>
|
39
|
+
|
40
|
+
<script>
|
41
|
+
function proposeAddress() {
|
42
|
+
document.getElementById('web_address').value =
|
43
|
+
document.getElementById('web_name').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
44
|
+
}
|
45
|
+
|
46
|
+
function cleanAddress() {
|
47
|
+
document.getElementById('web_address').value =
|
48
|
+
document.getElementById('web_address').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
49
|
+
}
|
50
|
+
|
51
|
+
function validateSetup() {
|
52
|
+
if (document.getElementById('web_name').value == "") {
|
53
|
+
alert("You must pick a name for the new web");
|
54
|
+
return false;
|
55
|
+
}
|
56
|
+
|
57
|
+
if (document.getElementById('web_address').value == "") {
|
58
|
+
alert("You must pick an address for the new web");
|
59
|
+
return false;
|
60
|
+
}
|
61
|
+
|
62
|
+
if (document.getElementById('system_password').value == "") {
|
63
|
+
alert("You must enter the system password");
|
64
|
+
return false;
|
65
|
+
}
|
66
|
+
|
67
|
+
return true;
|
68
|
+
}
|
69
|
+
</script>
|
@@ -0,0 +1,136 @@
|
|
1
|
+
<% @title = "Edit Web" %>
|
2
|
+
|
3
|
+
<form action="edit_web" id="setup" method="post"
|
4
|
+
onSubmit="cleanAddress(); return validateEditWebForm()">
|
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.
|
8
|
+
The address is the base path that all pages within the web live beneath.
|
9
|
+
Ex: the address "rails" gives URLs like <i>/rails/show/HomePage</i>.
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div class="inputBox, disableAutoComplete">
|
13
|
+
Name: <input type="text" id="name" name="name" value="<%= @web.name %>"
|
14
|
+
onChange="proposeAddress();" />
|
15
|
+
Address: <input type="text" id="address" name="address" value="<%= @web.address %>"
|
16
|
+
onChange="cleanAddress();" />
|
17
|
+
<i>(Letters and digits only)</i>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<h2 style="margin-bottom: 3px">Specialize</h2>
|
21
|
+
<div class="inputBox, disableAutoComplete">
|
22
|
+
Markup:
|
23
|
+
<select name="markup">
|
24
|
+
<%= html_options({'Textile' => :textile, 'Markdown' => :markdown, 'Mixed' => :mixed,
|
25
|
+
'RDoc' => :rdoc }, @web.markup) %>
|
26
|
+
</select>
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
Color:
|
31
|
+
<select name="color">
|
32
|
+
<%= html_options({ 'Green' => '008B26', 'Purple' => '504685', 'Red' => 'DA0006',
|
33
|
+
'Orange' => 'FA6F00', 'Grey' => '8BA2B0' }, @web.color) %>
|
34
|
+
</select>
|
35
|
+
<br/>
|
36
|
+
<p>
|
37
|
+
<small>
|
38
|
+
<input type="checkbox" name="safe_mode" <%= 'checked="on"' if @web.safe_mode %> />
|
39
|
+
Safe mode
|
40
|
+
<em>- strip HTML tags and stylesheet options from the content of all pages</em>
|
41
|
+
<br/>
|
42
|
+
<input type="checkbox" name="brackets_only" <%= 'checked="on"' if @web.brackets_only %> />
|
43
|
+
Brackets only
|
44
|
+
<em>- require all wiki words to be as [[wiki word]], WikiWord links won't be created</em>
|
45
|
+
<br/>
|
46
|
+
<input type="checkbox" name="count_pages" <%= 'checked="on"' if @web.count_pages %> />
|
47
|
+
Count pages
|
48
|
+
<br/>
|
49
|
+
<!--
|
50
|
+
File uploads are not ready for gfeneral use, and therefore are disabled in release 0.10
|
51
|
+
TODO Enable these input elements again after release 0.10
|
52
|
+
|
53
|
+
<input type="checkbox" name="allow_uploads" <%= 'checked="on"' if @web.allow_uploads %> />
|
54
|
+
Allow uploads of no more than
|
55
|
+
<input type="text" name="max_upload_size" value="<%= @web.max_upload_size %>"
|
56
|
+
width="20" />
|
57
|
+
kbytes
|
58
|
+
<em>-
|
59
|
+
allow users to upload pictures and other files and include them on wiki pages
|
60
|
+
</em>
|
61
|
+
<br/>
|
62
|
+
-->
|
63
|
+
</small>
|
64
|
+
</p>
|
65
|
+
|
66
|
+
<a href="#"
|
67
|
+
onClick="document.getElementById('additionalStyle').style.display='block';return false;">
|
68
|
+
Stylesheet tweaks >></a>
|
69
|
+
<small><em>
|
70
|
+
- add or change styles used by this web; styles defined here take precedence over
|
71
|
+
instiki.css. Hint: View HTML source of a page you want to style to find ID names on individual
|
72
|
+
tags.</em></small>
|
73
|
+
<br/>
|
74
|
+
<textarea id="additionalStyle"
|
75
|
+
style="display: none; margin-top: 10px; margin-bottom: 5px; width: 560px; height: 200px"
|
76
|
+
name="additional_style"><%= @web.additional_style %>
|
77
|
+
</textarea>
|
78
|
+
</div>
|
79
|
+
|
80
|
+
<h2 style="margin-bottom: 3px">Password protection for this web (<%= @web.name %>)</h2>
|
81
|
+
<div class="help">
|
82
|
+
This is the password that visitors need to view and edit this web.
|
83
|
+
Setting the password to nothing will remove the password protection.
|
84
|
+
</div>
|
85
|
+
<div class="inputBox">
|
86
|
+
Password: <input class="disableAutoComplete" type="password" id="password"
|
87
|
+
name="password" value="<%= @web.password %>" />
|
88
|
+
|
89
|
+
Verify: <input class="disableAutoComplete" type="password" id="password_check"
|
90
|
+
value="<%= @web.password %>" name="password_check" />
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<h2 style="margin-bottom: 3px">Publish read-only version of this web (<%= @web.name %>)</h2>
|
94
|
+
<div class="help">
|
95
|
+
You can turn on a read-only version of this web that's accessible even when the regular web
|
96
|
+
is password protected.
|
97
|
+
The published version is accessible through URLs like /wiki/published/HomePage.
|
98
|
+
</div>
|
99
|
+
<div class="inputBox">
|
100
|
+
<input type="checkbox" name="published" <%= 'checked="on"' if @web.published %> />
|
101
|
+
Publish this web
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<p align="right">
|
105
|
+
<small>
|
106
|
+
Enter system password
|
107
|
+
<input type="password" class="disableAutoComplete" id="system_password"
|
108
|
+
name="system_password" />
|
109
|
+
and
|
110
|
+
<input type="submit" value="Update Web" />
|
111
|
+
<br/><br/>
|
112
|
+
...or forget changes and <%= link_to 'create a new web', :action => 'create_web' %>
|
113
|
+
</small>
|
114
|
+
</p>
|
115
|
+
|
116
|
+
</form>
|
117
|
+
|
118
|
+
<br/>
|
119
|
+
<h1>Other administrative tasks</h1>
|
120
|
+
|
121
|
+
<%= form_tag({:controller => 'admin', :web => @web.address, :action => 'remove_orphaned_pages'},
|
122
|
+
{:id => 'remove_orphaned_pages'})
|
123
|
+
%>
|
124
|
+
onSubmit="return checkSystemPassword(document.getElementById('system_password_orphaned').value)">
|
125
|
+
<p align="right">
|
126
|
+
<small>
|
127
|
+
Clean up by entering system password
|
128
|
+
<input type="password" id="system_password_orphaned" name="system_password_orphaned" />
|
129
|
+
and
|
130
|
+
<input type="submit" value="Delete Orphan Pages" />
|
131
|
+
</small>
|
132
|
+
</p>
|
133
|
+
<%= end_form_tag %>
|
134
|
+
|
135
|
+
<script type="text/javascript" src="/javascripts/edit_web.js" />
|
136
|
+
<script type="text/javascript">overrideAutocomplete()</script>
|