Index: openacs-4/packages/recruiting/dotlrn-recruiting.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting/Attic/dotlrn-recruiting.info,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/recruiting/dotlrn-recruiting.info 30 Jul 2002 22:39:29 -0000 1.2 +++ openacs-4/packages/recruiting/dotlrn-recruiting.info 1 Aug 2002 00:45:49 -0000 1.3 @@ -24,10 +24,20 @@ + + + + + + + + + + @@ -51,6 +61,13 @@ + + + + + + + Index: openacs-4/packages/recruiting/tcl/dotlrn-recruiting-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting/tcl/dotlrn-recruiting-procs-postgresql.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/recruiting/tcl/dotlrn-recruiting-procs-postgresql.xql 31 Jul 2002 23:53:37 -0000 1.3 +++ openacs-4/packages/recruiting/tcl/dotlrn-recruiting-procs-postgresql.xql 1 Aug 2002 00:45:49 -0000 1.4 @@ -112,6 +112,24 @@ + + + update recruiting_candidates + set first_name = :first_name, + last_name = :last_name, + address1 = :address1, + address2 = :address2, + city = :city, + state = :state, + zip = :zip, + zip_plus_four = :zip_plus_four, + country = :country, + email = :email, + status = :status + where candidate_id = :candidate_id + + + delete from recruiting_ratings Index: openacs-4/packages/recruiting/tcl/dotlrn-recruiting-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting/tcl/dotlrn-recruiting-procs.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/recruiting/tcl/dotlrn-recruiting-procs.tcl 31 Jul 2002 23:53:37 -0000 1.4 +++ openacs-4/packages/recruiting/tcl/dotlrn-recruiting-procs.tcl 1 Aug 2002 00:45:49 -0000 1.5 @@ -243,6 +243,27 @@ return [array get recruiting_candidate] } + + ad_proc -public update_candidate { + {-candidate_id:required} + {-first_name:required} + {-last_name:required} + {-address1:required} + {-address2:required} + {-city:required} + {-state:required} + {-zip:required} + {-zip_plus_four:required} + {-country:required} + {-email:required} + {-status:required} + {-package_id:required} + } { + update a candidate + } { + db_dml update_candidate {} + } + } namespace eval recruiting_interview { Index: openacs-4/packages/recruiting/www/admin/change-candidate-status.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting/www/admin/change-candidate-status.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/recruiting/www/admin/change-candidate-status.adp 1 Aug 2002 00:45:49 -0000 1.1 @@ -0,0 +1,10 @@ + + + +@context_bar@ + + Index: openacs-4/packages/recruiting/www/admin/change-candidate-status.adp~ =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting/www/admin/Attic/change-candidate-status.adp~,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/recruiting/www/admin/change-candidate-status.adp~ 1 Aug 2002 00:45:49 -0000 1.1 @@ -0,0 +1,10 @@ + + + +@context_bar@ + + Index: openacs-4/packages/recruiting/www/admin/change-candidate-status.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting/www/admin/change-candidate-status.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/recruiting/www/admin/change-candidate-status.tcl 1 Aug 2002 00:45:49 -0000 1.1 @@ -0,0 +1,54 @@ +ad_page_contract { + recruiting admin interface + change a candidate's status + + @author chak (chak@openforce.net) + @creation-date 2002-07-30 + @version $Id: change-candidate-status.tcl,v 1.1 2002/08/01 00:45:49 chak Exp $ +} { + candidate_id +} + +set package_id [ad_conn package_id] +set user_id [ad_verify_and_get_user_id] + +array set info [recruiting_candidate::get -candidate_id $candidate_id] + +form create change_status +element create change_status status \ + -label "Change status type for $info(first_name) $info(last_name) (help):" \ + -datatype integer \ + -widget select \ + -options [db_list_of_lists get_status_types "select short_desc,status_type_id from recruiting_status_types where enabled_p='t' order by short_desc"] \ + -value $info(status) + +element create change_status candidate_id \ + -widget hidden \ + -value $candidate_id + +if {[form is_valid change_status]} { + form get_values change_status \ + status + + recruiting_candidate::update_candidate \ + -candidate_id $info(candidate_id) \ + -first_name $info(first_name) \ + -last_name $info(last_name) \ + -address1 $info(address1) \ + -address2 $info(address2) \ + -city $info(city) \ + -state $info(state) \ + -zip $info(zip) \ + -zip_plus_four $info(zip_plus_four) \ + -country $info(country) \ + -email $info(email) \ + -status $status \ + -package_id $package_id + + ad_returnredirect view-one-candidate?[export_vars candidate_id] + ad_script_abort +} + +set context_bar [list [list "../" "Recruiting"] [list "index" "Admin"] [list "list-candidates" "Candidates"] [list "view-one-candidate?[export_vars candidate_id]"] "Change Status"] + +ad_return_template Index: openacs-4/packages/recruiting/www/admin/change-candidate-status.tcl~ =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting/www/admin/Attic/change-candidate-status.tcl~,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/recruiting/www/admin/change-candidate-status.tcl~ 1 Aug 2002 00:45:49 -0000 1.1 @@ -0,0 +1,49 @@ +ad_page_contract { + recruiting admin interface + change a candidate's status + + @author chak (chak@openforce.net) + @creation-date 2002-07-30 + @version $Id: change-candidate-status.tcl~,v 1.1 2002/08/01 00:45:49 chak Exp $ +} { + candidate_id +} + +set package_id [ad_conn package_id] +set user_id [ad_verify_and_get_user_id] + +array set info [recruiting_candidate::get -candidate_id $candidate_id] + +form create change_status +element create edit_candidate status \ + -label "Change status type for $info(first_name) $info(last_name) (help):" \ + -datatype integer \ + -widget select \ + -options [db_list_of_lists get_status_types "select short_desc,status_type_id from recruiting_status_types where enabled_p='t' order by short_desc"] \ + -value $info(status) + +if {[form is_valid change_status]} { + form get_values edit_candidate \ + status + + recruiting_candidate::update_candidate \ + -candidate_id $info(candidate_id) \ + -first_name $info(first_name) \ + -last_name $info(last_name) \ + -address1 $info(address1) \ + -address2 $info(address2) \ + -city $info(city) \ + -state $info(state) \ + -zip $info(zip) \ + -zip_plus_four $info(zip_plus_four) \ + -country $info(country) \ + -email $info(email) \ + -status $status + + ad_returnredirect list-candidates + ad_script_abort +} + +set context_bar [list [list "../" "Recruiting"] [list "index" "Admin"] [list "list-candidates" "Candidates"] [list "view-one-candidate?[export_vars candidate_id]"] "Change Status"] + +ad_return_template Index: openacs-4/packages/recruiting/www/admin/edit-candidate.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting/www/admin/edit-candidate.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/recruiting/www/admin/edit-candidate.adp 1 Aug 2002 00:45:49 -0000 1.1 @@ -0,0 +1,10 @@ + + + +@context_bar@ + + Index: openacs-4/packages/recruiting/www/admin/edit-candidate.adp~ =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting/www/admin/Attic/edit-candidate.adp~,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/recruiting/www/admin/edit-candidate.adp~ 1 Aug 2002 00:45:49 -0000 1.1 @@ -0,0 +1,15 @@ + + + +@context_bar@ + + + + + + There are no candidate status types defined. You must define a status type before creating candidates. + Index: openacs-4/packages/recruiting/www/admin/edit-candidate.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting/www/admin/edit-candidate.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/recruiting/www/admin/edit-candidate.tcl 1 Aug 2002 00:45:49 -0000 1.1 @@ -0,0 +1,133 @@ +ad_page_contract { + recruiting admin interface + new candidate page + + @author chak (chak@openforce.net) + @creation-date 2002-07-30 + @version $Id: edit-candidate.tcl,v 1.1 2002/08/01 00:45:49 chak Exp $ +} { + candidate_id +} + +set package_id [ad_conn package_id] +set user_id [ad_verify_and_get_user_id] + +# check if there are status types defined. if not, +# don't let any candidates be created (what would their +# status type be)? + +array set info [recruiting_candidate::get -candidate_id $candidate_id] + +form create edit_candidate +element create edit_candidate first_name \ + -label "First Name:" \ + -datatype text \ + -widget text \ + -html {size 30} \ + -value $info(first_name) + +element create edit_candidate last_name \ + -label "Last Name:" \ + -datatype text \ + -widget text \ + -html {size 30} \ + -value $info(last_name) + +element create edit_candidate address1 \ + -label "Address 1:" \ + -datatype text \ + -widget text \ + -html {size 30} \ + -value $info(address1) + +element create edit_candidate address2 \ + -label "Address 2:" \ + -datatype text \ + -widget text \ + -html {size 30} \ + -optional \ + -value $info(address2) + +element create edit_candidate city \ + -label "City:" \ + -datatype text \ + -widget text \ + -html {size 30} \ + -value $info(city) + +element create edit_candidate state \ + -label "State:" \ + -datatype text \ + -widget text \ + -html {size 2} \ + -value $info(state) + +element create edit_candidate zip \ + -label "Zip:" \ + -datatype text \ + -widget text \ + -html {size 5} \ + -optional \ + -value $info(zip) + +element create edit_candidate zip_plus_four \ + -label {Zip Plus 4:} \ + -datatype text \ + -widget text \ + -html {size 4} \ + -optional \ + -value $info(zip_plus_four) + +element create edit_candidate country \ + -label "Country:" \ + -datatype text \ + -widget text \ + -html {size 30} \ + -value $info(country) + +element create edit_candidate email \ + -label "Email:" \ + -datatype text \ + -widget text \ + -html {size 30} \ + -value $info(email) + +element create edit_candidate status \ + -label "Status (help):" \ + -datatype integer \ + -widget select \ + -options [db_list_of_lists get_status_types "select short_desc,status_type_id from recruiting_status_types where enabled_p='t' order by short_desc"] \ + -value $info(status) + +element create edit_candidate candidate_id \ + -widget hidden \ + -value $candidate_id + +if {[form is_valid edit_candidate]} { + form get_values edit_candidate \ + first_name last_name \ + address1 address2 city state zip zip_plus_four country \ + email status + + recruiting_candidate::update_candidate \ + -candidate_id $candidate_id \ + -first_name $first_name \ + -last_name $last_name \ + -address1 $address1 \ + -address2 $address2 \ + -city $city \ + -state $state \ + -zip $zip \ + -zip_plus_four $zip_plus_four \ + -country $country \ + -email $email \ + -status $status \ + -package_id $package_id + + ad_returnredirect list-candidates + ad_script_abort +} + +set context_bar [list [list "../" "Recruiting"] [list "index" "Admin"] [list "list-candidates" "Candidates"] "Edit Candidate"] + +ad_return_template Index: openacs-4/packages/recruiting/www/admin/edit-candidate.tcl~ =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting/www/admin/Attic/edit-candidate.tcl~,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/recruiting/www/admin/edit-candidate.tcl~ 1 Aug 2002 00:45:49 -0000 1.1 @@ -0,0 +1,114 @@ +ad_page_contract { + recruiting admin interface + new candidate page + + @author chak (chak@openforce.net) + @creation-date 2002-07-30 + @version $Id: edit-candidate.tcl~,v 1.1 2002/08/01 00:45:49 chak Exp $ +} + +set package_id [ad_conn package_id] +set user_id [ad_verify_and_get_user_id] + +# check if there are status types defined. if not, +# don't let any candidates be created (what would their +# status type be)? + +set status_type_count [db_string get_status_type_count {}] + +form create new_candidate +element create new_candidate first_name \ + -label "First Name:" \ + -datatype text \ + -widget text \ + -html {size 30} + +element create new_candidate last_name \ + -label "Last Name:" \ + -datatype text \ + -widget text \ + -html {size 30} + +element create new_candidate address1 \ + -label "Address 1:" \ + -datatype text \ + -widget text \ + -html {size 30} + +element create new_candidate address2 \ + -label "Address 2:" \ + -datatype text \ + -widget text \ + -html {size 30} \ + -optional + +element create new_candidate city \ + -label "City:" \ + -datatype text \ + -widget text \ + -html {size 30} + +element create new_candidate state \ + -label "State:" \ + -datatype text \ + -widget text \ + -html {size 2} + +element create new_candidate zip \ + -label "Zip:" \ + -datatype text \ + -widget text \ + -html {size 5} \ + -optional + +element create new_candidate zip_plus_four \ + -label {Zip Plus 4:} \ + -datatype text \ + -widget text \ + -html {size 4} \ + -optional + +element create new_candidate country \ + -label "Country:" \ + -datatype text \ + -widget text \ + -html {size 30} + +element create new_candidate email \ + -label "Email:" \ + -datatype text \ + -widget text \ + -html {size 30} + +element create new_candidate status \ + -label "Status (help):" \ + -datatype integer \ + -widget select \ + -options [db_list_of_lists get_status_types "select short_desc,status_type_id from recruiting_status_types where enabled_p='t' order by short_desc"] + +if {[form is_valid new_candidate]} { + form get_values new_candidate \ + first_name last_name \ + address1 address2 city state zip zip_plus_four country \ + email status + + recruiting_candidate::new \ + -first_name $first_name \ + -last_name $last_name \ + -address1 $address1 \ + -address2 $address2 \ + -city $city \ + -state $state \ + -zip $zip \ + -zip_plus_four $zip_plus_four \ + -country $country \ + -email $email \ + -status $status + + ad_returnredirect list-candidates + ad_script_abort +} + +set context_bar [list [list "../" "Recruiting"] [list "index" "Admin"] [list "list-candidates" "Candidates"] "New Candidate"] + +ad_return_template Index: openacs-4/packages/recruiting/www/admin/list-criteria.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting/www/admin/list-criteria.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/recruiting/www/admin/list-criteria.tcl 31 Jul 2002 23:54:00 -0000 1.2 +++ openacs-4/packages/recruiting/www/admin/list-criteria.tcl 1 Aug 2002 00:45:49 -0000 1.3 @@ -14,12 +14,16 @@ table::setTitle enabled "Candidate Criteria" db_foreach get_enabled_criteria_types {} { table::addUnsortedRow enabled [list "$criteria_name" "(edit) (disable)"] +} if_no_rows { + table::addUnsortedRow enabled [list "There is no criteria defined yet. (Add Criteria)"] } + table::setTitle disabled "Disabled Criteria" db_foreach get_disabled_criteria_types {} { table::addUnsortedRow disabled [list "$criteria_name" "(enable)"] - +} if_no_rows { + table::addUnsortedRow disabled [list "There are no disabled criteria"] } table::setTitle options "Options" Index: openacs-4/packages/recruiting/www/admin/view-one-candidate.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/recruiting/www/admin/view-one-candidate.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/recruiting/www/admin/view-one-candidate.tcl 31 Jul 2002 23:54:00 -0000 1.1 +++ openacs-4/packages/recruiting/www/admin/view-one-candidate.tcl 1 Aug 2002 00:45:49 -0000 1.2 @@ -45,7 +45,7 @@ } table::setTitle options "Options" -table::addUnsortedRow options [list "Edit Information"] +table::addUnsortedRow options [list "Edit Information"] table::addUnsortedRow options [list "Change Status"] table::addUnsortedRow options [list "Assign Interview"]