[limb-svn] r6265 - in 3.x/examples/wact: examples/tags/list examples/tags/list/templates examples/tags/list/templates/5 examples/tags/list/templates/6 lib/limb

svn at limb-project.com svn at limb-project.com
Thu Sep 6 10:43:59 MSD 2007


Author: serega
Date: 2007-09-06 10:43:59 +0400 (Thu, 06 Sep 2007)
New Revision: 6265
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6265

Added:
   3.x/examples/wact/examples/tags/list/list_other_properties.php
   3.x/examples/wact/examples/tags/list/list_separated_dynamic.php
   3.x/examples/wact/examples/tags/list/templates/5/
   3.x/examples/wact/examples/tags/list/templates/5/page.html
   3.x/examples/wact/examples/tags/list/templates/6/
   3.x/examples/wact/examples/tags/list/templates/6/page.html
Modified:
   3.x/examples/wact/examples/tags/list/desc.ini
   3.x/examples/wact/lib/limb/
Log:
-- added a couple of new usage example for recently added list properties

Modified: 3.x/examples/wact/examples/tags/list/desc.ini
===================================================================
--- 3.x/examples/wact/examples/tags/list/desc.ini	2007-09-06 06:42:53 UTC (rev 6264)
+++ 3.x/examples/wact/examples/tags/list/desc.ini	2007-09-06 06:43:59 UTC (rev 6265)
@@ -6,7 +6,7 @@
 0=templates/1/page.html
 
 [decorated]
-description=<list:item> predefined properties usage example.
+description=List tags predefined properties Pariry, ListRowNumber usage example
 php=list_decorated.php
 0=templates/2/page.html
 
@@ -20,4 +20,14 @@
 php=list_default.php
 0=templates/4/page.html
 
+[other_properties]
+description=Other predefined properties FirstRow, LastRow, TotalItems of list tags usage example
+php=list_other_properties.php
+0=templates/5/page.html
 
+[dynamic_separators]
+description=<list:separator> and <list:fill> tags with dynamic parameters example.
+php=list_separated_dynamic.php
+0=templates/6/page.html
+
+

Added: 3.x/examples/wact/examples/tags/list/list_other_properties.php
===================================================================
--- 3.x/examples/wact/examples/tags/list/list_other_properties.php	                        (rev 0)
+++ 3.x/examples/wact/examples/tags/list/list_other_properties.php	2007-09-06 06:43:59 UTC (rev 6265)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id$
+ * @package    wact
+ */
+
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
+
+$page = new WactTemplate('5/page.html');
+include('data.inc.php');
+$page->setChildDataSet('php_modules', $data);
+$page->display();
+
+?>

Added: 3.x/examples/wact/examples/tags/list/list_separated_dynamic.php
===================================================================
--- 3.x/examples/wact/examples/tags/list/list_separated_dynamic.php	                        (rev 0)
+++ 3.x/examples/wact/examples/tags/list/list_separated_dynamic.php	2007-09-06 06:43:59 UTC (rev 6265)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Limb Web Application Framework
+ *
+ * @link http://limb-project.com
+ *
+ * @copyright  Copyright &copy; 2004-2007 BIT
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ * @version    $Id$
+ * @package    wact
+ */
+
+require_once 'limb/wact/common.inc.php';
+require_once 'limb/wact/src/WactTemplate.class.php';
+
+$page = new WactTemplate('6/page.html');
+include('data.inc.php');
+$page->setChildDataSet('php_modules', $data);
+$page->display();
+
+?>

Added: 3.x/examples/wact/examples/tags/list/templates/5/page.html
===================================================================
--- 3.x/examples/wact/examples/tags/list/templates/5/page.html	                        (rev 0)
+++ 3.x/examples/wact/examples/tags/list/templates/5/page.html	2007-09-06 06:43:59 UTC (rev 6265)
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>List Properties Example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<h1 align="center">List Properties Example</h1>
+  <P align="center">A simple list formatted into a table.</P>
+  <P align="center">Here we used some of the tag properties like TotalItems, FirstRow, LastRow</P>
+
+  <list:LIST id='php_modules'>
+    <TABLE BORDER="1" ALIGN="CENTER" CELLPADDING="5">
+      <list:ITEM>
+        <TR>
+          <TD>
+            <core:optional for=':FirstRow'>
+              First row
+            </core:optional>
+            <core:optional for=':LastRow'>
+              Last row
+            </core:optional>
+            <core:if exp='{$(!:FirstRow && !:LastRow)}'>
+              Regular row
+            </core:if>
+          </TD>
+          <TD>{$name}</TD>
+          <TD>{$description|default:"&nbsp;"|raw}</TD>
+        </TR>
+      </list:ITEM>
+        <TR>
+          <TD colspan='3'>Total: {$TotalItems} rows displayed</TD>
+        </TR>
+    </TABLE>
+  </list:LIST>
+</body>
+</html>

Added: 3.x/examples/wact/examples/tags/list/templates/6/page.html
===================================================================
--- 3.x/examples/wact/examples/tags/list/templates/6/page.html	                        (rev 0)
+++ 3.x/examples/wact/examples/tags/list/templates/6/page.html	2007-09-06 06:43:59 UTC (rev 6265)
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>List Separator Example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<h1 align="center">List Separator And Fill tags example</h1>
+  <P align="center">This examples show how to use list:separator and list:fill tags with dynamic parameters</P>
+
+  <h2>Dynamic separator step</h2>
+  <list:LIST id='php_modules'>
+    <table border='1'>
+      <tr>
+        <td>
+        <ul>
+          <list:ITEM>
+              <li>{$name}</li>
+            <list:separator step='{$:TotalItems/3|number}'></ul></td><td><ul></list:separator>
+          </list:ITEM>
+        </ul>
+        </td>
+      </tr>
+    </table>
+  </list:LIST>
+
+  <h2>Valid layout with multi column output</h2>
+
+  <list:LIST from='#[php_modules]'>
+    <table border='1'>
+      <tr>
+        <list:ITEM>
+           <td>{$name}</td>
+          <list:separator every='{$(:TotalItems/2 + 1)|number}'></tr><tr></list:separator>
+        </list:ITEM>
+        <list:fill upto='{$(:TotalItems/2 + 1)|number}' var='count'>
+          <core:repeat value="{$count}"><td style='color:grey;'>autofill</td></core:repeat>
+        </list:fill>
+      </tr>
+    </table>
+  </list:LIST>
+
+</body>
+</html>


Property changes on: 3.x/examples/wact/lib/limb
___________________________________________________________________
Name: svn:externals
   - wact -r 6151 https://svn.limb-project.com/3.x/branches/2007.3/limb/wact 

   + wact -r 6264 https://svn.limb-project.com/3.x/trunk/limb/wact 




More information about the limb-svn mailing list