instiki 0.9.2 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. data/CHANGELOG +165 -0
  2. data/README +68 -172
  3. data/app/controllers/admin_controller.rb +94 -0
  4. data/app/controllers/application.rb +131 -0
  5. data/app/controllers/file_controller.rb +129 -0
  6. data/app/controllers/wiki_controller.rb +354 -0
  7. data/{libraries/view_helper.rb → app/helpers/application_helper.rb} +68 -33
  8. data/app/models/author.rb +3 -3
  9. data/app/models/chunks/category.rb +33 -31
  10. data/app/models/chunks/chunk.rb +86 -20
  11. data/app/models/chunks/engines.rb +54 -38
  12. data/app/models/chunks/include.rb +41 -29
  13. data/app/models/chunks/literal.rb +31 -19
  14. data/app/models/chunks/nowiki.rb +28 -31
  15. data/app/models/chunks/test.rb +18 -18
  16. data/app/models/chunks/uri.rb +182 -97
  17. data/app/models/chunks/wiki.rb +141 -82
  18. data/app/models/file_yard.rb +58 -0
  19. data/app/models/page.rb +112 -86
  20. data/app/models/page_lock.rb +22 -23
  21. data/app/models/page_set.rb +89 -64
  22. data/app/models/revision.rb +123 -90
  23. data/app/models/web.rb +176 -89
  24. data/app/models/wiki_content.rb +207 -105
  25. data/app/models/wiki_service.rb +233 -83
  26. data/app/models/wiki_words.rb +23 -25
  27. data/app/views/{wiki/new_system.rhtml → admin/create_system.rhtml} +83 -78
  28. data/app/views/{wiki/new_web.rhtml → admin/create_web.rhtml} +69 -64
  29. data/app/views/admin/edit_web.rhtml +136 -0
  30. data/app/views/file/file.rhtml +19 -0
  31. data/app/views/file/import.rhtml +23 -0
  32. data/app/views/layouts/default.rhtml +85 -0
  33. data/app/views/markdown_help.rhtml +12 -16
  34. data/app/views/mixed_help.rhtml +7 -0
  35. data/app/views/navigation.rhtml +30 -19
  36. data/app/views/rdoc_help.rhtml +12 -16
  37. data/app/views/textile_help.rhtml +24 -28
  38. data/app/views/wiki/authors.rhtml +11 -13
  39. data/app/views/wiki/edit.rhtml +39 -31
  40. data/app/views/wiki/export.rhtml +12 -14
  41. data/app/views/wiki/feeds.rhtml +14 -10
  42. data/app/views/wiki/list.rhtml +64 -57
  43. data/app/views/wiki/locked.rhtml +23 -14
  44. data/app/views/wiki/login.rhtml +14 -11
  45. data/app/views/wiki/new.rhtml +31 -27
  46. data/app/views/wiki/page.rhtml +115 -81
  47. data/app/views/wiki/print.rhtml +14 -16
  48. data/app/views/wiki/published.rhtml +9 -10
  49. data/app/views/wiki/recently_revised.rhtml +27 -30
  50. data/app/views/wiki/revision.rhtml +103 -81
  51. data/app/views/wiki/rollback.rhtml +14 -9
  52. data/app/views/wiki/rss_feed.rhtml +22 -22
  53. data/app/views/wiki/search.rhtml +38 -15
  54. data/app/views/wiki/tex.rhtml +22 -22
  55. data/app/views/wiki/tex_web.rhtml +34 -34
  56. data/app/views/wiki/web_list.rhtml +18 -13
  57. data/app/views/wiki_words_help.rhtml +9 -8
  58. data/config/environment.rb +82 -0
  59. data/config/environments/development.rb +5 -0
  60. data/config/environments/production.rb +4 -0
  61. data/config/environments/test.rb +17 -0
  62. data/config/routes.rb +18 -0
  63. data/instiki +6 -67
  64. data/instiki.rb +3 -0
  65. data/lib/active_record_stub.rb +31 -0
  66. data/{libraries/diff → lib}/diff.rb +444 -475
  67. data/lib/instiki_errors.rb +15 -0
  68. data/{libraries → lib}/rdocsupport.rb +151 -155
  69. data/lib/redcloth_for_tex.rb +736 -0
  70. data/natives/osx/desktop_launcher/AppDelegate.h +18 -0
  71. data/natives/osx/desktop_launcher/AppDelegate.mm +109 -0
  72. data/natives/osx/desktop_launcher/Credits.html +16 -0
  73. data/natives/osx/desktop_launcher/English.lproj/InfoPlist.strings +0 -0
  74. data/natives/osx/desktop_launcher/English.lproj/MainMenu.nib/classes.nib +13 -0
  75. data/natives/osx/desktop_launcher/English.lproj/MainMenu.nib/info.nib +24 -0
  76. data/natives/osx/desktop_launcher/English.lproj/MainMenu.nib/objects.nib +0 -0
  77. data/natives/osx/desktop_launcher/Info.plist +13 -0
  78. data/natives/osx/desktop_launcher/Instiki.xcode/project.pbxproj +592 -0
  79. data/natives/osx/desktop_launcher/Instiki_Prefix.pch +7 -0
  80. data/natives/osx/desktop_launcher/MakeDMG.sh +9 -0
  81. data/natives/osx/desktop_launcher/main.mm +14 -0
  82. data/natives/osx/desktop_launcher/version.plist +16 -0
  83. data/public/404.html +6 -0
  84. data/public/500.html +6 -0
  85. data/public/dispatch.rb +10 -0
  86. data/public/favicon.ico +0 -0
  87. data/public/javascripts/edit_web.js +52 -0
  88. data/public/javascripts/prototype.js +336 -0
  89. data/{app/views/static_style_sheet.rhtml → public/stylesheets/instiki.css} +221 -198
  90. data/script/breakpointer +4 -0
  91. data/script/server +93 -0
  92. metadata +59 -32
  93. data/app/controllers/wiki.rb +0 -389
  94. data/app/models/chunks/match.rb +0 -19
  95. data/app/views/bottom.rhtml +0 -4
  96. data/app/views/top.rhtml +0 -49
  97. data/app/views/wiki/edit_web.rhtml +0 -138
  98. data/libraries/action_controller_servlet.rb +0 -177
  99. data/libraries/erb.rb +0 -490
  100. data/libraries/madeleine_service.rb +0 -68
  101. data/libraries/redcloth_for_tex.rb +0 -869
  102. data/libraries/web_controller_server.rb +0 -81
@@ -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
- "ÀÁÂÃÄÅĀĄĂÆÇĆČĈĊĎĐÈÉÊËĒĘĚĔĖĜĞĠĢĤĦÌÍÎÏĪĨĬĮİ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
-
18
- def self.separate(wiki_word, ignore_separation = false)
19
- if ignore_separation
20
- wiki_word
21
- else
22
- wiki_word.gsub(/([a-z#{I18N_LOWER_CASE_LETTERS}])([A-Z#{I18N_HIGHER_CASE_LETTERS}])/u, '\1 \2')
23
- end
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 %><%= sub_template "top" %>
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, you'll need to do a brief one-time setup.
6
- </p>
7
-
8
- <form action="../create_system" id="setup" method="post" onSubmit="return validateSetup()">
9
- <ol class="setup">
10
- <li>
11
-
12
- <h2 style="margin-bottom: 3px">Name and address for your first web</h2>
13
- <div class="help">
14
- 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.
15
- </div>
16
- <div class="inputBox">
17
- Name: <input type="text" id="web_name" name="web_name" value="Wiki" onChange="proposeAddress();"
18
- onClick="this.value == 'Wiki' ? this.value = '' : true"> &nbsp;&nbsp;
19
- Address: <input type="text" id="web_address" name="web_address" onChange="cleanAddress();" value="wiki">
20
- </div>
21
- </li>
22
-
23
- <li>
24
- <h2 style="margin-bottom: 3px">Password for creating and changing webs</h2>
25
- <div class="help">
26
- Administrative access allows you to make new webs and change existing ones.<br/>
27
- Everyone with this password will be able to do this, so pick it carefully.
28
- </div>
29
- <div class="inputBox">
30
- Password: <input type="password" id="password" name="password"> &nbsp;&nbsp;
31
- Verify: <input type="password" id="password_check" name="password_check">
32
- </div>
33
- </li>
34
- </ol>
35
-
36
- <p align="right">
37
- <input type="submit" value="Setup" style="margin-left: 40px">
38
- </p>
39
- </form>
40
-
41
- <script>
42
- function proposeAddress() {
43
- document.getElementById('web_address').value =
44
- document.getElementById('web_name').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
45
- }
46
-
47
- function cleanAddress() {
48
- document.getElementById('web_address').value =
49
- document.getElementById('web_address').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
50
- }
51
-
52
- function validateSetup() {
53
- if (document.getElementById('web_name').value == "") {
54
- alert("You must pick a name for the first web");
55
- return false;
56
- }
57
-
58
- if (document.getElementById('web_address').value == "") {
59
- alert("You must pick an address for the first web");
60
- return false;
61
- }
62
-
63
- if (document.getElementById('password').value == "") {
64
- alert("You must pick a system password");
65
- return false;
66
- }
67
-
68
- if (document.getElementById('password_check').value == "" ||
69
- document.getElementById('password').value != document.getElementById('password_check').value) {
70
- alert("The password and its verification doesn't match");
71
- return false;
72
- }
73
-
74
- return true;
75
- }
76
- </script>
77
-
78
- <%= sub_template "bottom" %>
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
+ &nbsp;&nbsp;
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
+ &nbsp;&nbsp;
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 %><%= 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();" /> &nbsp;&nbsp;
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
- <%= sub_template "bottom" %>
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
+ &nbsp;&nbsp;
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();" /> &nbsp;&nbsp;
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
+ &nbsp;&nbsp;
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 &gt;&gt;</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
+ &nbsp;&nbsp;
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>