Index: openacs-4/contrib/packages/project-manager/tcl/process-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/process-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/project-manager/tcl/process-procs.tcl 25 Jun 2004 00:04:42 -0000 1.1 +++ openacs-4/contrib/packages/project-manager/tcl/process-procs.tcl 26 Jun 2004 00:03:37 -0000 1.2 @@ -12,6 +12,40 @@ namespace eval pm::process {} +ad_proc -public pm::process::delete { + {-process_id:required} +} { + Deletes a process and all process tasks + + @author Jade Rubick (jader@bread.com) + @creation-date 2004-06-25 + + @param process_id + + @return + + @error +} { + + db_transaction { + db_dml delete_tasks { + DELETE FROM + pm_process_task + WHERE + process_id = :process_id + } + + db_dml delete_process { + DELETE FROM + pm_process + WHERE + process_id = :process_id + } + } + +} + + ad_proc -public pm::process::remove_assignees { {-process_task_id:required} } { Index: openacs-4/contrib/packages/project-manager/www/process-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-delete.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/project-manager/www/process-delete.adp 26 Jun 2004 00:03:37 -0000 1.1 @@ -0,0 +1,16 @@ + + @title@ + @context@ + +

+ Are you sure you want to delete this process: @one_line@ + +

+ @description@ +
+ +

+ Delete +     + Cancel, do not delete +

Index: openacs-4/contrib/packages/project-manager/www/process-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-delete.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/project-manager/www/process-delete.tcl 26 Jun 2004 00:03:37 -0000 1.1 @@ -0,0 +1,41 @@ +# + +ad_page_contract { + + Delete a process + + @author Jade Rubick (jader@bread.com) + @creation-date 2004-06-25 + @arch-tag: e4153029-2cda-462d-b429-8f2b24999580 + @cvs-id $Id: process-delete.tcl,v 1.1 2004/06/26 00:03:37 jader Exp $ +} { + process_id:integer + {confirm_p:boolean 0} + {return_url "processes"} +} -properties { +} -validate { +} -errors { +} + +set package_id [ad_conn package_id] + + +if {[string is false $confirm_p]} { + + db_1row get_name "select one_line, description from pm_process where process_id = :process_id" + + set title "Delete process: $one_line" + set context [list "Delete: $one_line"] + + set yes_url "process-delete?[export_vars {process_id {confirm_p 1} return_url}]" + set no_url $return_url + + return +} + + +permission::require_permission -object_id $package_id -privilege delete + +pm::process::delete -process_id $process_id + +ad_returnredirect -message "Process deleted" $return_url Index: openacs-4/contrib/packages/project-manager/www/processes-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/processes-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/project-manager/www/processes-postgresql.xql 25 Jun 2004 00:04:43 -0000 1.2 +++ openacs-4/contrib/packages/project-manager/www/processes-postgresql.xql 26 Jun 2004 00:03:37 -0000 1.3 @@ -9,7 +9,7 @@ p.one_line, p.description, p.party_id, - to_char(p.creation_date,'Mon DD ''YY') as creation_date + to_char(p.creation_date,'YYYY-MM-DD') as creation_date_ansi FROM pm_process p ORDER BY Index: openacs-4/contrib/packages/project-manager/www/processes.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/processes.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/contrib/packages/project-manager/www/processes.tcl 27 Apr 2004 00:49:29 -0000 1.8 +++ openacs-4/contrib/packages/project-manager/www/processes.tcl 26 Jun 2004 00:03:37 -0000 1.9 @@ -76,6 +76,12 @@ creation_date { label "Created" } + delete { + link_url_col delete_url + display_template { + + } + } } \ -main_class { narrow @@ -96,9 +102,10 @@ } -db_multirow -extend { item_url } processes process_query { +db_multirow -extend { delete_url creation_date } processes process_query { } { - + set delete_url [export_vars -base "process-delete" {process_id}] + set creation_date [lc_time_fmt $creation_date_ansi "%x"] }