Index: openacs-4/packages/tlf-survey/tcl/tlf-survey-context-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/tlf-survey/tcl/tlf-survey-context-procs.tcl,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/tlf-survey/tcl/tlf-survey-context-procs.tcl 15 Mar 2023 13:09:02 -0000 1.1.2.1
+++ openacs-4/packages/tlf-survey/tcl/tlf-survey-context-procs.tcl 5 Jul 2023 09:12:44 -0000 1.1.2.2
@@ -38,23 +38,26 @@
}
}
lappend l "position"
- foreach fn [concat [list name last_modified creation_date duration] $l] {
+ foreach fn [concat [list name last_modified creation_date duration state] $l] {
append cols "
$fn | "
}
set tablecontent ""
::xo::dc foreach keys {
select ci.name,
to_char(o.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified,
to_char(o.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date,
+ state,
bt.instance_attributes as ia
from xowiki_page_instance bt,
cr_items ci,
- acs_objects o
+ acs_objects o,
+ xowiki_form_page x
where ci.parent_id = :parent
- and page_template = :wf_item
- and o.package_id = :pkg
- and ci.live_revision = bt.page_instance_id
- and o.object_id = ci.item_id
+ and bt.page_template = :wf_item
+ and o.package_id = :pkg
+ and ci.live_revision = bt.page_instance_id
+ and o.object_id = ci.item_id
+ and x.xowiki_form_page_id = ci.live_revision
order by o.creation_date desc
} {
set duration [expr {[clock scan $last_modified] - [clock scan $creation_date]}]
@@ -64,6 +67,7 @@
$last_modified |
$creation_date |
$duration |
+ $state |
}]
foreach col $l {
set cnt [expr {[dict exists $ia $col] ? [dict get $ia $col] : ""}]
@@ -111,9 +115,13 @@
lappend new_colheaders \
[expr {[dict exists $labels $key] ? [dict get $labels $key] : $key}]
}
- append csv [::csv::join [concat [list name last_modified username duration] $new_colheaders position] ";"]\n
+ append csv [::csv::join \
+ [concat [list name last_modified username duration state]\
+ $new_colheaders position] ";"]\n
} else {
- append csv [::csv::join [concat [list name last_modified username duration] $l position] ";"]\n
+ append csv [::csv::join \
+ [concat [list name last_modified username duration state]\
+ $l position] ";"]\n
}
lappend l position
::xo::dc foreach get_tablecontent {
@@ -122,6 +130,7 @@
to_char((select creation_date from acs_objects where object_id = bt.item_id),
'YYYY-MM-DD HH24:MI:SS') as creation_date,
instance_attributes as ia,
+ state,
(select username from users
where user_id = bt.creation_user) as username
from xowiki_form_pagei bt,
@@ -138,7 +147,8 @@
$name \
$last_modified \
$username \
- $duration]
+ $duration \
+ $state]
foreach col $l {
set cnt [expr {[dict exists $ia $col] ? [dict get $ia $col] : ""}]
lappend tablecontent $cnt
@@ -266,7 +276,7 @@
});
}]
return [:www-view "[template::multirow size tbl_members] [_ tlf-survey.Members]
-
[template::list::render -name tbl_members] $table "]
+
$table
[template::list::render -name tbl_members] "]
}
:proc www-preview_popup {} {