timoh
committed
on 08 Feb 04
corrected context_bar
openacs-4/.../cadmin/tree-view-simple.tcl (+3 -3)
15 15     locale:onevalue
16 16     tree:multirow
17 17 }
18 18
19 19 set user_id [ad_maybe_redirect_for_registration]
20 20 set tree_id $source_tree_id
21 21
22 22 array set target_tree [category_tree::get_data $target_tree_id $locale]
23 23 set target_tree_name $target_tree(tree_name)
24 24
25 25 if {$target_tree(site_wide_p) == "f"} {
26 26     permission::require_permission -object_id $tree_id -privilege category_tree_read
27 27 }
28 28
29 29 array set one_tree [category_tree::get_data $tree_id $locale]
30 30 set tree_name $one_tree(tree_name)
31 31
32 32 set page_title "Simplified tree view"
33 33
34 34 if {[info exists object_id]} {
35       set context_bar [list [category::get_object_context $object_id] [list [export_vars -base one-object {locale object_id}] "Category Management"]]
  35     set context_bar [list [category::get_object_context $object_id] [list [export_vars -no_empty -base one-object {locale object_id}] "Category Management"]]
36 36 } else {
37       set context_bar [list [list ".?[export_vars {locale}]" "Category Management"]]
  37     set context_bar [list [list ".?[export_vars -no_empty {locale}]" "Category Management"]]
38 38 }
39   lappend context_bar [list [export_vars -base tree-view {tree_id locale object_id}] $target_tree_name] [list [export_vars -base tree-copy [list [list tree_id $target_tree_id] locale object_id]] "Copy a tree"] "View \"$tree_name\""
  39 lappend context_bar [list [export_vars -no_empty -base tree-view {tree_id locale object_id}] $target_tree_name] [list [export_vars -no_empty -base tree-copy { {tree_id $target_tree_id} locale object_id }] "Copy a tree"] "View \"$tree_name\""
40 40
41 41 template::multirow create tree category_name deprecated_p level left_indent
42 42
43 43 foreach category [category_tree::get_tree -all $tree_id $locale] {
44 44     util_unlist $category category_id category_name deprecated_p level
45 45
46 46     template::multirow append tree $category_name $deprecated_p $level [category::repeat_string " " [expr ($level-1)*5]]
47 47 }
48 48
49 49 template::list::create \
50 50     -name tree \
51 51     -no_data "None" \
52 52     -elements {
53 53         category_name {
54 54             label "Name"
55 55             display_template {
56 56                 @tree.left_indent;noquote@ @tree.category_name@
57 57             }
58 58         }
59 59     }