instiki 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. data/CHANGELOG +174 -165
  2. data/README +68 -68
  3. data/app/controllers/admin_controller.rb +94 -94
  4. data/app/controllers/application.rb +135 -131
  5. data/app/controllers/file_controller.rb +129 -129
  6. data/app/controllers/wiki_controller.rb +354 -354
  7. data/app/helpers/application_helper.rb +68 -68
  8. data/app/models/author.rb +3 -3
  9. data/app/models/chunks/category.rb +33 -33
  10. data/app/models/chunks/chunk.rb +86 -86
  11. data/app/models/chunks/engines.rb +61 -54
  12. data/app/models/chunks/include.rb +41 -41
  13. data/app/models/chunks/literal.rb +31 -31
  14. data/app/models/chunks/nowiki.rb +28 -28
  15. data/app/models/chunks/test.rb +18 -18
  16. data/app/models/chunks/uri.rb +182 -182
  17. data/app/models/chunks/wiki.rb +141 -141
  18. data/app/models/file_yard.rb +58 -58
  19. data/app/models/page.rb +112 -112
  20. data/app/models/page_lock.rb +22 -22
  21. data/app/models/page_set.rb +89 -89
  22. data/app/models/revision.rb +123 -123
  23. data/app/models/web.rb +182 -176
  24. data/app/models/wiki_content.rb +207 -207
  25. data/app/models/wiki_service.rb +233 -233
  26. data/app/models/wiki_words.rb +23 -23
  27. data/app/views/admin/create_system.rhtml +83 -83
  28. data/app/views/admin/create_web.rhtml +69 -69
  29. data/app/views/admin/edit_web.rhtml +137 -136
  30. data/app/views/file/file.rhtml +18 -18
  31. data/app/views/file/import.rhtml +22 -22
  32. data/app/views/layouts/default.rhtml +86 -85
  33. data/app/views/markdown_help.rhtml +12 -12
  34. data/app/views/mixed_help.rhtml +6 -6
  35. data/app/views/navigation.rhtml +30 -30
  36. data/app/views/rdoc_help.rhtml +12 -12
  37. data/app/views/textile_help.rhtml +24 -24
  38. data/app/views/wiki/authors.rhtml +11 -11
  39. data/app/views/wiki/edit.rhtml +39 -39
  40. data/app/views/wiki/export.rhtml +12 -12
  41. data/app/views/wiki/feeds.rhtml +14 -14
  42. data/app/views/wiki/list.rhtml +64 -64
  43. data/app/views/wiki/locked.rhtml +23 -23
  44. data/app/views/wiki/login.rhtml +14 -14
  45. data/app/views/wiki/new.rhtml +31 -31
  46. data/app/views/wiki/page.rhtml +115 -115
  47. data/app/views/wiki/print.rhtml +14 -14
  48. data/app/views/wiki/published.rhtml +9 -9
  49. data/app/views/wiki/recently_revised.rhtml +26 -26
  50. data/app/views/wiki/revision.rhtml +103 -103
  51. data/app/views/wiki/rollback.rhtml +36 -36
  52. data/app/views/wiki/rss_feed.rhtml +22 -22
  53. data/app/views/wiki/search.rhtml +38 -38
  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 -18
  57. data/app/views/wiki_words_help.rhtml +9 -9
  58. data/config/environment.rb +82 -82
  59. data/config/environments/development.rb +5 -5
  60. data/config/environments/production.rb +4 -4
  61. data/config/environments/test.rb +17 -17
  62. data/config/routes.rb +18 -18
  63. data/lib/active_record_stub.rb +31 -31
  64. data/lib/bluecloth_tweaked.rb +1127 -0
  65. data/lib/diff.rb +444 -444
  66. data/lib/instiki_errors.rb +14 -14
  67. data/lib/rdocsupport.rb +151 -151
  68. data/lib/redcloth_for_tex.rb +736 -736
  69. data/natives/osx/desktop_launcher/AppDelegate.h +18 -18
  70. data/natives/osx/desktop_launcher/AppDelegate.mm +109 -109
  71. data/natives/osx/desktop_launcher/Credits.html +15 -15
  72. data/natives/osx/desktop_launcher/English.lproj/MainMenu.nib/classes.nib +12 -12
  73. data/natives/osx/desktop_launcher/English.lproj/MainMenu.nib/info.nib +24 -24
  74. data/natives/osx/desktop_launcher/Info.plist +12 -12
  75. data/natives/osx/desktop_launcher/Instiki.xcode/project.pbxproj +592 -592
  76. data/natives/osx/desktop_launcher/Instiki_Prefix.pch +7 -7
  77. data/natives/osx/desktop_launcher/MakeDMG.sh +9 -9
  78. data/natives/osx/desktop_launcher/main.mm +14 -14
  79. data/natives/osx/desktop_launcher/version.plist +16 -16
  80. data/public/404.html +5 -5
  81. data/public/500.html +5 -5
  82. data/public/dispatch.rb +9 -9
  83. data/public/javascripts/edit_web.js +52 -52
  84. data/public/javascripts/prototype.js +336 -336
  85. data/public/stylesheets/instiki.css +222 -222
  86. data/script/breakpointer +4 -4
  87. data/script/server +93 -93
  88. metadata +4 -3
@@ -1,23 +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
- 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
+ # 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,83 +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
- 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
+ <% @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,69 +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
- 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>
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>
@@ -1,136 +1,137 @@
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>
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
+ :onSubmit => "return checkSystemPassword(document.getElementById('system_password_orphaned').value)"
124
+ })
125
+ %>
126
+ <p align="right">
127
+ <small>
128
+ Clean up by entering system password
129
+ <input type="password" id="system_password_orphaned" name="system_password_orphaned" />
130
+ and
131
+ <input type="submit" value="Delete Orphan Pages" />
132
+ </small>
133
+ </p>
134
+ <%= end_form_tag %>
135
+
136
+ <script type="text/javascript" src="/javascripts/edit_web.js" />
137
+ <script type="text/javascript">overrideAutocomplete()</script>