cvs: peardoc /en/package/structures/structures-datagrid/structures-datagrid-datasource excel.xml
/en/package/structures/structures-datagrid/structures-datagrid-renderer smarty.xml xls.xml

From: Date: Sat, 11 Nov 2006 15:56:09 +0000
Subject: cvs: peardoc /en/package/structures/structures-datagrid/structures-datagrid-datasource excel.xml
/en/package/structures/structures-datagrid/structures-datagrid-renderer smarty.xml xls.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-8755@lists.php.net to get a copy of this message
wiesemann Sat Nov 11 15:56:09 2006 UTC Modified files: /peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource excel.xml /peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer smarty.xml xls.xml Log: - remove unneeded four space intendation for example code http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/excel.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/excel.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/excel.xml:1.2 peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/excel.xml:1.3 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/excel.xml:1.2 Wed Oct 25 10:17:24 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid-datasource/excel.xml Sat Nov 11 15:56:09 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid-datasource.excel"> <refnamediv> <refname>Structures_DataGrid_DataSource_Excel</refname> @@ -81,7 +81,7 @@ It is therefore recommended that you replace the die() statement by something like this: <programlisting> - return PEAR::raiseError('The filename ' . $sFileName . ' is not readable'); +return PEAR::raiseError('The filename ' . $sFileName . ' is not readable'); </programlisting> This class is optimized for the changed code (but will work also with the die() in the reader class, of course), and provides then a reasonable error http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/smarty.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/smarty.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/smarty.xml:1.2 peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/smarty.xml:1.3 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/smarty.xml:1.2 Thu Sep 21 11:58:25 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/smarty.xml Sat Nov 11 15:56:09 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid-renderer.smarty"> <refnamediv> <refname>Structures_DataGrid_Renderer_Smarty</refname> @@ -163,36 +163,36 @@ </para> <para> <programlisting> - &lt;!-- Show paging links using the custom getPaging function --&gt; - {getPaging prevImg=&quot;&lt;&lt;&quot; nextImg=&quot;&gt;&gt;&quot; separator=&quot; | &quot; delta=&quot;5&quot;} - - &lt;p&gt;Showing records {$firstRecord} to {$lastRecord} - from {$totalRecordsNum}, page {$currentPage} of {$pagesNum}&lt;/p&gt; - - &lt;table cellspacing=&quot;0&quot;&gt; - &lt;!-- Build header --&gt; - &lt;tr&gt; - {section name=col loop=$columnSet} - &lt;th {$columnSet[col].attributes}&gt; - &lt;!-- Check if the column is sortable --&gt; - {if $columnSet[col].link != &quot;&quot;} - &lt;a href=&quot;{$columnSet[col].link}&quot;&gt;{$columnSet[col].label}&lt;/a&gt; - {else} - {$columnSet[col].label} - {/if} - &lt;/th&gt; - {/section} - &lt;/tr&gt; - - &lt;!-- Build body --&gt; - {section name=row loop=$recordSet} - &lt;tr {if $smarty.section.row.iteration is even}bgcolor=&quot;#EEEEEE&quot;{/if}&gt; - {section name=col loop=$recordSet[row]} - &lt;td {$columnSet[col].attributes}&gt;{$recordSet[row][col]}&lt;/td&gt; - {/section} - &lt;/tr&gt; - {/section} - &lt;/table&gt; +&lt;!-- Show paging links using the custom getPaging function --&gt; +{getPaging prevImg=&quot;&lt;&lt;&quot; nextImg=&quot;&gt;&gt;&quot; separator=&quot; | &quot; delta=&quot;5&quot;} + +&lt;p&gt;Showing records {$firstRecord} to {$lastRecord} +from {$totalRecordsNum}, page {$currentPage} of {$pagesNum}&lt;/p&gt; + +&lt;table cellspacing=&quot;0&quot;&gt; + &lt;!-- Build header --&gt; + &lt;tr&gt; + {section name=col loop=$columnSet} + &lt;th {$columnSet[col].attributes}&gt; + &lt;!-- Check if the column is sortable --&gt; + {if $columnSet[col].link != &quot;&quot;} + &lt;a href=&quot;{$columnSet[col].link}&quot;&gt;{$columnSet[col].label}&lt;/a&gt; + {else} + {$columnSet[col].label} + {/if} + &lt;/th&gt; + {/section} + &lt;/tr&gt; + + &lt;!-- Build body --&gt; + {section name=row loop=$recordSet} + &lt;tr {if $smarty.section.row.iteration is even}bgcolor=&quot;#EEEEEE&quot;{/if}&gt; + {section name=col loop=$recordSet[row]} + &lt;td {$columnSet[col].attributes}&gt;{$recordSet[row][col]}&lt;/td&gt; + {/section} + &lt;/tr&gt; + {/section} +&lt;/table&gt; </programlisting> </para> </refsect1> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xls.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xls.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xls.xml:1.2 peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xls.xml:1.3 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xls.xml:1.2 Thu Sep 21 11:58:25 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xls.xml Sat Nov 11 15:56:09 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid-renderer.xls"> <refnamediv> <refname>Structures_DataGrid_Renderer_XLS</refname> @@ -189,19 +189,19 @@ </para> <para> <programlisting> - // Create a workbook - $workbook = new Spreadsheet_Excel_Writer(); - - // Specify that spreadsheet must be sent the browser - $workbook-&gt;send('test.xls'); - - // Create your format - $format_bold =&amp; $workbook-&gt;addFormat(); - $format_bold-&gt;setBold(); - - // Fill the workbook, passing the format as an option - $options = array('headerFormat' =&gt; &amp;$format_bold); - $datagrid-&gt;fill($workbook, $options); +// Create a workbook +$workbook = new Spreadsheet_Excel_Writer(); + +// Specify that spreadsheet must be sent the browser +$workbook-&gt;send('test.xls'); + +// Create your format +$format_bold =&amp; $workbook-&gt;addFormat(); +$format_bold-&gt;setBold(); + +// Fill the workbook, passing the format as an option +$options = array('headerFormat' =&gt; &amp;$format_bold); +$datagrid-&gt;fill($workbook, $options); </programlisting> </para> </refsect1>

« previous php.pear.doc (#8755) next »