diff doc/customizing.txt @ 3122:6e8eb05435cf

new example
author Richard Jones <richard@users.sourceforge.net>
date Fri, 28 Jan 2005 05:08:47 +0000
parents bdd31aaf556e
children 5894c7bea8ce
line wrap: on
line diff
--- a/doc/customizing.txt	Fri Jan 28 04:30:17 2005 +0000
+++ b/doc/customizing.txt	Fri Jan 28 05:08:47 2005 +0000
@@ -2,7 +2,7 @@
 Customising Roundup
 ===================
 
-:Version: $Revision: 1.167 $
+:Version: $Revision: 1.168 $
 
 .. This document borrows from the ZopeBook section on ZPT. The original is at:
    http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -2614,6 +2614,46 @@
 Adding a new field to the classic schema
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+This example shows how to add a simple field (a due date) to the default
+classic schema. It does not add any additional behaviour, such as enforcing
+the due date, or causing automatic actions to fire if the due date passes.
+
+
+1. modify the schema::
+
+    issue = IssueClass(db, "issue", 
+                    assignedto=Link("user"), topic=Multilink("keyword"),
+                    priority=Link("priority"), status=Link("status"),
+                    due_dat=Date())
+
+2. add an edit field to the issue.item.html template::
+
+    <tr> 
+     <th>Due Date</th> 
+     <td tal:content="structure context/due_date/field" /> 
+    </tr> 
+
+3. add the property to the issue.index.html page::
+
+   (in the heading row)
+     <th tal:condition="request/show/due_date">Due Date</th>
+   (in the data row)
+     <td tal:condition="request/show/priority" tal:content="i/due_date" />
+
+4. add the property to the issue.search.html page::
+
+     <tr tal:define="name string:due_date">
+       <th i18n:translate="">Due Date:</th>
+       <td metal:use-macro="search_input"></td>
+       <td metal:use-macro="column_input"></td>
+       <td metal:use-macro="sort_input"></td>
+       <td metal:use-macro="group_input"></td>
+     </tr>
+
+
+Adding a new constrained field to the classic schema
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
 This example shows how to add a new constrained property (i.e. a
 selection of distinct values) to your tracker.
 

Roundup Issue Tracker: http://roundup-tracker.org/