Index: openacs-4/packages/acs-templating/acs-templating.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/acs-templating.info,v diff -u -r1.15 -r1.16 --- openacs-4/packages/acs-templating/acs-templating.info 12 Sep 2003 14:13:57 -0000 1.15 +++ openacs-4/packages/acs-templating/acs-templating.info 22 Sep 2003 18:03:48 -0000 1.16 @@ -7,7 +7,7 @@ t t - + Karl Goldstein @@ -19,13 +19,14 @@ template system provides a way to use a single layout specification for many physical pages, so the overall layout of a site can be more easily administered. - + + - + Index: openacs-4/packages/acs-templating/resources/forms/blue.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/resources/forms/blue.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/resources/forms/blue.adp 22 Sep 2003 18:03:48 -0000 1.1 @@ -0,0 +1,98 @@ + + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@elements.section@
+ + + +
@elements.label;noquote@   + +
   +
+
+
> + + + + + + + + + +
\@formgroup.widget;noquote@ + +
+
+ \@formerror.@elements.id@;noquote\@ +
+
+
+ + + + +
\@formerror.@elements.id@;noquote\@ +
+
+ +
+ + +
Fisheye: Tag 1.20 refers to a dead (removed) revision in file `openacs-4/packages/acs-templating/resources/forms/standard-lars.adp'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-templating/resources/forms/standard.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/resources/forms/standard.adp,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-templating/resources/forms/standard.adp 22 Sep 2003 17:42:56 -0000 1.8 +++ openacs-4/packages/acs-templating/resources/forms/standard.adp 22 Sep 2003 18:03:48 -0000 1.9 @@ -1,98 +1,133 @@ - - - -
+ + + +
- - - + - +
+ + +
- - + +
- + - - + - - - - - - - + - - - + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +
@elements.section@
@elements.section@
- - - -
@elements.label;noquote@   - -
   -
-
-
+ + + +
> - - - - - - - - - -
\@formgroup.widget;noquote@ - -
-
- \@formerror.@elements.id@;noquote\@ -
-
-
- - - - -
\@formerror.@elements.id@;noquote\@ -
-
+ + + + + + @elements.label;noquote@ + + * + + +   + + + + + + + + + + + + + + + + +
\@formgroup.widget;noquote@ + +
+
+
+ + + + + + + + + + + +
+ \@formerror.@elements.id@;noquote\@ +
+
+
+ + +
+ [i] + +
+
+ +
+ + + + + * required <% break %> + + -
+
- +
- - -
Index: openacs-4/packages/acs-templating/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/apm-callback-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/tcl/apm-callback-procs.tcl 22 Sep 2003 18:03:48 -0000 1.1 @@ -0,0 +1,57 @@ +ad_library { + APM callback procedures for acs-templating. + + @creation-date 2003-09-22 + @author Lars Pind (lars@collaboraid.biz) + @cvs-id $Id: apm-callback-procs.tcl,v 1.1 2003/09/22 18:03:48 lars Exp $ +} + +namespace eval template {} +namespace eval template::apm {} + +ad_proc -public template::apm::before_upgrade { + {-from_version_name:required} + {-to_version_name:required} +} { + apm_upgrade_logic \ + -from_version_name $from_version_name \ + -to_version_name $to_version_name \ + -spec { + 4.6.4 5.0d1 { + db_transaction { + + # Change 'standard-lars' to 'standard' + + set package_id [apm_package_id_from_key "acs-templating"] + set DefaultFormStyle [parameter::get \ + -package_id $package_id \ + -parameter DefaultFormStyle] + + if { [string equal $DefaultFormStyle "standard-lars"] } { + parameter::set_value \ + -package_id $package_id \ + -parameter DefaultFormStyle \ + -value "standard" + } + + db_foreach subsite { + select package_id + from apm_packages + where package_key = 'acs-subsite' + } { + set DefaultFormStyle [parameter::get \ + -package_id $package_id \ + -parameter DefaultFormStyle] + + if { [string equal $DefaultFormStyle "standard-lars"] } { + parameter::set_value \ + -package_id $package_id \ + -parameter DefaultFormStyle \ + -value "standard" + } + } + + } + } + } +} Index: openacs-4/packages/acs-templating/tcl/form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/form-procs.tcl,v diff -u -r1.17 -r1.18 --- openacs-4/packages/acs-templating/tcl/form-procs.tcl 22 Sep 2003 17:42:56 -0000 1.17 +++ openacs-4/packages/acs-templating/tcl/form-procs.tcl 22 Sep 2003 18:03:48 -0000 1.18 @@ -366,6 +366,11 @@ set file_stub [template::get_resource_path]/forms/$style + if { ![file exists "${file_stub}.adp"] } { + # We always have a template named 'standard' + set file_stub "[template::get_resource_path]/forms/standard" + } + # set the asset url for images set assets "[template::get_resource_path]/assets" # assume resources are under page root (not safe) @@ -397,12 +402,7 @@ @return A string containing the HTML for the body of the form. } { - if { [catch { - set __adp_output [template $id $style] - }] } { - set style "standard" - set __adp_output [template $id $style] - } + set __adp_output [template $id $style] set level [template::adp_level]