Index: openacs-4/packages/xowiki/xowiki.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v diff -u -r1.7 -r1.8 --- openacs-4/packages/xowiki/xowiki.info 26 Jan 2006 12:29:45 -0000 1.7 +++ openacs-4/packages/xowiki/xowiki.info 30 Jan 2006 02:04:50 -0000 1.8 @@ -8,27 +8,27 @@ f xowiki - + Gustaf Neumann - A more generic xotcl-based wikis example with object types + A more generic xotcl-based wikis example with object types and subtypes based on the content repository (with category support) - 2006-01-26 - XoWiki is a wiki implementation for OpenACS in xotcl. Instead of trying to -implement the full set of wiki markup commands of systems like MediaWiki, -XoWiki is based on a rich text editor and focuses more on integration -with oacs (e.g categories, general comments, adp-includes). XoWiki -combines aspects of wikis (ease of page-creation) with aspects of a -content management system (revisions, re-usable items, multiple -languages). Furthermore, XoWiki allows to define different types of links such -one could define book-structures (where a navigation structure could be built on the fly) or glossaries with differnt kind of word relationships (like synonyms, etc.). XoWiki supports pages in multiple languages and is localized (currently only for English and German). Currently, richtext and plaintext type entries are supported. Included support for adp-substitution in wiki pages and a file-selector. 0.13 supports page templates and uses the new generic form interface. Use of the oo layer for the content repository, reduced number of database interactions.0.18 supports text/enhanced, nice page names, import/export. Support for search (::xowiki::Page and ::xowiki::PlainPage) + 2006-01-30 + XoWiki is a wiki implementation for OpenACS in xotcl. Instead of trying to +implement the full set of wiki markup commands of systems like MediaWiki, +XoWiki is based on a rich text editor and focuses more on integration +with oacs (e.g categories, general comments, adp-includes). XoWiki +combines aspects of wikis (ease of page-creation) with aspects of a +content management system (revisions, re-usable items, multiple +languages). Furthermore, XoWiki allows to define different types of links such +one could define book-structures (where a navigation structure could be built on the fly) or glossaries with differnt kind of word relationships (like synonyms, etc.). XoWiki supports pages in multiple languages and is localized (currently only for English and German). Currently, richtext and plaintext type entries are supported. Included support for adp-substitution in wiki pages and a file-selector. 0.13 supports page templates and uses the new generic form interface. Use of the oo layer for the content repository, reduced number of database interactions.0.18 supports text/enhanced, nice page names, import/export. Support for search (::xowiki::Page and ::xowiki::PlainPage); 0.20 support ::xowiki::Object, directory object, rss generation into syndication table, improved admin pages 0 - + - + Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 28 Jan 2006 23:28:22 -0000 1.9 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 30 Jan 2006 02:04:51 -0000 1.10 @@ -160,7 +160,7 @@ {validate {{title {\[::xowiki::validate_title\]} {correcting locale}}}} {with_categories true} - {submit_link view} + {submit_link "view"} } WikiForm instproc folderspec {value} { @@ -222,19 +222,19 @@ } WikiForm instproc update_references {} { my instvar data - $data render_adp false - $data render -update_references - } - - WikiForm instproc new_data {} { - my handle_enhanced_text_from_form - set item_id [next] if {![my istype PageInstanceForm]} { ### danger: update references does an ad_eval, which breaks the [template::adp_level] ### ad_form! don't do it here. - my update_references + $data render_adp false + $data render -update_references } + my set submit_link pages/[ad_urlencode [$data set title]]? + } + WikiForm instproc new_data {} { + my handle_enhanced_text_from_form + set item_id [next] + my update_references return $item_id } @@ -263,18 +263,38 @@ Class create ObjectForm -superclass PlainWikiForm \ -parameter { - {f.title {title:text(inform)}} {f.text {text:text(textarea),nospell,optional {label #xowiki.content#} {html {cols 80 rows 15}}}} - {validate - {}} {with_categories false} } + ObjectForm instproc init {} { + my instvar data + if {[$data exists title]} { + # don't call vaidate on the folder object, don't let people change its name + set title [$data set title] + if {$title eq "::[$data set parent_id]"} { + my f.title {title:text(inform) {label #xowiki.name#}} + my validate {{title {1} {correcting locale}}} + #my log "--e don't validate folder id - parent_id = [$data set parent_id]" + } + } + next + } + ObjectForm instproc new_request {} { + my instvar data + permission::require_permission \ + -party_id [ad_conn user_id] -object_id [$data set parent_id] \ + -privilege "admin" + next + } + ObjectForm instproc edit_request {item_id} { my instvar data + my log "--e setting f.title" + my f.title {{title:text {label #xowiki.name#}}} permission::require_permission \ -party_id [ad_conn user_id] -object_id [$data set parent_id] \ -privilege "admin" @@ -283,7 +303,7 @@ ObjectForm instproc edit_data {} { my instvar data - $data package_info [$data set text] + $data set_payload [$data set text] next } @@ -415,15 +435,14 @@ my log "--f fetch folder object" set o [::xowiki::Object create ::$folder_id] ::xowiki::Object fetch_object -object $o -item_id $item_id - $o package_info [$o set text] } else { my log "--f save new folder object" set o [::xowiki::Object create ::$folder_id] - $o set text "set package_id $package_id\nset index_page {}\n" + $o set text "# this is the payload of the folder object\n\nset index_page \"\"\n" $o set parent_id $folder_id $o set title ::$folder_id $o save_new - $o package_info [$o set text] + $o initialize_loaded_object } $o proc destroy {} {my log "--f "; next} my log "--f exists $o -> [::xotcl::Object isobject $o]" @@ -487,16 +506,11 @@ Page instproc div arg { if {$arg eq "content"} { return "
" - } elseif {$arg eq "sidebar"} { - return "