Index: openacs-4/contrib/packages/simulation/tcl/ui-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/tcl/Attic/ui-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/contrib/packages/simulation/tcl/ui-procs.tcl 30 Jan 2004 10:29:16 -0000 1.2
+++ openacs-4/contrib/packages/simulation/tcl/ui-procs.tcl 30 Jan 2004 10:57:08 -0000 1.3
@@ -31,6 +31,34 @@
}
}
+ad_proc -public simulation::ui::forms::document_upload::documents_element_value { action_id } {
+ Get a piece of HTML with links to documents for the documents form element.
+} {
+ set documents "
"
+
+ db_foreach documents {
+ select cr.title as object_title,
+ ci.name as object_name
+ from sim_task_object_map m,
+ cr_items ci,
+ cr_revisions cr
+ where m.task_id = :action_id
+ and m.relation_tag = 'attachment'
+ and ci.item_id = m.object_id
+ and cr.revision_id = ci.live_revision
+ order by m.order_n
+ } {
+ set object_url [simulation::object::url \
+ -name $object_name]
+ append documents "- $object_title
"
+ }
+
+ append documents "
"
+
+ return $documents
+}
+
+
ad_proc -public simulation::ui::forms::document_upload::insert_document {
case_id
role_id
Index: openacs-4/contrib/packages/simulation/www/citybuild/object-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/citybuild/Attic/object-edit.adp,v
diff -u -r1.12 -r1.13
--- openacs-4/contrib/packages/simulation/www/citybuild/object-edit.adp 27 Jan 2004 15:51:37 -0000 1.12
+++ openacs-4/contrib/packages/simulation/www/citybuild/object-edit.adp 30 Jan 2004 10:57:08 -0000 1.13
@@ -4,7 +4,3 @@
object.title
-TODO: (2h) Lars, modify content field to allow uploading of non-text documents
-(word, etc), after which point content field should display as a
-hyperlink and a delete button (applies to all types)
-
Index: openacs-4/contrib/packages/simulation/www/siminst/map-characters.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/map-characters.adp,v
diff -u -r1.12 -r1.13
--- openacs-4/contrib/packages/simulation/www/siminst/map-characters.adp 22 Jan 2004 14:08:39 -0000 1.12
+++ openacs-4/contrib/packages/simulation/www/siminst/map-characters.adp 30 Jan 2004 10:57:08 -0000 1.13
@@ -1,6 +1,6 @@
- Select from existing characters or
- add new characters and refresh
+ Select from existing characters in the Yellow Pages, or
+ add new characters and refresh
this page.
Index: openacs-4/contrib/packages/simulation/www/siminst/map-tasks.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/map-tasks.adp,v
diff -u -r1.12 -r1.13
--- openacs-4/contrib/packages/simulation/www/siminst/map-tasks.adp 14 Jan 2004 10:18:10 -0000 1.12
+++ openacs-4/contrib/packages/simulation/www/siminst/map-tasks.adp 30 Jan 2004 10:57:08 -0000 1.13
@@ -1,6 +1,6 @@
- Some of the tasks of this simulation require attachments. However, there are no CityBuild properties to select from. Someone needs to create properties in CityBuild before you can start this simulation.
+ Some of the tasks of this simulation require attachments. However, there are no CityBuild props to select from.
Create props in CityBuild before you can finish setting up these tasks.
Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-participants.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-participants.tcl,v
diff -u -r1.11 -r1.12
--- openacs-4/contrib/packages/simulation/www/siminst/simulation-participants.tcl 27 Jan 2004 09:58:43 -0000 1.11
+++ openacs-4/contrib/packages/simulation/www/siminst/simulation-participants.tcl 30 Jan 2004 10:57:08 -0000 1.12
@@ -77,6 +77,7 @@
template::list::create \
-name "participants" \
-key group_id \
+ -no_data "There are no user groups set up" \
-elements {
group_name {
label "Group Name"
Index: openacs-4/contrib/packages/simulation/www/simplay/task-detail.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/task-detail.adp,v
diff -u -r1.8 -r1.9
--- openacs-4/contrib/packages/simulation/www/simplay/task-detail.adp 22 Jan 2004 15:47:23 -0000 1.8
+++ openacs-4/contrib/packages/simulation/www/simplay/task-detail.adp 30 Jan 2004 10:57:08 -0000 1.9
@@ -8,4 +8,8 @@
@action.description@
+
+@documents_pre_form;noquote@
+
+
Index: openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/task-detail.tcl,v
diff -u -r1.16 -r1.17
--- openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl 27 Jan 2004 15:30:07 -0000 1.16
+++ openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl 30 Jan 2004 10:57:08 -0000 1.17
@@ -60,23 +60,8 @@
set pretty_name $action(pretty_name)
set description [template::util::richtext::create $action(description) $action(description_mime_type)]
- set documents {}
- db_foreach documents {
- select cr.title as object_title,
- ci.name as object_name
- from sim_task_object_map m,
- cr_items ci,
- cr_revisions cr
- where m.task_id = :action_id
- and m.relation_tag = 'attachment'
- and ci.item_id = m.object_id
- and cr.revision_id = ci.live_revision
- order by m.order_n
- } {
- set object_url [simulation::object::url \
- -name $object_name]
- append documents "$object_title
"
- }
+ set documents [simulation::ui::forms::document_upload::documents_element_value $action_id]
+ set documents_pre_form ""
set recipient_list [list]
foreach recipient_id $action(recipients) {
@@ -127,6 +112,8 @@
-form [concat {{pretty_name:text(inform) {label "Task"}}} [simulation::ui::forms::document_upload::form_block]] \
-on_request {
set pretty_name $action(pretty_name)
+ set documents_pre_form [simulation::ui::forms::document_upload::documents_element_value $action_id]
+
} -on_submit {
db_transaction {
Index: openacs-4/packages/simulation/tcl/ui-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/tcl/ui-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/simulation/tcl/ui-procs.tcl 30 Jan 2004 10:29:16 -0000 1.2
+++ openacs-4/packages/simulation/tcl/ui-procs.tcl 30 Jan 2004 10:57:08 -0000 1.3
@@ -31,6 +31,34 @@
}
}
+ad_proc -public simulation::ui::forms::document_upload::documents_element_value { action_id } {
+ Get a piece of HTML with links to documents for the documents form element.
+} {
+ set documents ""
+
+ db_foreach documents {
+ select cr.title as object_title,
+ ci.name as object_name
+ from sim_task_object_map m,
+ cr_items ci,
+ cr_revisions cr
+ where m.task_id = :action_id
+ and m.relation_tag = 'attachment'
+ and ci.item_id = m.object_id
+ and cr.revision_id = ci.live_revision
+ order by m.order_n
+ } {
+ set object_url [simulation::object::url \
+ -name $object_name]
+ append documents "- $object_title
"
+ }
+
+ append documents "
"
+
+ return $documents
+}
+
+
ad_proc -public simulation::ui::forms::document_upload::insert_document {
case_id
role_id
Index: openacs-4/packages/simulation/www/citybuild/object-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/citybuild/object-edit.adp,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/simulation/www/citybuild/object-edit.adp 27 Jan 2004 15:51:37 -0000 1.12
+++ openacs-4/packages/simulation/www/citybuild/object-edit.adp 30 Jan 2004 10:57:08 -0000 1.13
@@ -4,7 +4,3 @@
object.title
-TODO: (2h) Lars, modify content field to allow uploading of non-text documents
-(word, etc), after which point content field should display as a
-hyperlink and a delete button (applies to all types)
-
Index: openacs-4/packages/simulation/www/siminst/map-characters.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/map-characters.adp,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/simulation/www/siminst/map-characters.adp 22 Jan 2004 14:08:39 -0000 1.12
+++ openacs-4/packages/simulation/www/siminst/map-characters.adp 30 Jan 2004 10:57:08 -0000 1.13
@@ -1,6 +1,6 @@
- Select from existing characters or
- add new characters and refresh
+ Select from existing characters in the Yellow Pages, or
+ add new characters and refresh
this page.
Index: openacs-4/packages/simulation/www/siminst/map-tasks.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/map-tasks.adp,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/simulation/www/siminst/map-tasks.adp 14 Jan 2004 10:18:10 -0000 1.12
+++ openacs-4/packages/simulation/www/siminst/map-tasks.adp 30 Jan 2004 10:57:08 -0000 1.13
@@ -1,6 +1,6 @@
- Some of the tasks of this simulation require attachments. However, there are no CityBuild properties to select from. Someone needs to create properties in CityBuild before you can start this simulation.
+ Some of the tasks of this simulation require attachments. However, there are no CityBuild props to select from.
Create props in CityBuild before you can finish setting up these tasks.
Index: openacs-4/packages/simulation/www/siminst/simulation-participants.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/simulation-participants.tcl,v
diff -u -r1.11 -r1.12
--- openacs-4/packages/simulation/www/siminst/simulation-participants.tcl 27 Jan 2004 09:58:43 -0000 1.11
+++ openacs-4/packages/simulation/www/siminst/simulation-participants.tcl 30 Jan 2004 10:57:08 -0000 1.12
@@ -77,6 +77,7 @@
template::list::create \
-name "participants" \
-key group_id \
+ -no_data "There are no user groups set up" \
-elements {
group_name {
label "Group Name"
Index: openacs-4/packages/simulation/www/simplay/task-detail.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/task-detail.adp,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/simulation/www/simplay/task-detail.adp 22 Jan 2004 15:47:23 -0000 1.8
+++ openacs-4/packages/simulation/www/simplay/task-detail.adp 30 Jan 2004 10:57:08 -0000 1.9
@@ -8,4 +8,8 @@
@action.description@
+
+@documents_pre_form;noquote@
+
+
Index: openacs-4/packages/simulation/www/simplay/task-detail.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/task-detail.tcl,v
diff -u -r1.16 -r1.17
--- openacs-4/packages/simulation/www/simplay/task-detail.tcl 27 Jan 2004 15:30:07 -0000 1.16
+++ openacs-4/packages/simulation/www/simplay/task-detail.tcl 30 Jan 2004 10:57:08 -0000 1.17
@@ -60,23 +60,8 @@
set pretty_name $action(pretty_name)
set description [template::util::richtext::create $action(description) $action(description_mime_type)]
- set documents {}
- db_foreach documents {
- select cr.title as object_title,
- ci.name as object_name
- from sim_task_object_map m,
- cr_items ci,
- cr_revisions cr
- where m.task_id = :action_id
- and m.relation_tag = 'attachment'
- and ci.item_id = m.object_id
- and cr.revision_id = ci.live_revision
- order by m.order_n
- } {
- set object_url [simulation::object::url \
- -name $object_name]
- append documents "$object_title
"
- }
+ set documents [simulation::ui::forms::document_upload::documents_element_value $action_id]
+ set documents_pre_form ""
set recipient_list [list]
foreach recipient_id $action(recipients) {
@@ -127,6 +112,8 @@
-form [concat {{pretty_name:text(inform) {label "Task"}}} [simulation::ui::forms::document_upload::form_block]] \
-on_request {
set pretty_name $action(pretty_name)
+ set documents_pre_form [simulation::ui::forms::document_upload::documents_element_value $action_id]
+
} -on_submit {
db_transaction {