"
- } elseif {$arg eq "left-col"} {
- return "
"
- } elseif {$arg eq "right-col"} {
- return "
"
- } elseif {$arg eq "left-col30"} {
- return "
"
- } elseif {$arg eq "right-col70"} {
- return "
"
+ } elseif {[lsearch [list \
+ left-col left-col25 left-col30 \
+ right-col right-col25 right-col30 right-col70] \
+ $arg] > -1} {
+ return "
"
} elseif {$arg eq "box"} {
return "
"
} elseif {$arg eq ""} {
@@ -698,16 +712,31 @@
next
}
- Object instproc package_info {cmd} {
- set package_info [self]::package_info
- if {![my isobject $package_info]} {::xotcl::Object create $package_info}
- if {[catch {$package_info eval $cmd} error ]} {
+ #
+ # Methods of the object Object
+ #
+
+ Object instproc get_content {} {
+ if {[[self]::payload info procs content] ne ""} {
+ return [my substitute_markup [[self]::payload content]]
+ } else {
+ return "
[my set text]" + } + } + + Object instproc initialize_loaded_object {} { + my set_payload [my set text] + } + Object instproc set_payload {cmd} { + set payload [self]::payload + if {![my isobject $payload]} {::xotcl::Object create $payload -requireNamespace} + if {[catch {$payload eval $cmd} error ]} { ns_log error "XoWiki folder object: content lead to error: $error" } } - Object instproc get_package_info {var} { - set package_info [self]::package_info - if {![my isobject $package_info]} {::xotcl::Object create $package_info} - expr {[$package_info exists $var] ? [$package_info set $var] : ""} + Object instproc get_payload {var} { + set payload [self]::payload + if {![my isobject $payload]} {::xotcl::Object create $payload -requireNamespace} + expr {[$payload exists $var] ? [$payload set $var] : ""} } } \ No newline at end of file Index: openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl 28 Jan 2006 15:58:50 -0000 1.3 +++ openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl 30 Jan 2006 02:04:51 -0000 1.4 @@ -20,18 +20,23 @@ set content [expr {[$page set object_type] eq "::xowiki::PlainPage" ? [$page set text] : [lindex [$page set text] 0]}] $page set unresolved_references 0 - $page instvar item_id + $page instvar item_id creation_user set content [ad_html_text_convert -from [$page set mime_type] -to text/plain -- $content] - - #ns_log notice "--datasource content=$content, oid=$revision_id" + if {$creation_user ne ""} { + acs_user::get -user_id $creation_user -array user + set creator "$user(first_names) $user(last_name)" + } else { + set creator "nobody" + } + #ns_log notice "--datasource revid=$revision_id, cru=$creation_user, cr=$creator" # category photos # link "${full}photo/photo_id=$item_id" return [list object_id $revision_id title [$page set title] \ content $content keywords {} \ storage_type text mime text/plain \ syndication [list link "[ad_url]/o/$item_id" \ description $content \ - author "nobody" \ + author $creator \ category "" \ guid "[ad_url]/o/$item_id" \ pubDate [$page set last_modified]] \ Index: openacs-4/packages/xowiki/www/delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/Attic/delete.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/xowiki/www/delete.tcl 30 Dec 2005 00:09:58 -0000 1.3 +++ openacs-4/packages/xowiki/www/delete.tcl 30 Jan 2006 02:04:51 -0000 1.4 @@ -8,12 +8,10 @@ @param object_type the source class providing the data source for filling the form } -query { item_id:integer + {query "."} } permission::require_write_permission -object_id $item_id - ::Generic::CrItem delete -item_id $item_id +ad_returnredirect $query -ad_returnredirect "." -# stop running this code, since we're redirecting -ad_script_abort Index: openacs-4/packages/xowiki/www/edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/Attic/edit.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/xowiki/www/edit.tcl 30 Dec 2005 00:09:58 -0000 1.3 +++ openacs-4/packages/xowiki/www/edit.tcl 30 Jan 2006 02:04:51 -0000 1.4 @@ -53,7 +53,7 @@ #ns_log notice "-- form f1 has class [::xowiki::f1 info class]" ::xowiki::f1 generate -::xowiki::f1 instvar page_title context +::xowiki::f1 instvar page_title context formTemplate if {[info exists item_id]} { set rev_link [export_vars -base revisions {{page_id $item_id} title}] Index: openacs-4/packages/xowiki/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/Attic/index.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/xowiki/www/index.tcl 28 Jan 2006 23:28:23 -0000 1.7 +++ openacs-4/packages/xowiki/www/index.tcl 30 Jan 2006 02:04:51 -0000 1.8 @@ -12,12 +12,13 @@ folder_id:optional } -set context [list] +set context [list [list admin Administration] index] set supertype ::xowiki::Page +set query .?[ns_conn query] if {![info exists folder_id] && ![info exists object_type]} { set folder_id [$supertype require_folder -name xowiki] - set index_page [$folder_id get_package_info index_page] + set index_page [$folder_id get_payload index_page] if {$index_page ne ""} { set item_id [Generic::CrItem lookup -title $index_page -parent_id $folder_id] if {$item_id != 0} { @@ -86,7 +87,7 @@ -object_type $object_type \ -title.href [export_vars -base pages/[ad_urlencode $title] {}] \ -edit.href [export_vars -base edit {item_id}] \ - -delete.href [export_vars -base delete {item_id}] + -delete.href [export_vars -base delete {item_id query}] } set t1 [t1 asHTML] \ No newline at end of file Index: openacs-4/packages/xowiki/www/view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/Attic/view.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/xowiki/www/view.adp 28 Jan 2006 01:31:26 -0000 1.4 +++ openacs-4/packages/xowiki/www/view.adp 30 Jan 2006 02:04:51 -0000 1.5 @@ -68,8 +68,10 @@ img.undefined {border: 10; color: yellow; height: 12px} #left-col {float: left; width: 40%; relative: absolute; top: 0px;} #right-col {float: right; width: 59%; relative: absolute; top: 0px;} -#left-col30 {float: left; width: 30%; relative: absolute; top: 0px;} +#left-col30 {float: left; width: 30%; relative: absolute; top: 0px; margin-right: 10px;} +#left-col25 {float: left; width: 25%; relative: absolute; top: 0px; margin-right: 10px;} #right-col70 {float: right; width: 69%; relative: absolute; top: 0px;} +#right-col25 {float: right; width: 25%; relative: absolute; top: 0px;}
Index: openacs-4/packages/xowiki/www/admin/delete-type.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/delete-type.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/xowiki/www/admin/delete-type.tcl 30 Dec 2005 00:09:58 -0000 1.3
+++ openacs-4/packages/xowiki/www/admin/delete-type.tcl 30 Jan 2006 02:04:51 -0000 1.4
@@ -7,6 +7,7 @@
@param object_type the class name of an instance of CrClass
} -query {
object_type
+ {query "."}
}
db_foreach retrieve_instances [$object_type instance_select_query] {
@@ -18,4 +19,4 @@
$type drop_object_type
}
-ad_returnredirect "."
+ad_returnredirect $query
Index: openacs-4/packages/xowiki/www/admin/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/index.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/xowiki/www/admin/index.tcl 28 Jan 2006 23:28:23 -0000 1.5
+++ openacs-4/packages/xowiki/www/admin/index.tcl 30 Jan 2006 02:04:51 -0000 1.6
@@ -16,6 +16,7 @@
set folder_id [$supertype require_folder -name xowiki]
set object_types [$supertype object_types]
+
TableWidget t1 -volatile \
-actions {
Action new -label export -url export
Index: openacs-4/packages/xowiki/www/pages/index.vuh
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/pages/Attic/index.vuh,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/xowiki/www/pages/index.vuh 28 Jan 2006 23:28:23 -0000 1.4
+++ openacs-4/packages/xowiki/www/pages/index.vuh 30 Jan 2006 02:04:51 -0000 1.5
@@ -22,11 +22,13 @@
set path [ad_conn path_info]
#ns_log notice "-- path=<$path>"
if {$path ne ""} {
- if {![regexp {^..:} $path]} {
- set path [string range [lang::conn::locale] 0 1]:$path
+ set item_id [::Generic::CrItem lookup -title $path -parent_id $folder_id]
+ if {$item_id == 0} {
+ if {![regexp {^..:} $path]} {
+ set path [string range [lang::conn::locale] 0 1]:$path
+ set item_id [::Generic::CrItem lookup -title $path -parent_id $folder_id]
+ }
}
- set item_id [::Generic::CrItem lookup \
- -title $path -parent_id $folder_id]
#ns_log notice "-- path=<$path> item_id=$item_id"
if {$item_id != 0} {
rp_form_put item_id $item_id
Index: openacs-4/packages/xowiki/www/portlets/wiki.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlets/Attic/wiki.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/xowiki/www/portlets/wiki.tcl 14 Dec 2005 16:13:37 -0000 1.1
+++ openacs-4/packages/xowiki/www/portlets/wiki.tcl 30 Jan 2006 02:04:51 -0000 1.2
@@ -7,10 +7,12 @@
if {[::xowiki::Page incr recursion_count]<3} {
set content [$page render]
- set link [export_vars -base view {item_id}]
+ set link [ad_urlencode $name]
ns_log notice "RECURSION_COUNT = [::xowiki::Page set recursion_count]"
} else {
set content "Recursion Limit exceeded, items are nested to deep!"
}
::xowiki::Page incr recursion_count -1
+#strip language prefix for title
+regexp {^..:(.*)$} $name _ name
\ No newline at end of file