Index: openacs-4/packages/categories/www/cadmin/category-delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/cadmin/category-delete.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/categories/www/cadmin/category-delete.tcl 5 Feb 2004 18:58:48 -0000 1.5
+++ openacs-4/packages/categories/www/cadmin/category-delete.tcl 8 Feb 2004 17:20:47 -0000 1.6
@@ -21,15 +21,18 @@
set user_id [ad_maybe_redirect_for_registration]
permission::require_permission -object_id $tree_id -privilege category_tree_write
-multirow create categories category_id category_name objects_p
+multirow create categories category_id category_name objects_p view_url
foreach id $category_id {
multirow append categories \
$id \
[category::get_name $id $locale] \
- [db_string check_mapped_objects {}]
+ [db_string check_mapped_objects {}] \
+ [export_vars -no_empty -base category-usage { {category_id $id} tree_id locale object_id }]
}
+multirow sort categories -dictionary category_name
+
array set tree [category_tree::get_data $tree_id $locale]
set tree_name $tree(tree_name)
@@ -50,6 +53,10 @@
-elements {
category_name {
label "Name"
+ display_template {
+ @categories.category_name@
+ @categories.category_name@
+ }
}
objects_p {
display_template {
Index: openacs-4/packages/categories/www/cadmin/tree-delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/cadmin/tree-delete.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/categories/www/cadmin/tree-delete.tcl 5 Feb 2004 18:58:48 -0000 1.4
+++ openacs-4/packages/categories/www/cadmin/tree-delete.tcl 8 Feb 2004 17:22:49 -0000 1.5
@@ -46,19 +46,23 @@
set delete_url [export_vars -no_empty -base tree-delete-2 {tree_id locale object_id}]
set cancel_url [export_vars -no_empty -base tree-view {tree_id locale object_id}]
-template::multirow create used_categories category_id category_name
+template::multirow create used_categories category_id category_name view_url
db_foreach get_category_in_use "" {
set category_name [category::get_name $category_id $locale]
- template::multirow append used_categories $category_id $category_name
+ template::multirow append used_categories $category_id $category_name \
+ [export_vars -no_empty -base category-usage { category_id tree_id locale object_id }]
}
+template::multirow sort used_categories -dictionary category_name
+
template::list::create \
-name used_categories \
-no_data "None" \
-elements {
category_name {
label "Name"
+ link_url_col view_url
}
}