comparison 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
comparison
equal deleted inserted replaced
3121:bdd31aaf556e 3122:6e8eb05435cf
1 =================== 1 ===================
2 Customising Roundup 2 Customising Roundup
3 =================== 3 ===================
4 4
5 :Version: $Revision: 1.167 $ 5 :Version: $Revision: 1.168 $
6 6
7 .. This document borrows from the ZopeBook section on ZPT. The original is at: 7 .. This document borrows from the ZopeBook section on ZPT. The original is at:
8 http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx 8 http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
9 9
10 .. contents:: 10 .. contents::
2612 2612
2613 2613
2614 Adding a new field to the classic schema 2614 Adding a new field to the classic schema
2615 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2615 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2616 2616
2617 This example shows how to add a simple field (a due date) to the default
2618 classic schema. It does not add any additional behaviour, such as enforcing
2619 the due date, or causing automatic actions to fire if the due date passes.
2620
2621
2622 1. modify the schema::
2623
2624 issue = IssueClass(db, "issue",
2625 assignedto=Link("user"), topic=Multilink("keyword"),
2626 priority=Link("priority"), status=Link("status"),
2627 due_dat=Date())
2628
2629 2. add an edit field to the issue.item.html template::
2630
2631 <tr>
2632 <th>Due Date</th>
2633 <td tal:content="structure context/due_date/field" />
2634 </tr>
2635
2636 3. add the property to the issue.index.html page::
2637
2638 (in the heading row)
2639 <th tal:condition="request/show/due_date">Due Date</th>
2640 (in the data row)
2641 <td tal:condition="request/show/priority" tal:content="i/due_date" />
2642
2643 4. add the property to the issue.search.html page::
2644
2645 <tr tal:define="name string:due_date">
2646 <th i18n:translate="">Due Date:</th>
2647 <td metal:use-macro="search_input"></td>
2648 <td metal:use-macro="column_input"></td>
2649 <td metal:use-macro="sort_input"></td>
2650 <td metal:use-macro="group_input"></td>
2651 </tr>
2652
2653
2654 Adding a new constrained field to the classic schema
2655 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2656
2617 This example shows how to add a new constrained property (i.e. a 2657 This example shows how to add a new constrained property (i.e. a
2618 selection of distinct values) to your tracker. 2658 selection of distinct values) to your tracker.
2619 2659
2620 2660
2621 Introduction 2661 Introduction

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