Soks 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +14 -4
- data/bin/soks-create-wiki.rb +2 -2
- data/contrib/redcloth-3.0.3.rb +0 -1
- data/lib/helpers/default-helpers.rb +13 -12
- data/lib/helpers/mail2wiki-helper.rb +12 -7
- data/lib/helpers/mail2wiki-test.rb +15 -0
- data/lib/helpers/wiki2html.rb +60 -0
- data/lib/soks-drb.rb +20 -0
- data/lib/soks-fcgi.rb +127 -0
- data/lib/soks-model.rb +11 -3
- data/lib/soks-servlet.rb +68 -45
- data/lib/soks-storage.rb +11 -3
- data/lib/soks-utils.rb +32 -3
- data/lib/soks-view.rb +48 -69
- data/lib/soks.rb +6 -3
- data/templates/default/attachment/blank.gif +0 -0
- data/templates/default/attachment/logo.jpg +0 -0
- data/templates/default/attachment/newpage.js +9 -0
- data/templates/default/attachment/pngbehavior.htc +86 -0
- data/templates/default/attachment/robots.txt +2 -1
- data/templates/default/attachment/stylesheet.css +144 -37
- data/templates/default/banned_titles.txt +36 -0
- data/templates/default/content/Api%20for%20classes%20to%20modify%20the%20wiki.textile +24 -0
- data/templates/default/content/Author.textile +3 -3
- data/templates/default/content/Automatic%20Summaries.textile +14 -14
- data/templates/default/content/Automatic%20linking%20between%20pages.textile +2 -0
- data/templates/default/content/Bug%3A%20RSS%20feed%20does%20not%20validate.textile +10 -0
- data/templates/default/content/Bug%3A%20Textile%20mishandles%20paragraphs.textile +33 -0
- data/templates/default/content/Bug%3A%20Unanticipated%20Rollbacks.textile +21 -0
- data/templates/default/content/Home%20Page.textile +3 -2
- data/templates/default/content/How%20to%20administrate%20this%20wiki.textile +4 -19
- data/templates/default/content/How%20to%20get%20the%20latest%20Soks%20from%20cvs.textile +21 -0
- data/templates/default/content/How%20to%20import%20data%20to%20this%20wiki.textile +45 -0
- data/templates/default/content/How%20to%20install%20Soks.textile +12 -8
- data/templates/default/content/How%20to%20password%20protect%20your%20wiki.textile +43 -0
- data/templates/default/content/How%20to%20report%20a%20bug.textile +1 -1
- data/templates/default/content/How%20to%20use%20the%20keyboard%20shortcuts.textile +2 -0
- data/templates/default/content/How%20to%20use%20this%20wiki.textile +1 -0
- data/templates/default/content/Instructions%20and%20Howtos.textile +4 -1
- data/templates/default/content/Known%20bugs.textile +5 -2
- data/templates/default/content/List%20of%20changes.textile +49 -0
- data/templates/default/content/New%20Recent%20Changes%20class.textile +58 -0
- data/templates/default/content/New%20page%20templates%20or%20categories%20code.textile +68 -0
- data/templates/default/content/Per%20Wiki%20Templates.textile +35 -0
- data/templates/default/content/Planned%20Features.textile +29 -8
- data/templates/default/content/README.textile +14 -4
- data/templates/default/content/RSS%20feed.textile +2 -0
- data/templates/default/content/Recent%20Changes%20to%20This%20Site.textile +200 -202
- data/templates/default/content/SOKS%20features.textile +2 -1
- data/templates/default/content/Sidebar%20Page.textile +3 -0
- data/templates/default/content/Type%20a%20title%20here.textile +1 -0
- data/templates/default/content/bug%3A%20competing%20edits.textile +13 -0
- data/templates/default/content/ctrl%2Dn.textile +1 -0
- data/templates/default/content/tamc.textile +1 -0
- data/templates/default/start.rb +38 -15
- data/templates/default/version.txt +1 -1
- data/templates/default/views/Page_edit.rhtml +71 -57
- data/templates/default/views/Page_meta.rhtml +6 -2
- data/templates/default/views/Page_revisions.rhtml +17 -9
- data/templates/default/views/Page_rss.rhtml +3 -1
- data/templates/default/views/Page_search_results.rhtml +11 -1
- data/templates/default/views/Page_view.rhtml +6 -2
- data/templates/default/views/UploadPage_edit.rhtml +58 -33
- data/templates/default/views/frame.rhtml +46 -27
- data/test/test_soks-utils.rb +37 -0
- metadata +27 -229
- data/templates/default/content/Bug%3A%20%5BFATAL%5D%20When%20renaming%20upload%20%2F%20picture%2.textile +0 -1
- data/templates/default/content/Bug%3A%20Automatic%20link%20links%20to%20stuff%20inside%20%3Chtml.textile +0 -1
- data/templates/default/content/Bug%3A%20Does%20not%20make%20use%20of%20if%2Dmodified%2Dsince%20r.textile +0 -1
- data/templates/default/content/Bug%3A%20Duplicate%20links%2Dto%20a%20page%20sometimes%20appear.textile +0 -1
- data/templates/default/content/Bug%3A%20External%20links%20incorrectly%20include%20trailing%20pu.textile +0 -1
- data/templates/default/content/Bug%3A%20In%20a%20list%20of%20links%2C%20the%20last%20link%20is%2.textile +0 -1
- data/templates/default/content/Bug%3A%20Inserted%20pages%20are%20not%20refreshed%20when%20new%20.textile +0 -1
- data/templates/default/content/Bug%3A%20No%20robots%2Etxt%20or%20favicon%2Eico.textile +0 -1
- data/templates/default/content/Bug%3A%20Page%20titles%20cannot%20have%20html%20tags%20in%20them.textile +0 -1
- data/templates/default/content/Bug%3A%20Punctuation%20in%20page%20titles%20still%20problematic.textile +0 -7
- data/templates/default/content/Bug%3A%20RSS%20feed%20shows%20oldest%2015%20revisions%20%28not%20.textile +0 -1
- data/templates/default/content/Bug%3A%20Search%20box%20width%20does%20not%20match%20column%20wid.textile +0 -1
- data/templates/default/content/Bug%3A%20Search%20includes%20leading%20and%20trailing%20spaces.textile +0 -1
- data/templates/default/content/Bug%3A%20Search%20inluced%20leading%20and%20trailing%20spaces.textile +0 -1
- data/templates/default/content/Bug%3A%20Site%20Index%20updates%20on%20every%20revision.textile +0 -1
- data/templates/default/content/Bug%3A%20Symbols%20are%20not%20always%20correctly%20rendered%20in.textile +0 -1
- data/templates/default/content/Bug%3A%20Uploads%20are%20not%20password%20protected.textile +0 -3
- data/templates/default/content/Bug%3A%20no%20superclass%20method%20%60%5Fdeprecated%5Fbase64.textile +0 -1
- data/templates/default/content/Fixed%20Bug%3A%20%5BFATAL%5D%20When%20renaming%20upload%20%2F%20p.textile +0 -34
- data/templates/default/content/Fixed%20Bug%3A%20Duplicate%20links%2Dto%20a%20page%20sometimes%20.textile +0 -3
- data/templates/default/content/Fixed%20Bug%3A%20External%20links%20incorrectly%20include%20trail.textile +0 -3
- data/templates/default/content/Fixed%20Bug%3A%20In%20a%20list%20of%20links%2C%20the%20last%20lin.textile +0 -13
- data/templates/default/content/Fixed%20Bug%3A%20Inserted%20pages%20are%20not%20refreshed%20when%.textile +0 -9
- data/templates/default/content/Fixed%20Bug%3A%20No%20robots%2Etxt%20or%20favicon%2Eico.textile +0 -4
- data/templates/default/content/Fixed%20Bug%3A%20RSS%20feed%20shows%20oldest%2015%20revisions%20%.textile +0 -15
- data/templates/default/content/Fixed%20Bug%3A%20Search%20box%20width%20does%20not%20match%20colu.textile +0 -3
- data/templates/default/content/Fixed%20Bug%3A%20Search%20includes%20leading%20and%20trailing%20s.textile +0 -3
- data/templates/default/content/Fixed%20Bug%3A%20Site%20Index%20updates%20on%20every%20revision.textile +0 -3
- data/templates/default/content/Fixed%20Bug%3A%20Symbols%20are%20not%20always%20correctly%20rende.textile +0 -5
- data/templates/default/content/Fixed%20Bug%3A%20no%20superclass%20method%20%60%5Fdeprecated%5Fba.textile +0 -3
- data/templates/default/content/Site%20Index.textile +0 -60
- data/templates/default/content/fixed%20bug%3A%20automatic%20link%20links%20to%20stuff%20inside%2.textile +0 -3
- data/templates/default/content/sandbox.textile +0 -2
- data/templates/default/content/test%20page.textile +0 -1
- data/templates/instiki/attachment/header_backdrop.png +0 -0
- data/templates/instiki/attachment/instiki_style_sheet.css +0 -199
- data/templates/instiki/attachment/logo.tiff +0 -0
- data/templates/instiki/attachment/logotext.png +0 -0
- data/templates/instiki/attachment/newpage.js +0 -41
- data/templates/instiki/attachment/rss.png +0 -0
- data/templates/instiki/banned_titles.txt +0 -31
- data/templates/instiki/content/All%20News.textile +0 -9
- data/templates/instiki/content/Attached%20ruby%20logo.textile +0 -1
- data/templates/instiki/content/Attached%20test%20thing.textile +0 -1
- data/templates/instiki/content/Author.textile +0 -12
- data/templates/instiki/content/Automatic%20Summaries.textile +0 -77
- data/templates/instiki/content/Automatic%20linking%20between%20pages.textile +0 -5
- data/templates/instiki/content/Bug%3A%20%5BFATAL%5D%20When%20renaming%20upload%20%2F%20picture%2.textile +0 -1
- data/templates/instiki/content/Bug%3A%20Automatic%20link%20links%20to%20stuff%20inside%20%3Chtml.textile +0 -1
- data/templates/instiki/content/Bug%3A%20Does%20not%20make%20use%20of%20if%2Dmodified%2Dsince%20r.textile +0 -1
- data/templates/instiki/content/Bug%3A%20Duplicate%20links%2Dto%20a%20page%20sometimes%20appear.textile +0 -1
- data/templates/instiki/content/Bug%3A%20External%20links%20incorrectly%20include%20trailing%20pu.textile +0 -1
- data/templates/instiki/content/Bug%3A%20GEM%20limits%20title%20lengths.textile +0 -1
- data/templates/instiki/content/Bug%3A%20In%20a%20list%20of%20links%2C%20the%20last%20link%20is%2.textile +0 -1
- data/templates/instiki/content/Bug%3A%20Inserted%20pages%20are%20not%20refreshed%20when%20new%20.textile +0 -1
- data/templates/instiki/content/Bug%3A%20No%20robots%2Etxt%20or%20favicon%2Eico.textile +0 -1
- data/templates/instiki/content/Bug%3A%20Page%20titles%20cannot%20have%20html%20tags%20in%20them.textile +0 -1
- data/templates/instiki/content/Bug%3A%20Punctuation%20in%20page%20titles%20still%20problematic.textile +0 -7
- data/templates/instiki/content/Bug%3A%20RSS%20feed%20shows%20oldest%2015%20revisions%20%28not%20.textile +0 -1
- data/templates/instiki/content/Bug%3A%20Search%20box%20width%20does%20not%20match%20column%20wid.textile +0 -1
- data/templates/instiki/content/Bug%3A%20Search%20includes%20leading%20and%20trailing%20spaces.textile +0 -1
- data/templates/instiki/content/Bug%3A%20Search%20inluced%20leading%20and%20trailing%20spaces.textile +0 -1
- data/templates/instiki/content/Bug%3A%20Site%20Index%20updates%20on%20every%20revision.textile +0 -1
- data/templates/instiki/content/Bug%3A%20Symbols%20are%20not%20always%20correctly%20rendered%20in.textile +0 -1
- data/templates/instiki/content/Bug%3A%20Uploads%20are%20not%20password%20protected.textile +0 -3
- data/templates/instiki/content/Bug%3A%20no%20superclass%20method%20%60%5Fdeprecated%5Fbase64.textile +0 -1
- data/templates/instiki/content/Bug%3A%20notextile%20does%20not%20prevent%20page%20inserts.textile +0 -1
- data/templates/instiki/content/Fixed%20Bug%3A%20%5BFATAL%5D%20When%20renaming%20upload%20%2F%20p.textile +0 -34
- data/templates/instiki/content/Fixed%20Bug%3A%20Duplicate%20links%2Dto%20a%20page%20sometimes%20.textile +0 -3
- data/templates/instiki/content/Fixed%20Bug%3A%20External%20links%20incorrectly%20include%20trail.textile +0 -3
- data/templates/instiki/content/Fixed%20Bug%3A%20In%20a%20list%20of%20links%2C%20the%20last%20lin.textile +0 -13
- data/templates/instiki/content/Fixed%20Bug%3A%20Inserted%20pages%20are%20not%20refreshed%20when%.textile +0 -9
- data/templates/instiki/content/Fixed%20Bug%3A%20No%20robots%2Etxt%20or%20favicon%2Eico.textile +0 -4
- data/templates/instiki/content/Fixed%20Bug%3A%20RSS%20feed%20shows%20oldest%2015%20revisions%20%.textile +0 -15
- data/templates/instiki/content/Fixed%20Bug%3A%20Search%20box%20width%20does%20not%20match%20colu.textile +0 -3
- data/templates/instiki/content/Fixed%20Bug%3A%20Search%20includes%20leading%20and%20trailing%20s.textile +0 -3
- data/templates/instiki/content/Fixed%20Bug%3A%20Site%20Index%20updates%20on%20every%20revision.textile +0 -3
- data/templates/instiki/content/Fixed%20Bug%3A%20Symbols%20are%20not%20always%20correctly%20rende.textile +0 -5
- data/templates/instiki/content/Fixed%20Bug%3A%20no%20superclass%20method%20%60%5Fdeprecated%5Fba.textile +0 -3
- data/templates/instiki/content/Home%20Page.textile +0 -19
- data/templates/instiki/content/How%20to%20administrate%20this%20wiki.textile +0 -62
- data/templates/instiki/content/How%20to%20change%20the%20way%20this%20wiki%20looks.textile +0 -30
- data/templates/instiki/content/How%20to%20export%20a%20site%20from%20this%20wiki.textile +0 -60
- data/templates/instiki/content/How%20to%20hack%20soks.textile +0 -61
- data/templates/instiki/content/How%20to%20import%20a%20site%20from%20instiki.textile +0 -13
- data/templates/instiki/content/How%20to%20install%20Soks.textile +0 -27
- data/templates/instiki/content/How%20to%20report%20a%20bug.textile +0 -8
- data/templates/instiki/content/How%20to%20use%20the%20keyboard%20shortcuts.textile +0 -13
- data/templates/instiki/content/How%20to%20use%20this%20wiki.textile +0 -27
- data/templates/instiki/content/Instructions%20and%20Howtos.textile +0 -18
- data/templates/instiki/content/Known%20bugs.textile +0 -15
- data/templates/instiki/content/Latest%20News.textile +0 -9
- data/templates/instiki/content/List%20of%20changes.textile +0 -67
- data/templates/instiki/content/Picture%20of%20Type%20a%20title%20here.textile +0 -1
- data/templates/instiki/content/Picture%20of%20a%20logo%20for%20the%20ruby%20language.textile +0 -1
- data/templates/instiki/content/Picture%20of%20a%20pair%20of%20soks.textile +0 -1
- data/templates/instiki/content/Picture%20of%20powered%20by%20ruby%20logo.textile +0 -1
- data/templates/instiki/content/Planned%20Features.textile +0 -19
- data/templates/instiki/content/README.textile +0 -63
- data/templates/instiki/content/RSS%20feed.textile +0 -7
- data/templates/instiki/content/Recent%20Blog%20Entries.textile +0 -5
- data/templates/instiki/content/Recent%20Changes%20to%20This%20Site.textile +0 -211
- data/templates/instiki/content/Recent%20News.textile +0 -9
- data/templates/instiki/content/Ruby.textile +0 -9
- data/templates/instiki/content/SOKS%20features.textile +0 -16
- data/templates/instiki/content/Site%20Index.textile +0 -60
- data/templates/instiki/content/Soks%20Licence.textile +0 -64
- data/templates/instiki/content/fixed%20bug%3A%20automatic%20link%20links%20to%20stuff%20inside%2.textile +0 -3
- data/templates/instiki/content/let%20me%20know.textile +0 -1
- data/templates/instiki/content/sandbox.textile +0 -2
- data/templates/instiki/content/tamc2.textile +0 -1
- data/templates/instiki/content/test%20page.textile +0 -1
- data/templates/instiki/start.rb +0 -112
- data/templates/instiki/version.txt +0 -1
- data/templates/instiki/views/Page_content.rhtml +0 -1
- data/templates/instiki/views/Page_edit.rhtml +0 -8
- data/templates/instiki/views/Page_meta.rhtml +0 -34
- data/templates/instiki/views/Page_print.rhtml +0 -6
- data/templates/instiki/views/Page_revisions.rhtml +0 -17
- data/templates/instiki/views/Page_rss.rhtml +0 -55
- data/templates/instiki/views/Page_search_results.rhtml +0 -18
- data/templates/instiki/views/Page_view.rhtml +0 -2
- data/templates/instiki/views/UploadPage_edit.rhtml +0 -16
- data/templates/instiki/views/frame.rhtml +0 -90
- data/templates/instiki/views/messages.yaml +0 -6
- data/templates/rails/attachment/2colheader.css +0 -77
- data/templates/rails/attachment/basics.css +0 -98
- data/templates/rails/attachment/header_backdrop.png +0 -0
- data/templates/rails/attachment/logo.tiff +0 -0
- data/templates/rails/attachment/logotext.png +0 -0
- data/templates/rails/attachment/newpage.js +0 -41
- data/templates/rails/attachment/rss.png +0 -0
- data/templates/rails/banned_titles.txt +0 -31
- data/templates/rails/content/All%20News.textile +0 -9
- data/templates/rails/content/Attached%20ruby%20logo.textile +0 -1
- data/templates/rails/content/Attached%20test%20thing.textile +0 -1
- data/templates/rails/content/Author.textile +0 -12
- data/templates/rails/content/Automatic%20Summaries.textile +0 -77
- data/templates/rails/content/Automatic%20linking%20between%20pages.textile +0 -5
- data/templates/rails/content/Bug%3A%20%5BFATAL%5D%20When%20renaming%20upload%20%2F%20picture%2.textile +0 -1
- data/templates/rails/content/Bug%3A%20Automatic%20link%20links%20to%20stuff%20inside%20%3Chtml.textile +0 -1
- data/templates/rails/content/Bug%3A%20Does%20not%20make%20use%20of%20if%2Dmodified%2Dsince%20r.textile +0 -1
- data/templates/rails/content/Bug%3A%20Duplicate%20links%2Dto%20a%20page%20sometimes%20appear.textile +0 -1
- data/templates/rails/content/Bug%3A%20External%20links%20incorrectly%20include%20trailing%20pu.textile +0 -1
- data/templates/rails/content/Bug%3A%20GEM%20limits%20title%20lengths.textile +0 -1
- data/templates/rails/content/Bug%3A%20In%20a%20list%20of%20links%2C%20the%20last%20link%20is%2.textile +0 -1
- data/templates/rails/content/Bug%3A%20Inserted%20pages%20are%20not%20refreshed%20when%20new%20.textile +0 -1
- data/templates/rails/content/Bug%3A%20No%20robots%2Etxt%20or%20favicon%2Eico.textile +0 -1
- data/templates/rails/content/Bug%3A%20Page%20titles%20cannot%20have%20html%20tags%20in%20them.textile +0 -1
- data/templates/rails/content/Bug%3A%20Punctuation%20in%20page%20titles%20still%20problematic.textile +0 -7
- data/templates/rails/content/Bug%3A%20RSS%20feed%20shows%20oldest%2015%20revisions%20%28not%20.textile +0 -1
- data/templates/rails/content/Bug%3A%20Search%20box%20width%20does%20not%20match%20column%20wid.textile +0 -1
- data/templates/rails/content/Bug%3A%20Search%20includes%20leading%20and%20trailing%20spaces.textile +0 -1
- data/templates/rails/content/Bug%3A%20Search%20inluced%20leading%20and%20trailing%20spaces.textile +0 -1
- data/templates/rails/content/Bug%3A%20Site%20Index%20updates%20on%20every%20revision.textile +0 -1
- data/templates/rails/content/Bug%3A%20Symbols%20are%20not%20always%20correctly%20rendered%20in.textile +0 -1
- data/templates/rails/content/Bug%3A%20Uploads%20are%20not%20password%20protected.textile +0 -3
- data/templates/rails/content/Bug%3A%20no%20superclass%20method%20%60%5Fdeprecated%5Fbase64.textile +0 -1
- data/templates/rails/content/Bug%3A%20notextile%20does%20not%20prevent%20page%20inserts.textile +0 -1
- data/templates/rails/content/Fixed%20Bug%3A%20%5BFATAL%5D%20When%20renaming%20upload%20%2F%20p.textile +0 -34
- data/templates/rails/content/Fixed%20Bug%3A%20Duplicate%20links%2Dto%20a%20page%20sometimes%20.textile +0 -3
- data/templates/rails/content/Fixed%20Bug%3A%20External%20links%20incorrectly%20include%20trail.textile +0 -3
- data/templates/rails/content/Fixed%20Bug%3A%20In%20a%20list%20of%20links%2C%20the%20last%20lin.textile +0 -13
- data/templates/rails/content/Fixed%20Bug%3A%20Inserted%20pages%20are%20not%20refreshed%20when%.textile +0 -9
- data/templates/rails/content/Fixed%20Bug%3A%20No%20robots%2Etxt%20or%20favicon%2Eico.textile +0 -4
- data/templates/rails/content/Fixed%20Bug%3A%20RSS%20feed%20shows%20oldest%2015%20revisions%20%.textile +0 -15
- data/templates/rails/content/Fixed%20Bug%3A%20Search%20box%20width%20does%20not%20match%20colu.textile +0 -3
- data/templates/rails/content/Fixed%20Bug%3A%20Search%20includes%20leading%20and%20trailing%20s.textile +0 -3
- data/templates/rails/content/Fixed%20Bug%3A%20Site%20Index%20updates%20on%20every%20revision.textile +0 -3
- data/templates/rails/content/Fixed%20Bug%3A%20Symbols%20are%20not%20always%20correctly%20rende.textile +0 -5
- data/templates/rails/content/Fixed%20Bug%3A%20no%20superclass%20method%20%60%5Fdeprecated%5Fba.textile +0 -3
- data/templates/rails/content/Home%20Page.textile +0 -19
- data/templates/rails/content/How%20to%20administrate%20this%20wiki.textile +0 -62
- data/templates/rails/content/How%20to%20change%20the%20way%20this%20wiki%20looks.textile +0 -30
- data/templates/rails/content/How%20to%20export%20a%20site%20from%20this%20wiki.textile +0 -60
- data/templates/rails/content/How%20to%20hack%20soks.textile +0 -61
- data/templates/rails/content/How%20to%20import%20a%20site%20from%20instiki.textile +0 -13
- data/templates/rails/content/How%20to%20install%20Soks.textile +0 -27
- data/templates/rails/content/How%20to%20report%20a%20bug.textile +0 -8
- data/templates/rails/content/How%20to%20use%20the%20keyboard%20shortcuts.textile +0 -13
- data/templates/rails/content/How%20to%20use%20this%20wiki.textile +0 -27
- data/templates/rails/content/Instructions%20and%20Howtos.textile +0 -18
- data/templates/rails/content/Known%20bugs.textile +0 -15
- data/templates/rails/content/Latest%20News.textile +0 -9
- data/templates/rails/content/List%20of%20changes.textile +0 -67
- data/templates/rails/content/Picture%20of%20Type%20a%20title%20here.textile +0 -1
- data/templates/rails/content/Picture%20of%20a%20logo%20for%20the%20ruby%20language.textile +0 -1
- data/templates/rails/content/Picture%20of%20a%20pair%20of%20soks.textile +0 -1
- data/templates/rails/content/Picture%20of%20powered%20by%20ruby%20logo.textile +0 -1
- data/templates/rails/content/Planned%20Features.textile +0 -19
- data/templates/rails/content/README.textile +0 -63
- data/templates/rails/content/RSS%20feed.textile +0 -7
- data/templates/rails/content/Recent%20Blog%20Entries.textile +0 -5
- data/templates/rails/content/Recent%20Changes%20to%20This%20Site.textile +0 -211
- data/templates/rails/content/Recent%20News.textile +0 -9
- data/templates/rails/content/Ruby.textile +0 -9
- data/templates/rails/content/SOKS%20features.textile +0 -16
- data/templates/rails/content/Site%20Index.textile +0 -60
- data/templates/rails/content/Soks%20Licence.textile +0 -64
- data/templates/rails/content/fixed%20bug%3A%20automatic%20link%20links%20to%20stuff%20inside%2.textile +0 -3
- data/templates/rails/content/let%20me%20know.textile +0 -1
- data/templates/rails/content/sandbox.textile +0 -2
- data/templates/rails/content/tamc2.textile +0 -1
- data/templates/rails/content/test%20page.textile +0 -1
- data/templates/rails/start.rb +0 -113
- data/templates/rails/version.txt +0 -1
- data/templates/rails/views/Page_content.rhtml +0 -1
- data/templates/rails/views/Page_edit.rhtml +0 -61
- data/templates/rails/views/Page_meta.rhtml +0 -38
- data/templates/rails/views/Page_print.rhtml +0 -6
- data/templates/rails/views/Page_revisions.rhtml +0 -19
- data/templates/rails/views/Page_rss.rhtml +0 -55
- data/templates/rails/views/Page_search_results.rhtml +0 -19
- data/templates/rails/views/Page_view.rhtml +0 -3
- data/templates/rails/views/UploadPage_edit.rhtml +0 -38
- data/templates/rails/views/frame.rhtml +0 -60
- data/templates/rails/views/messages.yaml +0 -6
- /data/templates/default/attachment/{logo_thumb.bmp → tiny-logo thumb.bmp} +0 -0
data/templates/default/start.rb
CHANGED
@@ -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
|
-
|
8
|
-
|
9
|
-
|
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 =>
|
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(
|
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.
|
1
|
+
0.0.6
|
@@ -1,62 +1,76 @@
|
|
1
|
-
<span class='pagename'
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
11
|
-
|
12
|
-
<
|
13
|
-
|
14
|
-
</
|
15
|
-
<
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
</
|
37
|
-
|
38
|
-
|
39
|
-
<
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
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 = • bullet one<br />
|
15
|
+
* bullet two = • 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
|
-
<
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
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
|
-
|
58
|
-
|
59
|
-
|
60
|
-
<
|
61
|
-
|
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
|
-
|
7
|
-
<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
|
-
|
4
|
-
|
5
|
-
|
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
|
12
|
+
<li><del><%= change[1] %>. <%= change[2].gsub('<','<').gsub('>','>') %></del></li>
|
12
13
|
<% when "+" %>
|
13
|
-
|
14
|
+
<li><%= change[1] %>. <%= change[2].gsub('<','<').gsub('>','>') %></li>
|
14
15
|
<% end %>
|
15
16
|
<% end %>
|
16
17
|
<% end %>
|
17
|
-
</
|
18
|
-
|
19
|
-
|
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>
|
@@ -1,5 +1,7 @@
|
|
1
1
|
<span class='pagename'><%= pagename %></span>
|
2
|
+
|
2
3
|
<h1>Results of Search for “<%= pagename %>”</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
|
-
|
26
|
+
|
27
|
+
<div class='command'>
|
28
|
+
<a href='<%= url pagename, "edit" %>' accesskey="E" >Create a page titled “<%= pagename %>”</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
|
-
|
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'
|
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
|
-
<
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
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
|
-
|
34
|
-
|
35
|
-
|
36
|
-
<
|
37
|
-
|
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
|
-
|
18
|
-
|
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
|
21
|
-
|
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
|
-
|
24
|
-
<a href='<%= url
|
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
|
-
|
27
|
-
<%
|
28
|
-
<
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
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
|