| |
41 |
41 |
|
| |
42 |
42 |
db_transaction { |
| |
43 |
43 |
# use temporary table to use only bind vars in queries |
| |
44 |
44 |
foreach tree_id $tree_ids { |
| |
45 |
45 |
db_dml insert_tmp_category_trees "" |
| |
46 |
46 |
} |
| |
47 |
47 |
set tree_ids [db_list check_permissions_on_trees ""] |
| |
48 |
48 |
} |
| |
49 |
49 |
db_dml delete_tmp_category_trees "" |
| |
50 |
50 |
|
| |
51 |
51 |
template::multirow create trees tree_id tree_name category_id category_name indent selected_p |
| |
52 |
52 |
template::util::list_to_lookup $category_ids category_selected |
| |
53 |
53 |
|
| |
54 |
54 |
# get tree structures and names from the cache |
| |
55 |
55 |
foreach tree_id $tree_ids { |
| |
56 |
56 |
set tree_name [category_tree::get_name $tree_id] |
| |
57 |
57 |
foreach category [category_tree::get_tree $tree_id] { |
| |
58 |
58 |
util_unlist $category category_id category_name deprecated_p level |
| |
59 |
59 |
set indent "" |
| |
60 |
60 |
if {$level>1} { |
| |
61 |
|
set indent "[category::repeat_string " " [expr 2*$level -4]].." |
| |
|
61 |
set indent "[category::indent_html [expr 2*$level -4]].." |
| |
62 |
62 |
} |
| |
63 |
63 |
template::multirow append trees $tree_id $tree_name $category_id $category_name $indent [info exists category_selected($category_id)] |
| |
64 |
64 |
} |
| |
65 |
65 |
} |
| |
66 |
66 |
|
| |
67 |
67 |
set table_def { |
| |
68 |
68 |
{object_name "Object Name" {upper(n.object_name) $order} {<td><a href="/o/$object_id">$object_name</a></td>}} |
| |
69 |
69 |
{instance_name "Package" {} {<td align=right><a href="/o/$package_id">$instance_name</a></td>}} |
| |
70 |
70 |
{package_type "Package Type" {} r} |
| |
71 |
71 |
{creation_date "Creation Date" {} r} |
| |
72 |
72 |
} |
| |
73 |
73 |
|
| |
74 |
74 |
set order_by_clause [ad_order_by_from_sort_spec $orderby $table_def] |
| |
75 |
75 |
|
| |
76 |
76 |
set dimensional_def { |
| |
77 |
77 |
{subtree_p "Categorization" f { |
| |
78 |
78 |
{f "Exact"} |
| |
79 |
79 |
{t "Include Subcategories"} |
| |
80 |
80 |
}} |
| |
81 |
81 |
{letter "Name" all {{A "A"} {B "B"} {C "C"} {D "D"} {E "E"} {F "F"} {G "G"} {H "H"} {I "I"} {J "J"} {K "K"} {L "L"} {M "M"} {N "N"} {O "O"} {P "P"} {Q "Q"} {R "R"} {S "S"} {T "T"} {U "U"} {V "V"} {W "W"} {X "X"} {Y "Y"} {Z "Z"} {other "Other"} {all "All"} |