Index: openacs-4/packages/acs-admin/www/apm/version-callback-add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-callback-add-edit.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-admin/www/apm/version-callback-add-edit.tcl 29 Jan 2003 15:53:23 -0000 1.1
+++ openacs-4/packages/acs-admin/www/apm/version-callback-add-edit.tcl 31 Jan 2003 13:12:48 -0000 1.2
@@ -12,11 +12,8 @@
db_1row package_version_info "select pretty_name, version_name from apm_package_version_info where version_id = :version_id"
-set page_title "Add Tcl Callback for $pretty_name $version_name"
-set context_bar [ad_context_bar $page_title]
-set return_url "version-callbacks?version_id=$version_id"
+set return_url "version-callbacks?[export_vars { version_id }]"
-
# Set default values for type and proc name
if { [empty_string_p $type] } {
# We are in add mode
@@ -28,14 +25,18 @@
}
set type_value [lindex $type_options 0]
set proc_value ""
+ set page_title "Add Tcl Callback"
} else {
# We are in edit mode
set edit_mode_p 1
- set type_options ""
+ set type_options [list [list $type $type]]
set type_value $type
set proc_value [apm_get_callback_proc -type $type -version_id $version_id]
+ set page_title "Edit Tcl Callback"
}
+set context_bar [ad_context_bar [list "version-view?[export_vars { version_id }]" "$pretty_name $version_name"] [list $return_url "Tcl Callbacks"] $page_title]
+
set type_label "Tcl procedure name"
ad_form -name callback -cancel_url $return_url -form {
{version_id:integer(hidden)
@@ -76,8 +77,7 @@
}
if { $edit_mode_p } {
- element set_properties callback type -value $type_value -widget hidden
- element create callback type_inform -widget inform -value $type -label $type_label
+ element set_properties callback type -mode display
}
ad_return_template
Index: openacs-4/packages/acs-admin/www/apm/version-callbacks.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-callbacks.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-admin/www/apm/version-callbacks.adp 29 Jan 2003 15:53:23 -0000 1.1
+++ openacs-4/packages/acs-admin/www/apm/version-callbacks.adp 31 Jan 2003 13:12:48 -0000 1.2
@@ -4,31 +4,30 @@
-
-
- Type |
- Tcl Proc |
- Action |
-
-
-
-
- @callbacks.type@ |
- @callbacks.proc@ |
- Edit
- Delete |
-
-
-
-
-
+
+
+ Type |
+ Tcl Proc |
+ Action |
+
+
+
+ @callbacks.type@ |
+ @callbacks.proc@ |
+
+ Edit
+ Delete
+ |
+
+
+
-There are no Tcl callbacks defined for the package.
+ There are no Tcl callbacks defined for the package.
-
-Add callback
-
+
+ Add callback
+
Index: openacs-4/packages/acs-admin/www/apm/version-callbacks.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-callbacks.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-admin/www/apm/version-callbacks.tcl 29 Jan 2003 15:53:23 -0000 1.1
+++ openacs-4/packages/acs-admin/www/apm/version-callbacks.tcl 31 Jan 2003 13:12:48 -0000 1.2
@@ -9,8 +9,8 @@
db_1row package_version_info "select pretty_name, version_name from apm_package_version_info where version_id = :version_id"
-set page_title "Tcl Callbacks for $pretty_name $version_name"
-set context_bar [ad_context_bar [list "version-view?version_id=$version_id" "$pretty_name $version_name"] $page_title]
+set page_title "Tcl Callbacks"
+set context_bar [ad_context_bar [list "version-view?[export_vars { version_id }]" "$pretty_name $version_name"] $page_title]
db_multirow callbacks get_all_callbacks {
select type,