Soks 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. data/README.txt +14 -4
  2. data/bin/soks-create-wiki.rb +2 -2
  3. data/contrib/redcloth-3.0.3.rb +0 -1
  4. data/lib/helpers/default-helpers.rb +13 -12
  5. data/lib/helpers/mail2wiki-helper.rb +12 -7
  6. data/lib/helpers/mail2wiki-test.rb +15 -0
  7. data/lib/helpers/wiki2html.rb +60 -0
  8. data/lib/soks-drb.rb +20 -0
  9. data/lib/soks-fcgi.rb +127 -0
  10. data/lib/soks-model.rb +11 -3
  11. data/lib/soks-servlet.rb +68 -45
  12. data/lib/soks-storage.rb +11 -3
  13. data/lib/soks-utils.rb +32 -3
  14. data/lib/soks-view.rb +48 -69
  15. data/lib/soks.rb +6 -3
  16. data/templates/default/attachment/blank.gif +0 -0
  17. data/templates/default/attachment/logo.jpg +0 -0
  18. data/templates/default/attachment/newpage.js +9 -0
  19. data/templates/default/attachment/pngbehavior.htc +86 -0
  20. data/templates/default/attachment/robots.txt +2 -1
  21. data/templates/default/attachment/stylesheet.css +144 -37
  22. data/templates/default/banned_titles.txt +36 -0
  23. data/templates/default/content/Api%20for%20classes%20to%20modify%20the%20wiki.textile +24 -0
  24. data/templates/default/content/Author.textile +3 -3
  25. data/templates/default/content/Automatic%20Summaries.textile +14 -14
  26. data/templates/default/content/Automatic%20linking%20between%20pages.textile +2 -0
  27. data/templates/default/content/Bug%3A%20RSS%20feed%20does%20not%20validate.textile +10 -0
  28. data/templates/default/content/Bug%3A%20Textile%20mishandles%20paragraphs.textile +33 -0
  29. data/templates/default/content/Bug%3A%20Unanticipated%20Rollbacks.textile +21 -0
  30. data/templates/default/content/Home%20Page.textile +3 -2
  31. data/templates/default/content/How%20to%20administrate%20this%20wiki.textile +4 -19
  32. data/templates/default/content/How%20to%20get%20the%20latest%20Soks%20from%20cvs.textile +21 -0
  33. data/templates/default/content/How%20to%20import%20data%20to%20this%20wiki.textile +45 -0
  34. data/templates/default/content/How%20to%20install%20Soks.textile +12 -8
  35. data/templates/default/content/How%20to%20password%20protect%20your%20wiki.textile +43 -0
  36. data/templates/default/content/How%20to%20report%20a%20bug.textile +1 -1
  37. data/templates/default/content/How%20to%20use%20the%20keyboard%20shortcuts.textile +2 -0
  38. data/templates/default/content/How%20to%20use%20this%20wiki.textile +1 -0
  39. data/templates/default/content/Instructions%20and%20Howtos.textile +4 -1
  40. data/templates/default/content/Known%20bugs.textile +5 -2
  41. data/templates/default/content/List%20of%20changes.textile +49 -0
  42. data/templates/default/content/New%20Recent%20Changes%20class.textile +58 -0
  43. data/templates/default/content/New%20page%20templates%20or%20categories%20code.textile +68 -0
  44. data/templates/default/content/Per%20Wiki%20Templates.textile +35 -0
  45. data/templates/default/content/Planned%20Features.textile +29 -8
  46. data/templates/default/content/README.textile +14 -4
  47. data/templates/default/content/RSS%20feed.textile +2 -0
  48. data/templates/default/content/Recent%20Changes%20to%20This%20Site.textile +200 -202
  49. data/templates/default/content/SOKS%20features.textile +2 -1
  50. data/templates/default/content/Sidebar%20Page.textile +3 -0
  51. data/templates/default/content/Type%20a%20title%20here.textile +1 -0
  52. data/templates/default/content/bug%3A%20competing%20edits.textile +13 -0
  53. data/templates/default/content/ctrl%2Dn.textile +1 -0
  54. data/templates/default/content/tamc.textile +1 -0
  55. data/templates/default/start.rb +38 -15
  56. data/templates/default/version.txt +1 -1
  57. data/templates/default/views/Page_edit.rhtml +71 -57
  58. data/templates/default/views/Page_meta.rhtml +6 -2
  59. data/templates/default/views/Page_revisions.rhtml +17 -9
  60. data/templates/default/views/Page_rss.rhtml +3 -1
  61. data/templates/default/views/Page_search_results.rhtml +11 -1
  62. data/templates/default/views/Page_view.rhtml +6 -2
  63. data/templates/default/views/UploadPage_edit.rhtml +58 -33
  64. data/templates/default/views/frame.rhtml +46 -27
  65. data/test/test_soks-utils.rb +37 -0
  66. metadata +27 -229
  67. data/templates/default/content/Bug%3A%20%5BFATAL%5D%20When%20renaming%20upload%20%2F%20picture%2.textile +0 -1
  68. data/templates/default/content/Bug%3A%20Automatic%20link%20links%20to%20stuff%20inside%20%3Chtml.textile +0 -1
  69. data/templates/default/content/Bug%3A%20Does%20not%20make%20use%20of%20if%2Dmodified%2Dsince%20r.textile +0 -1
  70. data/templates/default/content/Bug%3A%20Duplicate%20links%2Dto%20a%20page%20sometimes%20appear.textile +0 -1
  71. data/templates/default/content/Bug%3A%20External%20links%20incorrectly%20include%20trailing%20pu.textile +0 -1
  72. data/templates/default/content/Bug%3A%20In%20a%20list%20of%20links%2C%20the%20last%20link%20is%2.textile +0 -1
  73. data/templates/default/content/Bug%3A%20Inserted%20pages%20are%20not%20refreshed%20when%20new%20.textile +0 -1
  74. data/templates/default/content/Bug%3A%20No%20robots%2Etxt%20or%20favicon%2Eico.textile +0 -1
  75. data/templates/default/content/Bug%3A%20Page%20titles%20cannot%20have%20html%20tags%20in%20them.textile +0 -1
  76. data/templates/default/content/Bug%3A%20Punctuation%20in%20page%20titles%20still%20problematic.textile +0 -7
  77. data/templates/default/content/Bug%3A%20RSS%20feed%20shows%20oldest%2015%20revisions%20%28not%20.textile +0 -1
  78. data/templates/default/content/Bug%3A%20Search%20box%20width%20does%20not%20match%20column%20wid.textile +0 -1
  79. data/templates/default/content/Bug%3A%20Search%20includes%20leading%20and%20trailing%20spaces.textile +0 -1
  80. data/templates/default/content/Bug%3A%20Search%20inluced%20leading%20and%20trailing%20spaces.textile +0 -1
  81. data/templates/default/content/Bug%3A%20Site%20Index%20updates%20on%20every%20revision.textile +0 -1
  82. data/templates/default/content/Bug%3A%20Symbols%20are%20not%20always%20correctly%20rendered%20in.textile +0 -1
  83. data/templates/default/content/Bug%3A%20Uploads%20are%20not%20password%20protected.textile +0 -3
  84. data/templates/default/content/Bug%3A%20no%20superclass%20method%20%60%5Fdeprecated%5Fbase64.textile +0 -1
  85. data/templates/default/content/Fixed%20Bug%3A%20%5BFATAL%5D%20When%20renaming%20upload%20%2F%20p.textile +0 -34
  86. data/templates/default/content/Fixed%20Bug%3A%20Duplicate%20links%2Dto%20a%20page%20sometimes%20.textile +0 -3
  87. data/templates/default/content/Fixed%20Bug%3A%20External%20links%20incorrectly%20include%20trail.textile +0 -3
  88. data/templates/default/content/Fixed%20Bug%3A%20In%20a%20list%20of%20links%2C%20the%20last%20lin.textile +0 -13
  89. data/templates/default/content/Fixed%20Bug%3A%20Inserted%20pages%20are%20not%20refreshed%20when%.textile +0 -9
  90. data/templates/default/content/Fixed%20Bug%3A%20No%20robots%2Etxt%20or%20favicon%2Eico.textile +0 -4
  91. data/templates/default/content/Fixed%20Bug%3A%20RSS%20feed%20shows%20oldest%2015%20revisions%20%.textile +0 -15
  92. data/templates/default/content/Fixed%20Bug%3A%20Search%20box%20width%20does%20not%20match%20colu.textile +0 -3
  93. data/templates/default/content/Fixed%20Bug%3A%20Search%20includes%20leading%20and%20trailing%20s.textile +0 -3
  94. data/templates/default/content/Fixed%20Bug%3A%20Site%20Index%20updates%20on%20every%20revision.textile +0 -3
  95. data/templates/default/content/Fixed%20Bug%3A%20Symbols%20are%20not%20always%20correctly%20rende.textile +0 -5
  96. data/templates/default/content/Fixed%20Bug%3A%20no%20superclass%20method%20%60%5Fdeprecated%5Fba.textile +0 -3
  97. data/templates/default/content/Site%20Index.textile +0 -60
  98. data/templates/default/content/fixed%20bug%3A%20automatic%20link%20links%20to%20stuff%20inside%2.textile +0 -3
  99. data/templates/default/content/sandbox.textile +0 -2
  100. data/templates/default/content/test%20page.textile +0 -1
  101. data/templates/instiki/attachment/header_backdrop.png +0 -0
  102. data/templates/instiki/attachment/instiki_style_sheet.css +0 -199
  103. data/templates/instiki/attachment/logo.tiff +0 -0
  104. data/templates/instiki/attachment/logotext.png +0 -0
  105. data/templates/instiki/attachment/newpage.js +0 -41
  106. data/templates/instiki/attachment/rss.png +0 -0
  107. data/templates/instiki/banned_titles.txt +0 -31
  108. data/templates/instiki/content/All%20News.textile +0 -9
  109. data/templates/instiki/content/Attached%20ruby%20logo.textile +0 -1
  110. data/templates/instiki/content/Attached%20test%20thing.textile +0 -1
  111. data/templates/instiki/content/Author.textile +0 -12
  112. data/templates/instiki/content/Automatic%20Summaries.textile +0 -77
  113. data/templates/instiki/content/Automatic%20linking%20between%20pages.textile +0 -5
  114. data/templates/instiki/content/Bug%3A%20%5BFATAL%5D%20When%20renaming%20upload%20%2F%20picture%2.textile +0 -1
  115. data/templates/instiki/content/Bug%3A%20Automatic%20link%20links%20to%20stuff%20inside%20%3Chtml.textile +0 -1
  116. data/templates/instiki/content/Bug%3A%20Does%20not%20make%20use%20of%20if%2Dmodified%2Dsince%20r.textile +0 -1
  117. data/templates/instiki/content/Bug%3A%20Duplicate%20links%2Dto%20a%20page%20sometimes%20appear.textile +0 -1
  118. data/templates/instiki/content/Bug%3A%20External%20links%20incorrectly%20include%20trailing%20pu.textile +0 -1
  119. data/templates/instiki/content/Bug%3A%20GEM%20limits%20title%20lengths.textile +0 -1
  120. data/templates/instiki/content/Bug%3A%20In%20a%20list%20of%20links%2C%20the%20last%20link%20is%2.textile +0 -1
  121. data/templates/instiki/content/Bug%3A%20Inserted%20pages%20are%20not%20refreshed%20when%20new%20.textile +0 -1
  122. data/templates/instiki/content/Bug%3A%20No%20robots%2Etxt%20or%20favicon%2Eico.textile +0 -1
  123. data/templates/instiki/content/Bug%3A%20Page%20titles%20cannot%20have%20html%20tags%20in%20them.textile +0 -1
  124. data/templates/instiki/content/Bug%3A%20Punctuation%20in%20page%20titles%20still%20problematic.textile +0 -7
  125. data/templates/instiki/content/Bug%3A%20RSS%20feed%20shows%20oldest%2015%20revisions%20%28not%20.textile +0 -1
  126. data/templates/instiki/content/Bug%3A%20Search%20box%20width%20does%20not%20match%20column%20wid.textile +0 -1
  127. data/templates/instiki/content/Bug%3A%20Search%20includes%20leading%20and%20trailing%20spaces.textile +0 -1
  128. data/templates/instiki/content/Bug%3A%20Search%20inluced%20leading%20and%20trailing%20spaces.textile +0 -1
  129. data/templates/instiki/content/Bug%3A%20Site%20Index%20updates%20on%20every%20revision.textile +0 -1
  130. data/templates/instiki/content/Bug%3A%20Symbols%20are%20not%20always%20correctly%20rendered%20in.textile +0 -1
  131. data/templates/instiki/content/Bug%3A%20Uploads%20are%20not%20password%20protected.textile +0 -3
  132. data/templates/instiki/content/Bug%3A%20no%20superclass%20method%20%60%5Fdeprecated%5Fbase64.textile +0 -1
  133. data/templates/instiki/content/Bug%3A%20notextile%20does%20not%20prevent%20page%20inserts.textile +0 -1
  134. data/templates/instiki/content/Fixed%20Bug%3A%20%5BFATAL%5D%20When%20renaming%20upload%20%2F%20p.textile +0 -34
  135. data/templates/instiki/content/Fixed%20Bug%3A%20Duplicate%20links%2Dto%20a%20page%20sometimes%20.textile +0 -3
  136. data/templates/instiki/content/Fixed%20Bug%3A%20External%20links%20incorrectly%20include%20trail.textile +0 -3
  137. data/templates/instiki/content/Fixed%20Bug%3A%20In%20a%20list%20of%20links%2C%20the%20last%20lin.textile +0 -13
  138. data/templates/instiki/content/Fixed%20Bug%3A%20Inserted%20pages%20are%20not%20refreshed%20when%.textile +0 -9
  139. data/templates/instiki/content/Fixed%20Bug%3A%20No%20robots%2Etxt%20or%20favicon%2Eico.textile +0 -4
  140. data/templates/instiki/content/Fixed%20Bug%3A%20RSS%20feed%20shows%20oldest%2015%20revisions%20%.textile +0 -15
  141. data/templates/instiki/content/Fixed%20Bug%3A%20Search%20box%20width%20does%20not%20match%20colu.textile +0 -3
  142. data/templates/instiki/content/Fixed%20Bug%3A%20Search%20includes%20leading%20and%20trailing%20s.textile +0 -3
  143. data/templates/instiki/content/Fixed%20Bug%3A%20Site%20Index%20updates%20on%20every%20revision.textile +0 -3
  144. data/templates/instiki/content/Fixed%20Bug%3A%20Symbols%20are%20not%20always%20correctly%20rende.textile +0 -5
  145. data/templates/instiki/content/Fixed%20Bug%3A%20no%20superclass%20method%20%60%5Fdeprecated%5Fba.textile +0 -3
  146. data/templates/instiki/content/Home%20Page.textile +0 -19
  147. data/templates/instiki/content/How%20to%20administrate%20this%20wiki.textile +0 -62
  148. data/templates/instiki/content/How%20to%20change%20the%20way%20this%20wiki%20looks.textile +0 -30
  149. data/templates/instiki/content/How%20to%20export%20a%20site%20from%20this%20wiki.textile +0 -60
  150. data/templates/instiki/content/How%20to%20hack%20soks.textile +0 -61
  151. data/templates/instiki/content/How%20to%20import%20a%20site%20from%20instiki.textile +0 -13
  152. data/templates/instiki/content/How%20to%20install%20Soks.textile +0 -27
  153. data/templates/instiki/content/How%20to%20report%20a%20bug.textile +0 -8
  154. data/templates/instiki/content/How%20to%20use%20the%20keyboard%20shortcuts.textile +0 -13
  155. data/templates/instiki/content/How%20to%20use%20this%20wiki.textile +0 -27
  156. data/templates/instiki/content/Instructions%20and%20Howtos.textile +0 -18
  157. data/templates/instiki/content/Known%20bugs.textile +0 -15
  158. data/templates/instiki/content/Latest%20News.textile +0 -9
  159. data/templates/instiki/content/List%20of%20changes.textile +0 -67
  160. data/templates/instiki/content/Picture%20of%20Type%20a%20title%20here.textile +0 -1
  161. data/templates/instiki/content/Picture%20of%20a%20logo%20for%20the%20ruby%20language.textile +0 -1
  162. data/templates/instiki/content/Picture%20of%20a%20pair%20of%20soks.textile +0 -1
  163. data/templates/instiki/content/Picture%20of%20powered%20by%20ruby%20logo.textile +0 -1
  164. data/templates/instiki/content/Planned%20Features.textile +0 -19
  165. data/templates/instiki/content/README.textile +0 -63
  166. data/templates/instiki/content/RSS%20feed.textile +0 -7
  167. data/templates/instiki/content/Recent%20Blog%20Entries.textile +0 -5
  168. data/templates/instiki/content/Recent%20Changes%20to%20This%20Site.textile +0 -211
  169. data/templates/instiki/content/Recent%20News.textile +0 -9
  170. data/templates/instiki/content/Ruby.textile +0 -9
  171. data/templates/instiki/content/SOKS%20features.textile +0 -16
  172. data/templates/instiki/content/Site%20Index.textile +0 -60
  173. data/templates/instiki/content/Soks%20Licence.textile +0 -64
  174. data/templates/instiki/content/fixed%20bug%3A%20automatic%20link%20links%20to%20stuff%20inside%2.textile +0 -3
  175. data/templates/instiki/content/let%20me%20know.textile +0 -1
  176. data/templates/instiki/content/sandbox.textile +0 -2
  177. data/templates/instiki/content/tamc2.textile +0 -1
  178. data/templates/instiki/content/test%20page.textile +0 -1
  179. data/templates/instiki/start.rb +0 -112
  180. data/templates/instiki/version.txt +0 -1
  181. data/templates/instiki/views/Page_content.rhtml +0 -1
  182. data/templates/instiki/views/Page_edit.rhtml +0 -8
  183. data/templates/instiki/views/Page_meta.rhtml +0 -34
  184. data/templates/instiki/views/Page_print.rhtml +0 -6
  185. data/templates/instiki/views/Page_revisions.rhtml +0 -17
  186. data/templates/instiki/views/Page_rss.rhtml +0 -55
  187. data/templates/instiki/views/Page_search_results.rhtml +0 -18
  188. data/templates/instiki/views/Page_view.rhtml +0 -2
  189. data/templates/instiki/views/UploadPage_edit.rhtml +0 -16
  190. data/templates/instiki/views/frame.rhtml +0 -90
  191. data/templates/instiki/views/messages.yaml +0 -6
  192. data/templates/rails/attachment/2colheader.css +0 -77
  193. data/templates/rails/attachment/basics.css +0 -98
  194. data/templates/rails/attachment/header_backdrop.png +0 -0
  195. data/templates/rails/attachment/logo.tiff +0 -0
  196. data/templates/rails/attachment/logotext.png +0 -0
  197. data/templates/rails/attachment/newpage.js +0 -41
  198. data/templates/rails/attachment/rss.png +0 -0
  199. data/templates/rails/banned_titles.txt +0 -31
  200. data/templates/rails/content/All%20News.textile +0 -9
  201. data/templates/rails/content/Attached%20ruby%20logo.textile +0 -1
  202. data/templates/rails/content/Attached%20test%20thing.textile +0 -1
  203. data/templates/rails/content/Author.textile +0 -12
  204. data/templates/rails/content/Automatic%20Summaries.textile +0 -77
  205. data/templates/rails/content/Automatic%20linking%20between%20pages.textile +0 -5
  206. data/templates/rails/content/Bug%3A%20%5BFATAL%5D%20When%20renaming%20upload%20%2F%20picture%2.textile +0 -1
  207. data/templates/rails/content/Bug%3A%20Automatic%20link%20links%20to%20stuff%20inside%20%3Chtml.textile +0 -1
  208. data/templates/rails/content/Bug%3A%20Does%20not%20make%20use%20of%20if%2Dmodified%2Dsince%20r.textile +0 -1
  209. data/templates/rails/content/Bug%3A%20Duplicate%20links%2Dto%20a%20page%20sometimes%20appear.textile +0 -1
  210. data/templates/rails/content/Bug%3A%20External%20links%20incorrectly%20include%20trailing%20pu.textile +0 -1
  211. data/templates/rails/content/Bug%3A%20GEM%20limits%20title%20lengths.textile +0 -1
  212. data/templates/rails/content/Bug%3A%20In%20a%20list%20of%20links%2C%20the%20last%20link%20is%2.textile +0 -1
  213. data/templates/rails/content/Bug%3A%20Inserted%20pages%20are%20not%20refreshed%20when%20new%20.textile +0 -1
  214. data/templates/rails/content/Bug%3A%20No%20robots%2Etxt%20or%20favicon%2Eico.textile +0 -1
  215. data/templates/rails/content/Bug%3A%20Page%20titles%20cannot%20have%20html%20tags%20in%20them.textile +0 -1
  216. data/templates/rails/content/Bug%3A%20Punctuation%20in%20page%20titles%20still%20problematic.textile +0 -7
  217. data/templates/rails/content/Bug%3A%20RSS%20feed%20shows%20oldest%2015%20revisions%20%28not%20.textile +0 -1
  218. data/templates/rails/content/Bug%3A%20Search%20box%20width%20does%20not%20match%20column%20wid.textile +0 -1
  219. data/templates/rails/content/Bug%3A%20Search%20includes%20leading%20and%20trailing%20spaces.textile +0 -1
  220. data/templates/rails/content/Bug%3A%20Search%20inluced%20leading%20and%20trailing%20spaces.textile +0 -1
  221. data/templates/rails/content/Bug%3A%20Site%20Index%20updates%20on%20every%20revision.textile +0 -1
  222. data/templates/rails/content/Bug%3A%20Symbols%20are%20not%20always%20correctly%20rendered%20in.textile +0 -1
  223. data/templates/rails/content/Bug%3A%20Uploads%20are%20not%20password%20protected.textile +0 -3
  224. data/templates/rails/content/Bug%3A%20no%20superclass%20method%20%60%5Fdeprecated%5Fbase64.textile +0 -1
  225. data/templates/rails/content/Bug%3A%20notextile%20does%20not%20prevent%20page%20inserts.textile +0 -1
  226. data/templates/rails/content/Fixed%20Bug%3A%20%5BFATAL%5D%20When%20renaming%20upload%20%2F%20p.textile +0 -34
  227. data/templates/rails/content/Fixed%20Bug%3A%20Duplicate%20links%2Dto%20a%20page%20sometimes%20.textile +0 -3
  228. data/templates/rails/content/Fixed%20Bug%3A%20External%20links%20incorrectly%20include%20trail.textile +0 -3
  229. data/templates/rails/content/Fixed%20Bug%3A%20In%20a%20list%20of%20links%2C%20the%20last%20lin.textile +0 -13
  230. data/templates/rails/content/Fixed%20Bug%3A%20Inserted%20pages%20are%20not%20refreshed%20when%.textile +0 -9
  231. data/templates/rails/content/Fixed%20Bug%3A%20No%20robots%2Etxt%20or%20favicon%2Eico.textile +0 -4
  232. data/templates/rails/content/Fixed%20Bug%3A%20RSS%20feed%20shows%20oldest%2015%20revisions%20%.textile +0 -15
  233. data/templates/rails/content/Fixed%20Bug%3A%20Search%20box%20width%20does%20not%20match%20colu.textile +0 -3
  234. data/templates/rails/content/Fixed%20Bug%3A%20Search%20includes%20leading%20and%20trailing%20s.textile +0 -3
  235. data/templates/rails/content/Fixed%20Bug%3A%20Site%20Index%20updates%20on%20every%20revision.textile +0 -3
  236. data/templates/rails/content/Fixed%20Bug%3A%20Symbols%20are%20not%20always%20correctly%20rende.textile +0 -5
  237. data/templates/rails/content/Fixed%20Bug%3A%20no%20superclass%20method%20%60%5Fdeprecated%5Fba.textile +0 -3
  238. data/templates/rails/content/Home%20Page.textile +0 -19
  239. data/templates/rails/content/How%20to%20administrate%20this%20wiki.textile +0 -62
  240. data/templates/rails/content/How%20to%20change%20the%20way%20this%20wiki%20looks.textile +0 -30
  241. data/templates/rails/content/How%20to%20export%20a%20site%20from%20this%20wiki.textile +0 -60
  242. data/templates/rails/content/How%20to%20hack%20soks.textile +0 -61
  243. data/templates/rails/content/How%20to%20import%20a%20site%20from%20instiki.textile +0 -13
  244. data/templates/rails/content/How%20to%20install%20Soks.textile +0 -27
  245. data/templates/rails/content/How%20to%20report%20a%20bug.textile +0 -8
  246. data/templates/rails/content/How%20to%20use%20the%20keyboard%20shortcuts.textile +0 -13
  247. data/templates/rails/content/How%20to%20use%20this%20wiki.textile +0 -27
  248. data/templates/rails/content/Instructions%20and%20Howtos.textile +0 -18
  249. data/templates/rails/content/Known%20bugs.textile +0 -15
  250. data/templates/rails/content/Latest%20News.textile +0 -9
  251. data/templates/rails/content/List%20of%20changes.textile +0 -67
  252. data/templates/rails/content/Picture%20of%20Type%20a%20title%20here.textile +0 -1
  253. data/templates/rails/content/Picture%20of%20a%20logo%20for%20the%20ruby%20language.textile +0 -1
  254. data/templates/rails/content/Picture%20of%20a%20pair%20of%20soks.textile +0 -1
  255. data/templates/rails/content/Picture%20of%20powered%20by%20ruby%20logo.textile +0 -1
  256. data/templates/rails/content/Planned%20Features.textile +0 -19
  257. data/templates/rails/content/README.textile +0 -63
  258. data/templates/rails/content/RSS%20feed.textile +0 -7
  259. data/templates/rails/content/Recent%20Blog%20Entries.textile +0 -5
  260. data/templates/rails/content/Recent%20Changes%20to%20This%20Site.textile +0 -211
  261. data/templates/rails/content/Recent%20News.textile +0 -9
  262. data/templates/rails/content/Ruby.textile +0 -9
  263. data/templates/rails/content/SOKS%20features.textile +0 -16
  264. data/templates/rails/content/Site%20Index.textile +0 -60
  265. data/templates/rails/content/Soks%20Licence.textile +0 -64
  266. data/templates/rails/content/fixed%20bug%3A%20automatic%20link%20links%20to%20stuff%20inside%2.textile +0 -3
  267. data/templates/rails/content/let%20me%20know.textile +0 -1
  268. data/templates/rails/content/sandbox.textile +0 -2
  269. data/templates/rails/content/tamc2.textile +0 -1
  270. data/templates/rails/content/test%20page.textile +0 -1
  271. data/templates/rails/start.rb +0 -113
  272. data/templates/rails/version.txt +0 -1
  273. data/templates/rails/views/Page_content.rhtml +0 -1
  274. data/templates/rails/views/Page_edit.rhtml +0 -61
  275. data/templates/rails/views/Page_meta.rhtml +0 -38
  276. data/templates/rails/views/Page_print.rhtml +0 -6
  277. data/templates/rails/views/Page_revisions.rhtml +0 -19
  278. data/templates/rails/views/Page_rss.rhtml +0 -55
  279. data/templates/rails/views/Page_search_results.rhtml +0 -19
  280. data/templates/rails/views/Page_view.rhtml +0 -3
  281. data/templates/rails/views/UploadPage_edit.rhtml +0 -38
  282. data/templates/rails/views/frame.rhtml +0 -60
  283. data/templates/rails/views/messages.yaml +0 -6
  284. /data/templates/default/attachment/{logo_thumb.bmp → tiny-logo thumb.bmp} +0 -0
@@ -3,18 +3,26 @@
3
3
  # This file was created automatically on <%= Time.now %>
4
4
  # Uncomment different sections to enable features of this wiki.
5
5
 
6
- #Add the required libraries to the search path:
7
- $:.push( "<%= settings[:soks_libraries].join('","') %>" )
8
-
9
- require 'soks'
6
+ #Add the required libraries to the search path
7
+ begin
8
+ require 'rubygems'
9
+ require_gem 'Soks', '= <%= settings[:version] %>'
10
+ $stderr.puts 'Loaded Soks <%= settings[:version] %> from gem'
11
+ rescue LoadError
12
+ $stderr.puts "Soks Gem version <%= settings[:version] %> could not be found"
13
+ $:.push( "<%= settings[:soks_libraries].join('","') %>" )
14
+ require 'soks'
15
+ $stderr.puts 'Loaded from fixed path'
16
+ end
10
17
 
11
18
  module StartSoks
12
-
19
+
20
+ # EDIT THIS TO CHANGE THE AUTHENTICATION
13
21
  =begin
14
22
  # If you uncomment this, don't forget to uncomment the authenticators line in the CUSTOMSETTINGS hash below!
15
23
  # You can choose what level of authentication to apply based on regular expressions matched
16
24
  # against the page title. These regexps are tried in order.Defaults are here:
17
- authenticators = [ [ %r{/(view|rss|print|find|meta)/.*}, WEBrick::HTTPAuth::NoAuthenticationRequired.new ],
25
+ authenticators = [ [ %r{/(view|rss|print|find|meta|attachment)/.*}, WEBrick::HTTPAuth::NoAuthenticationRequired.new ],
18
26
  # [ %r{/upload/.*}, WEBrick::HTTPAuth::NotPermitted.new ],
19
27
  # [ %r{/(edit|save)/home page}, WEBrick::HTTPAuth::SiteWidePassword.new('password','You need to enter the site wide password to edit the home page') ],
20
28
  # [ %r{/(view|edit|save)/private.*},WEBrick::HTTPAuth::BasicAuth.new( :UserDB => htpasswd, :Realm => realm ) ], # See webrick documentation
@@ -22,19 +30,23 @@ module StartSoks
22
30
  ]
23
31
  =end
24
32
 
33
+ # EDIT THIS TO CHANGE THE BASIC SETTINGS, DEFAULTS ARE IN /LIB/SOKS.rb
25
34
  CUSTOMSETTINGS = {
26
- :root_directory => '<%= settings[:root_directory] %>',
35
+ :root_directory => File.expand_path( File.dirname( __FILE__) ),
27
36
  # :name => 'test',
28
37
  # :description => 'A Soks Wiki',
38
+ # :server_type => WEBrick::Daemon, # Uncomment if you wish to fork, only works on some OSs
39
+ # :home_page => 'Home Page',
29
40
  :url => '<%= settings[:url] %>',
30
41
  :port => <%= settings[:port] %>,
31
42
  # :authenticators => authenticators
32
43
  }
33
44
 
34
45
  def self.start
46
+
47
+ # EDIT THIS TO CHANGE THE HELPERS (Index, Recent changes etc)
35
48
  start_wiki( CUSTOMSETTINGS ) do |wiki, view|
36
49
 
37
-
38
50
  # Examples of automatically generated summary pages:
39
51
  AutomaticSummary.new( wiki,
40
52
  :regexp_for_title => /^How to /i,
@@ -77,13 +89,24 @@ module StartSoks
77
89
  # :summarise_revisions => false, # If true, then can contain several revisions for same page
78
90
  # :remove_deleted_pages => true, # If false will keep references to deleted pages
79
91
 
80
- # These are beta...
92
+ # These are beta and off by default...
81
93
  =begin
82
- require 'helpers/rss2wiki-helper'
83
- RSS2WikiHelper.new( wiki, :url => 'http://rubyforge.org/export/rss_sfnews.php' )
84
-
85
- require 'helpers/mail2wiki-helper'
86
- Mail2WikiHelper.new( wiki )
94
+ require 'helpers/rss2wiki-helper'
95
+ RSS2WikiHelper.new( wiki, :url => 'http://rubyforge.org/export/rss_sfnews.php' )
96
+
97
+ require 'helpers/mail2wiki-helper'
98
+ Mail2WikiHelper.new( wiki, :server => 'imap.hermes.cam.ac.uk',
99
+ :username => 'tamc2',
100
+ :password => 'PASSWORD',
101
+ :mailbox => 'mcr notices',
102
+ :check_period => 600, # Seconds
103
+ :subject_regexp => /.*/ )
104
+
105
+ require 'helpers/wiki2html'
106
+ Wiki2Html.new( wiki, view, :views_to_copy => ['view','meta','rss'],
107
+ :extension => '.html',
108
+ :destination_dir => '/Users/tamc2/Sites',
109
+ :destination_url => 'http://localhost/~tamc2')
87
110
  =end
88
111
 
89
112
  # Putting these towards the end speeds things up.
@@ -97,7 +120,7 @@ Mail2WikiHelper.new( wiki )
97
120
  # This is an array of titles that will NOT be automatically linked.
98
121
  # Default is the 30 most common words in the english language
99
122
  # Note that pages can still be created with these titles, and they can still be manually linked to.
100
- banned_titles = IO.readlines('<%= settings[:root_directory] %>/banned_titles.txt').map { |title| title.strip }
123
+ banned_titles = IO.readlines("#{CUSTOMSETTINGS[:root_directory]}/banned_titles.txt").map { |title| title.strip }
101
124
 
102
125
  # This takes a while, so do it last. Note that the banned_titles argument is optional.
103
126
  AutomaticUpdateCrossLinks.new( wiki, view, banned_titles )
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
@@ -1,62 +1,76 @@
1
- <span class='pagename'><a href='<%= url pagename, "meta" %>'><%= pagename %></a> <%= page.deleted? ? "(Deleted)" : '' %></span>
2
-
3
- <form method=post action='<%= url pagename, "save" %>' >
4
- <table>
5
- <tr>
6
- <td>Title:</td>
7
- <td><input name='newtitle' size = '60' value='<%= pagename %>' onClick="this.value == 'Type a title here' ? this.value = '' : true"/></td>
8
- </tr>
1
+ <span class='pagename'>
2
+ <a href='<%= url pagename, "meta" %>'><%= pagename %></a>
3
+ <%= page.deleted? ? "(Deleted)" : '' %>
4
+ </span>
5
+
6
+ <a class='help' onclick='document.getElementById("tips").style.display = (document.getElementById("tips").style.display == "block") ? "none" : "block";' >Click me for help</a>
9
7
 
10
- <tr>
11
- <td valign='top'>Content:</td>
12
- <td>
13
- <textarea name='content' rows=30 cols=60 onClick="this.value == 'Type what you want here and click save' ? this.value = '' : true" ><%= page.content %></textarea>
14
- </td>
15
- <td valign='top'>
16
- <div class='tips'>
17
- <ul>
18
- <li>h1. big heading</li>
19
- <li>h2. little heading</li>
20
- <li>*bold text* = <b>bold text</b></li>
21
- <li>_italic text_ = <i>italic text</i></li>
22
- <li>* bullet one = &#8226; bullet one<br />
23
- * bullet two = &#8226; bullet two</li>
24
- <li># list one = 1. list one<br />
25
- # list two = 2. list two</li>
26
- <li>Most links are automatic</li>
27
- <li>[[insert picture of title of picture]]</li>
28
- <li><a href='http://hobix.com/textile/quick.html' target='textile_ref'>More</a></li>
29
- </ul>
30
- </div>
31
- <td>
32
- </tr>
33
- <tr>
34
- <td>Author:</td>
35
- <td><a href='<%= url person %>'><%= person %></a> Quit browser to log out.</td>
36
- </tr>
37
- <tr>
38
- <td></td>
39
- <td><input name=action value='Save' type=submit accesskey="S"> <a href='<%= url pagename %>' accesskey="C" >(Do not Save)</a> or <a href='<%= url pagename, 'delete' %>' accesskey='D'>(Delete)</a> this page.</td>
40
- </tr>
41
- </table>
42
- </form>
43
- <hr />
8
+ <div id='tips' style='display: none;'>
9
+ <ul>
10
+ <li>h1. big heading (make sure it is followed with a blank line)</li>
11
+ <li>h2. little heading (make sure it is followed with a blank line)</li>
12
+ <li>*bold text* = <b>bold text</b></li>
13
+ <li>_italic text_ = <i>italic text</i></li>
14
+ <li>* bullet one = &#8226; bullet one<br />
15
+ * bullet two = &#8226; bullet two</li>
16
+ <li># list one = 1. list one<br />
17
+ # list two = 2. list two</li>
18
+ <li>Most links are automatic</li>
19
+ <li>[[insert picture of title of picture]]</li>
20
+ <li>[[insert attached word document]]</li>
21
+ <li><a href='http://hobix.com/textile/quick.html' target='textile_ref'>Full Instructions</a></li>
22
+ </ul>
23
+ </div>
24
+
25
+ <form class='editpage' method='post' action='<%= url pagename, "save" %>' >
26
+ <div id='edittitle'>
27
+ Title:
28
+ <input name='newtitle'
29
+ size = '60'
30
+ value='<%= pagename %>'
31
+ onblur="validateTitle( this.value );"
32
+ onClick="this.value=this.value.replace('Type a title here' ,'')"
33
+ />
34
+ </div>
35
+
36
+ <div id='editcontent'>
37
+ <textarea name='content'
38
+ rows=30
39
+ cols=65
40
+ onclick="this.value=this.value.replace('Type what you want here and click save','')"
41
+ ><%= page.content %></textarea>
42
+ </div>
43
+
44
+ Hello <a href='<%= url person %>'><%= person %></a> (Quit browser to log out). Would you like to
45
+ <input name='action' value='Save Changes' type='submit' accesskey="S" /></form>,
46
+ <form class='editpage' method='post' action='<%= url pagename %>' >
47
+ <input name='action' value='Cancel Changes' type=submit accesskey="C" />
48
+ </form> or
49
+ <form class='editpage' method='post' action='<%= url pagename, 'delete' %>' >
50
+ <input name='action' value='Delete this Page' type='submit' accesskey="D" />
51
+ </form>?
52
+
44
53
  <% unless page.empty? %>
45
- <p>The most recent change was made by <a href='<%= url page.author %>'><%= page.author %></a> who changed:</p>
46
- <%
47
- page.changes.each do |change_group|
48
- change_group.each do |change|
49
- case change[0]
50
- when "-" %>
51
- <del><%= change[1] %>. <%= change[2] %></del><br />
52
- <% when "+" %>
53
- <%= change[1] %>. <%= change[2] %><br />
54
- <%
54
+ <div class='change'>
55
+ <h2>The most recent change was made by <a href='<%= url page.author %>'><%= page.author %></a> who changed:</h2>
56
+ <%
57
+ page.changes.each do |change_group|
58
+ change_group.each do |change|
59
+ case change[0]
60
+ when "-" %>
61
+ <del><%= change[1] %>. <%= change[2] %></del><br />
62
+ <% when "+" %>
63
+ <%= change[1] %>. <%= change[2] %><br />
64
+ <%
65
+ end
55
66
  end
56
67
  end
57
- end
58
- %>
59
- <p>
60
- <a href='<%= url pagename, "rollback" %>?revision=<%= page.number-1 %>' accesskey="U" >(Undo this change)</a> or <a href='<%= url pagename, "revisions" %>' accesskey="A" >(Show All changes)</a>
61
- </p>
68
+ %>
69
+ </div>
70
+ <p>
71
+ <form class='editpage' method=post action='<%= url pagename, "rollback" %>' >
72
+ <input name='revision' value='<%= page.number-1 %>' type='hidden' />
73
+ <input name='action' value='Undo this change' type='submit' accesskey="U" />
74
+ </form> or <a href='<%= url pagename, "revisions" %>' accesskey="A" >Show <b>A</b>ll changes</a>.
75
+ </p>
62
76
  <% end %>
@@ -2,9 +2,13 @@
2
2
 
3
3
  <h1><%= pagename %></h1>
4
4
 
5
+ <% seconds_per_change = (page.revised_on-page.created_on)/page.revisions.size.to_i %>
6
+
5
7
  <p>This page was created on <%= page.created_on %> by <%= page.revisions.first.author %>.</p>
6
- <p>It was last updated on <%= page.revised_on %> by <%= page.author %>.</p>
7
- <p> It has been changed <%= page.revisions.size %> time(s) (roughly once every <%= (((Time.now-page.created_on)/page.revisions.size)/(60*60*24)).to_i %> days).</p>
8
+ <% if page.revisions.size > 1 %>
9
+ <p>It was last updated on <%= page.revised_on %> by <%= page.author %>.</p>
10
+ <p>It has been changed <%= page.revisions.size %> times (roughly once every <%= seconds_per_change.to_time_units %>).</p>
11
+ <% end %>
8
12
 
9
13
  <div class='metacolumn' >
10
14
  <h2>Wiki links from this page</h2>
@@ -1,20 +1,28 @@
1
1
  <span class='pagename'><a href='<%= url pagename, "meta" %>'><%= pagename %></a> <%= page.deleted? ? "(Deleted)" : '' %></span>
2
2
 
3
- <div class="undochange">
4
- <% page.revisions.reverse_each do |revision| %>
5
- <p><%= revision.created_on %> by <a href='<%= url revision.author %>'><%= revision.author %></a> <a href='<%= url pagename, "rollback" %>?revision=<%= revision.number-1 %>' >(undo)</a>:</p>
6
- <p>
3
+
4
+ <% page.revisions.reverse_each do |revision| %>
5
+ <div class="undochange">
6
+ <p><%= revision.created_on %> by <a href='<%= url revision.author %>'><%= revision.author %></a></p>
7
+ <ol>
7
8
  <% revision.changes.each do |change_group| %>
8
9
  <% change_group.each do |change|
9
10
  case change[0]
10
11
  when "-" %>
11
- <del><%= change[1] %>. <%= change[2] %></del><br />
12
+ <li><del><%= change[1] %>. <%= change[2].gsub('<','&lt;').gsub('>','&gt;') %></del></li>
12
13
  <% when "+" %>
13
- <%= change[1] %>. <%= change[2] %><br />
14
+ <li><%= change[1] %>. <%= change[2].gsub('<','&lt;').gsub('>','&gt;') %></li>
14
15
  <% end %>
15
16
  <% end %>
16
17
  <% end %>
17
- </p>
18
- <% end %>
19
- <br />(<a href='<%= url pagename, "edit" %>' accesskey="R" >Return to editing</a>)
18
+ </ol>
19
+ <form method=post action='<%= url pagename, "rollback" %>' >
20
+ <input name='revision' value='<%= revision.number-1 %>' type='hidden' />
21
+ <input name='action' value='Undo the changes above' type='submit' />
22
+ </form>
23
+ </div>
24
+ <% end %>
25
+
26
+ <div class='command'>
27
+ <a href='<%= url pagename, "edit" %>' accesskey="R" >Return to editing</a>
20
28
  </div>
@@ -2,7 +2,9 @@
2
2
  require "rss/maker"
3
3
 
4
4
  RSS::Maker.make("2.0") do |maker|
5
-
5
+
6
+ maker.encoding = 'iso-8859-1'
7
+
6
8
  maker.channel.title = "#{$SETTINGS[:name]} #{pagename}"
7
9
  maker.channel.description = $SETTINGS[:description]
8
10
  maker.channel.link = $SETTINGS[:url]
@@ -1,5 +1,7 @@
1
1
  <span class='pagename'><%= pagename %></span>
2
+
2
3
  <h1>Results of Search for &#8220;<%= pagename %>&#8221;</h1>
4
+
3
5
  <% unless title_results.empty? %>
4
6
  <h2>Matches in the titles of pages</h2>
5
7
  <ul>
@@ -7,7 +9,10 @@
7
9
  <li><a href='<%= url name %>' ><%= name %></a></li>
8
10
  <% end %>
9
11
  </ul>
12
+ <% else %>
13
+ <p>No matches in the titles of pages</p>
10
14
  <% end %>
15
+
11
16
  <% unless text_results.empty? %>
12
17
  <h2>Matches in the text of pages</h2>
13
18
  <ul>
@@ -15,5 +20,10 @@
15
20
  <li><a href='<%= url name %>' ><%= name %></a></li>
16
21
  <% end %>
17
22
  </ul>
23
+ <% else %>
24
+ <p>No matches in the text of pages</p>
18
25
  <% end %>
19
- <div class='command'>(<a href='<%= url pagename, "edit" %>' accesskey="E" >Create a page titled &#8220;<%= pagename %>&#8221;</a>)</div>
26
+
27
+ <div class='command'>
28
+ <a href='<%= url pagename, "edit" %>' accesskey="E" >Create a page titled &#8220;<%= pagename %>&#8221;</a>
29
+ </div>
@@ -1,4 +1,8 @@
1
1
  <span class='pagename'><a href='<%= url pagename, "meta" %>'><%= pagename %></a> <%= page.deleted? ? "(Deleted)" : '' %></span>
2
2
 
3
- <%= renderedview %>
4
- <div class='command'><a href='<%= url pagename, "edit" %>' accesskey="E" >(Edit this page)</a></div>
3
+ <%= renderedview %>
4
+
5
+ <div class='command'>
6
+ <a href='<%= url pagename, "edit" %>' accesskey="E" >Edit this page</a> or
7
+ watch for changes using <a href='<%= url pagename, 'rss' %>'>RSS</a>.
8
+ </div>
@@ -1,38 +1,63 @@
1
- <span class='pagename'><a href='<%= url pagename, "meta" %>'><%= pagename %></a> <%= page.deleted? ? "(Deleted)" : '' %></span>
1
+ <span class='pagename'>
2
+ <a href='<%= url pagename, "meta" %>'><%= pagename %></a>
3
+ <%= page.deleted? ? "(Deleted)" : '' %>
4
+ </span>
5
+
6
+ <a class='help' onclick='document.getElementById("tips").style.display = (document.getElementById("tips").style.display == "block") ? "none" : "block";' >Click me for help</a>
7
+
8
+ <div id='tips' style='display: none;'>
9
+ <p>To add a file or picture, click on the 'choose file' or 'browse...' button below, select the file you wish to add, then give it a meaningful title in the title box. Note that the title can be a sentence, e.g. "claim form" or "a beautiful balloon", and does not need to have an extension.</p>
10
+ <p>You can put add a link to the file from another page in the wiki by typing its title (e.g. "attached claim form"). To make a picture appear as part of another page write [[ insert picture name ]] (e.g. [[insert picture of a beautiful balloon]]).</p>
11
+ </div>
12
+
13
+ <form class='editpage' action='<%= url pagename, "upload" %>' method='post' enctype='multipart/form-data' >
14
+ <div id='fileedittitle'>
15
+ Title:
16
+ <% if page.is_a? ImagePage %>
17
+ <input type=hidden name='titleprefix' value='Picture of ' />
18
+ Picture of <input name='newtitle' size = '51' value='<%= pagename[ 10..-1].strip %>'
19
+ <% else %>
20
+ <input type=hidden name='titleprefix' value='Attached ' />
21
+ Attached <input name='newtitle' size = '52' value='<%= pagename[ 9..-1].strip %>'
22
+ <% end %>
23
+ onBlur="validateTitle( this.value );" onClick="this.value=this.value.replace('Type a title here','')" />
24
+ </div>
25
+
26
+ <div id='fileeditfile'>
27
+ <input name='file' type=file /></td></tr>
28
+ </div>
29
+
30
+ Hello <a href='<%= url person %>'><%= person %></a> (Quit browser to log out). Would you like to
31
+ <input name='action' value='Save Changes' type='submit' accesskey="S" /></form>,
32
+ <form class='editpage' method='post' action='<%= url pagename %>' >
33
+ <input name='action' value='Cancel Changes' type=submit accesskey="C" />
34
+ </form> or
35
+ <form class='editpage' method='post' action='<%= url pagename, 'delete' %>' >
36
+ <input name='action' value='Delete this Page' type='submit' accesskey="D" />
37
+ </form>?
38
+
2
39
 
3
- <form action='<%= url pagename, "upload" %>' method=post enctype=multipart/form-data >
4
- <table>
5
- <tr><td>Title:</td><td>
6
- <% if page.is_a? ImagePage %>
7
- <input type=hidden name='titleprefix' value='Picture of ' />
8
- Picture of <input name='newtitle' size = '51' value='<%= pagename[ 10..-1].strip %>'
9
- <% else %>
10
- <input type=hidden name='titleprefix' value='Attached ' />
11
- Attached <input name='newtitle' size = '52' value='<%= pagename[ 9..-1].strip %>'
12
- <% end %>
13
- onClick="this.value == 'Type a title here' ? this.value = '' : true"/></td></tr>
14
- <tr><td valign='top'>File:</td><td><input name='file' type=file /></td></tr>
15
- <tr><td>Author:</td><td><a href='<%= url person %>'><%= person %></a> Quit browser to log out.</td>
16
- <tr><td></td><td><input name=action value='Save' type=submit accesskey="S"> <a href='<%= url pagename %>' accesskey="C" >(Cancel)</a> or <a href='<%= url pagename, 'delete' %>' accesskey='D'>(Delete)</a> this page.</td></tr>
17
- </table>
18
- </form>
19
- <hr />
20
40
  <% unless page.empty? %>
21
- <p>The most recent change was made by <a href='<%= url page.author %>'><%= page.author %></a> who changed:</p>
22
- <%
23
- page.changes.each do |change_group|
24
- change_group.each do |change|
25
- case change[0]
26
- when "-" %>
27
- <del><%= change[1] %>. <%= change[2] %></del><br />
28
- <% when "+" %>
29
- <%= change[1] %>. <%= change[2] %><br />
30
- <%
41
+ <div class='change'>
42
+ <h2>The most recent change was made by <a href='<%= url page.author %>'><%= page.author %></a> who changed:</h2>
43
+ <%
44
+ page.changes.each do |change_group|
45
+ change_group.each do |change|
46
+ case change[0]
47
+ when "-" %>
48
+ <del><%= change[1] %>. <%= change[2] %></del><br />
49
+ <% when "+" %>
50
+ <%= change[1] %>. <%= change[2] %><br />
51
+ <%
52
+ end
31
53
  end
32
54
  end
33
- end
34
- %>
35
- <p>
36
- <a href='<%= url pagename, "rollback" %>?revision=<%= page.number - 1 %>' accesskey="U" >(Undo this change)</a> or <a href='<%= url pagename, "revisions" %>' accesskey="A" >(Show All changes)</a>
37
- </p>
55
+ %>
56
+ </div>
57
+ <p>
58
+ <form class='editpage' method=post action='<%= url pagename, "rollback" %>' >
59
+ <input name='revision' value='<%= page.number-1 %>' type='hidden' />
60
+ <input name='action' value='Undo this change' type='submit' accesskey="U" />
61
+ </form> or <a href='<%= url pagename, "revisions" %>' accesskey="A" >Show <b>A</b>ll changes</a>.
62
+ </p>
38
63
  <% end %>
@@ -5,39 +5,58 @@
5
5
  <meta name='description' content='<%= $SETTINGS[:description] %>' />
6
6
  <meta name='keywords' content='Soks, <%= $SETTINGS[:name] %>' />
7
7
  <link href='<%= file 'stylesheet.css' %>' rel='stylesheet' type='text/css' media='screen' />
8
- <link href='<%= file 'print_stylesheet.css' %>' rel='stylesheet' type='text/css' media='print' />
8
+ <link href='<%= file 'print_stylesheet.css' %>' rel='stylesheet' type='text/css' media='print' />
9
9
  <link rel='alternate' type='application/rss+xml' title='RSS' href='<%= url pagename, 'rss' %>' />
10
- <script src='<%= file 'newpage.js' %>' type='text/javascript'></script>
11
- <link rel="SHORTCUT ICON" href='<%= file 'favicon.ico' %>' />
10
+ <script src='<%= file 'newpage.js' %>' type='text/javascript'></script>
12
11
  </head>
13
12
  <body onkeypress='hotkey(event);'>
13
+
14
14
  <div id='content'>
15
15
  <%= content_of_page %>
16
- </div>
17
- <div id='menu'>
18
- <a href='<%= url 'Home Page' %>' accesskey='H' ><img width='149' src='<%= file 'logo.png' %>' alt='<%= @wikiname %>' /></a>
16
+ </div>
17
+
18
+ <div id='menu'>
19
+
20
+ <h1><%= @wikiname %></h1>
21
+ <a href='<%= url $SETTINGS[:home_page] %>' accesskey='H' >
22
+ <img width='149' src='<%= file 'logo.jpg' %>' alt='<%= @wikiname %>' />
23
+ </a>
24
+
25
+ <h2>Search</h2>
19
26
  <form method='get' action='<%= url pagename, 'find' %>' >
20
- <input class='search' name='regex' value='' size='18' />
21
- <input name='action' value='search' type='submit' />
27
+ <input class='search'
28
+ name='regex'
29
+ value='Enter word & press return'
30
+ onClick="this.value=this.value.replace('Enter word & press return','')"
31
+ size='17' />
22
32
  </form>
23
- <a href='<%= url 'site index' %>' accesskey='I' >Site Index</a>
24
- <a href='<%= url 'recent changes to this site' %>' accesskey='R' >Recent Changes</a>
33
+
34
+ <h2><a href='<%= url "Sidebar Page" %>' >Important Pages</a></h2>
35
+ <% sidebarpage = @wiki.page( "Sidebar Page") %>
36
+ <div class='linklist'>
37
+ <%= redcloth( sidebarpage) %>
38
+ </div>
39
+
25
40
  <% if page %>
26
- <br />
27
- <% page.links_to.each do |linkedpage| %>
28
- <a href='<%= url linkedpage.name %>'><%= linkedpage.name %></a>
29
- <% end %>
30
- <% end %>
31
- <br />
32
- <a href='<%= url 'Type a title here', 'edit' %>'>Add a new page</a>
33
- <a href='<%= url 'Picture of Type a title here', 'edit' %>'>Upload a new picture</a>
34
- <a href='<%= url 'Attached Type a title here', 'edit' %>'>Upload a new file</a>
35
- <br />
36
- <span class='disclaimer'>
37
- Powered by <a style='display:inline;' href='http://soks.rubyforge.org'>Soks</a>
38
- </span>
39
- <br />
40
- <a style='display:inline;' href='<%= url pagename, 'rss' %>'><img src='<%= file 'rss.png'%>' alt='rss feed' /></a>
41
- </div>
41
+ <% dynamic_links = page.links_to - sidebarpage.links_from - [ sidebarpage ] %>
42
+ <% unless dynamic_links.empty? %>
43
+ <h2>Pages that link here</h2>
44
+ <div class='linklist'>
45
+ <% dynamic_links.each do |linkedpage| %>
46
+ <a href='<%= url linkedpage.name %>'><%= linkedpage.name %></a>
47
+ <% end %>
48
+ </div>
49
+ <% end %>
50
+ <% end %>
51
+
52
+ <h2>Add a page</h2>
53
+ <div class='linklist'>
54
+ <a href='<%= url 'Type a title here', 'edit' %>'>Add a new page</a>
55
+ <a href='<%= url 'Picture of Type a title here', 'edit' %>'>Upload a new picture</a>
56
+ <a href='<%= url 'Attached Type a title here', 'edit' %>'>Upload a new file</a>
57
+ </div>
58
+
59
+ <h2>Powered by <a href='http://www.soks.org'>Soks</a></h2>
60
+ </div> <!-- menu --!>
42
61
  </body>
43
- </html>
62
+ </html>
@@ -0,0 +1,37 @@
1
+ require 'test/unit'
2
+ require 'soks-utils'
3
+
4
+ class ToTimeUnitsMT < Test::Unit::TestCase
5
+
6
+ def test_seconds
7
+ assert_equal( 'fraction of a second', 0.4.to_time_units )
8
+ assert_equal( 'second', 0.8.to_time_units )
9
+ assert_equal( 'second', 1.3.to_time_units )
10
+ assert_equal( '5 seconds', 5.to_time_units )
11
+ end
12
+
13
+ def test_minutes
14
+ assert_equal( 'minute', 46.to_time_units )
15
+ assert_equal( '10 minutes', (60*10.4).to_time_units )
16
+ end
17
+
18
+ def test_hours
19
+ assert_equal( 'hour', (60*60*1.2).to_time_units )
20
+ assert_equal( '2 hours', (60*60*1.8).to_time_units )
21
+ end
22
+
23
+ def test_days
24
+ assert_equal( 'day', (60*60*24*0.95).to_time_units )
25
+ assert_equal( '20 days', (60*60*24*20).to_time_units )
26
+ end
27
+
28
+ def test_months
29
+ assert_equal( 'month', (60*60*24*30*1.1).to_time_units )
30
+ assert_equal( '10 months', (60*60*24*30*10).to_time_units )
31
+ end
32
+
33
+ def test_years
34
+ assert_equal( 'year', (60*60*24*30*14).to_time_units )
35
+ assert_equal( '11 years', (60*60*24*365*11).to_time_units )
36
+ end
37
+ end