Index: openacs-4/packages/ams/www/list-attribute-section-heading.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ams/www/list-attribute-section-heading.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/ams/www/list-attribute-section-heading.tcl 18 May 2005 17:11:48 -0000 1.1
+++ openacs-4/packages/ams/www/list-attribute-section-heading.tcl 26 May 2005 07:35:29 -0000 1.2
@@ -6,6 +6,8 @@
} {
{list_id:integer,notnull}
{attribute_id:integer,notnull}
+ return_url:optional
+ return_url_label:optional
}
db_0or1row get_heading { select aa.pretty_name as attribute_pretty_name,
@@ -45,7 +47,7 @@
and attribute_id = :attribute_id
}
} -after_submit {
- ad_returnredirect "list?[export_vars -url {package_key object_type list_name}]"
+ ad_returnredirect "list?[export_vars -url {package_key object_type list_name return_url return_url_label}]"
ad_script_abort
}
Index: openacs-4/packages/ams/www/list-attributes-unmap.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ams/www/list-attributes-unmap.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/ams/www/list-attributes-unmap.tcl 18 May 2005 17:11:48 -0000 1.2
+++ openacs-4/packages/ams/www/list-attributes-unmap.tcl 26 May 2005 07:35:29 -0000 1.3
@@ -7,6 +7,8 @@
} {
{attribute_id:integer,multiple}
{list_id:integer,notnull}
+ return_url:optional
+ return_url_label:optional
}
foreach attribute_id $attribute_id {
@@ -18,5 +20,5 @@
set object_type $list_info(object_type)
set list_name $list_info(list_name)
-ad_returnredirect "list?[export_vars -url {package_key object_type list_name}]"
+ad_returnredirect "list?[export_vars -url {package_key object_type list_name return_url return_url_label}]"
ad_script_abort
Index: openacs-4/packages/ams/www/list-attributes.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ams/www/list-attributes.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/ams/www/list-attributes.tcl 18 May 2005 17:11:48 -0000 1.1
+++ openacs-4/packages/ams/www/list-attributes.tcl 26 May 2005 07:35:29 -0000 1.2
@@ -8,6 +8,8 @@
{attribute_id:integer,multiple}
{list_id:integer,notnull}
{command "map"}
+ return_url:optional
+ return_url_label:optional
}
foreach attribute_id $attribute_id {
@@ -19,5 +21,5 @@
set object_type $list_info(object_type)
set list_name $list_info(list_name)
-ad_returnredirect "list?[export_vars -url {package_key object_type list_name}]"
+ad_returnredirect "list?[export_vars -url {package_key object_type list_name return_url return_url_label}]"
ad_script_abort
Index: openacs-4/packages/ams/www/list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ams/www/list.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/ams/www/list.tcl 18 May 2005 17:11:48 -0000 1.2
+++ openacs-4/packages/ams/www/list.tcl 26 May 2005 07:35:29 -0000 1.3
@@ -86,8 +86,8 @@
action {
label "Action"
display_template {
- Unmap
- Add HeadingEdit/Delete Heading
+ Unmap
+ Add HeadingEdit/Delete Heading
}
}
answer {
@@ -129,7 +129,7 @@
set sort_order_count 10
-db_multirow -extend { sort_order_key attribute_url } -unclobber mapped_attributes select_mapped_attributes {
+db_multirow -extend { sort_order_key attribute_url unmap_url heading_url } -unclobber mapped_attributes select_mapped_attributes {
select alam.required_p,
alam.section_heading,
ams.attribute_id,
@@ -147,6 +147,8 @@
} {
set attribute_url "attribute?[export_vars -url {attribute_id}]"
set sort_order_key $sort_order_count
+ set unmap_url [export_vars -base "list-attributes-unmap" -url {list_id attribute_id return_url return_url_label}]
+ set heading_url [export_vars -base "list-attribute-section-heading" -url {list_id attribute_id return_url return_url_label}]
incr sort_order_count 10
}
@@ -196,7 +198,7 @@
Define Widget
- Map
+ Map
}
}
@@ -220,7 +222,7 @@
# This query will override the ad_page_contract value entry_id
-db_multirow -extend { attribute_url attribute_add_url } -unclobber unmapped_attributes get_unmapped_attributes "
+db_multirow -extend { attribute_url attribute_add_url map_url } -unclobber unmapped_attributes get_unmapped_attributes "
select attribute_id,
widget,
deprecated_p,
@@ -232,9 +234,9 @@
where attribute_id not in ( select alam.attribute_id from ams_list_attribute_map alam where alam.list_id = :list_id )
and object_type in ([ams::object_parents -sql -object_type $object_type])
" {
- set return_url $this_url
- set attribute_add_url [export_vars -base "attribute-add" -url {object_type attribute_name return_url}]
+ set attribute_add_url [export_vars -base "attribute-add" -url {object_type attribute_name {return_url $this_url}}]
set attribute_url [export_vars -base "attribute" -url {attribute_id}]
+ set map_url [export_vars -base "list-attributes" -url {list_id attribute_id return_url return_url_label {command "map"}}]
}
set return_url $provided_return_url