Index: openacs-4/packages/acs-admin/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/Attic/index-oracle.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-admin/www/index-oracle.xql 23 Feb 2009 21:30:11 -0000 1.5 +++ openacs-4/packages/acs-admin/www/index-oracle.xql 13 Apr 2009 23:10:26 -0000 1.6 @@ -8,10 +8,9 @@ select s.node_id, site_node.url(node_id) as node_url, instance_name - from site_nodes s, apm_packages p, apm_package_types t + from site_nodes s, apm_packages p where s.object_id = p.package_id - and p.package_key = t.package_key - and t.implements_subsite_p = 't' + and p.package_key in ($package_keys) Index: openacs-4/packages/acs-admin/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/Attic/index-postgresql.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-admin/www/index-postgresql.xql 23 Feb 2009 21:30:11 -0000 1.5 +++ openacs-4/packages/acs-admin/www/index-postgresql.xql 13 Apr 2009 23:10:26 -0000 1.6 @@ -8,10 +8,9 @@ select s.node_id, site_node__url(node_id) as node_url, instance_name - from site_nodes s, apm_packages p, apm_package_types t + from site_nodes s, apm_packages p where s.object_id = p.package_id - and p.package_key = t.package_key - and t.implements_subsite_p is true + and p.package_key in ($package_keys) Index: openacs-4/packages/acs-admin/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/index.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-admin/www/index.tcl 20 Jun 2007 06:21:48 -0000 1.12 +++ openacs-4/packages/acs-admin/www/index.tcl 13 Apr 2009 23:10:27 -0000 1.13 @@ -6,7 +6,8 @@ } set page_title [ad_conn instance_name] -set subsite_number [db_string count_subsites "select count(*) from apm_packages where package_key = 'acs-subsite'"] +set package_keys '[join [subsite::package_keys] ',']' +set subsite_number [db_string count_subsites {}] if {$subsite_number > 100} { set too_many_subsites_p 1 } else { Index: openacs-4/packages/acs-admin/www/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/index.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-admin/www/index.xql 28 Aug 2003 11:59:01 -0000 1.3 +++ openacs-4/packages/acs-admin/www/index.xql 13 Apr 2009 23:10:27 -0000 1.4 @@ -1,6 +1,14 @@ + + + select count(*) + from apm_packages + where package_key in ($package_keys) + + + select package_key, Index: openacs-4/packages/acs-admin/www/apm/package-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/package-add-2.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-admin/www/apm/package-add-2.tcl 15 Jan 2009 23:08:20 -0000 1.8 +++ openacs-4/packages/acs-admin/www/apm/package-add-2.tcl 13 Apr 2009 23:10:27 -0000 1.9 @@ -11,6 +11,8 @@ { package_type "apm_application"} { initial_install_p "f" } { singleton_p "f" } + { implements_subsite_p f } + { inherit_templates_p t } { auto_mount "" } package_uri version_name @@ -103,7 +105,8 @@ db_transaction { # Register the package. apm_package_register $package_key $pretty_name $pretty_plural $package_uri \ - $package_type $initial_install_p $singleton_p $implements_subsite_p $inherit_templates_p + $package_type $initial_install_p $singleton_p $implements_subsite_p \ + $inherit_templates_p # Insert the version set version_id [apm_package_install_version \ -callback apm_dummy_callback \ Index: openacs-4/packages/acs-admin/www/apm/package-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/package-add.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-admin/www/apm/package-add.tcl 21 Nov 2007 14:08:43 -0000 1.9 +++ openacs-4/packages/acs-admin/www/apm/package-add.tcl 13 Apr 2009 23:10:27 -0000 1.10 @@ -107,6 +107,14 @@ such as the ACS Kernel. + Implements Subsite? + Does your package implement subsite semantics? Your package may do so by extending acs-subsite or by providing the means to mount applications, generate navigation tools, specify master templates, and manage community-oriented features such as user groups and roles. + + + Inherit Templates? + Do you want your package to inherit templates from packages it extends? If true, the request processor will first try to map a URL corresponding to a mounted instance of your package to one of its templates, and if no match is found, will search extended packages. If false, only templates in your package will be mapped to URLs. + + Auto-mount URI Index: openacs-4/packages/acs-admin/www/apm/version-dependencies-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependencies-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-admin/www/apm/version-dependencies-oracle.xql 27 Apr 2001 01:41:12 -0000 1.1 +++ openacs-4/packages/acs-admin/www/apm/version-dependencies-oracle.xql 13 Apr 2009 23:10:27 -0000 1.2 @@ -26,14 +26,16 @@ - -select t.pretty_name dep_pretty_name, v.version_name dep_version_name, v.version_id dep_version_id -from apm_package_versions v, apm_package_dependencies d, apm_package_types t -where d.service_uri = :service_uri -and d.dependency_type = :other_dependency_type_prep -and d.version_id = v.version_id -and t.package_key = v.package_key -and apm_package_version.sortable_version_name(d.service_version) $sign apm_package_version.sortable_version_name(:service_version) + + select t.pretty_name dep_pretty_name, v.version_name dep_version_name, + v.version_id dep_version_id, d.dependency_type as dep_type + from apm_package_versions v, apm_package_dependencies d, apm_package_types t + where d.service_uri = :service_uri + and d.dependency_type = in ($other_dependency_in) + and d.version_id = v.version_id + and t.package_key = v.package_key + and apm_package_version.sortable_version_name(d.service_version) + $sign apm_package_version.sortable_version_name(:service_version) Index: openacs-4/packages/acs-admin/www/apm/version-dependencies-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependencies-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-admin/www/apm/version-dependencies-postgresql.xql 28 Apr 2001 17:35:30 -0000 1.2 +++ openacs-4/packages/acs-admin/www/apm/version-dependencies-postgresql.xql 13 Apr 2009 23:10:27 -0000 1.3 @@ -28,10 +28,10 @@ select t.pretty_name as dep_pretty_name, v.version_name as dep_version_name, - v.version_id as dep_version_id + v.version_id as dep_version_id, d.dependency_type as dep_type from apm_package_versions v, apm_package_dependencies d, apm_package_types t where d.service_uri = :service_uri - and d.dependency_type = :other_dependency_type_prep + and d.dependency_type in ($other_dependency_in) and d.version_id = v.version_id and t.package_key = v.package_key and apm_package_version__sortable_version_name(d.service_version) $sign Index: openacs-4/packages/acs-admin/www/apm/version-dependencies.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependencies.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-admin/www/apm/version-dependencies.tcl 10 Jan 2007 21:21:59 -0000 1.3 +++ openacs-4/packages/acs-admin/www/apm/version-dependencies.tcl 13 Apr 2009 23:10:27 -0000 1.4 @@ -17,19 +17,18 @@ " -foreach dependency_type { provide require } { - set other_dependency_type [ad_decode $dependency_type "provide" "require" "provide"] - doc_body_append "

Services [string totitle $dependency_type]d

    \n" +foreach dependency_type { provide extend require } { set dependency_type_prep "${dependency_type}s" - db_foreach apm_all_dependencies { - select dependency_id, service_uri, service_version - from apm_package_dependencies - where version_id = :version_id - and dependency_type = :dependency_type_prep - order by service_uri - } { - doc_body_append "
  • [string totitle $dependency_type]s service $service_uri, version $service_version (remove)\n" + if { [string index $dependency_type end] eq "e" } { + set dependency_type_prep_2 ${dependency_type}d + } else { + set dependency_type_prep_2 ${dependency_type}ed + } + doc_body_append "

    Services [string totitle $dependency_type_prep_2]

      \n" + + db_foreach apm_all_dependencies {} { + doc_body_append "
    • [string totitle $dependency_type_prep] service $service_uri, version $service_version (remove)\n" # If this package provides a service, show a list of all packages that require it, # or vice versa. If this package provides a service, show other packages requiring @@ -39,20 +38,18 @@ set sign [ad_decode $dependency_type "provide" "<=" ">="] set counter 0 - set other_dependency_type_prep "${other_dependency_type}s" - db_foreach apm_specific_version_dependencies " -select t.pretty_name dep_pretty_name, v.version_name dep_version_name, v.version_id dep_version_id -from apm_package_versions v, apm_package_dependencies d, apm_package_types t -where d.service_uri = :service_uri -and d.dependency_type = :other_dependency_type_prep -and d.version_id = v.version_id -and t.package_key = v.package_key -and apm_package_version.sortable_version_name(d.service_version) $sign apm_package_version.sortable_version_name(:service_version)" { - incr counter + set other_dependency_in [ad_decode $dependency_type "provide" "'requires','extends'" "'provides'"] + db_foreach apm_specific_version_dependencies {} { + incr counter if { $counter == 1 } { doc_body_append "\n" @@ -61,7 +58,7 @@ doc_body_append "
    • This package does not $dependency_type any services.\n" } if { $installed_p eq "t" } { - doc_body_append "
    • Add a service ${dependency_type}d by this package\n" + doc_body_append "
    • Add a service $dependency_type_prep_2 by this package\n" } doc_body_append "
    \n" } Index: openacs-4/packages/acs-admin/www/apm/version-dependency-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependency-add-2.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-admin/www/apm/version-dependency-add-2.tcl 6 Jan 2009 01:29:55 -0000 1.6 +++ openacs-4/packages/acs-admin/www/apm/version-dependency-add-2.tcl 13 Apr 2009 23:10:27 -0000 1.7 @@ -13,8 +13,9 @@ db_transaction { switch $dependency_type { - require { - apm_dependency_add -dependency_id $dependency_id requires $version_id $service_uri $service_version + require - + extend { + apm_dependency_add -dependency_id $dependency_id ${dependency_type}s $version_id $service_uri $service_version } provide { Index: openacs-4/packages/acs-admin/www/apm/version-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-edit.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-admin/www/apm/version-edit.tcl 29 Jul 2008 22:04:14 -0000 1.9 +++ openacs-4/packages/acs-admin/www/apm/version-edit.tcl 13 Apr 2009 23:10:27 -0000 1.10 @@ -68,15 +68,25 @@ OpenACS Core: - $initial_install_p + [ad_decode $initial_install_p t Yes No] Singleton: - $singleton_p + [ad_decode $singleton_p t Yes No] + Implements Subsite: + [ad_decode $implements_subsite_p t Yes No] + + + + Inherit Templates: + [ad_decode $inherit_templates_p t Yes No] + + + Auto-mount: Index: openacs-4/packages/acs-admin/www/apm/version-edit.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-edit.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-admin/www/apm/version-edit.xql 29 Jan 2003 15:53:23 -0000 1.3 +++ openacs-4/packages/acs-admin/www/apm/version-edit.xql 13 Apr 2009 23:10:27 -0000 1.4 @@ -4,10 +4,12 @@ - select version_id, package_key, package_uri, pretty_name, version_name, version_uri, auto_mount, - summary, description_format, description, release_date, vendor, vendor_uri, - enabled_p, installed_p, tagged_p, imported_p, data_model_loaded_p, activation_date, tarball_length, - deactivation_date, distribution_uri, distribution_date, singleton_p, initial_install_p + select version_id, package_key, package_uri, pretty_name, version_name, + version_uri, auto_mount, summary, description_format, description, release_date, + vendor, vendor_uri, enabled_p, installed_p, tagged_p, imported_p, + data_model_loaded_p, activation_date, tarball_length, + deactivation_date, distribution_uri, distribution_date, singleton_p, + initial_install_p, implements_subsite_p, inherit_templates_p from apm_package_version_info where version_id = :version_id Index: openacs-4/packages/acs-admin/www/apm/version-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-view.tcl,v diff -u -r1.19 -r1.20 --- openacs-4/packages/acs-admin/www/apm/version-view.tcl 10 Jan 2007 21:21:59 -0000 1.19 +++ openacs-4/packages/acs-admin/www/apm/version-view.tcl 13 Apr 2009 23:10:27 -0000 1.20 @@ -130,6 +130,8 @@ Version:$version_name OpenACS Core:[ad_decode $initial_install_p "t" "Yes" "No"] Singleton:[ad_decode $singleton_p "t" "Yes" "No"] +Implements Subsite:[ad_decode $implements_subsite_p t Yes No] +Inherit Templates:[ad_decode $inherit_templates_p t Yes No] Auto-mount:$auto_mount Status:$status Data Model:$data_model_status Index: openacs-4/packages/acs-admin/www/apm/version-view.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-view.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-admin/www/apm/version-view.xql 24 Sep 2003 18:23:36 -0000 1.4 +++ openacs-4/packages/acs-admin/www/apm/version-view.xql 13 Apr 2009 23:10:27 -0000 1.5 @@ -6,6 +6,7 @@ select version_id, package_key, package_uri, pretty_name, version_name, version_uri, summary, description_format, description, singleton_p, initial_install_p, + implements_subsite_p, inherit_templates_p, to_char(release_date, 'Month DD, YYYY') as release_date , vendor, vendor_uri, auto_mount, enabled_p, installed_p, tagged_p, imported_p, data_model_loaded_p, to_char(activation_date, 'Month DD, YYYY') as activation_date,