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 -r1.12.4.4 -r1.12.4.5 --- openacs-4/packages/acs-admin/www/apm/packages-install-2.tcl 9 Sep 2013 16:44:16 -0000 1.12.4.4 +++ openacs-4/packages/acs-admin/www/apm/packages-install-2.tcl 27 Sep 2013 18:47:52 -0000 1.12.4.5 @@ -44,87 +44,93 @@ } } +set title "Package Installation" +set context [list [list "/acs-admin/apm/" "Package Manager"] $title] + if {![info exists install_spec_files]} { - doc_body_append "[apm_header "Package Installation"]

-No packages selected.

[ad_footer]" - return -} + set body { +

+ No packages selected.

+ } +} else { -### Dependency Check -set dependency_results [apm_dependency_check -pkg_info_all $pkg_info_list $install_spec_files] + ### Dependency Check + set dependency_results [apm_dependency_check -pkg_info_all $pkg_info_list $install_spec_files] -if { [lindex $dependency_results 0] == 1 && [llength [lindex $dependency_results 2]] > 0 } { + if { [lindex $dependency_results 0] == 1 && [llength [lindex $dependency_results 2]] > 0 } { - set extra_package_keys [lindex $dependency_results 2] + set extra_package_keys [lindex $dependency_results 2] - # Check was good after adding a couple more packages + # Check was good after adding a couple more packages - doc_body_append "[apm_header "Package Installation"] -

Additional Packages Automatically Added

+ set body [subst { +

Additional Packages Automatically Added

- Some of the packages you were trying to install required other packages to be installed first. - We've added these additional packages needed, and ask you to review the list of packages below. + Some of the packages you were trying to install required other packages to be installed first. + We've added these additional packages needed, and ask you to review the list of packages below. -

- [export_vars -form {spec_files}]

- -

- - " + + [export_vars -form {spec_files}]

+ +

+
+ }] - set install [concat $install $extra_package_keys] - set enable [concat $enable $extra_package_keys] + set install [concat $install $extra_package_keys] + set enable [concat $enable $extra_package_keys] - doc_body_append [apm_package_selection_widget [lindex $dependency_results 1] $install $enable] + append body [apm_package_selection_widget [lindex $dependency_results 1] $install $enable] - doc_body_append " -
- -
- [ad_footer] - " + append body [subst { + + + + }] + + } elseif { ([lindex $dependency_results 0] == 1) || $force_p eq "t" } { -} elseif { ([lindex $dependency_results 0] == 1) || $force_p eq "t" } { - ### Check passed! Initiate install. + ### Check passed! Initiate install. - # 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 + # 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 -} else { - ### Check failed. Offer user an explanation and an ability to select unselect packages. - doc_body_append "[apm_header "Package Installation"] -

Select Packages to Install

- - Some of the packages you are trying to install have unsatisfied dependencies. The packages - with unsatisfied dependencies have been deselected. If you wish to install packages that do - not pass dependencies, please click the \"force\" option below. -

- - - - If you think you might want to use a package later (but not right away), - install it but don't enable it. - - [export_vars -form {spec_files}]

- -

- - " - - doc_body_append [apm_package_selection_widget [lindex $dependency_results 1] $install $enable] + ad_returnredirect packages-install-3 + ad_script_abort + } else { + + ### Check failed. Offer user an explanation and an ability to + ### select unselect packages. + + set body [subst { - doc_body_append " -
- Force the install

- -

- [ad_footer] - " + Some of the packages you are trying to install have unsatisfied dependencies. The packages + with unsatisfied dependencies have been deselected. If you wish to install packages that do + not pass dependencies, please click the "force" option below. +
+ + + + If you think you might want to use a package later (but not right away), + install it but don't enable it. + + [export_vars -form {spec_files}]

+ +

+ + }] + + append body \ + [apm_package_selection_widget [lindex $dependency_results 1] $install $enable] \ + [subst { +
+ Force the install

+ +

+ }] + } }