Index: openacs-4/packages/acs-admin/www/install/install.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/install/install.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-admin/www/install/install.tcl 20 Apr 2004 21:12:29 -0000 1.3 +++ openacs-4/packages/acs-admin/www/install/install.tcl 21 May 2004 09:38:06 -0000 1.4 @@ -44,7 +44,8 @@ $version(name) \ $version(package.type) \ $version(install_type) \ - $version(summary)] + $version(summary) \ + $version(maturity)] } } } @@ -57,7 +58,7 @@ ##### # Sort the list alphabetically (in case package_name and package_key doesn't sort the same) -multirow create packages package_key package_name version_name package_type install_type summary +multirow create packages package_key package_name version_name package_type install_type summary maturity foreach name [lsort -ascii [array names package]] { set row $package($name) multirow append packages \ @@ -66,7 +67,8 @@ [lindex $row 2] \ [lindex $row 3] \ [lindex $row 4] \ - [lindex $row 5] + [lindex $row 5] \ + [apm::package_version::attributes::maturity_int_to_text [lindex $row 6]] } multirow extend packages install_url @@ -95,6 +97,9 @@ summary { label "Summary" } + maturity { + label {[apm::package_version::attributes::get_pretty_name maturity]} + } version_name { label "Version" } Index: openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl,v diff -u -r1.76 -r1.77 --- openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 21 May 2004 09:24:08 -0000 1.76 +++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 21 May 2004 09:38:07 -0000 1.77 @@ -123,37 +123,6 @@ } } - -ad_proc -private apm_maturity_int_to_text { maturity } { - Get the internationalized maturity description - corresponding to the given integer package maturity level. - - @author Peter Marklund -} { - if {[exists_and_not_null maturity]} { - - if { ![expr $maturity >= -1 && $maturity <= 3] } { - error "Maturity must be between -1 and 3 but is \"$maturity\"" - } - - set maturity_key(-1) "#acs-tcl.maturity_incompatible#" - set maturity_key(0) "#acs-tcl.maturity_new_submission#" - set maturity_key(1) "#acs-tcl.maturity_immature#" - set maturity_key(2) "#acs-tcl.maturity_mature#" - set maturity_key(3) "#acs-tcl.maturity_mature_and_standard#" - - set result [lang::util::localize $maturity_key($maturity)] - - } else { - - set result "" - - } - - return $result -} - - ad_proc -private pkg_info_new { package_key spec_file_path provides requires {dependency_p ""} {comment ""}} { Returns a datastructure that maintains information about a package. @@ -1997,6 +1966,17 @@ } } +ad_proc -private apm::package_version::attributes::get_pretty_name { attribute_name } { + Return the pretty name of attribute with given short name. + + @author Peter Marklund +} { + array set attributes [apm::package_version::attributes::get_spec] + array set attribute $attributes($attribute_name) + + return $attribute(pretty_name) +} + ad_proc -private apm::package_version::attributes::validate_maturity { maturity } { set error_message "" if { ![empty_string_p $maturity] } { @@ -2010,6 +1990,35 @@ return $error_message } +ad_proc -private apm::package_version::attributes::maturity_int_to_text { maturity } { + Get the internationalized maturity description + corresponding to the given integer package maturity level. + + @author Peter Marklund +} { + if {[exists_and_not_null maturity]} { + + if { ![expr $maturity >= -1 && $maturity <= 3] } { + error "Maturity must be between -1 and 3 but is \"$maturity\"" + } + + set maturity_key(-1) "#acs-tcl.maturity_incompatible#" + set maturity_key(0) "#acs-tcl.maturity_new_submission#" + set maturity_key(1) "#acs-tcl.maturity_immature#" + set maturity_key(2) "#acs-tcl.maturity_mature#" + set maturity_key(3) "#acs-tcl.maturity_mature_and_standard#" + + set result [lang::util::localize $maturity_key($maturity)] + + } else { + + set result "" + + } + + return $result +} + ad_proc -private apm::package_version::attributes::parse_xml { {-parent_node:required} {-array:required}