comparison doc/customizing.txt @ 3660:d6aeef8a1910

minor fix from [SF#1517913]
author Richard Jones <richard@users.sourceforge.net>
date Fri, 11 Aug 2006 00:50:43 +0000
parents f7db2771e87d
children 722ab52d47fc
comparison
equal deleted inserted replaced
3659:bfb120928309 3660:d6aeef8a1910
1 =================== 1 ===================
2 Customising Roundup 2 Customising Roundup
3 =================== 3 ===================
4 4
5 :Version: $Revision: 1.203 $ 5 :Version: $Revision: 1.204 $
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::
2827 You add new fields by editing the ``schema.py`` file in you tracker's home. 2827 You add new fields by editing the ``schema.py`` file in you tracker's home.
2828 Schema changes are automatically applied to the database on the next 2828 Schema changes are automatically applied to the database on the next
2829 tracker access (note that roundup-server would need to be restarted as it 2829 tracker access (note that roundup-server would need to be restarted as it
2830 caches the schema). 2830 caches the schema).
2831 2831
2832 1. modify the schema:: 2832 1. modify the ``schema.py``::
2833 2833
2834 issue = IssueClass(db, "issue", 2834 issue = IssueClass(db, "issue",
2835 assignedto=Link("user"), topic=Multilink("keyword"), 2835 assignedto=Link("user"), topic=Multilink("keyword"),
2836 priority=Link("priority"), status=Link("status"), 2836 priority=Link("priority"), status=Link("status"),
2837 due_date=Date()) 2837 due_date=Date())
2838 2838
2839 2. add an edit field to the issue.item.html template:: 2839 2. add an edit field to the ``issue.item.html`` template::
2840 2840
2841 <tr> 2841 <tr>
2842 <th>Due Date</th> 2842 <th>Due Date</th>
2843 <td tal:content="structure context/due_date/field" /> 2843 <td tal:content="structure context/due_date/field" />
2844 </tr> 2844 </tr>
2845 2845
2846 3. add the property to the issue.index.html page:: 2846 3. add the property to the ``issue.index.html`` page::
2847 2847
2848 (in the heading row) 2848 (in the heading row)
2849 <th tal:condition="request/show/due_date">Due Date</th> 2849 <th tal:condition="request/show/due_date">Due Date</th>
2850 (in the data row) 2850 (in the data row)
2851 <td tal:condition="request/show/due_date" tal:content="i/due_date" /> 2851 <td tal:condition="request/show/due_date" tal:content="i/due_date" />
2852 2852
2853 4. add the property to the issue.search.html page:: 2853 4. add the property to the ``issue.search.html`` page::
2854 2854
2855 <tr tal:define="name string:due_date"> 2855 <tr tal:define="name string:due_date">
2856 <th i18n:translate="">Due Date:</th> 2856 <th i18n:translate="">Due Date:</th>
2857 <td metal:use-macro="search_input"></td> 2857 <td metal:use-macro="search_input"></td>
2858 <td metal:use-macro="column_input"></td> 2858 <td metal:use-macro="column_input"></td>
2859 <td metal:use-macro="sort_input"></td> 2859 <td metal:use-macro="sort_input"></td>
2860 <td metal:use-macro="group_input"></td> 2860 <td metal:use-macro="group_input"></td>
2861 </tr> 2861 </tr>
2862
2863 5. if you wish for the due date to appear in the standard views listed
2864 in the sidebar of the web interface then you'll need to add "due_date"
2865 to the list of @columns in the links in the sidebar section of
2866 ``page.html``.
2862 2867
2863 2868
2864 Adding a new constrained field to the classic schema 2869 Adding a new constrained field to the classic schema
2865 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2870 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2866 2871

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