Index: openacs-4/packages/acs-admin/tcl/apm-admin-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/tcl/apm-admin-procs.tcl,v diff -u -N -r1.18.8.11 -r1.18.8.12 --- openacs-4/packages/acs-admin/tcl/apm-admin-procs.tcl 12 Aug 2014 17:39:26 -0000 1.18.8.11 +++ openacs-4/packages/acs-admin/tcl/apm-admin-procs.tcl 17 Aug 2014 08:11:10 -0000 1.18.8.12 @@ -94,94 +94,57 @@ ad_proc -private apm_package_selection_widget { - -install_enable:boolean pkg_info_list {to_install ""} - {to_enable ""} } { Provides a widget for selecting packages. Displays dependency information if available. - - @param intall_enable Set this flag if you want separate install and enable checkboxes to be displayed. If you don't set it, - only the enable checkbox will be displayed, and the resulting page is expected to assume that enable also means install. + @param pkg_info_list list of package infos for all packages to be listed + @param to_install list of package_keys to install } { if {$pkg_info_list eq ""} { return "" } - - set checkbox_count 0 + set counter 0 - set band_colors { white "#ececec" } - set widget "
" return $widget } @@ -268,7 +209,9 @@ # LARS: Default to 1 (the package_key/version_name you supplied was higher than what's on the system) # for the case where nothing it returned, because this implies that there was no highest version installed, # i.e., no version at all of the package was installed. - return [db_string apm_higher_version_installed_p {} -default 1] + set result [db_string apm_higher_version_installed_p {} -default 1] + ns_log notice "apm_higher_version_installed_p <$package_key> <$version_name> -> $result" + return $result } Index: openacs-4/packages/acs-admin/www/apm/packages-install-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/packages-install-2.tcl,v diff -u -N -r1.12.4.8 -r1.12.4.9 --- openacs-4/packages/acs-admin/www/apm/packages-install-2.tcl 11 Oct 2013 11:43:46 -0000 1.12.4.8 +++ openacs-4/packages/acs-admin/www/apm/packages-install-2.tcl 17 Aug 2014 08:11:10 -0000 1.12.4.9 @@ -6,20 +6,17 @@ @creation-date Mon Oct 9 00:13:43 2000 @cvs-id $Id$ } { - {install:multiple ""} - {enable:multiple ""} + {package_key:multiple ""} {force_p "f"} } # Install and enable are sets of keys; need to turn them back into spec files. set spec_files [ad_get_client_property apm spec_files] -# LARS HACK: I got rid of the separate install/enable checkboxes -set install $enable +set install $package_key # Clear out previous client properties. ad_set_client_property -clob t apm pkg_install_list "" -ad_set_client_property -clob t apm pkg_enable_list "" foreach spec_file $spec_files { # Get package info, and find out if this is a package we should install @@ -71,18 +68,13 @@ }] @@ -93,7 +85,6 @@ # We use client properties to pass along this information as it is fairly large. ad_set_client_property -clob t apm pkg_install_list [lindex $dependency_results 1] - ad_set_client_property -clob t apm pkg_enable_list $enable ad_returnredirect packages-install-3 ad_script_abort @@ -120,12 +111,10 @@ [export_vars -form {spec_files}]-
- " + set widget " Install [ad_decode $install_enable_p 1 "Enable " ""]Package Directory Comment " + append widget "\n+
" foreach pkg_info $pkg_info_list { incr counter set package_key [pkg_info_key $pkg_info] set package_path [pkg_info_path $pkg_info] - set package_rel_path [string range $package_path [string length $::acs::rootdir] end] set spec_file [pkg_info_spec $pkg_info] array set package [apm_read_package_info_file $spec_file] set version_name $package(name) ns_log Debug "Selection widget: $package_key, Dependency: [pkg_info_dependency_p $pkg_info]" - - append widget " Install Package Package Key Comment " + append widget " " if { [pkg_info_dependency_p $pkg_info] == "t" } { # Dependency passed. - if { $install_enable_p } { - if { $package_key in $to_install } { - append widget " " } elseif { [pkg_info_dependency_p $pkg_info] == "f" } { #Dependency failed. - if { $install_enable_p } { - append widget "" - } else { - append widget " " - } - } - if { $package_key in $to_enable } { + if { $package_key in $to_install } { append widget " - $package(package-name) $package(name) -$package_rel_path -Dependencies satisfied. +$package_key +Dependencies satisfied. " - } append widget " - + $package(package-name) $package(name) -$package_rel_path -+ $package_key +" foreach comment [pkg_info_comment $pkg_info] { append widget "$comment
" @@ -208,38 +171,16 @@ set comment "Installing older version of package." } - append widget "" - - if { $package_key in $to_install } { - set install_checked "checked" - } else { - set install_checked "" - } - if { $package_key in $to_enable } { - set enable_checked "checked" - } else { - set enable_checked "" - } - - if { $install_enable_p } { - append widget " " } - incr checkbox_count 2 } - append widget "- " - } else { - append widget " - " - } - + set install_checked [lindex {"" checked} [expr {$package_key in $to_install}]] append widget " + $package(package-name) $package(name) -$package_rel_path +$package_key $comment
-
-Force the install Index: openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl,v diff -u -N -r1.14.8.3 -r1.14.8.4 --- openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl 28 Sep 2013 12:10:00 -0000 1.14.8.3 +++ openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl 17 Aug 2014 08:11:10 -0000 1.14.8.4 @@ -80,7 +80,7 @@ append body [subst { Select what data files to load for $version(package-name) $final_version_name}] append body \ - [apm_package_selection_widget [lindex $dependency_results 1] $install $enable] \ + [apm_package_selection_widget [lindex $dependency_results 1] $install] \ [subst {
-+
Load File Name Index: openacs-4/packages/acs-admin/www/apm/packages-install.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/packages-install.tcl,v diff -u -N -r1.22.4.6 -r1.22.4.7 --- openacs-4/packages/acs-admin/www/apm/packages-install.tcl 16 Aug 2014 17:20:41 -0000 1.22.4.6 +++ openacs-4/packages/acs-admin/www/apm/packages-install.tcl 17 Aug 2014 08:11:10 -0000 1.22.4.7 @@ -12,8 +12,6 @@ set title "Package Installation" set context [list [list "/acs-admin/apm/" "Package Manager"] $title] -ad_return_top_of_page [ad_parse_template -params [list context title] \ - "/packages/openacs-default-theme/lib/plain-streaming-head"] ### Get all the spec files # @@ -69,9 +67,11 @@ apm_log APMDebug $spec_files +set body "" + if { $spec_files eq "" } { # No spec files to work with. - ns_write [subst { + append body [subst {No New Packages to Install
There are no new packages to install. Please load some @@ -80,12 +80,12 @@ }] } else { - ns_write { + append body {
Select Packages to Install
Please select the set of packages you'd like to install.
} - ns_write [subst { + append body [subst {