Index: openacs-4/packages/xowiki/xowiki.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v
diff -u -r1.55 -r1.56
--- openacs-4/packages/xowiki/xowiki.info 19 Jul 2007 21:20:12 -0000 1.55
+++ openacs-4/packages/xowiki/xowiki.info 22 Jul 2007 12:01:27 -0000 1.56
@@ -8,146 +8,147 @@
fxowiki
-
+ 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)
- 2007-07-19
- <pre>
-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 OpenACS (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 different kind of word relationships (like synonyms,
-etc.). XoWiki supports pages in multiple languages and is localized
-(currently only for English and German). Currently, rich-text 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.21: Ajax-based chat added, new attributes creator and page_title for
-all xowiki::Pages;
-
-0.22 improved permission checking.
-
-0.24 provides link-types, more includeletes (most-recently viewed,
-most frequently accessed pages).
-
-0.26 provides Weblog support.
-
- 0.27: alignment with xotcl-core
-
-0.28 (use cr_item.name instead of cr_revisions.title), change
-page_title to title (potential incompatibility) to rely more strictly
-to the CR data model (most files are effected).
-
-0.29: tag and improved weblog support.
-
-0.30:
-symbolic OO interface, nicer links, permission management.
-
-0.31: per
-package search.
-
-0.32: new class ::xowiki::File for [[file:readme.pdf]] and
-[[image:picture.jpg]]
-
-0.33: direct inclusion of XoWiki pages via {{en:mypage}}, simpler
-default pages (see xowiki/www/default-pages).
-
-0.34: notifications;
-
-0.36: prototypes, direct includes, context handling;
-
-0.37: initial regression testing (118 tests);
-
-0.38: production_mode, virtual presence, google-sitemap.
-
-0.39: version diff, provide image properties in XoWiki-pages, specify
-how links can be generated;
-
-0.42: book-style (toc and book portlet, based on YUI treeview), use
-language prefix to avoid clashes, ltree (for ordering);
-
-0.43: support for views package
-
-0.44: DotLRN portlet support
-
-0.45: auto-naming of pages
-
-0.46: support for announcement style configuration
-
-0.47: podcast support
-
-0.48: policy management moved to xotcl-core, more detailed
-form field specification for page instances, flash support,
-syndication status in www/admin/list, file import/export,
-style information in css files
-
-0.49: adp-generator, make tags/categories/social software
-buttons per item in a weblog, oacs-view2 and oacs-view3
-
-0.50: timeline support, new includelets activity-graph,
-collab-graph, timeline, and user-timeline
-
-0.51: minimal zen support, using new oo interface form
-xotcl-core, more silent on db-operations in error log
-
-0.52: added full set of padding-* and margin-* flags to
-control image rendering, added allow_edit and allow_delete
-to includelet "recent", new includelet "get" to obtain
-variable binding from different pages, new includelets
-creation-date to get dates nicer formatted, simplified
-development of derived packages (s5)
-
-0.53: ::xowiki::Form (will be maybe renamed before release),
-::xowiki::FormInstances (pot. rename). FormFields, form
-constraints, unnamed instances, some podcast improvements
-improved localization, new includelet "unread-items",
-export renaming for unnamed entries
-
-0.54: FormField classes, more internationalization,
-recursive inclusion bug fixed
-
-0.55: More complete set of FormField classes including
-composite fields, better mix of HTML forms with
-auto-generated form components.
+ 2007-07-22
+ <pre>
+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 OpenACS (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 different kind of word relationships (like synonyms,
+etc.). XoWiki supports pages in multiple languages and is localized
+(currently only for English and German). Currently, rich-text 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.21: Ajax-based chat added, new attributes creator and page_title for
+all xowiki::Pages;
+
+0.22 improved permission checking.
+
+0.24 provides link-types, more includeletes (most-recently viewed,
+most frequently accessed pages).
+
+0.26 provides Weblog support.
+
+ 0.27: alignment with xotcl-core
+
+0.28 (use cr_item.name instead of cr_revisions.title), change
+page_title to title (potential incompatibility) to rely more strictly
+to the CR data model (most files are effected).
+
+0.29: tag and improved weblog support.
+
+0.30:
+symbolic OO interface, nicer links, permission management.
+
+0.31: per
+package search.
+
+0.32: new class ::xowiki::File for [[file:readme.pdf]] and
+[[image:picture.jpg]]
+
+0.33: direct inclusion of XoWiki pages via {{en:mypage}}, simpler
+default pages (see xowiki/www/default-pages).
+
+0.34: notifications;
+
+0.36: prototypes, direct includes, context handling;
+
+0.37: initial regression testing (118 tests);
+
+0.38: production_mode, virtual presence, google-sitemap.
+
+0.39: version diff, provide image properties in XoWiki-pages, specify
+how links can be generated;
+
+0.42: book-style (toc and book portlet, based on YUI treeview), use
+language prefix to avoid clashes, ltree (for ordering);
+
+0.43: support for views package
+
+0.44: DotLRN portlet support
+
+0.45: auto-naming of pages
+
+0.46: support for announcement style configuration
+
+0.47: podcast support
+
+0.48: policy management moved to xotcl-core, more detailed
+form field specification for page instances, flash support,
+syndication status in www/admin/list, file import/export,
+style information in css files
+
+0.49: adp-generator, make tags/categories/social software
+buttons per item in a weblog, oacs-view2 and oacs-view3
+
+0.50: timeline support, new includelets activity-graph,
+collab-graph, timeline, and user-timeline
+
+0.51: minimal zen support, using new oo interface form
+xotcl-core, more silent on db-operations in error log
+
+0.52: added full set of padding-* and margin-* flags to
+control image rendering, added allow_edit and allow_delete
+to includelet "recent", new includelet "get" to obtain
+variable binding from different pages, new includelets
+creation-date to get dates nicer formatted, simplified
+development of derived packages (s5)
+
+0.53: ::xowiki::Form (will be maybe renamed before release),
+::xowiki::FormInstances (pot. rename). FormFields, form
+constraints, unnamed instances, some podcast improvements
+improved localization, new includelet "unread-items",
+export renaming for unnamed entries
+
+0.54: FormField classes, more internationalization,
+recursive inclusion bug fixed
+
+0.55: More complete set of FormField classes including
+composite fields, better mix of HTML forms with
+auto-generated form components.
</pre>BSD-Style0
-
+
-
+
-
+
+
Index: openacs-4/packages/xowiki/catalog/xowiki.de_DE.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/catalog/xowiki.de_DE.ISO-8859-1.xml,v
diff -u -r1.18 -r1.19
--- openacs-4/packages/xowiki/catalog/xowiki.de_DE.ISO-8859-1.xml 19 Jul 2007 21:20:12 -0000 1.18
+++ openacs-4/packages/xowiki/catalog/xowiki.de_DE.ISO-8859-1.xml 22 Jul 2007 12:01:27 -0000 1.19
@@ -1,5 +1,5 @@
-
+VerwaltenZur�ck
@@ -8,17 +8,23 @@
L�schenBearbeitenbearbeiten
+ Eintr�ge, die das Formular %form% verwenden:
+ Dieses Formular wird noch von %count% Eintr�gen verwendet. Bitte verwenden Sie diese, bevor Sie das Formular l�schen.Formular
- Formular Einschr�nkungen
+ Einschr�nkungen
+ Eintr�ge f�r dieses Formular
+ Formular ausf�llenIndexVerst�ndigungenCreatorKurzbeschreibungName
+ Eindeutige Kurzbezeichnung f�r einen Eintrag im Ordner; enth�lt meist nur KleinbuchstabenSpracheAbschnittInhaltTitel der Seite
+ Another item with the name '%value%' exists already in this folder Typ der SeiteInstanzattributeSeitenvorlage
Index: openacs-4/packages/xowiki/catalog/xowiki.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/catalog/xowiki.en_US.ISO-8859-1.xml,v
diff -u -r1.24 -r1.25
--- openacs-4/packages/xowiki/catalog/xowiki.en_US.ISO-8859-1.xml 19 Jul 2007 21:20:12 -0000 1.24
+++ openacs-4/packages/xowiki/catalog/xowiki.en_US.ISO-8859-1.xml 22 Jul 2007 12:01:27 -0000 1.25
@@ -1,5 +1,5 @@
-
+AdminBack
@@ -8,6 +8,8 @@
DeleteEditedit tags
+ Entries using form %form%
+ This page is still used by %count% entries. Please delete these first before deleting this page.Form constraint contains invalid charactersFrom field '%name%' has unknown attribute '%entry%'Unknown editor %editor%. Possible values are: %editors%
@@ -27,7 +29,7 @@
Can be obtained from the name of the uploaded fileFormForm Constraints
- Anwers
+ Entries for this formFill out OK %errorMsg%
@@ -47,7 +49,7 @@
Page TypeInstance AttributesPage Instance
- Unnamed Instances
+ Unnamed EntriesDurationE.g. 9:16 means 9 minutes 16 seconds (if ffmpeg is installed and configured, it will get the value automatically)Keywords
Index: openacs-4/packages/xowiki/tcl/package-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v
diff -u -r1.70 -r1.71
--- openacs-4/packages/xowiki/tcl/package-procs.tcl 17 Jul 2007 10:05:53 -0000 1.70
+++ openacs-4/packages/xowiki/tcl/package-procs.tcl 22 Jul 2007 12:01:27 -0000 1.71
@@ -284,8 +284,12 @@
}
set context [list [$id instance_name]]
set title Error
+ set header_stuff [::xowiki::Page header_stuff]
+ set index_link [my make_link -privilege public -link "" $id {} {}]
+ set link [my query_parameter "return_url" ""]
+ if {$link ne ""} {set back_link $link}
$id return_page -adp $template_file -variables {
- context title error_msg
+ context title index_link back_link header_stuff error_msg
}
}
@@ -306,7 +310,8 @@
}
}
if {[string match //* $object]} {
- # we have a reference to another instance, we cant resolve this from this package.
+
+ # we have a reference to another instance, we cant resolve this from this package.
# Report back not found
return ""
}
@@ -799,7 +804,28 @@
return [$page edit -new true -autoname $autoname]
}
+ Package instproc flush_references {-item_id:integer,required -name} {
+ my instvar folder_id id
+ if {$name eq "::$folder_id"} {
+ #my log "--D deleting folder object ::$folder_id"
+ ns_cache flush xotcl_object_cache ::$folder_id
+ ns_cache flush xotcl_object_type_cache item_id-of-$folder_id
+ ns_cache flush xotcl_object_type_cache root_folder-$id
+ ::$folder_id destroy
+ }
+ set key link-*-$name-$folder_id
+ foreach n [ns_cache names xowiki_cache $key] {ns_cache flush xowiki_cache $n}
+ }
+
Package instproc delete {-item_id -name} {
+ #
+ # This delete method does not require an instanantiated object,
+ # while the class-specific delete methods in xowiki-procs need these.
+ # If a (broken) object can't be instantiated, it cannot be deleted.
+ # Therefore we need this package level delete method.
+ # While the class specific methods are used from the
+ # application pages, the package_level method is used from the admin pages.
+ #
my instvar folder_id id
if {![info exists item_id]} {
set item_id [my query_parameter item_id]
@@ -808,17 +834,19 @@
}
if {$item_id ne ""} {
#my log "--D trying to delete $item_id $name"
- ::Generic::CrItem delete -item_id $item_id
-
- if {$name eq "::$folder_id"} {
- #my log "--D deleting folder object ::$folder_id"
- ns_cache flush xotcl_object_cache ::$folder_id
- ns_cache flush xotcl_object_type_cache item_id-of-$folder_id
- ns_cache flush xotcl_object_type_cache root_folder-$id
- ::$folder_id destroy
+ set object_type [::Generic::CrItem get_object_type -item_id $item_id]
+ # in case of PageTemplate and subtypes, we need to check
+ # for pages using this template
+ set classes [concat $object_type [$object_type info heritage]]
+ if {[lsearch $classes "::xowiki::PageTemplate"] > -1} {
+ set count [::xowiki::PageTemplate count_usages -item_id $item_id]
+ if {$count > 0} {
+ return [$id error_msg \
+ [_ xowiki.error-delete_entries_first [list count $count]]]
+ }
}
- set key link-*-$name-$folder_id
- foreach n [ns_cache names xowiki_cache $key] {ns_cache flush xowiki_cache $n}
+ $object_type delete -item_id $item_id
+ my flush_references -item_id $item_id -name $name
} else {
my log "--D nothing to delete!"
}
Index: openacs-4/packages/xowiki/tcl/xowiki-callback-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-callback-procs.tcl,v
diff -u -r1.21 -r1.22
--- openacs-4/packages/xowiki/tcl/xowiki-callback-procs.tcl 18 Jul 2007 11:36:28 -0000 1.21
+++ openacs-4/packages/xowiki/tcl/xowiki-callback-procs.tcl 22 Jul 2007 12:01:27 -0000 1.22
@@ -231,11 +231,44 @@
}
::xowiki::update_views
}
- if {[apm_version_names_compare $from_version_name "0.55"] == -1 &&
- [apm_version_names_compare $to_version_name "0.55"] > -1} {
- ns_log notice "-- upgrading to 0.55"
+ if {[apm_version_names_compare $from_version_name "0.56"] == -1 &&
+ [apm_version_names_compare $to_version_name "0.56"] > -1} {
+ ns_log notice "-- upgrading to 0.56"
+ db_dml add_integer_column \
+ "alter table xowiki_page_instance add column npage_template \
+ integer references cr_items(item_id)"
+ db_dml copy_old_values \
+ "update xowiki_page_instance set npage_template = page_template::integer"
+ db_dml rename_old_column \
+ "alter table xowiki_page_instance rename page_template to old_page_template"
+ db_dml rename_new_column \
+ "alter table xowiki_page_instance rename npage_template to page_template"
+ # a few releases later, drop old column
+ if {[db_0or1row in_between_version \
+ "select 1 from acs_object_types where \
+ object_type = '::xowiki::Form' and supertype = '::xowiki::Page'"]} {
+ # we have a version with a type hierarchy not compatible with the new one.
+ # this comes by updating often from head.
+ # The likelyhood to have such as version is rather low.
+ ns_log notice "Deleting incompatible version of ::xowiki::Form"
+ ::xo::db::sql::content_type drop_type -content_type ::xowiki::FormInstance \
+ -drop_children_p t -drop_table_p t -drop_objects_p t
+ ::xo::db::sql::content_type drop_type -content_type ::xowiki::Form \
+ -drop_children_p t -drop_table_p t -drop_objects_p t
+ }
::xowiki::update_views
}
+
+ if {[apm_version_names_compare $from_version_name "0.65"] == -1 &&
+ [apm_version_names_compare $to_version_name "0.65"] > -1} {
+ ns_log notice "-- upgrading to 0.65"
+ catch {
+ # for new installs, the old column might not exist
+ db_dml drop_old_column \
+ "alter table xowiki_page_instance drop column old_page_template"
+ }
+ ::xowiki::update_views
+ }
}
ad_proc fix_all_package_ids {} {
Index: openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/Attic/xowiki-portlet-procs.tcl,v
diff -u -r1.72 -r1.73
--- openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl 19 Jul 2007 21:20:12 -0000 1.72
+++ openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl 22 Jul 2007 12:01:27 -0000 1.73
@@ -2077,13 +2077,8 @@
set base [$package_id pretty_link [$__including_page name]]
set new_link [$package_id make_link -link $base $__including_page create-new return_url]
set answer_link [$package_id make_link -link $base $__including_page list return_url]
- set sql [::xowiki::FormPage instance_select_query \
- -count true \
- -with_subtypes false \
- -from_clause ", xowiki_page_instance p" \
- -where_clause " p.page_template=$form_item_id and p.page_instance_id=cr.revision_id " \
- -folder_id [$package_id folder_id]]
- set count [db_list [my qn count] $sql]
+ set template [::Generic::CrItem instantiate -item_id $form_item_id]
+ set count [$template count_usages]
set links [list]
foreach l [list new_link answer_link] {
if {[set $l] ne ""} {
@@ -2096,15 +2091,15 @@
}
#############################################################################
- Class create form-instance-menu \
+ Class create form-entry-menu \
-superclass ::xowiki::Portlet \
-parameter {
{__decoration none}
{parameter_declaration {
}}
}
- form-instance-menu instproc render {} {
+ form-entry-menu instproc render {} {
my get_parameters
my instvar __including_page
set form [$__including_page page_template]
@@ -2113,7 +2108,7 @@
}
#############################################################################
- Class create form-instances \
+ Class create form-usages \
-superclass ::xowiki::Portlet \
-parameter {
{__decoration none}
@@ -2124,7 +2119,7 @@
}}
}
- form-instances instproc render {} {
+ form-usages instproc render {} {
my get_parameters
my instvar __including_page
@@ -2138,9 +2133,10 @@
TableWidget t1 -volatile \
-columns {
+ ImageField_EditIcon edit -label "" -html {style "padding: 2px;"}
+ AnchorField name -label [_ xowiki.Page-name] -orderby name
Field last_modified -label "Modification Date" -orderby last_modified
Field creation_user -label "By User" -orderby creation_user
- AnchorField view -label "View"
ImageField_DeleteIcon delete -label ""
}
@@ -2158,18 +2154,22 @@
set p [::Generic::CrItem instantiate -item_id 0 -revision_id $revision_id]
$p destroy_on_cleanup
set page_link [$package_id pretty_link $name]
-
+ regexp {^([^.]+)[.]} $publish_date _ publish_date
+
t1 add \
- -view $name \
- -view.href $page_link \
+ -name $name \
+ -name.href $page_link \
-creation_user [::xo::get_user_name $creation_user] \
-delete.href [$package_id make_link -link $page_link $p delete return_url] \
+ -edit.href [$package_id make_link -link $page_link $p edit return_url] \
-last_modified $publish_date
}
set base [$package_id pretty_link [$__including_page name]]
set label [$__including_page name]
- append html "