Index: openacs-4/contrib/packages/simulation/lib/messages.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/lib/Attic/messages.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/contrib/packages/simulation/lib/messages.tcl 19 Dec 2003 14:52:21 -0000 1.3
+++ openacs-4/contrib/packages/simulation/lib/messages.tcl 5 Jan 2004 10:58:30 -0000 1.4
@@ -8,13 +8,17 @@
user_id {
default_value ""
}
+ case_id {
+ required_p 0
+ }
}
set package_id [ad_conn package_id]
set elements {
- case_name {
+ case_label {
label "Case"
+ hide_p {[ad_decode [exists_and_not_null case_id] 1 1 0]}
}
from {
label "From"
@@ -24,11 +28,12 @@
message_url
label "Subject"
}
- date {
- label "Date"
+ creation_date_pretty {
+ label "Received"
}
attachment_count {
label "Attachments"
+ html { align center }
}
}
@@ -39,11 +44,11 @@
-elements $elements
# TODO: make case_name be a combo of simulation name and case #
-db_multirow -extend { message_url } messages select_messages "
+db_multirow -extend { message_url creation_date_pretty } messages select_messages "
select distinct sm.message_id,
sm.title as subject,
- sm.case_id as case_name,
- creation_date as date,
+ sc.label as case_label,
+ to_char(creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date_ansi,
(select p.first_names || ' ' || p.last_name
from persons p
where p.person_id = creation_user) as from,
@@ -53,10 +58,16 @@
and relation_tag = 'attachment') as attachment_count
from sim_messagesx sm,
workflow_case_role_party_map wcrmp,
- party_approved_member_map pamm
+ party_approved_member_map pamm,
+ workflow_cases wc,
+ sim_cases sc
where pamm.member_id = :user_id
and wcrmp.party_id = pamm.party_id
and wcrmp.case_id = sm.case_id
+ and wc.case_id = sm.case_id
+ and sc.sim_case_id = wc.object_id
+ [ad_decode [exists_and_not_null case_id] 1 "and sm.case_id = :case_id" ""]
" {
- set message_url [export_vars -base "[apm_package_url_from_id $package_id]simplay/message" { message_id }]
+ set message_url [export_vars -base "[apm_package_url_from_id $package_id]simplay/message" { message_id case_id }]
+ set creation_date_pretty [lc_time_fmt $creation_date_ansi "%x %X"]
}
Index: openacs-4/contrib/packages/simulation/lib/tasks.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/lib/Attic/tasks.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/contrib/packages/simulation/lib/tasks.tcl 19 Dec 2003 14:35:16 -0000 1.4
+++ openacs-4/contrib/packages/simulation/lib/tasks.tcl 5 Jan 2004 10:58:30 -0000 1.5
@@ -29,6 +29,7 @@
}
case_label {
label "Case"
+ hide_p {[ad_decode [exists_and_not_null case_id] 1 1 0]}
}
}
Index: openacs-4/contrib/packages/simulation/www/simplay/case.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/case.adp,v
diff -u -r1.5 -r1.6
--- openacs-4/contrib/packages/simulation/www/simplay/case.adp 19 Dec 2003 14:48:30 -0000 1.5
+++ openacs-4/contrib/packages/simulation/www/simplay/case.adp 5 Jan 2004 10:58:30 -0000 1.6
@@ -3,12 +3,15 @@
@context;noquote@
Tasks
+
Messages
+
Portfolio
+
Index: openacs-4/contrib/packages/simulation/www/simplay/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/index.adp,v
diff -u -r1.11 -r1.12
--- openacs-4/contrib/packages/simulation/www/simplay/index.adp 19 Dec 2003 14:22:53 -0000 1.11
+++ openacs-4/contrib/packages/simulation/www/simplay/index.adp 5 Jan 2004 10:58:30 -0000 1.12
@@ -2,12 +2,14 @@
@title;noquote@
@context;noquote@
-Show list of cases and make user pick one before proceeding. However, if there is only one valid case, use it.
+
+ Show list of cases and make user pick one before proceeding. However, if there is only one valid case, use it.
+
-
+
All Messages
Index: openacs-4/packages/simulation/lib/messages.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/lib/messages.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/simulation/lib/messages.tcl 19 Dec 2003 14:52:21 -0000 1.3
+++ openacs-4/packages/simulation/lib/messages.tcl 5 Jan 2004 10:58:30 -0000 1.4
@@ -8,13 +8,17 @@
user_id {
default_value ""
}
+ case_id {
+ required_p 0
+ }
}
set package_id [ad_conn package_id]
set elements {
- case_name {
+ case_label {
label "Case"
+ hide_p {[ad_decode [exists_and_not_null case_id] 1 1 0]}
}
from {
label "From"
@@ -24,11 +28,12 @@
message_url
label "Subject"
}
- date {
- label "Date"
+ creation_date_pretty {
+ label "Received"
}
attachment_count {
label "Attachments"
+ html { align center }
}
}
@@ -39,11 +44,11 @@
-elements $elements
# TODO: make case_name be a combo of simulation name and case #
-db_multirow -extend { message_url } messages select_messages "
+db_multirow -extend { message_url creation_date_pretty } messages select_messages "
select distinct sm.message_id,
sm.title as subject,
- sm.case_id as case_name,
- creation_date as date,
+ sc.label as case_label,
+ to_char(creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date_ansi,
(select p.first_names || ' ' || p.last_name
from persons p
where p.person_id = creation_user) as from,
@@ -53,10 +58,16 @@
and relation_tag = 'attachment') as attachment_count
from sim_messagesx sm,
workflow_case_role_party_map wcrmp,
- party_approved_member_map pamm
+ party_approved_member_map pamm,
+ workflow_cases wc,
+ sim_cases sc
where pamm.member_id = :user_id
and wcrmp.party_id = pamm.party_id
and wcrmp.case_id = sm.case_id
+ and wc.case_id = sm.case_id
+ and sc.sim_case_id = wc.object_id
+ [ad_decode [exists_and_not_null case_id] 1 "and sm.case_id = :case_id" ""]
" {
- set message_url [export_vars -base "[apm_package_url_from_id $package_id]simplay/message" { message_id }]
+ set message_url [export_vars -base "[apm_package_url_from_id $package_id]simplay/message" { message_id case_id }]
+ set creation_date_pretty [lc_time_fmt $creation_date_ansi "%x %X"]
}
Index: openacs-4/packages/simulation/lib/tasks.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/lib/tasks.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/simulation/lib/tasks.tcl 19 Dec 2003 14:35:16 -0000 1.4
+++ openacs-4/packages/simulation/lib/tasks.tcl 5 Jan 2004 10:58:30 -0000 1.5
@@ -29,6 +29,7 @@
}
case_label {
label "Case"
+ hide_p {[ad_decode [exists_and_not_null case_id] 1 1 0]}
}
}
Index: openacs-4/packages/simulation/www/simplay/case.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/case.adp,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/simulation/www/simplay/case.adp 19 Dec 2003 14:48:30 -0000 1.5
+++ openacs-4/packages/simulation/www/simplay/case.adp 5 Jan 2004 10:58:30 -0000 1.6
@@ -3,12 +3,15 @@
@context;noquote@
Tasks
+
Messages
+
Portfolio
+
Index: openacs-4/packages/simulation/www/simplay/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/index.adp,v
diff -u -r1.11 -r1.12
--- openacs-4/packages/simulation/www/simplay/index.adp 19 Dec 2003 14:22:53 -0000 1.11
+++ openacs-4/packages/simulation/www/simplay/index.adp 5 Jan 2004 10:58:30 -0000 1.12
@@ -2,12 +2,14 @@
@title;noquote@
@context;noquote@
-Show list of cases and make user pick one before proceeding. However, if there is only one valid case, use it.
+
+ Show list of cases and make user pick one before proceeding. However, if there is only one valid case, use it.
+
-
+
All Messages