Index: openacs-4/packages/tasks/lib/contacts-bulk-add-process.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/tasks/lib/contacts-bulk-add-process.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/tasks/lib/contacts-bulk-add-process.adp 13 Mar 2006 07:36:40 -0000 1.1
@@ -0,0 +1,8 @@
+
+@context@
+@title@
+add_edit.one_line
+
+
#tasks.Assign_process_to_the_following# @assignees;noquote@
+
+
Index: openacs-4/packages/tasks/lib/contacts-bulk-add-process.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/tasks/lib/contacts-bulk-add-process.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/tasks/lib/contacts-bulk-add-process.tcl 13 Mar 2006 07:36:40 -0000 1.1
@@ -0,0 +1,78 @@
+ad_page_contract {
+
+ @author Matthew Geddert (openacs@geddert.com)
+ @creation-date 2006-03-12
+ @cvs-id $Id: contacts-bulk-add-process.tcl,v 1.1 2006/03/13 07:36:40 matthewg Exp $
+
+} {
+ {party_id:integer,multiple}
+ {return_url}
+ {process_id:integer ""}
+} -validate {
+ valid_process -requires {process_id} {
+ if { $process_id ne "" } {
+ set package_id [ad_conn package_id]
+ if { ![db_0or1row process_exists {}] } {
+ ad_complain [_ tasks.Process_id_not_valid]
+ }
+ }
+ }
+}
+
+set title [_ tasks.Add_Process]
+set context [list $title]
+set package_id [ad_conn package_id]
+
+set assigneees [list]
+foreach party $party_id {
+ contact::require_visiblity -party_id $party
+ if { $process_id ne "" } {
+ lappend assignees [contact::name -party_id $party]
+ } else {
+ lappend assignees [contact::link -party_id $party]
+ }
+}
+set assignees [join $assignees ", "]
+
+if { $process_id ne "" } {
+ set process [db_string get_process_title {}]
+ ad_progress_bar_begin \
+ -title [_ tasks.Assigning_-process-] \
+ -message_1 [_ tasks.lt_Assigning_-process-_to_-assignees-] \
+
+ foreach party $party_id {
+ tasks::process::assign -object_id $party -process_id $process_id
+ }
+ ad_progress_bar_end -url ${return_url}
+}
+
+
+
+template::list::create \
+ -name processes \
+ -multirow processes \
+ -elements {
+ assign {
+ label ""
+ display_template {
+ Assign
+ }
+ }
+ title {
+ label "Title"
+ }
+ description {
+ label "Description"
+ }
+ creator_name {
+ label "Manager"
+ link_url_eval $creator_url
+ }
+ } -filters {}
+
+db_multirow -extend { creator_url assign_url} -unclobber processes processes {} {
+ set creator_url [tasks::object_url -object_id $creation_user]
+ set assign_url [export_vars -base [ad_conn url] -url {party_id:multiple process_id return_url}]
+}
+
+ad_return_template
Index: openacs-4/packages/tasks/lib/contacts-bulk-add-process.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/tasks/lib/contacts-bulk-add-process.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/tasks/lib/contacts-bulk-add-process.xql 13 Mar 2006 07:36:40 -0000 1.1
@@ -0,0 +1,45 @@
+
+
+postgresql7.2
+
+
+
+ select 1
+ from t_processes p,
+ acs_objects o
+ where p.process_id = o.object_id
+ and p.workflow_id is not null
+ and o.package_id = :package_id
+ and p.process_id = :process_id
+
+
+
+
+
+ select p.title
+ from t_processes p,
+ acs_objects o
+ where p.process_id = o.object_id
+ and p.workflow_id is not null
+ and o.package_id = :package_id
+ and p.process_id = :process_id
+
+
+
+
+
+ select p.process_id,
+ p.title,
+ o.creation_user,
+ person__name(o.creation_user) as creator_name,
+ p.description
+ from t_processes p,
+ acs_objects o
+ where p.process_id = o.object_id
+ and p.workflow_id is not null
+ and o.package_id = :package_id
+ order by lower(p.title)
+
+
+
+
Index: openacs-4/packages/tasks/lib/contacts-bulk-add-task.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/tasks/lib/contacts-bulk-add-task.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/tasks/lib/contacts-bulk-add-task.adp 13 Mar 2006 07:36:40 -0000 1.1
@@ -0,0 +1,9 @@
+
+@context@
+@title@
+add_edit.one_line
+
+
Index: openacs-4/packages/tasks/lib/contacts-bulk-add-task.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/tasks/lib/contacts-bulk-add-task.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/tasks/lib/contacts-bulk-add-task.tcl 13 Mar 2006 07:36:40 -0000 1.1
@@ -0,0 +1,18 @@
+ad_page_contract {
+
+ @author Matthew Geddert (openacs@geddert.com)
+ @creation-date 2006-03-12
+ @cvs-id $Id: contacts-bulk-add-task.tcl,v 1.1 2006/03/13 07:36:40 matthewg Exp $
+
+} {
+ {party_id:integer,multiple ""}
+ {assignee_id: ""}
+ {return_url ""}
+}
+
+foreach assignee_id $assignee_id {
+ lappend party_id $assignee_id
+}
+
+set title [_ tasks.Add_Task]
+set context [list $title]