comparison doc/customizing.txt @ 3127:021b131bd816

doc fixes, one more fix to the permissions-in-listings fix
author Richard Jones <richard@users.sourceforge.net>
date Fri, 11 Feb 2005 22:18:20 +0000
parents a2889d22db4a
children 7308c3c5a943
comparison
equal deleted inserted replaced
3126:a2889d22db4a 3127:021b131bd816
1 =================== 1 ===================
2 Customising Roundup 2 Customising Roundup
3 =================== 3 ===================
4 4
5 :Version: $Revision: 1.170 $ 5 :Version: $Revision: 1.171 $
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::
1925 Interval properties - render the interval in a pretty 1925 Interval properties - render the interval in a pretty
1926 format (eg. "yesterday"). The format arguments are those used 1926 format (eg. "yesterday"). The format arguments are those used
1927 in the standard ``strftime`` call (see the `Python Library 1927 in the standard ``strftime`` call (see the `Python Library
1928 Reference: time module`__) 1928 Reference: time module`__)
1929 menu only on Link and Multilink properties - render a form select 1929 menu only on Link and Multilink properties - render a form select
1930 list for this property 1930 list for this property. Takes a number of optional arguments
1931
1932 size
1933 is used to limit the length of the list labels
1934 height
1935 is used to set the <select> tag's "size" attribute
1936 showid
1937 includes the item ids in the list labels
1938 additional
1939 lists properties which should be included in the label
1940 sort_on
1941 indicates the property to sort the list on as (direction,
1942 property) where direction is '+' or '-'.
1943
1944 The remaining keyword arguments are used as conditions for
1945 filtering the items in the list - they're passed as the
1946 "filterspec" argument to a Class.filter() call.
1947
1931 sorted only on Multilink properties - produce a list of the linked 1948 sorted only on Multilink properties - produce a list of the linked
1932 items sorted by some property, for example:: 1949 items sorted by some property, for example::
1933 1950
1934 python:context.files.sorted('creation') 1951 python:context.files.sorted('creation')
1935 1952
2624 1. modify the schema:: 2641 1. modify the schema::
2625 2642
2626 issue = IssueClass(db, "issue", 2643 issue = IssueClass(db, "issue",
2627 assignedto=Link("user"), topic=Multilink("keyword"), 2644 assignedto=Link("user"), topic=Multilink("keyword"),
2628 priority=Link("priority"), status=Link("status"), 2645 priority=Link("priority"), status=Link("status"),
2629 due_dat=Date()) 2646 due_date=Date())
2630 2647
2631 2. add an edit field to the issue.item.html template:: 2648 2. add an edit field to the issue.item.html template::
2632 2649
2633 <tr> 2650 <tr>
2634 <th>Due Date</th> 2651 <th>Due Date</th>
2638 3. add the property to the issue.index.html page:: 2655 3. add the property to the issue.index.html page::
2639 2656
2640 (in the heading row) 2657 (in the heading row)
2641 <th tal:condition="request/show/due_date">Due Date</th> 2658 <th tal:condition="request/show/due_date">Due Date</th>
2642 (in the data row) 2659 (in the data row)
2643 <td tal:condition="request/show/priority" tal:content="i/due_date" /> 2660 <td tal:condition="request/show/due_date" tal:content="i/due_date" />
2644 2661
2645 4. add the property to the issue.search.html page:: 2662 4. add the property to the issue.search.html page::
2646 2663
2647 <tr tal:define="name string:due_date"> 2664 <tr tal:define="name string:due_date">
2648 <th i18n:translate="">Due Date:</th> 2665 <th i18n:translate="">Due Date:</th>

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