arrow 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. data/ChangeLog +1590 -0
  2. data/LICENSE +28 -0
  3. data/README +75 -0
  4. data/Rakefile +366 -0
  5. data/Rakefile.local +63 -0
  6. data/data/arrow/applets/TEMPLATE.rb.tpl +53 -0
  7. data/data/arrow/applets/args.rb +50 -0
  8. data/data/arrow/applets/config.rb +55 -0
  9. data/data/arrow/applets/error.rb +63 -0
  10. data/data/arrow/applets/files.rb +46 -0
  11. data/data/arrow/applets/inspect.rb +46 -0
  12. data/data/arrow/applets/nosuchapplet.rb +31 -0
  13. data/data/arrow/applets/status.rb +92 -0
  14. data/data/arrow/applets/test.rb +133 -0
  15. data/data/arrow/applets/tutorial/counter.rb +96 -0
  16. data/data/arrow/applets/tutorial/dingus.rb +67 -0
  17. data/data/arrow/applets/tutorial/hello.rb +34 -0
  18. data/data/arrow/applets/tutorial/hello2.rb +73 -0
  19. data/data/arrow/applets/tutorial/imgtext.rb +90 -0
  20. data/data/arrow/applets/tutorial/imgtext2.rb +286 -0
  21. data/data/arrow/applets/tutorial/index.rb +36 -0
  22. data/data/arrow/applets/tutorial/logo.rb +98 -0
  23. data/data/arrow/applets/tutorial/memcache.rb +61 -0
  24. data/data/arrow/applets/tutorial/missing.rb +37 -0
  25. data/data/arrow/applets/tutorial/protected.rb +100 -0
  26. data/data/arrow/applets/tutorial/redirector.rb +52 -0
  27. data/data/arrow/applets/tutorial/rndimages.rb +159 -0
  28. data/data/arrow/applets/tutorial/sharenotes.rb +83 -0
  29. data/data/arrow/applets/tutorial/subclassed-hello.rb +32 -0
  30. data/data/arrow/applets/tutorial/superhello.rb +72 -0
  31. data/data/arrow/applets/tutorial/timeclock.rb +78 -0
  32. data/data/arrow/applets/view-applet.rb +123 -0
  33. data/data/arrow/applets/view-template.rb +85 -0
  34. data/data/arrow/applets/wiki.rb +274 -0
  35. data/data/arrow/templates/TEMPLATE.tmpl.tpl +36 -0
  36. data/data/arrow/templates/applet-status.tmpl +153 -0
  37. data/data/arrow/templates/args-display.tmpl +120 -0
  38. data/data/arrow/templates/config/display-table.tmpl +36 -0
  39. data/data/arrow/templates/config/display.tmpl +36 -0
  40. data/data/arrow/templates/counter-deleted.tmpl +33 -0
  41. data/data/arrow/templates/counter.tmpl +59 -0
  42. data/data/arrow/templates/dingus.tmpl +55 -0
  43. data/data/arrow/templates/enumtable.tmpl +8 -0
  44. data/data/arrow/templates/error-display.tmpl +92 -0
  45. data/data/arrow/templates/filemap.tmpl +89 -0
  46. data/data/arrow/templates/hello-world-src.tmpl +34 -0
  47. data/data/arrow/templates/hello-world.tmpl +60 -0
  48. data/data/arrow/templates/imgtext/fontlist.tmpl +46 -0
  49. data/data/arrow/templates/imgtext/form.tmpl +70 -0
  50. data/data/arrow/templates/imgtext/reload-error.tmpl +40 -0
  51. data/data/arrow/templates/imgtext/reload.tmpl +55 -0
  52. data/data/arrow/templates/inspect/display.tmpl +80 -0
  53. data/data/arrow/templates/loginform.tmpl +64 -0
  54. data/data/arrow/templates/logout.tmpl +32 -0
  55. data/data/arrow/templates/memcache/display.tmpl +41 -0
  56. data/data/arrow/templates/navbar.incl +27 -0
  57. data/data/arrow/templates/nosuchapplet.tmpl +32 -0
  58. data/data/arrow/templates/printsource.tmpl +35 -0
  59. data/data/arrow/templates/protected.tmpl +36 -0
  60. data/data/arrow/templates/rndimages.tmpl +38 -0
  61. data/data/arrow/templates/service-response.tmpl +13 -0
  62. data/data/arrow/templates/sharenotes/display.tmpl +38 -0
  63. data/data/arrow/templates/status.tmpl +120 -0
  64. data/data/arrow/templates/templateviewer.tmpl +43 -0
  65. data/data/arrow/templates/test/harness.tmpl +57 -0
  66. data/data/arrow/templates/test/list.tmpl +48 -0
  67. data/data/arrow/templates/test/problem.tmpl +42 -0
  68. data/data/arrow/templates/tutorial/index.tmpl +37 -0
  69. data/data/arrow/templates/tutorial/missingapplet.tmpl +29 -0
  70. data/data/arrow/templates/view-applet-nosuch.tmpl +32 -0
  71. data/data/arrow/templates/view-applet.tmpl +40 -0
  72. data/data/arrow/templates/view-template.tmpl +83 -0
  73. data/data/arrow/templates/wiki/formerror.tmpl +47 -0
  74. data/data/arrow/templates/wiki/markup_help.incl +6 -0
  75. data/data/arrow/templates/wiki/new.tmpl +56 -0
  76. data/data/arrow/templates/wiki/new_system.tmpl +122 -0
  77. data/data/arrow/templates/wiki/sectionlist.tmpl +43 -0
  78. data/data/arrow/templates/wiki/show.tmpl +34 -0
  79. data/docs/manual/layouts/default.page +43 -0
  80. data/docs/manual/lib/api-filter.rb +81 -0
  81. data/docs/manual/lib/editorial-filter.rb +64 -0
  82. data/docs/manual/lib/examples-filter.rb +244 -0
  83. data/docs/manual/lib/links-filter.rb +117 -0
  84. data/lib/apache/fakerequest.rb +448 -0
  85. data/lib/apache/logger.rb +33 -0
  86. data/lib/arrow.rb +51 -0
  87. data/lib/arrow/acceptparam.rb +207 -0
  88. data/lib/arrow/applet.rb +725 -0
  89. data/lib/arrow/appletmixins.rb +218 -0
  90. data/lib/arrow/appletregistry.rb +590 -0
  91. data/lib/arrow/applettestcase.rb +503 -0
  92. data/lib/arrow/broker.rb +255 -0
  93. data/lib/arrow/cache.rb +176 -0
  94. data/lib/arrow/config-loaders/yaml.rb +75 -0
  95. data/lib/arrow/config.rb +615 -0
  96. data/lib/arrow/constants.rb +24 -0
  97. data/lib/arrow/cookie.rb +359 -0
  98. data/lib/arrow/cookieset.rb +108 -0
  99. data/lib/arrow/dispatcher.rb +368 -0
  100. data/lib/arrow/dispatcherloader.rb +50 -0
  101. data/lib/arrow/exceptions.rb +61 -0
  102. data/lib/arrow/fallbackhandler.rb +48 -0
  103. data/lib/arrow/formvalidator.rb +631 -0
  104. data/lib/arrow/htmltokenizer.rb +343 -0
  105. data/lib/arrow/logger.rb +488 -0
  106. data/lib/arrow/logger/apacheoutputter.rb +69 -0
  107. data/lib/arrow/logger/arrayoutputter.rb +63 -0
  108. data/lib/arrow/logger/coloroutputter.rb +111 -0
  109. data/lib/arrow/logger/fileoutputter.rb +96 -0
  110. data/lib/arrow/logger/htmloutputter.rb +54 -0
  111. data/lib/arrow/logger/outputter.rb +123 -0
  112. data/lib/arrow/mixins.rb +425 -0
  113. data/lib/arrow/monkeypatches.rb +94 -0
  114. data/lib/arrow/object.rb +117 -0
  115. data/lib/arrow/path.rb +196 -0
  116. data/lib/arrow/service.rb +447 -0
  117. data/lib/arrow/session.rb +289 -0
  118. data/lib/arrow/session/dbstore.rb +100 -0
  119. data/lib/arrow/session/filelock.rb +160 -0
  120. data/lib/arrow/session/filestore.rb +132 -0
  121. data/lib/arrow/session/id.rb +98 -0
  122. data/lib/arrow/session/lock.rb +253 -0
  123. data/lib/arrow/session/md5id.rb +42 -0
  124. data/lib/arrow/session/nulllock.rb +42 -0
  125. data/lib/arrow/session/posixlock.rb +166 -0
  126. data/lib/arrow/session/sha1id.rb +54 -0
  127. data/lib/arrow/session/store.rb +366 -0
  128. data/lib/arrow/session/usertrackid.rb +52 -0
  129. data/lib/arrow/spechelpers.rb +73 -0
  130. data/lib/arrow/template.rb +713 -0
  131. data/lib/arrow/template/attr.rb +31 -0
  132. data/lib/arrow/template/call.rb +31 -0
  133. data/lib/arrow/template/comment.rb +33 -0
  134. data/lib/arrow/template/container.rb +118 -0
  135. data/lib/arrow/template/else.rb +41 -0
  136. data/lib/arrow/template/elsif.rb +44 -0
  137. data/lib/arrow/template/escape.rb +53 -0
  138. data/lib/arrow/template/export.rb +87 -0
  139. data/lib/arrow/template/for.rb +145 -0
  140. data/lib/arrow/template/if.rb +78 -0
  141. data/lib/arrow/template/import.rb +119 -0
  142. data/lib/arrow/template/include.rb +206 -0
  143. data/lib/arrow/template/iterator.rb +208 -0
  144. data/lib/arrow/template/nodes.rb +734 -0
  145. data/lib/arrow/template/parser.rb +571 -0
  146. data/lib/arrow/template/prettyprint.rb +53 -0
  147. data/lib/arrow/template/render.rb +191 -0
  148. data/lib/arrow/template/selectlist.rb +94 -0
  149. data/lib/arrow/template/set.rb +87 -0
  150. data/lib/arrow/template/timedelta.rb +81 -0
  151. data/lib/arrow/template/unless.rb +78 -0
  152. data/lib/arrow/template/urlencode.rb +51 -0
  153. data/lib/arrow/template/yield.rb +139 -0
  154. data/lib/arrow/templatefactory.rb +125 -0
  155. data/lib/arrow/testcase.rb +567 -0
  156. data/lib/arrow/transaction.rb +608 -0
  157. data/rake/191_compat.rb +26 -0
  158. data/rake/dependencies.rb +76 -0
  159. data/rake/documentation.rb +114 -0
  160. data/rake/helpers.rb +502 -0
  161. data/rake/hg.rb +282 -0
  162. data/rake/manual.rb +787 -0
  163. data/rake/packaging.rb +129 -0
  164. data/rake/publishing.rb +278 -0
  165. data/rake/style.rb +62 -0
  166. data/rake/svn.rb +668 -0
  167. data/rake/testing.rb +187 -0
  168. data/rake/verifytask.rb +64 -0
  169. data/spec/arrow/acceptparam_spec.rb +157 -0
  170. data/spec/arrow/applet_spec.rb +575 -0
  171. data/spec/arrow/appletmixins_spec.rb +409 -0
  172. data/spec/arrow/appletregistry_spec.rb +294 -0
  173. data/spec/arrow/broker_spec.rb +153 -0
  174. data/spec/arrow/config_spec.rb +224 -0
  175. data/spec/arrow/cookieset_spec.rb +164 -0
  176. data/spec/arrow/dispatcher_spec.rb +137 -0
  177. data/spec/arrow/dispatcherloader_spec.rb +65 -0
  178. data/spec/arrow/formvalidator_spec.rb +781 -0
  179. data/spec/arrow/logger_spec.rb +346 -0
  180. data/spec/arrow/mixins_spec.rb +120 -0
  181. data/spec/arrow/service_spec.rb +645 -0
  182. data/spec/arrow/session_spec.rb +121 -0
  183. data/spec/arrow/template/iterator_spec.rb +222 -0
  184. data/spec/arrow/templatefactory_spec.rb +185 -0
  185. data/spec/arrow/transaction_spec.rb +319 -0
  186. data/spec/arrow_spec.rb +37 -0
  187. data/spec/lib/appletmatchers.rb +281 -0
  188. data/spec/lib/constants.rb +77 -0
  189. data/spec/lib/helpers.rb +41 -0
  190. data/spec/lib/matchers.rb +44 -0
  191. data/tests/cookie.tests.rb +310 -0
  192. data/tests/path.tests.rb +157 -0
  193. data/tests/session.tests.rb +111 -0
  194. data/tests/session_id.tests.rb +82 -0
  195. data/tests/session_lock.tests.rb +191 -0
  196. data/tests/session_store.tests.rb +53 -0
  197. data/tests/template.tests.rb +1360 -0
  198. metadata +339 -0
@@ -0,0 +1,29 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3
+
4
+ <!--
5
+
6
+ Missing Applet
7
+
8
+ -->
9
+
10
+ <head>
11
+ <title>Missing Applet</title>
12
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
13
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
14
+ </head>
15
+ <body>
16
+
17
+ <h1>Missing Applet</h1>
18
+
19
+ <p>The applet you are requesting isn't loaded or doesn't exist. Sorry.</p>
20
+
21
+ </body>
22
+ </html>
23
+
24
+
25
+ <!--
26
+ Local Variables:
27
+ mode: nxml
28
+ -->
29
+
@@ -0,0 +1,32 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3
+
4
+ <!--
5
+
6
+ Applet Viewer
7
+
8
+ -->
9
+
10
+ <head>
11
+ <title>Applet Viewer</title>
12
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
13
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
14
+ <link rel="stylesheet" type="text/css" href="/css/arrow.css" />
15
+ </head>
16
+ <body>
17
+
18
+ <h1>Applet Viewer</h1>
19
+
20
+ <p><?attr message ?></p>
21
+
22
+ <?include navbar.incl?>
23
+
24
+ </body>
25
+ </html>
26
+
27
+
28
+ <!--
29
+ Local Variables:
30
+ mode: nxml
31
+ -->
32
+
@@ -0,0 +1,40 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3
+
4
+ <!--
5
+
6
+ Applet Viewer Applet
7
+
8
+ -->
9
+
10
+ <head>
11
+ <title>Applet Viewer Applet</title>
12
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
13
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
14
+ <link rel="stylesheet" type="text/css" href="/css/arrow.css" />
15
+ </head>
16
+ <body>
17
+
18
+ <h1><?call displayed_applet.signature.name ?>: Source View</h1>
19
+
20
+ <p>This is the source code for the <tt><?call displayed_applet.signature.name
21
+ ?></tt> applet, which is currently registered at <tt>/<?call applet.uri
22
+ ?></tt>.</p>
23
+
24
+ <div id="applet-code">
25
+ <pre><code>
26
+ <?escape code ?>
27
+ </code></pre>
28
+ </div>
29
+
30
+ <?include navbar.incl?>
31
+
32
+ </body>
33
+ </html>
34
+
35
+
36
+ <!--
37
+ Local Variables:
38
+ mode: nxml
39
+ -->
40
+
@@ -0,0 +1,83 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3
+
4
+ <!--
5
+
6
+ Arrow Template Viewer
7
+
8
+ -->
9
+
10
+ <head>
11
+ <title>Arrow Template Viewer: '<?attr path?>'</title>
12
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
13
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
14
+ <link rel="stylesheet" type="text/css" href="/css/arrow.css" />
15
+ </head>
16
+ <body>
17
+
18
+ <h1>Arrow Template Viewer: '<?attr path?>'</h1>
19
+
20
+ <p>This is an introspective view on the template objects used by Arrow.</p>
21
+
22
+ <?if template?>
23
+ <h2>Attributes</h2>
24
+
25
+ <p>This is a list of attributes of the template object which are settable by
26
+ the program which uses it.</p>
27
+
28
+ <ul>
29
+ <?yield name from template._attributes.keys.sort.each?>
30
+ <li><?attr name?></li>
31
+ <?end yield?>
32
+ </ul>
33
+
34
+ <?if tokenizer?>
35
+ <h2>XML Source</h2>
36
+
37
+ <p>This is the source of the template file itself.</p>
38
+
39
+ <div id="highlighted-source-section" class="highlighted-source">
40
+ <?yield token from tokenizer.each?>
41
+ <?call token.to_html ?>
42
+ <?end yield?>
43
+ </div>
44
+ <?else?>
45
+ <!-- No tokenizer -->
46
+ <?end if?>
47
+
48
+
49
+ <h2>Node Tree</h2>
50
+
51
+ <p>This is the abstract syntax tree which was parsed from the template's
52
+ source. Nodes are walked by the template object to define its attributes,
53
+ behaviours, and eventual output.</p>
54
+
55
+ <div id="node-tree-section" class="node-tree">
56
+ <?yield node from template._syntax_tree.each?>
57
+ <?call node.to_html?>
58
+ <?end yield?>
59
+ </div>
60
+
61
+ <?elsif error?>
62
+ <p class="errmsg">An error occurred while loading the '<tt><?attr
63
+ path?></tt>' template:</p>
64
+
65
+ <h2><strong><?escape error.message?></strong></h2>
66
+ <pre><?escape error.backtrace.join("\n") ?></pre>
67
+
68
+ <?else?>
69
+ <p>Hmmm... neither an error object or a template object were given to this
70
+ template.</p>
71
+ <?end if?>
72
+
73
+ <?include navbar.incl?>
74
+
75
+ </body>
76
+ </html>
77
+
78
+
79
+ <!--
80
+ Local Variables:
81
+ mode: xml
82
+ -->
83
+
@@ -0,0 +1,47 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4
+
5
+ <!--
6
+
7
+ Instiki Form Error
8
+
9
+ -->
10
+
11
+ <head>
12
+ <title>Wiki Form Error</title>
13
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
14
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
15
+ <link rel="stylesheet" type="text/css" href="/css/arrow.css" />
16
+ </head>
17
+ <body>
18
+
19
+ <h1>Error/s</h1>
20
+
21
+ <p>There were one or more errors in your submission. Please go back and
22
+ correct the following:</p>
23
+
24
+ <div id="form-errors">
25
+ <?if formerrors ?>
26
+ <ul class="error-list">
27
+ <?foreach error in formerrors ?>
28
+ <li><?attr error ?></li>
29
+ <?end?>
30
+ </ul>
31
+ <?else?>
32
+ <!-- Calling applet did not set the 'formerrors' field. -->
33
+ <p>Unknown form error.</p>
34
+ <?end?>
35
+ </div>
36
+
37
+ <?include navbar.incl?>
38
+
39
+ </body>
40
+ </html>
41
+
42
+
43
+ <!--
44
+ Local Variables:
45
+ mode: nxml
46
+ -->
47
+
@@ -0,0 +1,6 @@
1
+ <?inherit web ?>
2
+
3
+ <div style="text-size: 80%; border: 1px dotted #333; background: #dedede;">
4
+ {Markup help goes here}
5
+ </div>
6
+
@@ -0,0 +1,56 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4
+
5
+ <!--
6
+
7
+ New Topic Template
8
+ $Id$
9
+
10
+ -->
11
+
12
+ <head>
13
+ <title>New Topic: <?escape topic ?></title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
15
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
16
+ <link rel="stylesheet" type="text/css" href="/css/arrow.css" />
17
+ </head>
18
+ <body>
19
+
20
+ <h1>New Topic: <?escape topic ?></h1>
21
+
22
+ <?include wiki/markup_help.incl as markup_help ?>
23
+
24
+ <?if formerrors ?>
25
+ <div id="form-errors">
26
+ <ul class="error-list">
27
+ <?for error in formerrors ?>
28
+ <li><?attr error ?></li>
29
+ <?end for?>
30
+ </ul>
31
+ </div>
32
+ <?end if?>
33
+
34
+ <form action="[?call txn.applet ?]/save/[?urlencode topic ?]" method="post">
35
+ <p>
36
+ <textarea name="content" cols="80" rows="20"></textarea>
37
+ </p>
38
+
39
+ <p>
40
+ <input type="submit" value="Create" /> as
41
+ <input type="text" name="author" id="authorName" value="[?call author ?]"
42
+ onclick="this.value == 'AnonymousCoward' ? this.value = '' : true" />
43
+ </p>
44
+ </form>
45
+
46
+ <?include navbar.incl ?>
47
+
48
+ </body>
49
+ </html>
50
+
51
+
52
+ <!--
53
+ Local Variables:
54
+ mode: nxml
55
+ -->
56
+
@@ -0,0 +1,122 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3
+
4
+ <!--
5
+
6
+ New Wiki Setup
7
+
8
+ -->
9
+
10
+ <head>
11
+ <title>New Wiki Setup</title>
12
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
13
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
14
+ <link rel="stylesheet" type="text/css" href="/css/arrow.css" />
15
+
16
+ <script type="text/javascript"><!--
17
+ function proposeAddress() {
18
+ document.getElementById('web_address').value =
19
+ document.getElementById('web_name').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
20
+ }
21
+
22
+ function cleanAddress() {
23
+ document.getElementById('web_address').value =
24
+ document.getElementById('web_address').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
25
+ }
26
+
27
+ function validateSetup() {
28
+ if (document.getElementById('web_name').value == "") {
29
+ alert("You must pick a name for the first web");
30
+ return false;
31
+ }
32
+
33
+ if (document.getElementById('web_address').value == "") {
34
+ alert("You must pick an address for the first web");
35
+ return false;
36
+ }
37
+
38
+ if (document.getElementById('password').value == "") {
39
+ alert("You must pick a system password");
40
+ return false;
41
+ }
42
+
43
+ if (document.getElementById('password_check').value == "" ||
44
+ document.getElementById('password').value != document.getElementById('password_check').value) {
45
+ alert("The password and its verification doesn't match");
46
+ return false;
47
+ }
48
+
49
+ return true;
50
+ }
51
+ // -->
52
+ </script>
53
+ </head>
54
+ <body>
55
+
56
+ <h1>New Wiki Setup</h1>
57
+
58
+ <?if errors?>
59
+ <p>Sorry, there were errors in your submission:</p>
60
+ <ul>
61
+ <?for err in errors ?>
62
+ <li><?attr err?></li>
63
+ <?end for?>
64
+ </ul>
65
+ <?else?>
66
+ <p>
67
+ Congratulations on succesfully installing and starting Instiki.
68
+ Since this is the first time Instiki has been run on this port, you'll need to do a brief one-time setup.
69
+ </p>
70
+ <?end if?>
71
+
72
+ <form action="[?call txn.action ?]/create_system" id="setup" method="post" onsubmit="return validateSetup()">
73
+ <ol class="setup">
74
+ <li>
75
+
76
+ <h2 style="margin-bottom: 3px">Name and address for your first web</h2>
77
+
78
+ <div class="help">
79
+ The name of the web is included in the title on all pages. The
80
+ address is the base path that all pages within the web live
81
+ beneath. Ex: the address "rails" gives URLs like
82
+ <i>/show/rails/HomePage</i>. The address can only consist of letters
83
+ &amp; digits.
84
+ </div>
85
+
86
+ <div class="inputBox">
87
+ Name: <input type="text" id="web_name" name="web_name" value="Wiki" onchange="proposeAddress();"
88
+ onclick="this.value == 'Wiki' ? this.value = '' : true" /> &nbsp;&nbsp;
89
+ Address: <input type="text" id="web_address" name="web_address" onchange="cleanAddress();" value="wiki" />
90
+ </div>
91
+ </li>
92
+
93
+ <li>
94
+ <h2 style="margin-bottom: 3px">Password for creating and changing webs</h2>
95
+ <div class="help">
96
+ Administrative access allows you to make new webs and change existing ones.<br/>
97
+ Everyone with this password will be able to do this, so pick it carefully.
98
+ </div>
99
+ <div class="inputBox">
100
+ Password: <input type="password" id="password" name="password" /> &nbsp;&nbsp;
101
+ Verify: <input type="password" id="password_check" name="password_check" />
102
+ </div>
103
+ </li>
104
+ </ol>
105
+
106
+ <p align="right">
107
+ <input type="submit" value="Setup" style="margin-left: 40px" />
108
+ </p>
109
+ </form>
110
+
111
+
112
+ <?include navbar.incl?>
113
+
114
+ </body>
115
+ </html>
116
+
117
+
118
+ <!--
119
+ Local Variables:
120
+ mode: nxml
121
+ -->
122
+
@@ -0,0 +1,43 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4
+
5
+ <!--
6
+
7
+ [?call installation.name ?]
8
+
9
+ -->
10
+
11
+ <head>
12
+ <title>[? ?]</title>
13
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
14
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
15
+ <link rel="stylesheet" type="text/css" href="/css/arrow.css" />
16
+ </head>
17
+ <body>
18
+
19
+ <h1><?attr installation.name ?></h1>
20
+
21
+ <p>The list of sections in this Wiki are as follows:</p>
22
+
23
+ <ul>
24
+ <?for section in sections?>
25
+ <li><a href="[?call txn.action ?]/view/[?call section.name?]"><?call
26
+ section.name ?></a></li>
27
+ <?end for?>
28
+ </ul>
29
+
30
+ <p>You can also <a href="[?call txn.action ?]/new">create a new section</a>
31
+ if you like.</p>
32
+
33
+ <?include navbar.incl?>
34
+
35
+ </body>
36
+ </html>
37
+
38
+
39
+ <!--
40
+ Local Variables:
41
+ mode: xml
42
+ -->
43
+