Commit 3b779760 authored by Frank Bergmann's avatar Frank Bergmann

- OpenACS 5.9

parent da83718e
......@@ -2,17 +2,17 @@
<!-- Generated by the OpenACS Package Manager -->
<package key="acs-templating" url="http://openacs.org/repository/apm/packages/acs-templating/" type="apm_service">
<package-name>Templating</package-name>
<pretty-plural>Templating Services</pretty-plural>
<package-name>ACS Templating</package-name>
<pretty-plural>ACS Templating Services</pretty-plural>
<initial-install-p>t</initial-install-p>
<singleton-p>t</singleton-p>
<implements-subsite-p>f</implements-subsite-p>
<inherit-templates-p>t</inherit-templates-p>
<version name="5.10.0d1" url="http://openacs.org/repository/download/apm/acs-templating-5.10.0d1.apm">
<version name="5.9.0" url="http://openacs.org/repository/download/apm/acs-templating-5.9.0.apm">
<owner url="http://openacs.org">OpenACS</owner>
<summary>Templating library.</summary>
<release-date>2013-09-24</release-date>
<release-date>2015-10-04</release-date>
<vendor url="http://openacs.org">OpenACS</vendor>
<description format="text/html">The templating system provides the tag library and support routines
that allow developers and graphic designers to work
......@@ -27,8 +27,8 @@ layout of a site can be more easily administered.
<license>GPL version 2</license>
<maturity>3</maturity>
<provides url="acs-templating" version="5.10.0d1"/>
<requires url="acs-kernel" version="5.10.0d1"/>
<provides url="acs-templating" version="5.9.0"/>
<requires url="acs-kernel" version="5.9.0"/>
<callbacks>
<callback type="before-upgrade" proc="template::apm::before_upgrade"/>
......@@ -38,7 +38,7 @@ layout of a site can be more easily administered.
<parameter scope="instance" datatype="string" min_n_values="1" max_n_values="1" name="DefaultListFilterStyle" default="filters" description="The default list filter template to use if a particular listfilter tag does not explicitly specify the list filter style to use. &lt;br&gt; Relative to [acs_root_dir]/packages/acs-templating/resources/lists. If it starts with '/' then it is relative to [acs_root_dir]"/>
<parameter scope="instance" datatype="string" min_n_values="1" max_n_values="1" name="DefaultListStyle" default="table" description="The default list template to use if a particular list does not explicitly specify the list style to use. &lt;br&gt; Relative to [acs_root_dir]/packages/acs-templating/resources/lists. If it starts with '/' then it is relative to [acs_root_dir]"/>
<parameter scope="instance" datatype="string" min_n_values="1" max_n_values="1" name="RefreshCache" default="as needed" description="When to re-translate templates. Values: never, as needed, always."/>
<parameter scope="instance" datatype="string" min_n_values="1" max_n_values="1" name="RichTextEditor" default="xinha" description="Use the specified javascript text editor when UseHtmlAreaForRichtextP is activated. Valid arguments are &quot;xinha&quot; and &quot;tinymce&quot;."/>
<parameter scope="instance" datatype="string" min_n_values="1" max_n_values="1" name="RichTextEditor" default="xinha" description="Use the specified javascript text editor when UseHtmlAreaForRichtextP is activated. Valid arguments are &quot;xinha&quot;, &quot;ckeditor4&quot;, and &quot;tinymce&quot;."/>
<parameter scope="instance" datatype="number" min_n_values="1" max_n_values="1" name="ShowCompiledTemplatesP" default="0" description="Show thecompiled template (for debugging) at .cmp URL"/>
<parameter scope="instance" datatype="number" min_n_values="1" max_n_values="1" name="ShowDataDictionariesP" default="0" description="Offer data dictionaries on .dat/.fmt URL."/>
<parameter scope="instance" datatype="number" min_n_values="1" max_n_values="1" name="SpellcheckDialectsP" default="0" description="Do you care about dialects or not? If this is set to '1' all available dictionary dialects for all available languages will appear as choices in the pull-down menu. If the param is set to '0', only the base-language(s) will be shown. However, it only works with aspell - on ispell you'll simply get a 'yes' and 'no' option, no matter how this param is set, where 'yes' will use ispell's default dictionary. NOTE! You'll need to restart the server for this param to take effect."/>
......
<!-- Dark blue frame -->
<table bgcolor=#6699CC cellspacing=0 cellpadding=4 border=0>
<table bgcolor="#6699CC" cellspacing="0" cellpadding="4" border="0">
<tr><td>
<!-- Light blue pad -->
<table bgcolor=#99CCFF cellspacing=0 cellpadding=6 border=0 width="100%">
<table bgcolor="#99CCFF" cellspacing="0" cellpadding="6" border="0" width="100%">
<tr><td>
<!-- Form elements -->
<table bgcolor=#99CCFF cellspacing=0 cellpadding=2 border=0 width="100%">
<table bgcolor="#99CCFF" cellspacing="0" cellpadding="2" border="0" width="100%">
<multiple name=elements>
<if @elements.section@ not nil>
<tr><td colspan=2 bgcolor=#eeeeee><b>@elements.section@</b></td></tr>
<tr><td colspan="2" bgcolor="#eeeeee"><b>@elements.section@</b></td></tr>
</if>
<group column="section">
......@@ -43,7 +43,7 @@
</td>
</if>
<if @elements.widget@ eq radio or @elements.widget@ eq checkbox>
<if @elements.label@ nil><td colspan=2>></if>
<if @elements.label@ nil><td colspan="2">></if>
<else><td></else>
<noparse>
<table cellpadding="4" cellspacing="0" border="0">
......@@ -64,12 +64,12 @@
</if>
<else>
<if @elements.widget@ eq inform>
<td bgcolor=#EEEEEE>
<td bgcolor="#EEEEEE">
<noparse><formwidget id=@elements.id@></noparse>
</td>
</if>
<else>
<if @elements.label@ nil><td nowrap colspan=2></if>
<if @elements.label@ nil><td nowrap colspan="2"></if>
<else><td nowrap></else>
<noparse><formwidget id=@elements.id@>
<formerror id=@elements.id@><br><font
......
......@@ -14,13 +14,13 @@ set __return_url__ [ad_conn url]
multirow create __form_contents__ __key__ __value__
if { ![empty_string_p [set __form__ [ns_getform]]] } {
if { [set __form__ [ns_getform]] ne "" } {
set __form_size__ [ns_set size $__form__]
set __form_counter__ 0
while { $__form_counter__ < $__form_size__ } {
if { [string equal [ns_set key $__form__ $__form_counter__] __confirmed_p] } {
if { [ns_set key $__form__ $__form_counter__] eq "__confirmed_p" } {
multirow append __form_contents__ __confirmed_p 1
} else {
......@@ -36,3 +36,9 @@ if { ![empty_string_p [set __form__ [ns_getform]]] } {
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
<table bgcolor=#6699CC cellspacing=0 cellpadding=4 border=0 width="95%">
<table bgcolor="#6699CC" cellspacing="0" cellpadding="4" border="0" width="95%">
<tr bgcolor="#FFFFFF">
<td align=left><b>@form_properties.title@</b></td>
<td align=right>&nbsp;</td>
<td align="left"><b>@form_properties.title@</b></td>
<td align="right">&nbsp;</td>
</tr>
<if @elements:rowcount@ le 0>
<tr><td colspan=2><i>No items</i></td></tr>
<tr><td colspan="2"><i>No items</i></td></tr>
</if>
<else>
<tr>
<td colspan=2>
<td colspan="2">
<table bgcolor=#99CCFF cellspacing=0 cellpadding=2 border=0 width="100%">
<table bgcolor="#99CCFF" cellspacing="0" cellpadding="2" border="0" width="100%">
<tr bgcolor="#99CCFF">
<% set list_tag $form_properties(headers) %>
<list name=list_tag>
<th align=left>@list_tag:item@</th>
<list name="list_tag">
<th align="left">@list_tag:item@</th>
</list>
</tr>
......@@ -25,34 +25,34 @@
<if @elements.rownum@ le @elements:rowcount@>
<if @elements.col@ eq 1>
<if @elements.row@ odd><tr bgcolor=#ffffff></if>
<else><tr bgcolor=#dddddd></else>
<if @elements.row@ odd><tr bgcolor="#ffffff"></if>
<else><tr bgcolor="#dddddd"></else>
</if>
<if @elements.widget@ not in "hidden" "submit">
<td nowrap>
<if @elements.widget@ eq radio or @elements.widget@ eq checkbox>
<table cellpadding=4 cellspacing=0 border=0>
<table cellpadding="4" cellspacing="0" border="0">
<tr>
<noparse>
<formgroup id=@elements.id@>
<formgroup id="@elements.id@">
<td>\@formgroup.widget;noquote\@</td><td><label for="@elements.form_id@:elements:@elements.id@:\@formgroup.option\@">\@formgroup.label\@</label></td>
</formgroup>
</noparse>
</tr>
</table>
<noparse><formerror id=@elements.id@><br><font color="red"><b>\@formerror.@elements.id@\@<b></font></formerror></noparse>
<noparse><formerror id="@elements.id@"><br><font color="red"><b>\@formerror.@elements.id@\@<b></font></formerror></noparse>
</if>
<else>
<if @elements.widget@ eq inform>
<noparse><formwidget id=@elements.id@></noparse>
<noparse><formwidget id="@elements.id@"></noparse>
</if>
<else>
<noparse>
<formwidget id=@elements.id@>
<formerror id=@elements.id@><br><font color="red"><b>
<formwidget id="@elements.id@">
<formerror id="@elements.id@"><br><font color="red"><b>
\@formerror.@elements.id@\@<b></font></formerror>
</noparse>
</else>
......@@ -75,7 +75,7 @@
<multiple name=elements>
<if @elements.widget@ eq "submit">
<tr bgcolor="#FFFFFF">
<td align=right colspan=2><input type=submit name=@elements.id@ value="@elements.label@"></td>
<td align="right" colspan="2"><input type="submit" name="@elements.id@" value="@elements.label@"></td>
</tr>
</if>
</multiple>
......@@ -87,6 +87,6 @@
<multiple name=elements>
<if @elements.widget@ eq "hidden">
<noparse><formwidget id=@elements.id@></noparse>
<noparse><formwidget id="@elements.id@"></noparse>
</if>
</multiple>
......@@ -29,8 +29,8 @@
<if @elements.label@ not nil>
<td><span style="font-weight: bold">@elements.label;noquote@</span>&nbsp;&nbsp;
<if @elements.help_text@ not nil>
<br />&nbsp;&nbsp;
<span style="font-size: 90%"><noparse><formhelp id=@elements.id@></noparse></span><br />
<br>&nbsp;&nbsp;
<span style="font-size: 90%"><noparse><formhelp id=@elements.id@></noparse></span><br>
</if>
</td>
</if>
......@@ -61,7 +61,7 @@
<if @elements.label@ nil><td nowrap="nowrap" colspan="2"></if>
<else><td nowrap="nowrap"></else>
<noparse><formwidget id=@elements.id@>
<formerror id=@elements.id@><br />
<formerror id=@elements.id@><br>
<span style="font-weight: bold; color: red">\@formerror.@elements.id@;noquote\@</span>
</formerror></noparse>
</td>
......
<!-- Dark blue frame -->
<table bgcolor=#FFFFFF cellspacing=0 cellpadding=4 border=0>
<table bgcolor="#FFFFFF" cellspacing="0" cellpadding="4" border="0">
<tr><td>
<!-- Light blue pad -->
<table bgcolor=#FFFFFF cellspacing=0 cellpadding=6 border=0 width="100%">
<table bgcolor="#FFFFFF" cellspacing="0" cellpadding="6" border="0" width="100%">
<tr><td>
<!-- Form elements -->
<table bgcolor=#FFFFFF cellspacing=0 cellpadding=2 border=0 width="100%">
<table bgcolor="#FFFFFF" cellspacing="0" cellpadding="2" border="0" width="100%">
<multiple name=elements>
<if @elements.section@ not nil>
<tr><td colspan=2 bgcolor=#FFFFFF><b>@elements.section@</b></td></tr>
<tr><td colspan="2" bgcolor="#FFFFFF"><b>@elements.section@</b></td></tr>
</if>
<group column="section">
......@@ -24,7 +24,7 @@
<else>
<if @elements.widget@ eq "submit">
<tr><td align=center colspan=2>
<tr><td align="center" colspan="2">
<group column="widget">
<noparse><formwidget id=@elements.id@></noparse>
</group>
......@@ -36,15 +36,15 @@
<td><b>@elements.label;noquote@</b>&nbsp;&nbsp;
<if @elements.help_text@ not nil>
<br>&nbsp;&nbsp;
<font size=-1><noparse><formhelp id=@elements.id@></noparse></font><br>
<font size="-1"><noparse><formhelp id=@elements.id@></noparse></font><br>
</if>
</td>
</if>
<if @elements.widget@ eq radio or @elements.widget@ eq checkbox>
<if @elements.label@ nil><td colspan=2>></if>
<if @elements.label@ nil><td colspan="2">></if>
<else><td></else>
<noparse>
<table cellpadding=4 cellspacing=0 border=0>
<table cellpadding="4" cellspacing="0" border="0">
<formgroup id=@elements.id@>
<tr><td>\@formgroup.widget@</td>
<td><label for="@elements.form_id@:elements:@elements.id@:\@formgroup.option@">\@formgroup.label@</label></td></tr>
......@@ -58,12 +58,12 @@
</if>
<else>
<if @elements.widget@ eq inform>
<td bgcolor=#FFFFFF>
<td bgcolor="#FFFFFF">
<noparse><formwidget id=@elements.id@></noparse>
</td>
</if>
<else>
<if @elements.label@ nil><td nowrap colspan=2></if>
<if @elements.label@ nil><td nowrap colspan="2"></if>
<else><td nowrap></else>
<noparse><formwidget id=@elements.id@>
<formerror id=@elements.id@><br><font
......
<table cellspacing="2" cellpadding="2" border="0">
<multiple name=elements>
<multiple name=elements>
<if @elements.section@ not nil>
<fieldset id="@elements.form_id;noi18n@:@elements.section;noi18n@" @elements.sec_fieldset;noquote@><!-- section fieldset -->
<legend @elements.sec_legend;noquote@><span>@elements.sec_legendtext@</span></legend>
</if>
<group column="section">
<if @elements.widget;literal@ eq "hidden">
<noparse><div><formwidget id="@elements.id@"></div></noparse>
</if>
<else>
<if @elements.widget;literal@ eq "submit"><!-- if form submit button wrap it in the form-button class -->
<div class="form-button">
<group column="widget">
<noparse><formwidget id="@elements.id@">&nbsp;</noparse>
</group>
</div>
</if>
<else> <!-- wrap the form item in the form-item-wrapper class -->
<div class="form-item-wrapper">
<noparse>
<formerror id="@elements.id@">
<span class="form-error">
\@formerror.@elements.id@;noquote\@
</span> <!-- /form-error -->
</formerror>
</noparse>
<if @elements.section@ not nil>
<tr class="form-section"><th colspan="2">@elements.section;noquote@</th></tr>
</if>
<if @elements.widget;literal@ in radio checkbox>
<if @elements.legendtext@ defined>
<fieldset @elements.fieldset;noi18n@>
<!-- radio button groups and checkbox groups get their own fieldsets -->
<legend @elements.legend;oni18n@><span>@elements.legendtext@</span></legend>
</if>
</if>
<group column="section">
<if @elements.widget@ eq "hidden">
<noparse><formwidget id=@elements.id@></noparse>
</if>
<if @elements.label@ not nil>
<noparse>
<if @form_properties.mode;literal@ eq display or @elements.widget;literal@ in radio checkbox date inform>
<!-- no label tag -->
</if>
<else>
<label for="@elements.id@">
</else>
<else>
<if \@formerror.@elements.id@\@ not nil>
<span class="form-label form-label-error">
</if>
<else>
<span class="form-label">
</else>
</noparse>
<if @elements.widget@ eq "submit">
<tr class="form-element">
<td align="left" colspan="2">
<group column="widget">
<noparse><formwidget id="@elements.id@"></noparse>
</group>
</td>
</tr>
</if>
<else>
<tr class="form-element">
@elements.label;noquote@
<if @elements.label@ not nil>
<noparse>
<if \@formerror.@elements.id@\@ not nil>
<td class="form-label-error">
</if>
<else>
<td class="form-label">
</else>
</noparse>
@elements.label;noquote@
<if @form_properties.show_required_p@ true>
<if @elements.optional@ nil and @elements.mode@ ne "display" and @elements.widget@ ne "inform"><span class="form-required-mark">*</span></if>
</if>
</td>
</if>
<else>
<td class="form-label">
&nbsp;
</td>
</else>
<if @form_properties.show_required_p;literal@ true>
<if @elements.optional@ nil and @elements.mode;literal@ ne "display" and @elements.widget;literal@ ne "inform">
<strong class="form-required-mark">(#acs-templating.required#)</strong>
</if>
</if>
</span><!-- form-label -->
<if @form_properties.mode;literal@ eq display or @elements.widget;literal@ in radio checkbox date inform>
<!-- no label tag -->
</if>
<else>
</label>
</else>
<noparse>
<if \@formerror.@elements.id@\@ not nil>
<td class="form-widget-error">
</if>
<else>
<td class="form-widget">
</else>
</noparse>
</if>
<else>
<if @form_properties.show_required_p;literal@ true>
<if @elements.optional@ nil and @elements.mode;literal@ ne "display" and @elements.widget;literal@ ne "inform">
<span class="form-label form-required-mark">
#acs-templating.required#
</span>
</if>
</if>
</else>
<if @elements.widget@ eq radio or @elements.widget@ eq checkbox>
<noparse>
<table class="formgroup">
<formgroup id="@elements.id@">
<tr>
<td>\@formgroup.widget;noquote@</td>
<td class="form-widget">
<label for="@elements.form_id@:elements:@elements.id@:\@formgroup.option@">
\@formgroup.label;noquote@
</label>
</td>
</tr>
</formgroup>
</table>
</noparse>
</if>
<if @elements.widget;literal@ in radio checkbox>
<noparse>
<span class="form-widget">
<formgroup id="@elements.id@">
<label for="@elements.form_id@:elements:@elements.id@:\@formgroup.option@">
\@formgroup.widget;noquote@
\@formgroup.label;noquote@
</label><br>
</formgroup>
</span>
</noparse>
</if>
<else>
<noparse>
<span class="form-widget">
<formwidget id="@elements.id@">
</span>
</noparse>
</else>
<if @elements.help_text@ not nil>
<span class="form-help-text">
<img src="/shared/images/info.gif" width="12" height="9" alt="Help" title="Help text" style="border:0">
<noparse><formhelp id="@elements.id@"></noparse>
</span> <!-- /form-help-text -->
</if>
<else>
<noparse>
<formwidget id="@elements.id@">
</noparse>
</else>
<if @elements.widget;literal@ in radio checkbox>
<if @elements.legendtext@ defined>
<!-- radio button groups and checkbox groups get their own fieldsets -->
</fieldset>
</if>
</if>
</div> <!-- form-item-wrapper -->
</else>
</else>
</group>
<noparse>
<formerror id="@elements.id@">
<div class="form-error">
\@formerror.@elements.id@;noquote\@
</div>
</formerror>
</noparse>
<if @elements.help_text@ not nil and @elements.mode@ ne "display">
<div class="form-help-text">
<img src="/shared/images/info.gif" width="12" height="9" alt="[i]" title="Help text" border="0">
<noparse><formhelp id="@elements.id@"></noparse>
</div>
</if>
</td>
</tr>
</else>
</else>
</group>
</multiple>
</table>
<multiple name="elements">
<if @form_properties.show_required_p@ true>
<if @elements.optional@ nil and @elements.mode@ ne "display" and @elements.widget@ ne "inform" and @elements.widget@ ne "hidden" and @elements.widget@ ne "submit">
<span class="form-required-mark">*</span> #acs-templating.required# <% break %>
</if>
<if @elements.section@ not nil>
</fieldset> <!-- section fieldset -->
</if>
</multiple>
<table cellpadding=0 cellspacing=0 border=0 bgcolor=#999999 width="100%" height=0>
<tr bgcolor=#999999>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#999999" width="100%" height="0">
<tr bgcolor="#999999">
<td>
<table cellpadding=0 cellspacing=0 border=0 bgcolor=#DDDDDD width="100%">
<tr align=center>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#DDDDDD" width="100%">
<tr align="center">
<multiple name=elements>
<if @elements.current@ eq 1><td bgcolor=#FFFFFF></if>
<if @elements.current@ eq 1><td bgcolor="#FFFFFF"></if>
<else>
<td bgcolor=#99CCFF>
<table border=0 cellpadding=2 cellspacing=1 width="100%" bgcolor=#6699cc>
<tr align=center bgcolor=#99ccff><td>
<td bgcolor="#99CCFF">
<table border="0" cellpadding="2" cellspacing="1" width="100%"
bgcolor="#6699cc">
<tr align="center" bgcolor="#99ccff"><td>
</else>
&nbsp;<font size=-1><noparse><formwidget id=@elements.id@></noparse></font>
&nbsp;<font size="-1"><noparse><formwidget id="@elements.id@"></noparse></font>
&nbsp;
</td>
<if @elements.current@ ne 1></tr></table></td></if>
......
<!-- Dark blue frame -->
<table bgcolor=#6699CC cellspacing=0 cellpadding=4 border=0>
<table bgcolor="#6699CC" cellspacing="0" cellpadding="4" border="0">
<tr><td>
<!-- Light blue pad -->
<table bgcolor=#99CCFF cellspacing=0 cellpadding=6 border=0 width="100%">
<table bgcolor="#99CCFF" cellspacing="0" cellpadding="6" border="0" width="100%">
<tr><td>
<table bgcolor=#99CCFF cellspacing=0 cellpadding=2 border=0 width="100%">
<table bgcolor="#99CCFF" cellspacing="0" cellpadding="2" border="0" width="100%">
<multiple name=elements>
<if @elements.section@ not nil>
<tr><td colspan=2 bgcolor=#eeeeee><b>@elements.section;noquote@</b></td></tr>
<tr><td colspan="2" bgcolor="#eeeeee"><b>@elements.section;noquote@</b></td></tr>
</if>
<group column="section">
......@@ -27,8 +27,8 @@
<else>
<!-- If the widget is wide, display it in its own section -->
<if @elements.wide@ not nil>
<tr><td colspan=2 bgcolor=#eeeeee><b>@elements.label;noquote@</b></td></tr>
<tr><td colspan=2>
<tr><td colspan="2" bgcolor="#eeeeee"><b>@elements.label;noquote@</b></td></tr>
<tr><td colspan="2">
</if>
<else>
<tr><td><b>@elements.label@</b>&nbsp;&nbsp;
......@@ -46,14 +46,14 @@
</if>
</if><else><td></else>
<noparse>
<table cellpadding=4 cellspacing=0 border=0>
<table cellpadding="4" cellspacing="0" border="0">
<formgroup id=@elements.id@ cols=4>
<formgroup id="@elements.id@" cols="4">
<if \@formgroup.col@ eq 1><tr></if>
<if \@formgroup.rownum@ le \@formgroup:rowcount@>
<td align=right>&nbsp;\@formgroup.widget;noquote@</td>
<td align=left><label for="@elements.form_id@:elements:@elements.id@:\@formgroup.option@">\@formgroup.label@</label></td>
<td align="right">&nbsp;\@formgroup.widget;noquote@</td>
<td align="left"><label for="@elements.form_id@:elements:@elements.id@:\@formgroup.option@">\@formgroup.label@</label></td>
</if><else><td>&nbsp;</td><td>&nbsp;</td></else>
<if \@formgroup.col@ eq 4></tr></if>
......@@ -75,14 +75,14 @@
<font color="red"><b>\@formerror.@elements.id@;noquote\@</b></font><br>
</formerror>
</noparse>
</if><else><td bgcolor=#EEEEEE></else>
<noparse><formwidget id=@elements.id;noquote@></noparse>
</if><else><td bgcolor="#EEEEEE"></else>
<noparse><formwidget id="@elements.id;noquote@"></noparse>
</td>
</if>
<else>
<if @elements.wide@ not nil></if><else><td nowrap></else>
<noparse><formwidget id=@elements.id@>
<formerror id=@elements.id@><br><font
<noparse><formwidget id="@elements.id@">
<formerror id="@elements.id@"><br><font
color="red"><b>\@formerror.@elements.id@;noquote\@<b></font>
</formerror></noparse>
</td>
......
......@@ -24,7 +24,7 @@
# }
# - The recieving page variable must be of the type :multiple
# since the filter sends the values in the following way:
# filter_name=filter_value&filter_name=filter_value&....&extra_variables=extra_values
# filter_name=filter_value&amp;filter_name=filter_value&....&amp;extra_variables=extra_values
%>
......
......@@ -4,3 +4,9 @@ set code [template::util::read_file $code_stub.tcl]
template::get_datasources $code
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -3,3 +3,9 @@
foreach key [array names requesterror] {
lappend requesterrors $requesterror($key)
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -66,3 +66,9 @@ ad_proc -public template_tag { name arglist body } {
default { error [_ acs-templating.Tag_handler_invalid_number_of_args] }
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -5,3 +5,9 @@
rp_register_extension_handler adp adp_parse_ad_conn_file
rp_register_extension_handler tcl adp_parse_ad_conn_file
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -106,3 +106,9 @@ namespace eval template {
namespace export form element request
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -107,3 +107,9 @@ ad_proc -private template::apm::after_upgrade {
}
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -361,3 +361,9 @@ ad_proc -public template::widget::currency {
return $output
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -513,3 +513,9 @@ ad_proc -public template::data::validate::time_of_day {
return [template::util::date::validate $value message]
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -6,3 +6,9 @@
# Initialize the months array
template::util::date::init
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -1287,11 +1287,11 @@ ad_proc -public template::widget::textdate { element_reference tag_attributes }
}
if {$element(mode) eq "edit"} {
append output "<input type=\"text\" name=\"$element(id)\" size=\"10\" maxlength=\"10\" id=\"$element(id)_input_field\" value=\"[ad_quotehtml $textdate]\" >"
append output "<input type=\"text\" name=\"$element(id)\" size=\"10\" maxlength=\"10\" id=\"$element(id)_input_field\" value=\"[ns_quotehtml $textdate]\" >"
append output "<input type=\"button\" style=\"border-width: 0px; height: 17px; width: 19px; background-image: url('/resources/acs-templating/calendar.gif'); background-repeat: no-repeat; cursor: pointer;\" onclick=\"return showCalendarWithDefault('$element(id)_input_field', '$javascriptdate', '[template::util::textdate_localized_format]');\" >"
} else {
append output $textdate
append output "<input type=\"hidden\" name=\"$element(id)\" value=\"[ad_quotehtml $textdate]\">"
append output "<input type=\"hidden\" name=\"$element(id)\" value=\"[ns_quotehtml $textdate]\">"
}
return $output
......@@ -1416,3 +1416,9 @@ ad_proc -public template::widget::time_of_day { element_reference tag_attributes
return [template::widget::date element $tag_attributes]
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -20,3 +20,9 @@ ad_proc -public watch_files {} {
}
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -166,3 +166,9 @@ ad_proc -public template::verify_datasources {} {
return 1
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -175,8 +175,7 @@ ad_proc -private -deprecated template::util::display_value { ref } {
@see use simple "ns_log ...." instead
} {
upvar $ref value
ns_log notice "$ref: $value
"
ns_log notice "$ref: $value"
}
......@@ -606,13 +605,13 @@ ad_proc -private doc::parse_tcl_library { dir_list } {
foreach dir $dir_list {
#debug
#template::util::display_value dir
#debug
#template::util::display_value dir
# using this lame hack since most aD servers are running an earlier version of Tcl than 8.3,
# which supports the -directory switch that this hack emulates
append file_list [glob -nocomplain $dir/*.tcl $dir/*/*.tcl $dir/*/*/*.tcl $dir/*/*/*/*.tcl ]
append file_list " "
# using this lame hack since most aD servers are running an earlier version of Tcl than 8.3,
# which supports the -directory switch that this hack emulates
append file_list [glob -nocomplain $dir/*.tcl $dir/*/*.tcl $dir/*/*/*.tcl $dir/*/*/*/*.tcl ]
append file_list " "
}
#debugging
......@@ -634,3 +633,9 @@ ad_proc -private doc::parse_tcl_library { dir_list } {
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -760,3 +760,9 @@ ad_proc -private template::element::copy_value_to_values_if_defined {} {
}
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -66,3 +66,9 @@ ad_proc -public template::util::file::get_property {
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -77,7 +77,6 @@ ad_proc -public cmp_page_filter { why } {
regsub {.cmp} $url {} url_stub
regexp {^/([^/]*)(.*)} $url_stub all package_key rest
set file_stub "$::acs::rootdir/packages/$package_key/www$rest"
set beginTime [clock clicks -milliseconds]
set output "<pre>[ns_quotehtml [template::adp_compile -file $file_stub.adp]]</pre>"
......@@ -86,8 +85,7 @@ ad_proc -public cmp_page_filter { why } {
ns_log debug "cmp_page_filter: Time elapsed: $timeElapsed"
} errMsg] } {
global errorInfo
set output <html><body><pre>[ad_quotehtml $errorInfo]</pre></body></html>
set output <html><body><pre>[ns_quotehtml $::errorInfo]</pre></body></html>
}
ns_return 200 text/html $output
......@@ -103,10 +101,9 @@ ad_proc -public dat_page_filter { why } {
regsub {.dat} $url {} url_stub
regexp {^/([^/]*)(.*)} $url_stub all package_key rest
set code_stub "$::acs::rootdir/packages/$package_key/www$rest"
set beginTime [clock clicks -milliseconds]
set file_stub [template::get_resource_path]/messages/datasources
set file_stub [template::resource_path -type messages -style $datasources]
set output [template::adp_parse $file_stub [list code_stub $code_stub]]
......@@ -114,8 +111,7 @@ ad_proc -public dat_page_filter { why } {
ns_log debug " dat_page_filter: Time elapsed: $timeElapsed"
} errMsg] } {
global errorInfo
set output <html><body><pre>$errorInfo</pre></body></html>
set output <html><body><pre>$::errorInfo</pre></body></html>
}
ns_return 200 text/html $output
......@@ -153,7 +149,6 @@ ad_proc -private frm_page_filter { why } {
Return the form data for a request for .frm
} {
if { [catch {
set beginTime [clock clicks -milliseconds]
set output [template::frm_page_handler]
......@@ -162,11 +157,16 @@ ad_proc -private frm_page_filter { why } {
ns_log debug "frm_page_filter: Time elapsed: $timeElapsed"
} errMsg] } {
global errorInfo
set output $errorInfo
set output $::errorInfo
}
ns_return 200 text/html "<html><body><pre>[ns_quotehtml $output]</pre></body></html>"
return filter_return
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -338,22 +338,20 @@ ad_proc -private template::form::template { id { style "" } } {
-default "standard-lars"]]
}
# Added support for storing form templates outside acs-templating
if {[regexp {^/(.*)} $style path]} {
set file_stub "$::acs::rootdir$path"
} else {
set file_stub [template::get_resource_path]/forms/$style
}
if { ![file exists "${file_stub}.adp"] } {
set file_stub [template::resource_path -type forms -style $style]
if { ![file exists "$file_stub.adp"] } {
# We always have a template named 'standard'
set file_stub "[template::get_resource_path]/forms/standard"
set file_stub [template::resource_path -type forms -style standard]
}
# set the asset url for images
set assets "[template::get_resource_path]/assets"
# assume resources are under page root (not safe)
regsub "^$::acs::pageroot" $assets {} assets
# the following block seems useless, deactivated for the time being
if {0} {
# set the asset url for images
set assets "[template::get_resource_path]/assets"
# assume resources are under page root (not safe)
regsub "^$::acs::pageroot" $assets {} assets
}
# ensure that the style template has been compiled and is up-to-date
template::adp_init adp $file_stub
......@@ -512,7 +510,7 @@ ad_proc -private template::form::render { id tag_attributes } {
}
if { [info exists form_properties(actions)]
&& [template::util::is_true $form_properties(actions)]
&& $form_properties(actions) ne ""
} {
set form_properties(display_buttons) $form_properties(actions)
}
......@@ -863,7 +861,7 @@ ad_proc -public template::form::export {} {
set value [ns_set value $form $i]
append export_data "
<div><input type=\"hidden\" name=\"$key\" value=\"[ad_quotehtml $value]\"></div>"
<div><input type=\"hidden\" name=\"$key\" value=\"[ns_quotehtml $value]\"></div>"
}
return $export_data
......@@ -919,3 +917,9 @@ ad_proc -public template::form::set_error {
set formerror($element) $error
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -37,8 +37,47 @@ ad_proc -private template::reset_request_vars {} {
set ::template::footers [list]
}
ad_proc -public template::add_script {
{-type "text/javascript"}
{-defer:boolean}
{-async:boolean}
{-src ""}
{-charset ""}
{-script ""}
{-order "0"}
{-section "head"}
} {
@param type the type attribute of the script tag, eg. 'text/javascript'
@param defer whether execution of the script should be defered until after
the page has been loaded
@param async whether execution of the script should be executed asynchronously
as soon as it is available
@param src the src attribute of the script tag, ie. the source url of the
script
@param charset the charset attribute of the script tag, ie. the character
set of the script if it differs from the main document
@param script the inline script for the body of the script tag. This
parameter will be ignored if a value has been supplied for src
@param order specify inclusion order
@param section section, where script is added ("head" or "body")
} {
if {$section eq "head"} {
#
# A head script
#
::template::head::add_script -type $type -defer=$defer_p -async=$async_p \
-src $src -charset $charset -script $script -order $order
} else {
#
# A body script. The order is ignored.
#
::template::add_body_script -type $type -defer=$defer_p -async=$async_p \
-src $src -charset $charset -script $script
}
}
ad_proc -public template::head::add_script {
{-type:required}
{-type "text/javascript"}
{-defer:boolean}
{-async:boolean}
{-src ""}
......@@ -63,8 +102,9 @@ ad_proc -public template::head::add_script {
@param charset the charset attribute of the script tag, ie. the character
set of the script if it differs from the main document
@param script the inline script for the body of the script tag. This
parameter will be ignored if a value has been supplied for
src
parameter will be ignored if a value has been supplied for src
@param order specify inclusion order
} {
variable ::template::head::scripts
......@@ -318,7 +358,7 @@ ad_proc -public template::add_body_handler {
}
ad_proc -public template::add_body_script {
{-type:required}
{-type "text/javascript"}
{-defer:boolean}
{-async:boolean}
{-src ""}
......@@ -644,3 +684,9 @@ ad_proc template::get_body_event_handlers {
return $event_handlers
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -59,3 +59,9 @@ ad_proc -public template::get_mime_type {} {
return $mime_type
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -38,7 +38,7 @@ ad_proc -public template::paginator { command args } {
paginator::$command {*}$args
}
ad_proc -public template::paginator::create { statement_name name query args } {
ad_proc -public template::paginator::create { statement_name name query count_query args } {
Creates a paginator object. Performs an initial query to get the complete
list of rows in the query result and caches the result for subsequent
queries.
......@@ -861,3 +861,9 @@ ad_proc -private template::paginator::get_reference {} {
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -8,3 +8,4 @@
</fullquery>
</queryset>
......@@ -478,25 +478,26 @@ ad_proc -public template::expand_percentage_signs { message } {
return $formatted_message
}
ad_proc -public template::adp_compile { source_type source } {
ad_proc -public template::adp_compile { {-file ""} {-string ""} } {
Converts an ADP template into a chunk of Tcl code. Caching this code
avoids the need to reparse the ADP template with each request.
@param source_type Indicates the source of the Tcl code to compile.
Valid options are -string or -file
@param source A string containing either the template itself
(for -string) or the path to the file containing the template (for -file)
@param file The file name of the source
@param string string to be compliled
@return The compiled code.
Valid options are either -string or -file
} {
variable parse_list
# initialize the compiled code
set parse_list [list "set __adp_output {}; set __ad_conn_locale \[ad_conn locale\]"]
switch -exact -- $source_type {
-file { set chunk [template::util::read_file $source] }
-string { set chunk $source }
default { error "Source type must be -string or -file" }
if {$file ne "" && $string ne ""} {
error "you must specify either -file or -string"
} elseif {$file ne ""} {
set chunk [template::util::read_file $file]
} else {
set chunk $string
}
# substitute <% ... %> blocks with registered tags so they can be handled
......@@ -531,7 +532,7 @@ ad_proc -public template::adp_compile { source_type source } {
# We do each substitution set in two pieces, separately for normal
# variables and for variables with ";noquote" attached to them.
# Specifically, @x@ gets translated to [ad_quotehtml ${x}], whereas
# Specifically, @x@ gets translated to [ns_quotehtml ${x}], whereas
# @x;noquote@ gets translated to ${x}. The same goes for array
# variable references.
......@@ -550,7 +551,7 @@ ad_proc -public template::adp_compile { source_type source } {
if {[ns_quotehtml ""] eq ""} {
while {[regsub -all [template::adp_array_variable_regexp] $code {\1[ns_quotehtml [lang::util::localize $\2(\3)]]} code]} {}
} else {
while {[regsub -all [template::adp_array_variable_regexp] $code {\1[ad_quotehtml [lang::util::localize $\2(\3)]]} code]} {}
while {[regsub -all [template::adp_array_variable_regexp] $code {\1[ns_quotehtml [lang::util::localize $\2(\3)]]} code]} {}
}
# substitute simple variable references
......@@ -560,7 +561,7 @@ ad_proc -public template::adp_compile { source_type source } {
if {[ns_quotehtml ""] eq ""} {
while {[regsub -all [template::adp_variable_regexp] $code {\1[ns_quotehtml [lang::util::localize ${\2}]]} code]} {}
} else {
while {[regsub -all [template::adp_variable_regexp] $code {\1[ad_quotehtml [lang::util::localize ${\2}]]} code]} {}
while {[regsub -all [template::adp_variable_regexp] $code {\1[ns_quotehtml [lang::util::localize ${\2}]]} code]} {}
}
# unescape protected # references
......
......@@ -872,8 +872,7 @@ ad_proc -public template::multirow {
}
1 {
# TCL_ERROR
global errorInfo errorCode
error $error $errorInfo $errorCode
error $error $::errorInfo $::errorCode
}
2 {
# TCL_RETURN
......@@ -1163,6 +1162,8 @@ ad_proc -public cache { command cache_key args } {
return $result
}
# Local Variables:
# tcl-indent-level: 2
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -157,29 +157,35 @@ ad_proc -public template::request::is_valid { { url "" } } {
@return 1 if no error conditions exist, 0 otherwise.
} {
set level [template::adp_level]
upvar #$level request:error requesterror
set level [template::adp_level]
upvar #$level request:error requesterror
if { [info exists requesterror] } {
if { [info exists requesterror] } {
# set requesterror as a data source
uplevel #$level "upvar 0 request:error requesterror"
# set requesterror as a data source
uplevel #$level "upvar 0 request:error requesterror"
if { $url ne "self" } {
if { $url ne "self" } {
if {$url eq {}} {
set file_stub [template::get_resource_path]/messages/request-error
} else {
set file_stub [ns_url2file $url]
}
template::set_file $file_stub
}
if {$url eq {}} {
set file_stub [template::resource_path -type messages -style request-error]
} else {
set file_stub [ns_url2file $url]
}
template::set_file $file_stub
}
return 0
return 0
} else {
} else {
return 1
}
return 1
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -294,7 +294,7 @@ ad_proc -public template::widget::richtext_or_file {
append output "onclick=\"javascript:acs_RichText_Or_File_InputMethodChanged('$element(form_id)', '$element(id)', this);\">"
append output "<label for=\"$element(id).storage_type_text\">Enter text</label><blockquote>"
} else {
append output "<input type=\"hidden\" name=\"$element(id).storage_type\" value=\"[ad_quotehtml $storage_type]\">"
append output "<input type=\"hidden\" name=\"$element(id).storage_type\" value=\"[ns_quotehtml $storage_type]\">"
}
if { $storage_type eq "" || $storage_type eq "text" } {
......@@ -329,11 +329,17 @@ ad_proc -public template::widget::richtext_or_file {
# Display mode
if { [info exists element(value)] } {
append output [template::util::richtext_or_file::get_property html_value $element(value)]
append output "<input type=\"hidden\" name=\"$element(id).mime_type\" value=\"[ad_quotehtml $mime_type]\">"
append output "<input type=\"hidden\" name=\"$element(id).storage_type\" value=\"[ad_quotehtml $storage_type]\">"
append output "<input type=\"hidden\" name=\"$element(id).text\" value=\"[ad_quotehtml $text]\">"
append output "<input type=\"hidden\" name=\"$element(id).mime_type\" value=\"[ns_quotehtml $mime_type]\">"
append output "<input type=\"hidden\" name=\"$element(id).storage_type\" value=\"[ns_quotehtml $storage_type]\">"
append output "<input type=\"hidden\" name=\"$element(id).text\" value=\"[ns_quotehtml $text]\">"
}
}
return $output
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
This diff is collapsed.
......@@ -109,3 +109,9 @@ db_transaction {
nsv_set spellchecker path $bin
nsv_set spellchecker lang_options $wanted_dicts
nsv_set spellchecker default_lang $default_lang
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -61,7 +61,8 @@ ad_proc -public template::data::transform::spellcheck {
# case 2, submission of the page showing errors: returns the corrected text.
set merge_text [template::util::spellcheck::merge_text $element(id)]
if { [set richtext_p $element(datatype) eq "richtext"] } {
set richtext_p [expr {$element(datatype) eq "richtext"}]
if { $richtext_p } {
# special treatment for the "richtext" datatype.
set format [template::util::richtext::get_property format [lindex $values 0]]
if { $merge_text ne "" } {
......@@ -342,7 +343,7 @@ ad_proc -public template::util::spellcheck::get_element_formtext {
regsub -all {<a [^<]*>} $formtext_to_display "<u>" formtext_to_display
regsub -all {</a>} $formtext_to_display "</u>" formtext_to_display
append formtext_to_display "<input type=\"hidden\" name=\"${var_to_spellcheck}.merge_text\" value=\"[ad_quotehtml $processed_text]\" >"
append formtext_to_display "<input type=\"hidden\" name=\"${var_to_spellcheck}.merge_text\" value=\"[ns_quotehtml $processed_text]\" >"
####
......@@ -439,3 +440,9 @@ ad_proc -public template::util::spellcheck::spellcheck_properties {
return [array get spellcheck]
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -276,3 +276,9 @@ template_tag tabstrip { chunk params } {
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -255,3 +255,9 @@ template_tag tablewidget { chunk params } {
template::adp_compile $chunk
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
This diff is collapsed.
......@@ -96,7 +96,7 @@ ad_proc -private template_tag_subst_reference {arg} {
substitute variable references
@return variable name
} {
if { [regsub {^"@([a-zA-Z0-9_]+)\.([a-zA-Z0-9_.]+)@"$} $arg {\1(\2)} arg1] } {
if { [regsub {^"@([a-zA-Z0-9_]+)\.([a-zA-Z0-9_.-]+)@"$} $arg {\1(\2)} arg1] } {
} elseif { [regsub {^"@([a-zA-Z0-9_:]+)@"$} $arg {\1} arg1] } {
} else {
set arg1 ""
......@@ -168,8 +168,7 @@ ad_proc -public template_tag_if_interp_expr {} {
}
in {
set expr "^([join [lrange $args $i end] "|"])\$"
append condition "\[regexp \"$expr\" $arg1\] "
append condition "$arg1 in { [lrange $args 2 end] } "
set next [llength $args]
}
......@@ -189,20 +188,17 @@ ad_proc -public template_tag_if_interp_expr {} {
if {$arg eq ""} {
error "IF tag nil test uses string not variable for $arg1"
}
#append condition "\[template::util::is_nil $arg\]"
append condition "(!\[info exists $arg\] || \${$arg} eq {})"
}
set next $i
}
defined {
# substitute variable references
if { ! ( [regsub {^"@([a-zA-Z0-9_]+)\.([a-zA-Z0-9_.]+)@"$} $arg1 {\1(\2)} arg1]
|| [regsub {^"@([a-zA-Z0-9_:]+)@"$} $arg1 {\1} arg1] )} {
error "IF tag defined test uses string not variable for $arg1"
set arg [template_tag_subst_reference $arg1]
if {$arg eq ""} {
error "IF tag nil test uses string not variable for $arg1"
}
append condition "\[info exists $arg1\]"
append condition "\[info exists $arg\]"
set next $i
}
......@@ -217,7 +213,8 @@ ad_proc -public template_tag_if_interp_expr {} {
}
true {
append condition "\[template::util::is_true $arg1\]"
#append condition "\[template::util::is_true $arg1\]"
append condition "\[string is true -strict $arg1\]"
set next $i
}
......@@ -228,7 +225,8 @@ ad_proc -public template_tag_if_interp_expr {} {
default {
# treat <if @foo_p@> as a shortcut for <if @foo_p@ true>
append condition "\[template::util::is_true $arg1\]"
#append condition "\[template::util::is_true $arg1\]"
append condition "\[string is true -strict $arg1\]"
set next [expr {$i - 1}]
}
}
......
......@@ -5,3 +5,9 @@ ns_cache create template_cache -size $size
set size [parameter::get -package_id $package_id -parameter TemplateQueryCacheSize -default 20000]
ns_cache create template_query_cache -size $size
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -20,3 +20,9 @@ if { [parameter::get -package_id $pkg_id -parameter ShowDataDictionariesP -defau
ad_register_filter postauth GET *.dat dat_page_filter
ad_register_filter postauth GET *.frm frm_page_filter
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -24,4 +24,9 @@ aa_register_case sql_date {
aa_true "to_timestamp for Oracle 9i and PostgreSQL" [string match "to_timestamp*" $sql_date]
}
}
}
\ No newline at end of file
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -10,3 +10,9 @@ ad_library {
# here. Use CVS to restore it.
#aa_register_case -cats { api } -bugs { 428 } group_tag
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -20,3 +20,9 @@ template::multirow append test II 1 a
template::multirow append test II 1 b
template::multirow append test II 2 a
template::multirow append test II 2 b
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -124,3 +124,9 @@ aa_register_case -cats {api smoke} expand_percentage_signs {
aa_equals "square brackets in array key safe" $expanded_message "Test message \$two(\$three(\[__does_not_exist\]))"
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -224,3 +224,9 @@ aa_register_case -cats { api } spellcheck__spellcheck_properties {
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -134,7 +134,9 @@ ad_proc -public template::util::is_true { x } {
@return 0 if the variable can be interpreted as false;
1 for true if it can't.
} {
expr {[string tolower $x] ni {0 f false n no off ""}}
#expr {[string tolower $x] ni {0 f false n no off ""}}
#ns_log notice "TRUE [expr {[string tolower $x] ni {0 f false n no off ""}}] [string is true -strict $x]"
string is true -strict $x
}
ad_proc -public template::util::lpop { ref } {
......@@ -482,20 +484,39 @@ ad_proc -public template::util::write_file { path text } {
close $fd
}
ad_proc -public template::util::url_to_file { url {reference_url ""} } {
Resolve a URL into an absolute file path.
ad_proc -public template::util::master_to_file { url {reference_url ""} } {
Resolve a URL into an absolute file path, but respect styled
master configuration for named masters
(e.g. acs-templating/resources/masters/... containing 2cols.adp)
} {
if { [string index $url 0] ne "/" } {
set master_stub [template::resource_path -type masters -style $url]
if { [string index $url 0] ne "/" } {
set path [file dirname $reference_url]/$url
if {[file exists $master_stub.adp]} {
set path $master_stub
} else {
set path [file dirname $reference_url]/$url
}
} else {
set path $::acs::rootdir/$url
}
return [ns_normalizepath $path]
}
} else {
ad_proc -public template::util::url_to_file { url {reference_url ""} } {
Resolve a URL into an absolute file path.
} {
set path $::acs::rootdir/$url
}
if { [string index $url 0] ne "/" } {
set path [file dirname $reference_url]/$url
} else {
set path $::acs::rootdir/$url
}
return [ns_normalizepath $path]
return [ns_normalizepath $path]
}
ad_proc -public template::util::resolve_directory_url { url } {
......@@ -538,7 +559,6 @@ ad_proc -public -deprecated template::util::get_cookie { name {default_value ""}
@see ad_get_cookie
} {
set headers [ns_conn headers]
set cookie [ns_set iget $headers Cookie]
if { [regexp "$name=(\[^;\]+)" $cookie match value] } {
......@@ -606,7 +626,7 @@ ad_proc -deprecated -public template::util::quote_html {
Quote possible HTML tags in the contents of the html parameter.
} {
return [ad_quotehtml $html]
return [ns_quotehtml $html]
}
ad_proc -public template::util::multirow_quote_html {multirow_ref column_ref} {
......@@ -622,7 +642,7 @@ ad_proc -public template::util::multirow_quote_html {multirow_ref column_ref} {
for { set i 1 } { $i <= $rowcount } { incr i} {
upvar $multirow_ref:$i arr
set arr($column_ref) [ad_quotehtml [set arr($column_ref)]]
set arr($column_ref) [ns_quotehtml [set arr($column_ref)]]
}
}
......@@ -757,14 +777,112 @@ ad_proc -public template::util::tcl_to_sql_list { lst } {
}
}
ad_proc -public template::get_resource_path {} {
ad_proc -deprecated template::get_resource_path {} {
Get the template directory
The body is doublequoted, so it is interpreted when this file is read
@see template::resource_path
} "
return \"[file dirname [file dirname [info script]]]/resources\"
"
ad_proc -public template::themed_template {
path
} {
Given a path like /packages/acs-admin/www/index pointing to an
.adp file, this function tries to locate this path in the
ResourceDir of the subsite (determined by the theme). If found the
themed template is returned, otherwse the passed template path.
@param path absolute path within the open acs tree (without extension)
@return path to themed template or input value (without extension)
} {
if {[string index $path 0] eq "/"} {
set style [string range $path 1 end]
} else {
set style $path
}
set stub [template::resource_path -type templates -style $style -relative]
if {[file readable $::acs::rootdir/$stub.adp]} {
return $stub
}
return $path
}
ad_proc -public template::streaming_template {
-subsite_id
} {
Return the path of the streaming template
@param subsite_id id of the subsite. Defaults to [ad_conn subsite_id]
@return path to themed template
} {
if { ![info exists subsite_id] } {
set subsite_id [ad_conn subsite_id]
}
set template [parameter::get -package_id $subsite_id \
-parameter StreamingHead \
-default "/packages/openacs-default-theme/lib/plain-streaming-head"]
return [template::resource_path -type masters -style $template -relative]
}
ad_proc -public template::resource_path {
-type:required
-style:required
-relative:boolean
-subsite_id
-theme_dir
} {
Process the templating "style" and return the stub (path without
extensions). When the style is not an abolute path, check if the
resource can be obtained from the theme, if not fallback to the
resources directory of acs-templating.
@param type type of resource (e.g. "forms" or "lists")
@param style name of the resource within the type (e.g. "standard")
@param relative return optionally the path relative to the OpenACS root directory
@param theme_dir theming directory (alternative to determination via subsite), higher priority
@param subsite_id subsite_id to determine theming information
@return path of the resource (without extension)
@author Gustaf Neumann
} {
if {![regexp {^/(.*)} $style path]} {
if { ![info exists theme_dir] } {
if { ![info exists subsite_id] } {
set subsite_id [ad_conn subsite_id]
}
set theme_dir [parameter::get -parameter ResourceDir -package_id $subsite_id]
}
if {$theme_dir ne ""} {
if {![file isdir $::acs::rootdir/$theme_dir]} {
ns_log warning "ResourceDir '$theme_dir' does not exist under '$::acs::rootdir';\
ignore parameter setting of subsite $subsite_id"
set theme_dir ""
}
}
if {$theme_dir ne ""} {
set path $theme_dir/$type/$style
if {![file exists $::acs::rootdir/$path.adp]} {
unset path
}
}
if {![info exists path]} {
set path /packages/acs-templating/resources/$type/$style
}
}
if {$relative_p} {
return $path
} else {
return $::acs::rootdir/$path
}
}
ad_proc -public stack_frame_values {level} {
return the variables and arrays of one frame as HTML
......@@ -814,3 +932,9 @@ ad_proc -public stack_dump {} {
<h2>Globals</h2>
<ul> [stack_frame_values 0] </ul>\n"
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -322,7 +322,7 @@ ad_proc -private template::widget::textarea_internal {
if { $mode ne "edit" } {
set output {}
if { $value ne "" } {
append output "[ad_quotehtml $value]<input type=\"hidden\" name=\"$name\" value=\"[ad_quotehtml $value]\">"
append output "[ns_quotehtml $value]<input type=\"hidden\" name=\"$name\" value=\"[ns_quotehtml $value]\">"
}
} else {
set output "<textarea name=\"$name\""
......@@ -335,7 +335,7 @@ ad_proc -private template::widget::textarea_internal {
}
}
append output ">[ad_quotehtml $value]</textarea>"
append output ">[ns_quotehtml $value]</textarea>"
}
return $output
......@@ -381,7 +381,7 @@ ad_proc -public template::widget::input {
if { ( $type eq "checkbox" || $type eq "radio" ) && [info exists element(value)] } {
# This can be used in the form template in a <label for="id">...</label> tag.
set attributes(id) "$element(form_id):elements:$element(name):$element(value)"
} elseif { $type eq "password" || $type eq "text" || $type eq "button" || $type eq "file"} {
} elseif { $type in {"password" "text" "button" "file" }} {
set attributes(id) "$element(name)"
}
......@@ -390,18 +390,19 @@ ad_proc -public template::widget::input {
if { $element(mode) ne "edit" && $type ni { hidden submit button clear checkbox radio } } {
set output ""
if { [info exists element(value)] } {
append output [ad_quotehtml $element(value)]
append output "<input type=\"hidden\" name=\"$element(name)\" value=\"[ad_quotehtml $element(value)]\">"
append output [ns_quotehtml $element(value)]
append output "<input type=\"hidden\" name=\"$element(name)\" value=\"[ns_quotehtml $element(value)]\">"
}
} else {
set output "<input type=\"$type\" name=\"$element(name)\""
if { $element(mode) ne "edit" && $type ni { hidden submit button clear } } {
append output " disabled"
}
}
if { [info exists element(value)] } {
append output " value=\"[ad_quotehtml $element(value)]\""
append output " value=\"[ns_quotehtml $element(value)]\""
}
foreach name [array names attributes] {
......@@ -505,12 +506,12 @@ ad_proc -public template::widget::hidden {
# I changed this by saying that field is multiple whenever element(values)
# exists and is not null.
if { [info exists element(values)] && $element(values) ne "" } {
ns_log notice "hidden form element with multiple values: <$element(values)>"
#ns_log notice "hidden form element with multiple values: <$element(values)>"
set output {}
set count 0
foreach itemvalue $element(values) {
append output [subst {
<input type="hidden" id="$element(form_id):$element(name):$count" name="$element(name)" value="[ad_quotehtml $itemvalue]">
<input type="hidden" id="$element(form_id):$element(name):$count" name="$element(name)" value="[ns_quotehtml $itemvalue]">
}]
incr count
}
......@@ -661,7 +662,7 @@ ad_proc -public template::widget::menu {
if { [info exists values($value)] } {
lappend selected_list $label
append output "<input type=\"hidden\" name=\"$widget_name\" value=\"[ad_quotehtml $value]\">"
append output [subst {<input type="hidden" name="$widget_name" value="[ns_quotehtml $value]">}]
}
}
......@@ -678,22 +679,22 @@ ad_proc -public template::widget::menu {
set label [lindex $option 0]
set value [lindex $option 1]
append output " <input type=\"$widget_type\" name=\"$widget_name\" value=\"[ad_quotehtml $value]\""
append output [subst { <input type="$widget_type" name="$widget_name" value="[ns_quotehtml $value]"}]
if { [info exists values($value)] } {
append output " checked=\"checked\""
append output [subst { checked="checked"}]
}
append output ">$label<br>\n"
append output [subst {>[ns_quotehtml $label]<br>\n}]
}
}
default {
append output "<select name=\"$widget_name\" id=\"$widget_name\" "
append output [subst {<select name="$widget_name" id="$widget_name" }]
foreach name [array names attributes] {
if {$attributes($name) eq {}} {
append output " $name=\"$name\""
append output [subst { $name="$name"}]
} else {
append output " $name=\"$attributes($name)\""
append output [subst { $name="$attributes($name)"}]
}
}
append output ">\n"
......@@ -703,12 +704,12 @@ ad_proc -public template::widget::menu {
set label [lindex $option 0]
set value [lindex $option 1]
append output " <option value=\"[ad_quotehtml $value]\""
append output [subst { <option value="[ns_quotehtml $value]"}]
if { [info exists values($value)] } {
append output " selected=\"selected\""
append output [subst { selected="selected"}]
}
append output ">$label</option>\n"
append output [subst {>[ns_quotehtml $label]</option>\n}]
}
append output "</select>"
}
......@@ -1074,8 +1075,8 @@ ad_proc -public template::widget::select_text {
append output [template::util::select_text::get_property select_value $element(value)]
append output "&nbsp;"
append output [template::util::select_text::get_property text_value $element(value)]
append output "<input type=\"hidden\" name=\"$element(id).text\" value=\"[ad_quotehtml $text]\">"
append output "<input type=\"hidden\" name=\"$element(id)\" value=\"[ad_quotehtml $select]\">"
append output "<input type=\"hidden\" name=\"$element(id).text\" value=\"[ns_quotehtml $text]\">"
append output "<input type=\"hidden\" name=\"$element(id)\" value=\"[ns_quotehtml $select]\">"
}
}
......@@ -1328,3 +1329,11 @@ ad_proc -public template::widget::checkbox_text {
return $output
}
#
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -716,3 +716,9 @@ ad_proc -public template::wizard::save_last_visited_step {
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -371,3 +371,9 @@ append page "
"
doc_return 200 text/html $page
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -272,3 +272,9 @@ set r18 [expr {int ( $xf ) }]; # keep the integer part in r18
set xf [expr {1 / ($xf - $r18) }]; # invert the fractional part
set r19 [expr {int ( $xf ) }]; # keep the integer part in r19
set xf [expr {1 / ($xf - $r19) }]; # invert the fractional part
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -17,3 +17,9 @@ set v:1(five) 5
# don't define z
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -11,3 +11,9 @@ set lt <
set quot \"
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -17,3 +17,9 @@ if {[llength $l]} {
set lt "<"
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -2,15 +2,21 @@
<property name="context">{/doc/acs-templating {Templating}} {}</property>
<property name="doc(title)"></property>
<master>
<h2>Namespace cm_widget</h2>
<blockquote>Procedures associated with custom metadata widgets for
basic CR content types</blockquote>
<h3>Method Summary</h3>
<body>
<h2>Namespace cm_widget</h2><blockquote>Procedures associated with custom metadata widgets for
basic CR content types</blockquote><h3>Method Summary</h3>
Listing of public methods:<br><blockquote>The namespace cm_widget currently contains no public
methods.</blockquote><h3>Method Detail</h3><p align="right">
<font color="red">*</font> indicates required</p><p>
Listing of public methods:<br>
<blockquote>The namespace cm_widget currently contains no public
methods.</blockquote>
<h3>Method Detail</h3>
<p align="right">
<font color="red">*</font> indicates required</p>
<p>
<b>Private Methods</b>:<br>
</p><table width="100%">
</p>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="cm_widget::validate_description" id="cm_widget::validate_description"><font size="+1" weight="bold">cm_widget::validate_description</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -24,6 +30,6 @@ element</td>
</tr></table>
</dd></dl>
</td></tr>
</table><p align="right">
</table>
<p align="right">
<font color="red">*</font> indicates required</p>
</body>
......@@ -2,14 +2,21 @@
<property name="context">{/doc/acs-templating {Templating}} {}</property>
<property name="doc(title)"></property>
<master>
<h2>Namespace cms_rel</h2>
<blockquote>Procedures for managing relation items and child
items</blockquote>
<h3>Method Summary</h3>
<body>
<h2>Namespace cms_rel</h2><blockquote>Procedures for managing relation items and child
items</blockquote><h3>Method Summary</h3>
Listing of public methods:<br><blockquote>
Listing of public methods:<br>
<blockquote>
<a href="#cms_rel::sort_child_item_order">cms_rel::sort_child_item_order</a><br><a href="#cms_rel::sort_related_item_order">cms_rel::sort_related_item_order</a><br>
</blockquote><h3>Method Detail</h3><p align="right">
<font color="red">*</font> indicates required</p><b>Public Methods:</b><br><table width="100%">
</blockquote>
<h3>Method Detail</h3>
<p align="right">
<font color="red">*</font> indicates required</p>
<b>Public Methods:</b>
<br>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="cms_rel::sort_child_item_order" id="cms_rel::sort_child_item_order"><font size="+1" weight="bold">cms_rel::sort_child_item_order</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -24,7 +31,8 @@ related)</blockquote><dl><dd>
</tr></table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="cms_rel::sort_related_item_order" id="cms_rel::sort_related_item_order"><font size="+1" weight="bold">cms_rel::sort_related_item_order</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -39,6 +47,6 @@ was related)</blockquote><dl><dd>
</tr></table>
</dd></dl>
</td></tr>
</table><p align="right">
</table>
<p align="right">
<font color="red">*</font> indicates required</p>
</body>
This diff is collapsed.
......@@ -2,13 +2,20 @@
<property name="context">{/doc/acs-templating {Templating}} {}</property>
<property name="doc(title)"></property>
<master>
<h2>Namespace content_add</h2>
<blockquote>Procedures regarding content methods</blockquote>
<h3>Method Summary</h3>
<body>
<h2>Namespace content_add</h2><blockquote>Procedures regarding content methods</blockquote><h3>Method Summary</h3>
Listing of public methods:<br><blockquote>
Listing of public methods:<br>
<blockquote>
<a href="#content_add::content_method_html">content_add::content_method_html</a><br>
</blockquote><h3>Method Detail</h3><p align="right">
<font color="red">*</font> indicates required</p><b>Public Methods:</b><br><table width="100%">
</blockquote>
<h3>Method Detail</h3>
<p align="right">
<font color="red">*</font> indicates required</p>
<b>Public Methods:</b>
<br>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="content_add::content_method_html" id="content_add::content_method_html"><font size="+1" weight="bold">content_add::content_method_html</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -31,6 +38,6 @@ for a content item</blockquote><dl><dd>
</table>
</dd></dl>
</td></tr>
</table><p align="right">
</table>
<p align="right">
<font color="red">*</font> indicates required</p>
</body>
......@@ -2,13 +2,20 @@
<property name="context">{/doc/acs-templating {Templating}} {}</property>
<property name="doc(title)"></property>
<master>
<h2>Namespace content_method</h2>
<blockquote>Procedures regarding content methods</blockquote>
<h3>Method Summary</h3>
<body>
<h2>Namespace content_method</h2><blockquote>Procedures regarding content methods</blockquote><h3>Method Summary</h3>
Listing of public methods:<br><blockquote>
Listing of public methods:<br>
<blockquote>
<a href="#content_method::flush_content_methods_cache">content_method::flush_content_methods_cache</a><br><a href="#content_method::get_content_methods">content_method::get_content_methods</a><br>
</blockquote><h3>Method Detail</h3><p align="right">
<font color="red">*</font> indicates required</p><b>Public Methods:</b><br><table width="100%">
</blockquote>
<h3>Method Detail</h3>
<p align="right">
<font color="red">*</font> indicates required</p>
<b>Public Methods:</b>
<br>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="content_method::flush_content_methods_cache" id="content_method::flush_content_methods_cache"><font size="+1" weight="bold">content_method::flush_content_methods_cache</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -22,7 +29,8 @@ content_method_types cache is flushed</blockquote><dl><dd>
</tr></table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="content_method::get_content_methods" id="content_method::get_content_methods"><font size="+1" weight="bold">content_method::get_content_methods</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -45,9 +53,11 @@ content_method::text_entry_filter_sql - <a href=""></a><br>
</dd>
</dl>
</td></tr>
</table><p>
</table>
<p>
<b>Private Methods</b>:<br>
</p><table width="100%">
</p>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="content_method::get_content_method_options" id="content_method::get_content_method_options"><font size="+1" weight="bold">content_method::get_content_method_options</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -66,7 +76,8 @@ content_method::text_entry_filter_sql - <a href=""></a><br>
</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="content_method::text_entry_filter_sql" id="content_method::text_entry_filter_sql"><font size="+1" weight="bold">content_method::text_entry_filter_sql</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -82,6 +93,6 @@ content method</blockquote><dl>
method</dd>
</dl>
</td></tr>
</table><p align="right">
</table>
<p align="right">
<font color="red">*</font> indicates required</p>
</body>
......@@ -2,14 +2,19 @@
<property name="context">{/doc/acs-templating {Templating}} {}</property>
<property name="doc(title)"></property>
<master>
<h2>Namespace doc</h2>
<h3>Method Summary</h3>
<body>
<h2>Namespace doc</h2><h3>Method Summary</h3>
Listing of public methods:<br><blockquote>The namespace doc currently contains no public
methods.</blockquote><h3>Method Detail</h3><p align="right">
<font color="red">*</font> indicates required</p><p>
Listing of public methods:<br>
<blockquote>The namespace doc currently contains no public
methods.</blockquote>
<h3>Method Detail</h3>
<p align="right">
<font color="red">*</font> indicates required</p>
<p>
<b>Private Methods</b>:<br>
</p><table width="100%">
</p>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name=""></a><br><small><i>  by simon</i></small>
</td></tr><tr><td>
......@@ -23,7 +28,8 @@ parses out procedure source and comments</blockquote><dl><dd>
</tr></table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td><blockquote>Parse API documentation from a Tcl page API
documentation is parsed as follows: Document is scanned until a
\@namespace directive is encountered. The remainder of the file is
......@@ -39,7 +45,8 @@ namespace should be namespace::. By convention the API for each
namespace should be in a file of the same name, so that a link can
be generated automatically). - \@option (for switches such as -foo)
- \@return</blockquote></td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>called by parse_comment_text</blockquote><dl><dd>
<b>Parameters:</b><table><tr>
......@@ -49,7 +56,8 @@ be generated automatically). - \@option (for switches such as -foo)
</tr></table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>called by parse_namespace</blockquote><dl><dd>
<b>Parameters:</b><table>
......@@ -65,7 +73,8 @@ be generated automatically). - \@option (for switches such as -foo)
</table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>takes the absolute path of the tcl library directory
and parses through it</blockquote><dl>
......@@ -76,6 +85,6 @@ listing } {private procedures listing} }</dd><dt><b>See Also:</b></dt><dd>namesp
</dd>
</dl>
</td></tr>
</table><p align="right">
</table>
<p align="right">
<font color="red">*</font> indicates required</p>
</body>
......@@ -2,20 +2,26 @@
<property name="context">{/doc/acs-templating {Templating}} {}</property>
<property name="doc(title)"></property>
<master>
<h2>Namespace doc::util</h2>
<h3>Method Summary</h3>
<body>
<h2>Namespace doc::util</h2><h3>Method Summary</h3>
Listing of public methods:<br><blockquote>The namespace doc::util currently contains no public
methods.</blockquote><h3>Method Detail</h3><p align="right">
<font color="red">*</font> indicates required</p><p>
Listing of public methods:<br>
<blockquote>The namespace doc::util currently contains no public
methods.</blockquote>
<h3>Method Detail</h3>
<p align="right">
<font color="red">*</font> indicates required</p>
<p>
<b>Private Methods</b>:<br>
</p><table width="100%">
</p>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=" set split_name $see_name doc::util::text_divider split_name :: set name_length [llength $split_name] set see_namespace [join [lrange $split_name 0 [expr $name_length - 2]] \" set="" url=""><font size="+1" weight="bold">set split_name
$see_name doc::util::text_divider split_name :: set name_length
[llength $split_name] set see_namespace [join [lrange $split_name 0
[expr $name_length - 2]] \"\"] set url \"[doc::util::dbl_colon_fix
$see_namespace].html#[set see_name]\"</font></a></td></tr><tr><td><blockquote>procedure to deal with \@see comments</blockquote></td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>divides a string variable into a list of strings, all
but the first element beginning with the indicated text {marker;}
......@@ -34,13 +40,15 @@ itself)</td>
</td><td align="left">the string indicating text division</td>
</tr>
</table>
</dd><dt><b>See Also:</b></dt><dd>proc - <a href="doc__util.html#doc::util::find_marker_indices">doc::util::find_marker_indices</a><br>
</dd><dt><b>See Also:</b></dt><dd>proc - <a href="doc__util">doc::util::find_marker_indices</a><br>
</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td><blockquote>escapes out all square brackets</blockquote></td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>given a body of text and a text marker, returns a list
of position indices for each occurrence of the text
......@@ -60,15 +68,17 @@ marker</blockquote><dl>
</dd><dt><b>Returns:</b></dt><dd>list of indices of the position immediately preceding each
occurrence of the text marker; if there are no occurrences of the
text marker, returns a zero-element list</dd><dt><b>See Also:</b></dt><dd>namespace - <a href="doc">doc</a><br>
</dd><dd>proc - <a href="doc">doc::parse_file</a><br><a href="doc">doc::parse_namespace</a><br><a href="doc__util.html#doc::util::text_divider">doc::util::text_divider</a><br>
</dd><dd>proc - <a href="doc">doc::parse_file</a><br><a href="doc">doc::parse_namespace</a><br><a href="doc__util">doc::util::text_divider</a><br>
</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td><blockquote>puts a space after all closing curly brackets, does not
add a space when brackets are already followed by a
space</blockquote></td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>used to sort the see list, which has structure {[name}
name type type url url \]</blockquote><dl><dd>
......@@ -86,10 +96,12 @@ compared</td>
</table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td></td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td></td></tr>
</table><p align="right">
</table>
<p align="right">
<font color="red">*</font> indicates required</p>
</body>
......@@ -2,14 +2,21 @@
<property name="context">{/doc/acs-templating {Templating}} {}</property>
<property name="doc(title)"></property>
<master>
<h2>Namespace form</h2>
<blockquote>Commands for managing dynamic templated
forms.</blockquote>
<h3>Method Summary</h3>
<body>
<h2>Namespace form</h2><blockquote>Commands for managing dynamic templated
forms.</blockquote><h3>Method Summary</h3>
Listing of public methods:<br><blockquote>
Listing of public methods:<br>
<blockquote>
<a href="#"></a><br><a href="#"></a><br><a href="#"></a><br><a href="#"></a><br><a href="#"></a><br><a href="#"></a><br><a href="#"></a><br><a href="#"></a><br><a href="#"></a><br><a href="#"></a><br><a href="#"></a><br>
</blockquote><h3>Method Detail</h3><p align="right">
<font color="red">*</font> indicates required</p><b>Public Methods:</b><br><table width="100%">
</blockquote>
<h3>Method Detail</h3>
<p align="right">
<font color="red">*</font> indicates required</p>
<b>Public Methods:</b>
<br>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Convenience procedure to set individual values of a
form (useful for simple update forms). Typical usage is to query a
......@@ -30,7 +37,8 @@ correspond to element identifiers in the form</td>
</table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Determine whether a form exists by checking for its
data structures.</blockquote><dl>
......@@ -44,7 +52,8 @@ data structures.</blockquote><dl>
not.</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Generates hidden input tags for all values in a form
submission. Typically used to create a confirmation page following
......@@ -53,7 +62,8 @@ an initial submission.</blockquote><dl>
form.</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Initialize the data structures for a form.</blockquote><dl>
<dd>
......@@ -81,7 +91,8 @@ onSubmit validate() } }</td>
</table></dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Return a list which represents the result of getting
combined values from multiple form elements</blockquote><dl><dd>
......@@ -104,7 +115,8 @@ combine the values of all elements starting with { foo}</td>
</table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Return the number of elements in a form</blockquote><dl><dd>
<b>Parameters:</b><table><tr>
......@@ -114,7 +126,8 @@ combine the values of all elements starting with { foo}</td>
</tr></table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Return true if a submission in progress. The submission
may or may not be valid.</blockquote><dl>
......@@ -127,7 +140,8 @@ may or may not be valid.</blockquote><dl>
</dd><dt><b>Returns:</b></dt><dd>1 if true or 0 if false</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Return true if preparing a form for an initial request
(as opposed to repreparing a form that is returned to the user due
......@@ -142,7 +156,8 @@ default values for form elements.</blockquote><dl>
</dd><dt><b>Returns:</b></dt><dd>1 if true or 0 if false</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Return true if submission in progress and submission
was valid. Typically used to conditionally execute DML and redirect
......@@ -157,7 +172,8 @@ to report validation errors.</blockquote><dl>
</dd><dt><b>Returns:</b></dt><dd>1 if true or 0 if false</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Set local variables for form variables (assume they are
all single values). Typically used when processing the form
......@@ -177,7 +193,8 @@ empty, retreive all form elements</td>
</table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Set the name of the current section of the form. A form
may be divided into any number of sections for layout purposes.
......@@ -197,9 +214,11 @@ whenever the section name changes.</blockquote><dl><dd>
</table>
</dd></dl>
</td></tr>
</table><p>
</table>
<p>
<b>Private Methods</b>:<br>
</p><table width="100%">
</p>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Auto-generate the template for a form</blockquote><dl>
<dd>
......@@ -219,11 +238,13 @@ of the ATS resources directory.</td>
</dd><dt><b>Returns:</b></dt><dd>A string containing a template for the body of the form.</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td><blockquote>Helper procedure used to access the basic data
structures of a form object. Called by several of the form
commands.</blockquote></td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Iterates over all declared elements, checking for
hidden widgets and rendering those that have not been rendered yet.
......@@ -236,7 +257,8 @@ aid.</blockquote><dl><dd>
</tr></table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Render the HTML FORM tag along with a hidden element
that identifies the form object.</blockquote><dl>
......@@ -256,7 +278,8 @@ the FORM tag, such as JavaScript event handlers.</td>
</dd><dt><b>Returns:</b></dt><dd>A string containing the rendered tags.</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Render the finished HTML output for a dynamic
form.</blockquote><dl>
......@@ -277,6 +300,6 @@ of the ATS resources directory.</td>
</dd><dt><b>Returns:</b></dt><dd>A string containing the HTML for the body of the form.</dd>
</dl>
</td></tr>
</table><p align="right">
</table>
<p align="right">
<font color="red">*</font> indicates required</p>
</body>
......@@ -2,17 +2,26 @@
<property name="context">{/doc/acs-templating {Templating}} {}</property>
<property name="doc(title)"></property>
<master>
<body>
<h2>Namespace item</h2><blockquote>The item commands allow easy access to properties of
<h2>Namespace item</h2>
<blockquote>The item commands allow easy access to properties of
the content_item object. In the future, a unified API for caching
item properties will be developed here.</blockquote><p>Also see:</p><dl>
item properties will be developed here.</blockquote>
<p>Also see:</p>
<dl>
<dt>namespace</dt><dd><a href="publish">publish</a></dd>
</dl><h3>Method Summary</h3>
Listing of public methods:<br><blockquote>
</dl>
<h3>Method Summary</h3>
Listing of public methods:<br>
<blockquote>
<a href="#item::content_is_null">item::content_is_null</a><br><a href="#item::content_methods_by_type">item::content_methods_by_type</a><br><a href="#item::get_best_revision">item::get_best_revision</a><br><a href="#item::get_content_type">item::get_content_type</a><br><a href="#item::get_extended_url">item::get_extended_url</a><br><a href="#item::get_id">item::get_id</a><br><a href="#item::get_item_from_revision">item::get_item_from_revision</a><br><a href="#item::get_live_revision">item::get_live_revision</a><br><a href="#item::get_mime_info">item::get_mime_info</a><br><a href="#item::get_publish_status">item::get_publish_status</a><br><a href="#item::get_revision_content">item::get_revision_content</a><br><a href="#item::get_template_id">item::get_template_id</a><br><a href="#item::get_template_url">item::get_template_url</a><br><a href="#item::get_title">item::get_title</a><br><a href="#item::get_url">item::get_url</a><br><a href="#item::is_publishable">item::is_publishable</a><br>
</blockquote><h3>Method Detail</h3><p align="right">
<font color="red">*</font> indicates required</p><b>Public Methods:</b><br><table width="100%">
</blockquote>
<h3>Method Detail</h3>
<p align="right">
<font color="red">*</font> indicates required</p>
<b>Public Methods:</b>
<br>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="item::content_is_null" id="item::content_is_null"><font size="+1" weight="bold">item::content_is_null</font></a></td></tr><tr><td>
<blockquote>Determines if the content for the revision is null (not
mereley zero-length)</blockquote><dl>
......@@ -25,7 +34,8 @@ mereley zero-length)</blockquote><dl>
</dd><dt><b>Returns:</b></dt><dd>1 if the content is null, 0 otherwise</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="item::content_methods_by_type" id="item::content_methods_by_type"><font size="+1" weight="bold">item::content_methods_by_type</font></a></td></tr><tr><td>
<blockquote>Determines all the valid content methods for
instantiating a content type. Possible choices are text_entry,
......@@ -46,7 +56,8 @@ widgets</td>
</tr></table></dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="item::get_best_revision" id="item::get_best_revision"><font size="+1" weight="bold">item::get_best_revision</font></a></td></tr><tr><td>
<blockquote>Attempts to retrieve the live revision for the item. If
no live revision exists, attempts to retrieve the latest revision.
......@@ -62,7 +73,8 @@ revisions exist</dd><dt><b>See Also:</b></dt><dd>proc - <a href="item">item::get
</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="item::get_content_type" id="item::get_content_type"><font size="+1" weight="bold">item::get_content_type</font></a></td></tr><tr><td>
<blockquote>Retrieves the content type of tyhe item. If the item
does not exist, returns an empty string.</blockquote><dl>
......@@ -76,7 +88,8 @@ does not exist, returns an empty string.</blockquote><dl>
item exists</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="item::get_extended_url" id="item::get_extended_url"><font size="+1" weight="bold">item::get_extended_url</font></a></td></tr><tr><td>
<blockquote>Retrieves the relative URL of the item with a file
extension based on the item's mime_type (Example: {
......@@ -107,7 +120,8 @@ specified.</td>
</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="item::get_id" id="item::get_id"><font size="+1" weight="bold">item::get_id</font></a></td></tr><tr><td>
<blockquote>Looks up the URL and gets the item id at that URL, if
any.</blockquote><dl>
......@@ -128,7 +142,8 @@ failure</dd><dt><b>See Also:</b></dt><dd>proc - <a href="item">item::get_url</a>
</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="item::get_item_from_revision" id="item::get_item_from_revision"><font size="+1" weight="bold">item::get_item_from_revision</font></a></td></tr><tr><td>
<blockquote>Gets the item_id of the item to which the revision
belongs.</blockquote><dl>
......@@ -142,7 +157,8 @@ belongs.</blockquote><dl>
</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="item::get_live_revision" id="item::get_live_revision"><font size="+1" weight="bold">item::get_live_revision</font></a></td></tr><tr><td>
<blockquote>Retrieves the live revision for the item. If the item
has no live revision, returns an empty string.</blockquote><dl>
......@@ -157,7 +173,8 @@ live revision exists</dd><dt><b>See Also:</b></dt><dd>proc - <a href="item">item
</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="item::get_mime_info" id="item::get_mime_info"><font size="+1" weight="bold">item::get_mime_info</font></a></td></tr><tr><td>
<blockquote>Creates a onerow datasource in the calling frame which
holds the mime_type and file_extension of the specified revision.
......@@ -181,7 +198,8 @@ exists, 0 (zero) otherwise.</td>
</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="item::get_publish_status" id="item::get_publish_status"><font size="+1" weight="bold">item::get_publish_status</font></a></td></tr><tr><td>
<blockquote>Get the publish status of the item. The publish status
will be one of the following:
......@@ -207,7 +225,8 @@ failure</dd><dt><b>See Also:</b></dt><dd>proc - <a href="item">item::is_publisha
</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="item::get_revision_content" id="item::get_revision_content"><font size="+1" weight="bold">item::get_revision_content</font></a></td></tr><tr><td>
<blockquote>Create a onerow datasource called content in the
calling frame which contains all attributes for the revision
......@@ -232,7 +251,8 @@ of the corresponding item.</td>
</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="item::get_template_id" id="item::get_template_id"><font size="+1" weight="bold">item::get_template_id</font></a></td></tr><tr><td>
<blockquote>Retrieves the template which can be used to render the
item. If there is a template registered directly to the item,
......@@ -256,7 +276,8 @@ item, or an empty string on failure</dd><dt><b>See Also:</b></dt><dd>proc - <a h
</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="item::get_template_url" id="item::get_template_url"><font size="+1" weight="bold">item::get_template_url</font></a></td></tr><tr><td>
<blockquote>Retrieves the relative URL of the template which can be
used to render the item. The URL is relative to the TemplateRoot as
......@@ -278,7 +299,8 @@ item, or an empty string on failure</dd><dt><b>See Also:</b></dt><dd>proc - <a h
</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="item::get_title" id="item::get_title"><font size="+1" weight="bold">item::get_title</font></a></td></tr><tr><td>
<blockquote>Get the title for the item. If a live revision for the
item exists, use the live revision. Otherwise, use the latest
......@@ -293,7 +315,8 @@ revision.</blockquote><dl>
</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="item::get_url" id="item::get_url"><font size="+1" weight="bold">item::get_url</font></a></td></tr><tr><td>
<blockquote>Retrieves the relative URL stub to th item. The URL is
relative to the page root, and has no extension (Example: {
......@@ -309,7 +332,8 @@ failure</dd><dt><b>See Also:</b></dt><dd>proc - <a href="item">item::get_extende
</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="item::is_publishable" id="item::is_publishable"><font size="+1" weight="bold">item::is_publishable</font></a></td></tr><tr><td>
<blockquote>Determine if the item is publishable. The item is
publishable only if:
......@@ -327,6 +351,6 @@ publishable only if:
</dd><dt><b>Returns:</b></dt><dd>1 if the item is publishable, 0 otherwise</dd>
</dl>
</td></tr>
</table><p align="right">
</table>
<p align="right">
<font color="red">*</font> indicates required</p>
</body>
......@@ -2,16 +2,17 @@
<property name="context">{/doc/acs-templating {Templating}} {}</property>
<property name="doc(title)"></property>
<master>
<body>
<a href="namespaces" target="mainFrame"><font size="+1" bold="">All Namespaces</font></a><br><table border="0" width="100%"><tr><td nowrap="nowrap" align="left">  <a href="doc" target="mainFrame">doc</a><br>
  <a href="doc__util.html" target="mainFrame">doc::util</a><br>
<a href="namespaces" target="mainFrame"><font size="+1" bold="">All Namespaces</font></a>
<br>
<table border="0" width="100%"><tr><td nowrap="nowrap" align="left">  <a href="doc" target="mainFrame">doc</a><br>
  <a href="doc__util" target="mainFrame">doc::util</a><br>
  <a href="form" target="mainFrame">form</a><br>
  <a href="request" target="mainFrame">request</a><br>
  <a href="util" target="mainFrame">util</a><br>
</td></tr></table><a href="../gen/generate-docs" target="mainFrame">Regenerate</a>
</td></tr></table>
<a href="../gen/generate-docs" target="mainFrame">Regenerate</a>
these pages.
<p>If you have not regenerated these pages before, you may have to
reset permissions on all files to be written as well as your
/doc/acs-templating/TclDocs directory.</p>
</body>
......@@ -2,11 +2,10 @@
<property name="context">{/doc/acs-templating {Templating}} {}</property>
<property name="doc(title)"></property>
<master>
<body>
<h2 class="title" align="center">ATS and CMS Tcl Procedure
Specifications</h2><table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF"><td width="100%"><font size="+2">Namespaces</font></td></tr><tr bgcolor="white"><td><a href="doc">doc</a></td></tr><tr bgcolor="white"><td><a href="doc__util.html">doc::util</a></td></tr><tr bgcolor="white"><td>
Specifications</h2>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF"><td width="100%"><font size="+2">Namespaces</font></td></tr><tr bgcolor="white"><td><a href="doc">doc</a></td></tr><tr bgcolor="white"><td><a href="doc__util">doc::util</a></td></tr><tr bgcolor="white"><td>
<a href="form">form</a><blockquote>Commands for managing dynamic templated
forms.</blockquote>
</td></tr><tr bgcolor="white"><td>
......@@ -21,4 +20,3 @@ via a form.
</blockquote>
</td></tr><tr bgcolor="white"><td><a href="util">util</a></td></tr>
</table>
</body>
......@@ -2,13 +2,20 @@
<property name="context">{/doc/acs-templating {Templating}} {}</property>
<property name="doc(title)"></property>
<master>
<h2>Namespace pagination</h2>
<blockquote>Procedures for paginating a datasource</blockquote>
<h3>Method Summary</h3>
<body>
<h2>Namespace pagination</h2><blockquote>Procedures for paginating a datasource</blockquote><h3>Method Summary</h3>
Listing of public methods:<br><blockquote>
Listing of public methods:<br>
<blockquote>
<a href="#pagination::get_total_pages">pagination::get_total_pages</a><br><a href="#pagination::page_number_links">pagination::page_number_links</a><br><a href="#pagination::paginate_query">pagination::paginate_query</a><br>
</blockquote><h3>Method Detail</h3><p align="right">
<font color="red">*</font> indicates required</p><b>Public Methods:</b><br><table width="100%">
</blockquote>
<h3>Method Detail</h3>
<p align="right">
<font color="red">*</font> indicates required</p>
<b>Public Methods:</b>
<br>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="pagination::get_total_pages" id="pagination::get_total_pages"><font size="+1" weight="bold">pagination::get_total_pages</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -21,7 +28,8 @@ requires {$sql}</blockquote><dl><dd>
</tr></table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="pagination::page_number_links" id="pagination::page_number_links"><font size="+1" weight="bold">pagination::page_number_links</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -40,7 +48,8 @@ datasource</blockquote><dl><dd>
</table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="pagination::paginate_query" id="pagination::paginate_query"><font size="+1" weight="bold">pagination::paginate_query</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -58,11 +67,14 @@ datasource</blockquote><dl><dd>
</table>
</dd></dl>
</td></tr>
</table><p>
</table>
<p>
<b>Private Methods</b>:<br>
</p><table width="100%">
</p>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="pagination::get_rows_per_page" id="pagination::get_rows_per_page"><font size="+1" weight="bold">pagination::get_rows_per_page</font></a></td></tr><tr><td><blockquote>Returns the number of rows per page</blockquote></td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="pagination::ns_set_to_url_vars" id="pagination::ns_set_to_url_vars"><font size="+1" weight="bold">pagination::ns_set_to_url_vars</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -75,6 +87,6 @@ variables</blockquote><dl><dd>
</tr></table>
</dd></dl>
</td></tr>
</table><p align="right">
</table>
<p align="right">
<font color="red">*</font> indicates required</p>
</body>
This diff is collapsed.
......@@ -2,20 +2,29 @@
<property name="context">{/doc/acs-templating {Templating}} {}</property>
<property name="doc(title)"></property>
<master>
<body>
<h2>Namespace request</h2><blockquote>The request commands provide a mechanism for managing
<h2>Namespace request</h2>
<blockquote>The request commands provide a mechanism for managing
the query parameters to a page. The request is simply a special
instance of a form object, and is useful for the frequent cases
when data must be passed from page to page to determine display or
page flow, rather than perform a transaction based on user input
via a form.</blockquote><p>Also see:</p><dl>
via a form.</blockquote>
<p>Also see:</p>
<dl>
<dt>form</dt><dd><a href="">element</a></dd>
</dl><h3>Method Summary</h3>
Listing of public methods:<br><blockquote>
</dl>
<h3>Method Summary</h3>
Listing of public methods:<br>
<blockquote>
<a href="#"></a><br><a href="#"></a><br><a href="#"></a><br><a href="#"></a><br><a href="#"></a><br>
</blockquote><h3>Method Detail</h3><p align="right">
<font color="red">*</font> indicates required</p><b>Public Methods:</b><br><table width="100%">
</blockquote>
<h3>Method Detail</h3>
<p align="right">
<font color="red">*</font> indicates required</p>
<b>Public Methods:</b>
<br>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Checks for any param errors. If errors are found, sets
the display template to the specified URL (a system-wide request
......@@ -32,7 +41,8 @@ error conditions.</td>
</dd><dt><b>Returns:</b></dt><dd>1 if no error conditions exist, 0 otherwise.</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Create the request data structure. Typically called at
the beginning of the code for any page that accepts query
......@@ -44,7 +54,8 @@ requiring slightly less typing.</td>
</tr></table></dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Declares a query parameter as part of the page request.
Validates the values associated with the parameter, in the same
......@@ -82,7 +93,8 @@ fails.</td>
</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Manually report request error(s) by setting error
messages and then calling is_valid to handle display. Useful for
......@@ -104,7 +116,8 @@ condition.</td>
</table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>Retrieves the value(s) of the specified
parameter.</blockquote><dl>
......@@ -117,6 +130,6 @@ parameter.</blockquote><dl>
</dd><dt><b>Returns:</b></dt><dd>The value of the specified parameter.</dd>
</dl>
</td></tr>
</table><p align="right">
</table>
<p align="right">
<font color="red">*</font> indicates required</p>
</body>
......@@ -4,5 +4,3 @@ Procedure Specifications}</property>
<property name="doc(title)">ArsDigita Templating System, Content Management Tcl
Procedure Specifications</property>
<master>
<body></body>
......@@ -2,23 +2,30 @@
<property name="context">{/doc/acs-templating {Templating}} {}</property>
<property name="doc(title)"></property>
<master>
<h2>Namespace util</h2>
<h3>Method Summary</h3>
<body>
<h2>Namespace util</h2><h3>Method Summary</h3>
Listing of public methods:<br><blockquote>The namespace util currently contains no public
methods.</blockquote><h3>Method Detail</h3><p align="right">
<font color="red">*</font> indicates required</p><p>
Listing of public methods:<br>
<blockquote>The namespace util currently contains no public
methods.</blockquote>
<h3>Method Detail</h3>
<p align="right">
<font color="red">*</font> indicates required</p>
<p>
<b>Private Methods</b>:<br>
</p><table width="100%">
</p>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td><blockquote>a proc used for debugging, just prints out a value to
the error log</blockquote></td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>capitalizes the first letter of a string</blockquote><dl>
<dt><b>Returns:</b></dt><dd>returns formatted string</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>escapes quotes and removes comment tags from a body of
commented text</blockquote><dl>
......@@ -31,7 +38,8 @@ commented text</blockquote><dl>
</dd><dt><b>Returns:</b></dt><dd>text</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>just takes a body of text and puts a space behind every
double {quote;} this is done so that the text body can be treated
......@@ -47,7 +55,8 @@ being separated by characters other than a space</blockquote><dl>
that are already trailed by a space are unaffected</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>takes a .adp template name and the name of the file to
be written and creates the {file;} also puts out a notice
......@@ -66,7 +75,8 @@ file</td>
</table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td>
<blockquote>takes an alphabetized list and an entry</blockquote><dl>
<dd>
......@@ -86,15 +96,18 @@ list</td>
-1 if the entry is already in the list</dd>
</dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td><blockquote>used to compare two different elements in a list of
parsed data for public or private procs</blockquote></td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td><blockquote>uses ns_library to find the server root, may not always
be accurate because it essentially asks for the tcl library path
and strips off the last /tcl directory</blockquote></td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name=""></a></td></tr><tr><td></td></tr>
</table><p align="right">
</table>
<p align="right">
<font color="red">*</font> indicates required</p>
</body>
......@@ -2,14 +2,21 @@
<property name="context">{/doc/acs-templating {Templating}} {}</property>
<property name="doc(title)"></property>
<master>
<h2>Namespace widget</h2>
<blockquote>Procedures for generating and processing metadata form
widgets, editing attribute widgets</blockquote>
<h3>Method Summary</h3>
<body>
<h2>Namespace widget</h2><blockquote>Procedures for generating and processing metadata form
widgets, editing attribute widgets</blockquote><h3>Method Summary</h3>
Listing of public methods:<br><blockquote>
Listing of public methods:<br>
<blockquote>
<a href="#widget::param_element_create">widget::param_element_create</a><br>
</blockquote><h3>Method Detail</h3><p align="right">
<font color="red">*</font> indicates required</p><b>Public Methods:</b><br><table width="100%">
</blockquote>
<h3>Method Detail</h3>
<p align="right">
<font color="red">*</font> indicates required</p>
<b>Public Methods:</b>
<br>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF"><a name="widget::param_element_create" id="widget::param_element_create"><font size="+1" weight="bold">widget::param_element_create</font></a></td></tr><tr><td>
<blockquote>Dipatches subprocs to generate the form elements for
setting an attribute widget param</blockquote><dl><dd>
......@@ -51,9 +58,11 @@ param. One of literal, eval, query</td>
</table>
</dd></dl>
</td></tr>
</table><p>
</table>
<p>
<b>Private Methods</b>:<br>
</p><table width="100%">
</p>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="widget::create_options_param" id="widget::create_options_param"><font size="+1" weight="bold">widget::create_options_param</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -88,7 +97,8 @@ value (literal, query, eval)</td>
</table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="widget::create_param_source" id="widget::create_param_source"><font size="+1" weight="bold">widget::create_param_source</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -113,7 +123,8 @@ the form</td>
</table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="widget::create_param_type" id="widget::create_param_type"><font size="+1" weight="bold">widget::create_param_type</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -133,7 +144,8 @@ the form</td>
</table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="widget::create_param_value" id="widget::create_param_value"><font size="+1" weight="bold">widget::create_param_value</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -158,7 +170,8 @@ widget param is mandatory</td>
</table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="widget::create_text_param" id="widget::create_text_param"><font size="+1" weight="bold">widget::create_text_param</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -188,7 +201,8 @@ value (literal, query, eval)</td>
</table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="widget::create_values_param" id="widget::create_values_param"><font size="+1" weight="bold">widget::create_values_param</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -223,7 +237,8 @@ value (literal, query, eval)</td>
</table>
</dd></dl>
</td></tr>
</table><table width="100%">
</table>
<table width="100%">
<tr><td width="100%" bgcolor="#CCCCFF">
<a name="widget::process_param" id="widget::process_param"><font size="+1" weight="bold">widget::process_param</font></a><br><small><i>  by Michael Pih</i></small>
</td></tr><tr><td>
......@@ -256,6 +271,6 @@ belongs</td>
</table>
</dd></dl>
</td></tr>
</table><p align="right">
</table>
<p align="right">
<font color="red">*</font> indicates required</p>
</body>
......@@ -2,16 +2,21 @@
<property name="context">{/doc/acs-templating {Templating}} {Templating System API: Database Query}</property>
<property name="doc(title)">Templating System API: Database Query</property>
<master>
<body>
<h2>Database Query</h2><h3>Summary</h3><p>Utilize the results of a database query as a template data
source.</p><h3>Method</h3><pre>
<h2>Database Query</h2>
<h3>Summary</h3>
<p>Utilize the results of a database query as a template data
source.</p>
<h3>Method</h3>
<pre>
query <em>name structure sql -db dbhandle
-startrow n
-maxrows n
-bind (set|list)
-eval { code }</em>
</pre><p>Perform a query and store the results in a local variable.</p><h3>Examples</h3><pre>
</pre>
<p>Perform a query and store the results in a local variable.</p>
<h3>Examples</h3>
<pre>
set db [ns_db gethandle]
# this will set a scalar named current_time
......@@ -38,7 +43,9 @@ template::query user_info multilist "select * from users" -db $db
template::query persons nestedlist "
select state, city, first_name, last_name from users" \
-db $db -groupby { state city }
</pre><h3>Note(s)</h3><ul>
</pre>
<h3>Note(s)</h3>
<ul>
<li>Valid values for <tt>structure</tt> are <tt>onevalue, onerow,
multirow, onelist, nestedlist and multilist.</tt>
</li><li>
......@@ -52,5 +59,6 @@ from the query result that are included in the data source.</li><li>The <tt>eval
perform on each row of a multirow query as it is fetched from the
database. The code may refer to the <tt>row</tt> array to get and
set column values.</li><li>The <tt>bind</tt> option is valid only when using Oracle.</li>
</ul><hr><a href="mailto:templating\@arsdigita.com">templating\@arsdigita.com</a>
</body>
</ul>
<hr>
<a href="mailto:templating\@arsdigita.com">templating\@arsdigita.com</a>
......@@ -2,9 +2,10 @@
<property name="context">{/doc/acs-templating {Templating}} {Templating System API: Form Element}</property>
<property name="doc(title)">Templating System API: Form Element</property>
<master>
<body>
<h2>Form Element</h2><h3>Summary</h3><h3>Methods</h3><pre>
<h2>Form Element</h2>
<h3>Summary</h3>
<h3>Methods</h3>
<pre>
template::element create <em>form_name element_name \
-widget widget \
-datatype datatype \
......@@ -18,13 +19,15 @@ template::element create <em>form_name element_name \
-value value \
-values { value value ... }
</em>
</pre><p>Append a new element to the specified form.</p><ul>
</pre>
<p>Append a new element to the specified form.</p>
<ul>
<li>The <tt>html</tt> switch may be used to include additional HTML
attributes in the <tt>input</tt>, <tt>select</tt>, or
<tt>textarea</tt> tag used to ultimately render the element.</li><li>The <tt>validate</tt> switch may be used to perform simple
custom validation of each element value. <tt>type</tt> is a keyword
for the type of validation being performed. This same keyword must
be referenced by the <tt><a href="../tagref/formerror.html">formerror</a></tt> tag to customize the
be referenced by the <tt><a href="../tagref/formerror">formerror</a></tt> tag to customize the
presentation and layout of the error message for this validation
step. <tt>expression</tt> must be a block of arbitrary Tcl code
that evaluates to 1 (valid) or 0 (not valid). The variable
......@@ -34,12 +37,18 @@ message to return to the user if validation fails. The variables
<tt>$value</tt> and <tt>$label</tt> may be used in the message to
reference the parameter value and label (or name if no label is
supplied).</li>
</ul><pre>
</ul>
<pre>
template::element set_properties <em>form_name element_name
</em>
</pre><pre>
</pre>
<pre>
template::element get_value <em>form_name element_name</em>
</pre><h3>Example</h3><pre>
</pre>
<h3>Example</h3>
<pre>
template::element get_values <em>form_name element_name</em>
</pre><h3>Note(s)</h3><hr><a href="mailto:templating\@arsdigita.com">templating\@arsdigita.com</a>
</body>
</pre>
<h3>Note(s)</h3>
<hr>
<a href="mailto:templating\@arsdigita.com">templating\@arsdigita.com</a>
......@@ -2,24 +2,35 @@
<property name="context">{/doc/acs-templating {Templating}} {Templating System API: Form}</property>
<property name="doc(title)">Templating System API: Form</property>
<master>
<body>
<h2>Form</h2><h3>Summary</h3><p>Building dynamic forms with automated validation.</p><h3>Methods</h3><pre>
<h2>Form</h2>
<h3>Summary</h3>
<p>Building dynamic forms with automated validation.</p>
<h3>Methods</h3>
<pre>
template::form create <em>name \
-html { attribute value attribute value }</em>
</pre><p>Initialize data structures for a dynamic form. This procedure
must be called before adding elements to the form.</p><ul><li>Additional attributes to include in the HTML form tag may be
specified with the <tt>html</tt> option.</li></ul><pre>
</pre>
<p>Initialize data structures for a dynamic form. This procedure
must be called before adding elements to the form.</p>
<ul><li>Additional attributes to include in the HTML form tag may be
specified with the <tt>html</tt> option.</li></ul>
<pre>
template::form is_request <em>name</em>
</pre><p>Boolean procedure for determining whether a submission is in
</pre>
<p>Boolean procedure for determining whether a submission is in
progress. If this procedure returns true, then an initial request
for the form is underway. The code for insert or add forms may thus
query for primary key value(s), and the code for update forms may
query for current data and set the value(s) of form elements
accordingly.</p><pre>
accordingly.</p>
<pre>
template::form is_valid <em>name</em>
</pre><p>Boolean procedure that returns true if a submission is in
</pre>
<p>Boolean procedure that returns true if a submission is in
progress <em>and</em> the submission is valid. Database or any
other transactions based on the form submission should only take
place after this procedure has been checked.</p><h3>Example</h3><h3>Note(s)</h3><hr><a href="mailto:templating\@arsdigita.com">templating\@arsdigita.com</a>
</body>
place after this procedure has been checked.</p>
<h3>Example</h3>
<h3>Note(s)</h3>
<hr>
<a href="mailto:templating\@arsdigita.com">templating\@arsdigita.com</a>
......@@ -2,19 +2,24 @@
<property name="context">{/doc/acs-templating {Templating}} {Object and API Reference}</property>
<property name="doc(title)">Object and API Reference</property>
<master>
<body>
<h2>Object and API Reference</h2><a href="..">Templating System</a> : <a href="../developer-guide.html">Developer Guide</a> : API
<h2>Object and API Reference</h2>
<a href="..">Templating System</a>
: <a href="../developer-guide">Developer Guide</a>
: API
Some of the API discussed here achieves functionality that the ACS
(ArsDigita Community System) provides, just in different ways. If
you have the ACS installed, you likely want to use that instead of
the <code>query</code> and <code>request</code> call presented
the <code>query</code>
and <code>request</code>
call presented
below.
<ul>
<li><a href="database">Database Query</a></li><li><a href="multirow">Mutirow Data Source</a></li><li><a href="request">Request</a></li><li><a href="form">Form</a></li><li><a href="element">Form Element</a></li>
</ul><hr><address><a href="mailto:christian\@arsdigita.com">Christian
Brechbühler</a></address><!-- Created: Thu Sep 21 15:32:06 EDT 2000 -->
Last modified: $Id: index.html,v 1.1.1.1 2001/03/13 22:59:27 ben
</ul>
<hr>
<address><a href="mailto:christian\@arsdigita.com">Christian
Brechbühler</a></address>
<!-- Created: Thu Sep 21 15:32:06 EDT 2000 -->
Last modified: $&zwnj;Id: index.html,v 1.1.1.1 2001/03/13 22:59:27 ben
Exp $
</body>
......@@ -2,35 +2,50 @@
<property name="context">{/doc/acs-templating {Templating}} {Templating System API: Multirow}</property>
<property name="doc(title)">Templating System API: Multirow</property>
<master>
<body>
<h2>Multirow</h2><h3>Summary</h3><p>Access and modify rows and columns of a multirow data
source.</p><h3>Methods</h3><pre>
<h2>Multirow</h2>
<h3>Summary</h3>
<p>Access and modify rows and columns of a multirow data
source.</p>
<h3>Methods</h3>
<pre>
multirow <b>get</b><em>name index column</em>
</pre><blockquote>
</pre>
<blockquote>
<p>Get a particular column value or a reference to an entire
row.</p><ul>
<li>Rows are indexed starting with 1.</li><li>If a column name is omitted, this procedure will set
<tt>name</tt> to be a reference to an array containing the values
for the row specified by <tt>index</tt>.</li>
</ul>
</blockquote><pre>
</blockquote>
<pre>
multirow <b>set</b><em>name index column value</em>
</pre><blockquote><p>Set the value of a column in a specified row.</p></blockquote><pre>
</pre>
<blockquote><p>Set the value of a column in a specified row.</p></blockquote>
<pre>
multirow <b>size</b><em>name</em>
</pre><blockquote><p>Get the number of rows in the data source.</p></blockquote><pre>
</pre>
<blockquote><p>Get the number of rows in the data source.</p></blockquote>
<pre>
multirow <b>create</b><em>name column [column ...]</em>
</pre><blockquote><p>Set up a new multirow data source. This is an alternative to
</pre>
<blockquote><p>Set up a new multirow data source. This is an alternative to
having <a href="/api-doc/proc-view?proc=db%5fmultirow">db_multirow</a> create the
data source.</p></blockquote><pre>
data source.</p></blockquote>
<pre>
multirow <b>append</b><em>name value [value ...]</em>
</pre><blockquote><p>Add a row at the end of the data source. Extra values are
dropped, missing values default to the empty string</p></blockquote><pre>
</pre>
<blockquote><p>Add a row at the end of the data source. Extra values are
dropped, missing values default to the empty string</p></blockquote>
<pre>
multirow <b>map</b><em>name body</em>
</pre><blockquote><p>Evaluate <em>body</em> for each row of the data source, and
</pre>
<blockquote><p>Evaluate <em>body</em> for each row of the data source, and
return a list with all results. Within the body, all columns of the
current row are accessible (and modifiable) as local variables.
(Not yet committed.)</p></blockquote><h3>Examples</h3><pre>
(Not yet committed.)</p></blockquote>
<h3>Examples</h3>
<pre>
template::query foo multirow "select first_name, last_name from users"
<font color="green"># get the first name of the first user</font>
......@@ -41,7 +56,10 @@ current row are accessible (and modifiable) as local variables.
<font color="green"># this will the full name of the first user</font>
set full_name "$foo(first_name) $foo(last_name)"
</pre><h3>Note(s)</h3><ul><li>Use the <tt>eval</tt> option to template::query to modify
</pre>
<h3>Note(s)</h3>
<ul><li>Use the <tt>eval</tt> option to template::query to modify
column values while building a data source from a multirow query
result.</li></ul><hr><a href="mailto:templating\@arsdigita.com">templating\@arsdigita.com</a>
</body>
result.</li></ul>
<hr>
<a href="mailto:templating\@arsdigita.com">templating\@arsdigita.com</a>
......@@ -2,24 +2,31 @@
<property name="context">{/doc/acs-templating {Templating}} {Templating System API: Page Request}</property>
<property name="doc(title)">Templating System API: Page Request</property>
<master>
<body>
<h2>Page Request</h2><h3>Summary</h3><p>Transform, validate and report errors in the query parameters
associated with a page request.</p><p>This API is an alternative to <code>ad_page_contract</code>
which should usually be preferred if you have ACS installed.</p><h3>Methods</h3><pre>
<h2>Page Request</h2>
<h3>Summary</h3>
<p>Transform, validate and report errors in the query parameters
associated with a page request.</p>
<p>This API is an alternative to <code>ad_page_contract</code>
which should usually be preferred if you have ACS installed.</p>
<h3>Methods</h3>
<pre>
template::request create
</pre><p>Initialize the data structure to store request parameters.
</pre>
<p>Initialize the data structure to store request parameters.
Should be called at the start of any page that takes request
parameters.</p><pre>
parameters.</p>
<pre>
template::request set_param <em>name
-datatype datatype
-multiple
-optional
-validate { { expression } { message } }</em>
</pre><p>Validates request parameter values and then sets a local
</pre>
<p>Validates request parameter values and then sets a local
variable. Values are transformed if a transformation procedure
exists for the specified datatype (i.e. the components of a
<tt>date</tt> are assembled into a single structure).</p><ul>
<tt>date</tt> are assembled into a single structure).</p>
<ul>
<li>Options for <tt>datatype</tt> are the same as for form
elements.</li><li>The <tt>multiple</tt> switch indicates that more than one value
may be submitted. The local variable set by the procedure will be a
......@@ -34,18 +41,25 @@ simply a string containing a message to return to the user if
validation fails. The variables <tt>$value</tt> and <tt>$label</tt>
may be used in the message to reference the parameter value and
label (or name if no label is supplied).</li>
</ul><pre>
</ul>
<pre>
template::request get_param <em>name</em>
</pre><p>Returns the value (or values if the <tt>multiple</tt> is used)
of the named parameter.</p><pre>
</pre>
<p>Returns the value (or values if the <tt>multiple</tt> is used)
of the named parameter.</p>
<pre>
template::request is_valid <em>error_url</em>
</pre><p>Boolean procedure for determining whether any validation errors
occurred while setting request parameters.</p><ul><li>
</pre>
<p>Boolean procedure for determining whether any validation errors
occurred while setting request parameters.</p>
<ul><li>
<tt>error_url</tt> is the location of the template to use for
reporting request errors. The default is
<tt>/ats/templates/messages/request-error</tt> if no URL is
specified. To report request errors in the template of the page
itself, use <tt>self</tt> for the URL.</li></ul><h3>Example</h3><pre>
itself, use <tt>self</tt> for the URL.</li></ul>
<h3>Example</h3>
<pre>
request create
request set_param state_abbrev -datatype keyword -validate {
......@@ -59,12 +73,15 @@ request set_param user_id -datatype integer -multiple
if { ! [request is_valid "/mytemplates/request-error"] } { return }
...
</pre><h3>Note(s)</h3><ul>
</pre>
<h3>Note(s)</h3>
<ul>
<li>Error reporting templates may reference the
<tt>requesterror</tt> array to access error messages for each
parameter.</li><li>The request API provides a simple mechanism for processing
request parameters. It is not intended as a replacement to
<tt>ad_page_contract</tt> for sites built on the ArsDigita
Community System.</li>
</ul><hr><a href="mailto:templating\@arsdigita.com">templating\@arsdigita.com</a>
</body>
</ul>
<hr>
<a href="mailto:templating\@arsdigita.com">templating\@arsdigita.com</a>
......@@ -4,18 +4,21 @@ memory}</property>
<property name="doc(title)">Templating System Appendix D: Parsing templates in
memory</property>
<master>
<body>
<h2>Parsing Templates in Memory</h2><p>The templating system code is oriented towards parsing templates
<h2>Parsing Templates in Memory</h2>
<p>The templating system code is oriented towards parsing templates
stored in the file system, in conjunction with a Tcl script that is
also stored as a file. However, when the template is not actually
stored in the file system, you will need to parse it as a string in
memory. Two common situations in which this occurs are:</p><ul>
memory. Two common situations in which this occurs are:</p>
<ul>
<li>Templates are stored in the database.</li><li>Templates are generated dynamically, possibly based in turn on
a "style" template. This is how ATS auto-generates forms.</li>
</ul><h3>The Parsing Process</h3><p>Whether the template is ultimately stored in a file or not, the
</ul>
<h3>The Parsing Process</h3>
<p>Whether the template is ultimately stored in a file or not, the
templating system follows the same basic process during the parsing
process:</p><ol>
process:</p>
<ol>
<li>
<em>Prepare data sources.</em> Some Tcl code is evaluated to
prepare data sources (scalars, lists, multirow data structures) for
......@@ -31,9 +34,12 @@ evaluated in the same stack frame as the data source code, so that
all variables declared as data sources are directly available to
the template. The result of the evaluation step is a single string,
which normally is written to the connection.</li>
</ol><h3>How to Parse Templates in Memory</h3><p>The templating system provides a low-level API that allows you
</ol>
<h3>How to Parse Templates in Memory</h3>
<p>The templating system provides a low-level API that allows you
to perform the three steps described above in the context of your
own code:</p><blockquote><pre>
own code:</p>
<blockquote><pre>
<font color="green"># set up any number of data sources:</font>
set first_name George
......@@ -68,8 +74,11 @@ set output [template::adp_eval code]
<font color="green"># now use the output however you wish</font>
</pre></blockquote>
Also see the "<a href="../demo/index.html#string">string</a>" demo.
<h3>Generating Templates from Other Templates</h3><p>In some cases, the template itself may be based on yet another
Also see the "<a href="../demo/index">string</a>
" demo.
<h3>Generating Templates from Other Templates</h3>
<p>In some cases, the template itself may be based on yet another
base template. For example, the templating system itself generates
form templates based on a generic "style" template. The generic
template primarily depends on a single data source,
......@@ -78,11 +87,15 @@ particular form object. A single <tt>multiple</tt>loop is used to
lay out the specific <tt>formwidget</tt> and <tt>formgroup</tt>
tags, along with labels and validation text, for the form. The
output of this first step is then rendered into HTML and returned
to the user.</p><p>Note that the generic "style" template contains templating tags
to the user.</p>
<p>Note that the generic "style" template contains templating tags
(<tt>formwidget</tt>, <tt>formgroup</tt>, <tt>if</tt> etc.) that
must be "protected" during the first step. The templating system
provides the <a href="../tagref/noparse.html"><tt>noparse</tt></a>
tag to do this.</p><hr><a href="mailto:templating\@arsdigita.com">templating\@arsdigita.com</a><br>
Last modified: $Id: memory.html,v 1.1.1.1 2001/03/13 22:59:27 ben
provides the <a href="../tagref/noparse"><tt>noparse</tt></a>
tag to do this.</p>
<hr>
<a href="mailto:templating\@arsdigita.com">templating\@arsdigita.com</a>
<br>
Last modified: $&zwnj;Id: memory.html,v 1.1.1.1 2001/03/13 22:59:27 ben
Exp $
</body>
......@@ -15,3 +15,9 @@ set query "select
where user_id = :user_id"
db_1row users_query $query -column_array users
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -13,3 +13,9 @@ if { [regexp {\.\.|^/} $file] } {
}
ns_return 200 text/html "<pre>$compiled</pre>"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -31,3 +31,9 @@ if {[info exists error_list]} {
append phrase "$count $plural"
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
# ad_return_template stays in the same scope
set n_errors [llength $error_list]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
ad_page_contract {
@cvs-id $Id$
} -properties {}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -64,3 +64,9 @@ set tomorrow_date [template::util::date set_property clock $today_date $clock_va
# Get the SQL value
set tomorrow_sql [template::util::date::get_property sql_date $tomorrow_date]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -46,3 +46,9 @@ if { [form is_request sandwich] } {
if {[element get_value sandwich grid] == "t"} {
ad_return_template sandwich-grid
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -6,3 +6,9 @@ ad_page_contract {
set x 5
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -15,3 +15,9 @@ if { [info exists problems] } {
# Set up some data sources...
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
set color [format "%.6x" [expr {0xd53feb * $level & 0xffffff | 0x808080}]]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -5,3 +5,9 @@ ad_page_contract {
} -query {
m:naturalnum,notnull
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
set one_less [expr {$n - 1}]
set two_less [expr {$n - 2}]
\ No newline at end of file
set two_less [expr {$n - 2}]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -32,3 +32,9 @@ if { [form is_valid add_user] } {
template::forward index.html
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -31,3 +31,9 @@ db_multirow users users_query $query
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -13,3 +13,9 @@ set query "select
db_multirow users users_query $query
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -7,3 +7,9 @@ ad_page_contract {
set hello "Hello World"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -18,3 +18,9 @@ set bool_1_p 1
set bool_f_p f
set bool_0_p 0
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -6,3 +6,9 @@ ad_page_contract {
set x "Qui Me Amat, Amat Et Cattum Meum!"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment