comparison doc/customizing.txt @ 2958:1ae91c2fa5fe

merge from maint-0-7
author Richard Jones <richard@users.sourceforge.net>
date Thu, 25 Nov 2004 22:17:04 +0000
parents ad4fb8a14a97
children 9614a101b68f
comparison
equal deleted inserted replaced
2956:4511fd6c5dbf 2958:1ae91c2fa5fe
1 =================== 1 ===================
2 Customising Roundup 2 Customising Roundup
3 =================== 3 ===================
4 4
5 :Version: $Revision: 1.158 $ 5 :Version: $Revision: 1.159 $
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::
1762 that you'll need to use the "structure" TAL option if you 1762 that you'll need to use the "structure" TAL option if you
1763 want to use this ``tal:content`` expression:: 1763 want to use this ``tal:content`` expression::
1764 1764
1765 "structure python:msg.content.plain(hyperlink=1)" 1765 "structure python:msg.content.plain(hyperlink=1)"
1766 1766
1767 Note also that the text is automatically HTML-escaped before 1767 The text is automatically HTML-escaped before the hyperlinking
1768 the hyperlinking transformation. 1768 transformation done in the plain() method.
1769
1769 hyperlinked The same as msg.content.plain(hyperlink=1), but nicer:: 1770 hyperlinked The same as msg.content.plain(hyperlink=1), but nicer::
1770 1771
1771 "structure msg/content/hyperlinked" 1772 "structure msg/content/hyperlinked"
1772 1773
1773 field render an appropriate form edit field for the property - for 1774 field render an appropriate form edit field for the property - for
1774 most types this is a text entry box, but for Booleans it's a 1775 most types this is a text entry box, but for Booleans it's a
1775 tri-state yes/no/neither selection. 1776 tri-state yes/no/neither selection. This method may take some
1777 arguments:
1778
1779 size
1780 Sets the width in characters of the edit field
1781
1782 format (Date properties only)
1783 Sets the format of the date in the field - uses the same
1784 format string argument as supplied to the ``pretty`` method
1785 below.
1786
1776 stext only on String properties - render the value of the property 1787 stext only on String properties - render the value of the property
1777 as StructuredText (requires the StructureText module to be 1788 as StructuredText (requires the StructureText module to be
1778 installed separately) 1789 installed separately)
1779 multiline only on String properties - render a multiline form edit 1790 multiline only on String properties - render a multiline form edit
1780 field for the property 1791 field for the property
1800 python:context.activity.pretty('%Y-%m-%d') 1811 python:context.activity.pretty('%Y-%m-%d')
1801 1812
1802 Will format as "2004-03-19" instead. 1813 Will format as "2004-03-19" instead.
1803 1814
1804 Interval properties - render the interval in a pretty 1815 Interval properties - render the interval in a pretty
1805 format (eg. "yesterday") 1816 format (eg. "yesterday"). The format arguments are those used
1817 in the standard ``strftime`` call (see the `Python Library
1818 Reference: time module`__)
1806 menu only on Link and Multilink properties - render a form select 1819 menu only on Link and Multilink properties - render a form select
1807 list for this property 1820 list for this property
1808 sorted only on Multilink properties - produce a list of the linked 1821 sorted only on Multilink properties - produce a list of the linked
1809 items sorted by some property, for example:: 1822 items sorted by some property, for example::
1810 1823
1813 Will list the files by upload date. 1826 Will list the files by upload date.
1814 reverse only on Multilink properties - produce a list of the linked 1827 reverse only on Multilink properties - produce a list of the linked
1815 items in reverse order 1828 items in reverse order
1816 isset returns True if the property has been set to a value 1829 isset returns True if the property has been set to a value
1817 =========== ================================================================ 1830 =========== ================================================================
1831
1832 __ http://docs.python.org/lib/module-time.html
1818 1833
1819 All of the above functions perform checks for permissions required to 1834 All of the above functions perform checks for permissions required to
1820 display or edit the data they are manipulating. The simplest case is 1835 display or edit the data they are manipulating. The simplest case is
1821 editing an issue title. Including the expression:: 1836 editing an issue title. Including the expression::
1822 1837

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