comparison doc/customizing.txt @ 3125:a37e657057c0 maint-0.7

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Fri, 28 Jan 2005 05:11:29 +0000
parents b248c058eb93
children fa200651d4c6
comparison
equal deleted inserted replaced
3102:427e3aee2113 3125:a37e657057c0
2453 2453
2454 2454
2455 Adding a new field to the classic schema 2455 Adding a new field to the classic schema
2456 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2456 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2457 2457
2458 This example shows how to add a simple field (a due date) to the default
2459 classic schema. It does not add any additional behaviour, such as enforcing
2460 the due date, or causing automatic actions to fire if the due date passes.
2461
2462
2463 1. modify the schema::
2464
2465 issue = IssueClass(db, "issue",
2466 assignedto=Link("user"), topic=Multilink("keyword"),
2467 priority=Link("priority"), status=Link("status"),
2468 due_dat=Date())
2469
2470 2. add an edit field to the issue.item.html template::
2471
2472 <tr>
2473 <th>Due Date</th>
2474 <td tal:content="structure context/due_date/field" />
2475 </tr>
2476
2477 3. add the property to the issue.index.html page::
2478
2479 (in the heading row)
2480 <th tal:condition="request/show/due_date">Due Date</th>
2481 (in the data row)
2482 <td tal:condition="request/show/priority" tal:content="i/due_date" />
2483
2484 4. add the property to the issue.search.html page::
2485
2486 <tr tal:define="name string:due_date">
2487 <th i18n:translate="">Due Date:</th>
2488 <td metal:use-macro="search_input"></td>
2489 <td metal:use-macro="column_input"></td>
2490 <td metal:use-macro="sort_input"></td>
2491 <td metal:use-macro="group_input"></td>
2492 </tr>
2493
2494
2495 Adding a new constrained field to the classic schema
2496 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2497
2458 This example shows how to add a new constrained property (i.e. a 2498 This example shows how to add a new constrained property (i.e. a
2459 selection of distinct values) to your tracker. 2499 selection of distinct values) to your tracker.
2460 2500
2461 2501
2462 Introduction 2502 Introduction

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