Index: openacs-4/packages/acs-core-docs/acs-core-docs.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/acs-core-docs.info,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/acs-core-docs.info 3 Aug 2002 17:51:19 -0000 1.4 +++ openacs-4/packages/acs-core-docs/acs-core-docs.info 10 Sep 2002 09:42:43 -0000 1.5 @@ -24,6 +24,7 @@ + Index: openacs-4/packages/acs-core-docs/tcl/acs-core-docs-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/tcl/acs-core-docs-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/tcl/acs-core-docs-procs.tcl 10 Sep 2002 09:42:44 -0000 1.1 @@ -0,0 +1,36 @@ +ad_library { + core documentation procs. + + @author Jeff Davis (davis@xarg.net) + @creation-date 2002-09-10 + @cvs-id $Id: acs-core-docs-procs.tcl,v 1.1 2002/09/10 09:42:44 jeffd Exp $ +} + +ad_proc -private core_docs_uninstalled_packages_internal {} { + Returns a list (in array set format) of package.key package-name + (used for display on the index.adp page). + + @author Jeff Davis (davis@xarg.net) +} { + # Determine which spec files are not installed + foreach spec_file [apm_scan_packages "[acs_root_dir]/packages"] { + if { ! [catch {array set version [apm_read_package_info_file $spec_file]} errMsg] } { + if { ! [apm_package_registered_p $version(package.key)] } { + lappend uninstalled $version(package.key) $version(package-name) + } + } + } + + return $uninstalled +} + +ad_proc -public core_docs_uninstalled_packages {} { + Returns a list (in array set format) of package.key package-name + (used for display on the index.adp page). + + Cached version of core_docs_uninstalled_packages_internal + + @author Jeff Davis davis@xarg.net +} { + return [util_memoize core_docs_uninstalled_packages_internal] +} Index: openacs-4/packages/acs-core-docs/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/index.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-core-docs/www/index.adp 10 Aug 2002 20:07:20 -0000 1.5 +++ openacs-4/packages/acs-core-docs/www/index.adp 10 Sep 2002 09:42:45 -0000 1.6 @@ -23,7 +23,7 @@ Basic OpenACS -Installed Packages +Package Documentation @@ -58,8 +58,11 @@ set found_p 0 if {[db_table_exists apm_package_types]} { - db_foreach get_installed_pkgs "select package_key, pretty_name from apm_package_types" { - set found_p 1 + db_foreach get_installed_pkgs "select package_key, pretty_name from apm_package_types order by upper(pretty_name) " { + if { ! $found_p } { + set found_p 1 + adp_puts "Installed Packages\n\n" + } set index_page [lindex [glob -nocomplain \ "[acs_package_root_dir $package_key]/www/doc/index.*"] 0] @@ -79,6 +82,13 @@ adp_puts "- No installed packages.\n" } +set packages [core_docs_uninstalled_packages] +if { ! [empty_string_p $packages] } { + adp_puts "\nUninstalled packages\n\n" + foreach {key name} $packages { + adp_puts "- $name\n" + } +} %>