Index: openacs-4/packages/categories/www/cadmin/tree-copy-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/cadmin/tree-copy-view.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/categories/www/cadmin/tree-copy-view.adp 11 Feb 2004 10:15:59 -0000 1.1 @@ -0,0 +1,6 @@ + +@page_title;noquote@ +@context_bar;noquote@ +@locale;noquote@ + + Index: openacs-4/packages/categories/www/cadmin/tree-copy-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/cadmin/tree-copy-view.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/categories/www/cadmin/tree-copy-view.tcl 11 Feb 2004 10:15:59 -0000 1.1 @@ -0,0 +1,55 @@ +ad_page_contract { + + Displays a simple view of the source category tree for copy. + + @author Timo Hentschel (timo@timohentschel.de) + @cvs-id $Id: +} { + source_tree_id:integer + target_tree_id:integer + {locale ""} + object_id:integer,optional +} -properties { + page_title:onevalue + context_bar:onevalue + locale:onevalue + tree:multirow +} + +set user_id [ad_maybe_redirect_for_registration] +set tree_id $source_tree_id + +array set target_tree [category_tree::get_data $target_tree_id $locale] +set target_tree_name $target_tree(tree_name) + +if {$target_tree(site_wide_p) == "f"} { + permission::require_permission -object_id $tree_id -privilege category_tree_read +} + +set tree_name [category_tree::get_name $tree_id $locale] +set page_title "Category Tree \"$tree_name\"" + +set context_bar [category::context_bar $tree_id $locale [value_if_exists object_id]] +lappend context_bar [list [export_vars -no_empty -base tree-copy { {tree_id $target_tree_id} locale object_id }] "Copy tree"] "View \"$tree_name\"" + +template::multirow create tree category_name deprecated_p level left_indent + +foreach category [category_tree::get_tree -all $tree_id $locale] { + util_unlist $category category_id category_name deprecated_p level + + template::multirow append tree $category_name $deprecated_p $level [string repeat " " [expr ($level-1)*5]] +} + +template::list::create \ + -name tree \ + -no_data "None" \ + -elements { + category_name { + label "Name" + display_template { + @tree.left_indent;noquote@ @tree.category_name@ + } + } + } + +ad_return_template Index: openacs-4/packages/categories/www/cadmin/tree-copy.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/cadmin/tree-copy.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/categories/www/cadmin/tree-copy.tcl 11 Feb 2004 09:02:43 -0000 1.7 +++ openacs-4/packages/categories/www/cadmin/tree-copy.tcl 11 Feb 2004 10:15:59 -0000 1.8 @@ -19,12 +19,12 @@ set user_id [ad_maybe_redirect_for_registration] permission::require_permission -object_id $tree_id -privilege category_tree_write -set page_title "Choose a tree to copy" set tree_name [category_tree::get_name $tree_id $locale] set target_tree_id $tree_id +set page_title "Copy a tree into \"$tree_name\"" set context_bar [category::context_bar $tree_id $locale [value_if_exists object_id]] -lappend context_bar "Copy a tree" +lappend context_bar "Copy tree" template::multirow create trees tree_id tree_name site_wide_p view_url copy_url @@ -33,7 +33,7 @@ set source_tree_name [category_tree::get_name $source_tree_id $locale] template::multirow append trees $source_tree_id $source_tree_name $site_wide_p \ - [export_vars -no_empty -base tree-view-simple { source_tree_id target_tree_id locale object_id }] \ + [export_vars -no_empty -base tree-copy-view { source_tree_id target_tree_id locale object_id }] \ [export_vars -no_empty -base tree-copy-2 { source_tree_id target_tree_id locale object_id }] } } @@ -56,7 +56,7 @@ copy { label "Action" display_template { - Copy this tree + Copy tree } } } Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/categories/www/cadmin/tree-view-simple.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.8 refers to a dead (removed) revision in file `openacs-4/packages/categories/www/cadmin/tree-view-simple.tcl'. Fisheye: No comparison available. Pass `N' to diff?