Index: openacs-4/packages/openacs-bootstrap3-theme/tcl/init-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/tcl/init-procs.tcl,v diff -u -r1.5.2.11 -r1.5.2.12 --- openacs-4/packages/openacs-bootstrap3-theme/tcl/init-procs.tcl 29 Jul 2024 12:01:29 -0000 1.5.2.11 +++ openacs-4/packages/openacs-bootstrap3-theme/tcl/init-procs.tcl 13 Aug 2024 14:39:33 -0000 1.5.2.12 @@ -1,22 +1,39 @@ namespace eval openacs_bootstrap3_theme { - set bootstrap_version 3.4.1 + variable parameter_info + + set parameter_info { + package_key openacs-bootstrap3-theme + parameter_name BootstrapVersion + default_value 3.4.1 + } + + ad_proc -private ::openacs_bootstrap3_theme::resource_info { + {-version ""} + } { - ad_proc -private ::openacs_bootstrap3_theme::resource_info {} { - Get information about available version(s) of the bootstrap packages. The goal is to deliver resources either from the local filesystem, or from CDN. @return dict containing resourceDir, resourceName, cdn, cdnHost, prefix, cssFiles, jsFiles and extraFiles. - } { + } { + variable parameter_info + if {$version eq ""} { + dict with parameter_info { + set version [::parameter::get_global_value \ + -package_key $package_key \ + -parameter $parameter_name \ + -default $default_value] + } + } + # # Provide paths for loading either via resources or CDN # set resourceDir [acs_package_root_dir openacs-bootstrap3-theme/www/resources/bootstrap] set cdn //maxcdn.bootstrapcdn.com/bootstrap - set version $openacs_bootstrap3_theme::bootstrap_version if {[file exists $resourceDir/$version]} { set prefix /resources/openacs-bootstrap3-theme/bootstrap/$version Index: openacs-4/packages/openacs-bootstrap3-theme/tcl/resource-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/tcl/resource-init.tcl,v diff -u -r1.3.2.9 -r1.3.2.10 --- openacs-4/packages/openacs-bootstrap3-theme/tcl/resource-init.tcl 20 Mar 2024 10:19:38 -0000 1.3.2.9 +++ openacs-4/packages/openacs-bootstrap3-theme/tcl/resource-init.tcl 13 Aug 2024 14:39:33 -0000 1.3.2.10 @@ -1,25 +1,8 @@ # -# Register some URNs that we are providing for sharing. +# Register some URNs # +::util::resources::register_urns -namespace openacs_bootstrap3_theme -set version $::openacs_bootstrap3_theme::bootstrap_version - -# -# Get resource info from this package. If not locally installed, offer -# a link for download. -# -set resource_info [::openacs_bootstrap3_theme::resource_info] -set prefix [dict get $resource_info prefix] - -foreach URN [dict keys [dict get $resource_info urnMap]] { - template::register_urn \ - -urn $URN \ - -resource $prefix/[dict get $resource_info urnMap $URN] \ - -csp_list [expr {[dict exists $resource_info cspMap $URN] - ? [dict get $resource_info cspMap $URN] - : ""}] -} - template::register_urn \ -urn urn:ad:js:jquery \ -resource /resources/openacs-bootstrap3-theme/js/jquery-3.7.1.min.js