Index: openacs-4/packages/acs-subsite/www/admin/site-map/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/site-map/index.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-subsite/www/admin/site-map/index.tcl 3 Jul 2002 22:34:11 -0000 1.6 +++ openacs-4/packages/acs-subsite/www/admin/site-map/index.tcl 6 Jul 2002 14:05:22 -0000 1.7 @@ -11,6 +11,7 @@ {new_type ""} {root_id:integer ""} {new_application:integer ""} + {rename_application:integer {}} } if {[empty_string_p $root_id]} { @@ -35,6 +36,8 @@ set javascript "onLoad=\"javascript:document.new_parent.name.focus();document.new_parent.name.select()\"" } elseif {![empty_string_p $new_application]} { set javascript "onLoad=\"javascript:document.new_application.instance_name.focus();document.new_application.instance_name.select()\"" +} elseif {![empty_string_p $rename_application]} { + set javascript "onLoad=\"javascript:document.rename_application.instance_name.focus();document.rename_application.instance_name.select()\"" } else { set javascript "" } @@ -166,6 +169,7 @@ # Add a link to control permissioning if {$object_admin_p} { lappend controls "set permissions" + lappend controls "rename" } } } @@ -206,6 +210,14 @@ } else { doc_body_append "(none)" } + } elseif {$rename_application == $node_id} { + doc_body_append "
+ [export_form_vars expand:multiple root_id node_id rename_package_id] + + + +
+ " } else { doc_body_append "$object_name" } @@ -295,7 +307,7 @@ simply create a new folder as above, then select mount. Select the application to be copied from the list of available packages.

-To move or rename an application, +To move an application, copy it as above to the new location, then just select unmount at the old location. Selecting delete on the empty folder will remove it from the site node.

Index: openacs-4/packages/acs-subsite/www/admin/site-map/rename.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/site-map/rename.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-subsite/www/admin/site-map/rename.tcl 6 Jul 2002 14:05:22 -0000 1.1 @@ -0,0 +1,48 @@ +# packages/acs-subsite/www/admin/site-map/rename.tcl + +# Copyright (C) 2002 Red Hat + +# This file is part of ACS. +# +# ACS is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# ACS is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with ACS; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +ad_page_contract { + packages/acs-subsite/www/admin/site-map/rename.tcl + + @author bdolicki@redhat.com + @creation-date 2000-06-20 + @cvs-id $Id: rename.tcl,v 1.1 2002/07/06 14:05:22 jeffd Exp $ +} { + node_id:integer,notnull + instance_name:notnull + {expand:integer,multiple {}} + root_id:integer,optional +} + +# (bran 2000-06-20) Here I am assuming that only packages can be hung +# on site_nodes. Until we have a general framework for mutators +# I can hardly do anything better. + +db_dml app_rename { + update apm_packages + set instance_name = :instance_name + where package_id = (select object_id + from site_nodes + where node_id=:node_id) +} + +site_nodes_sync + +ad_returnredirect "./?[export_url_vars expand:multiple root_id]"