Index: openacs-4/packages/dotlrn/dotlrn.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/dotlrn.info,v diff -u -r1.141 -r1.141.2.1 --- openacs-4/packages/dotlrn/dotlrn.info 27 Oct 2014 16:41:14 -0000 1.141 +++ openacs-4/packages/dotlrn/dotlrn.info 9 Sep 2015 13:50:42 -0000 1.141.2.1 @@ -38,7 +38,7 @@ - + Index: openacs-4/packages/dotlrn/install.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/install.xml,v diff -u -r1.23 -r1.23.2.1 --- openacs-4/packages/dotlrn/install.xml 27 Oct 2014 16:41:14 -0000 1.23 +++ openacs-4/packages/dotlrn/install.xml 9 Sep 2015 13:50:42 -0000 1.23.2.1 @@ -22,10 +22,10 @@ ---> - + +--> @@ -45,9 +45,10 @@ - - Index: openacs-4/packages/dotlrn/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/apm-callback-procs.tcl,v diff -u -r1.13 -r1.13.2.1 --- openacs-4/packages/dotlrn/tcl/apm-callback-procs.tcl 27 Oct 2014 16:41:15 -0000 1.13 +++ openacs-4/packages/dotlrn/tcl/apm-callback-procs.tcl 9 Sep 2015 13:50:42 -0000 1.13.2.1 @@ -43,7 +43,7 @@ # Make sure that privacy is turned on acs_privacy::privacy_control_set 1 - + } Index: openacs-4/packages/theme-zen/install.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/theme-zen/install.xml,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/theme-zen/install.xml 27 Oct 2014 16:41:59 -0000 1.2 +++ openacs-4/packages/theme-zen/install.xml 9 Sep 2015 13:50:42 -0000 1.2.2.1 @@ -3,7 +3,6 @@ - Index: openacs-4/packages/theme-zen/theme-zen.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/theme-zen/theme-zen.info,v diff -u -r1.9 -r1.9.2.1 --- openacs-4/packages/theme-zen/theme-zen.info 27 Oct 2014 16:41:59 -0000 1.9 +++ openacs-4/packages/theme-zen/theme-zen.info 9 Sep 2015 13:50:43 -0000 1.9.2.1 @@ -8,19 +8,20 @@ t theme-zen - + Rafael Calvo 2011-10-30 Zen Theme for DotLRN DotLRN Consortium 2 - + - - + + + Index: openacs-4/packages/theme-zen/lib/lrn-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/theme-zen/lib/lrn-master.tcl,v diff -u -r1.15 -r1.15.2.1 --- openacs-4/packages/theme-zen/lib/lrn-master.tcl 27 Jun 2015 20:50:47 -0000 1.15 +++ openacs-4/packages/theme-zen/lib/lrn-master.tcl 9 Sep 2015 13:50:43 -0000 1.15.2.1 @@ -206,16 +206,16 @@ template::head::add_meta -name "robots" -content "all" template::head::add_meta -name "keywords" -content "accessibility, portals, elearning, design" -template::head::add_css -href "/resources/acs-subsite/default-master.css" -media "screen" -order 1 -template::head::add_css -href "/resources/theme-zen/css/main.css" -media "screen" -order 2 -template::head::add_css -href "/resources/theme-zen/css/print.css" -media "print" -order 3 -template::head::add_css -href "/resources/theme-zen/css/handheld.css" -media "handheld" -order 4 +#template::head::add_css -href "/resources/acs-subsite/default-master.css" -media "screen" -order 1 +#template::head::add_css -href "/resources/theme-zen/css/main.css" -media "screen" -order 2 +#template::head::add_css -href "/resources/theme-zen/css/print.css" -media "print" -order 3 +#template::head::add_css -href "/resources/theme-zen/css/handheld.css" -media "handheld" -order 4 template::head::add_css -href $css_url -media "screen" -order 5 -template::head::add_css -alternate -href "/resources/theme-zen/css/highContrast.css" -title "highContrast" -template::head::add_css -alternate -href "/resources/theme-zen/css/508.css" -title "508" +#template::head::add_css -alternate -href "/resources/theme-zen/css/highContrast.css" -title "highContrast" +#template::head::add_css -alternate -href "/resources/theme-zen/css/508.css" -title "508" -template::head::add_javascript -src "/resources/theme-zen/js/styleswitcher.js" +#template::head::add_javascript -src "/resources/theme-zen/js/styleswitcher.js" if { [info exists text] } { set text [lang::util::localize $text] Index: openacs-4/packages/theme-zen/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/theme-zen/tcl/apm-callback-procs.tcl,v diff -u -r1.2 -r1.2.8.1 --- openacs-4/packages/theme-zen/tcl/apm-callback-procs.tcl 15 May 2007 20:14:56 -0000 1.2 +++ openacs-4/packages/theme-zen/tcl/apm-callback-procs.tcl 9 Sep 2015 13:50:43 -0000 1.2.8.1 @@ -129,10 +129,87 @@ set theme_id [package_instantiate_object -var_list $var_list portal_element_theme] set site_template_id [db_nextval acs_object_id_seq] - db_dml insert_theme {} + db_dml insert_theme_to_dotlrn_site_templates {} + db_transaction { + + subsite::new_subsite_theme \ + -key dotlrn_zen \ + -name #theme-zen.Zen_Theme# \ + -template /packages/theme-zen/lib/lrn-master \ + -css { + {-href /resources/acs-templating/forms.css -media all} + {-href /resources/acs-templating/lists.css -media all} + {-href "/resources/acs-subsite/default-master.css" -media "screen" -order 1} + {-href "/resources/theme-zen/css/main.css" -media "screen" -order 2} + {-href "/resources/theme-zen/css/print.css" -media "print" -order 3} + {-href "/resources/theme-zen/css/handheld.css" -media "handheld" -order 4} + {-alternate -href "/resources/theme-zen/css/highContrast.css" -title "highContrast"} + {-alternate -href "/resources/theme-zen/css/508.css" -title "508"} + } \ + -js { + {-src "/resources/theme-zen/js/styleswitcher.js"} + } \ + -form_template "" \ + -list_template "" \ + -list_filter_template "" \ + -dimensional_template "" + } + + subsite::set_theme -theme dotlrn_zen + } ad_proc -public theme_zen::apm::before_uninstall {} { + Uninstall the package } { + subsite::delete_subsite_theme -key dotlrn_zen + + # + # At least, the code for Deleting the created portal layouts is + # missing to uninstall this package + # + # see portal_layout__delete(integer) + # select * from portal_layouts ; } + + +ad_proc -public theme_zen::apm::after_upgrade { + {-from_version_name:required} + {-to_version_name:required} +} { + Upgrade the package +} { + if {[apm_version_names_compare $from_version_name "2.9.0d4"] == -1 && + [apm_version_names_compare $to_version_name "2.9.0d4"] > -1} { + ns_log notice "-- upgrading to 2.9.0d4" + + # + # Register the theme if not already there + # + set themes [db_list get_themes {select key from subsite_themes}] + if {"dotlrn_zen" ni $themes} { + subsite::new_subsite_theme \ + -key dotlrn_zen \ + -name #theme-zen.Zen_Theme# \ + -template /packages/theme-zen/lib/lrn-master \ + -css { + {-href /resources/acs-templating/forms.css -media all} + {-href /resources/acs-templating/lists.css -media all} + {-href "/resources/acs-subsite/default-master.css" -media "screen" -order 1} + {-href "/resources/theme-zen/css/main.css" -media "screen" -order 2} + {-href "/resources/theme-zen/css/print.css" -media "print" -order 3} + {-href "/resources/theme-zen/css/handheld.css" -media "handheld" -order 4} + {-alternate -href "/resources/theme-zen/css/highContrast.css" -title "highContrast"} + {-alternate -href "/resources/theme-zen/css/508.css" -title "508"} + } \ + -js { + {-src "/resources/theme-zen/js/styleswitcher.js"} + } \ + -form_template "" \ + -list_template "" \ + -list_filter_template "" \ + -dimensional_template "" + } + } +} Index: openacs-4/packages/theme-zen/tcl/apm-callback-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/theme-zen/tcl/apm-callback-procs.xql,v diff -u -r1.2 -r1.2.8.1 --- openacs-4/packages/theme-zen/tcl/apm-callback-procs.xql 15 May 2007 20:14:56 -0000 1.2 +++ openacs-4/packages/theme-zen/tcl/apm-callback-procs.xql 9 Sep 2015 13:50:43 -0000 1.2.8.1 @@ -3,7 +3,7 @@ - + insert into dotlrn_site_templates (site_template_id, pretty_name, site_master, portal_theme_id )