Skip to content

Commit 8979685

Browse files
author
Richard Jones
committed
doc fixes, one more fix to the permissions-in-listings fix
1 parent 62db8b1 commit 8979685

File tree

3 files changed

+47
-7
lines changed

3 files changed

+47
-7
lines changed

doc/customizing.txt

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Customising Roundup
33
===================
44

5-
:Version: $Revision: 1.170 $
5+
:Version: $Revision: 1.171 $
66

77
.. This document borrows from the ZopeBook section on ZPT. The original is at:
88
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -1927,7 +1927,24 @@ pretty Date properties - render the date as "dd Mon YYYY" (eg. "19
19271927
in the standard ``strftime`` call (see the `Python Library
19281928
Reference: time module`__)
19291929
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+
19311948
sorted only on Multilink properties - produce a list of the linked
19321949
items sorted by some property, for example::
19331950

@@ -2626,7 +2643,7 @@ the due date, or causing automatic actions to fire if the due date passes.
26262643
issue = IssueClass(db, "issue",
26272644
assignedto=Link("user"), topic=Multilink("keyword"),
26282645
priority=Link("priority"), status=Link("status"),
2629-
due_dat=Date())
2646+
due_date=Date())
26302647

26312648
2. add an edit field to the issue.item.html template::
26322649

@@ -2640,7 +2657,7 @@ the due date, or causing automatic actions to fire if the due date passes.
26402657
(in the heading row)
26412658
<th tal:condition="request/show/due_date">Due Date</th>
26422659
(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" />
26442661

26452662
4. add the property to the issue.search.html page::
26462663

roundup/cgi/templating.py

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1596,6 +1596,18 @@ def menu(self, size=None, height=None, showid=0, additional=[],
15961596
sort_on=None, **conditions):
15971597
''' Render a form select list for this property
15981598
1599+
"size" is used to limit the length of the list labels
1600+
"height" is used to set the <select> tag's "size" attribute
1601+
"showid" includes the item ids in the list labels
1602+
"additional" lists properties which should be included in the
1603+
label
1604+
"sort_on" indicates the property to sort the list on as
1605+
(direction, property) where direction is '+' or '-'.
1606+
1607+
The remaining keyword arguments are used as conditions for
1608+
filtering the items in the list - they're passed as the
1609+
"filterspec" argument to a Class.filter() call.
1610+
15991611
If not editable, just display the value via plain().
16001612
'''
16011613
if not self.is_edit_ok():
@@ -1764,7 +1776,19 @@ def field(self, size=30, showid=0):
17641776

17651777
def menu(self, size=None, height=None, showid=0, additional=[],
17661778
sort_on=None, **conditions):
1767-
''' Render a form select list for this property
1779+
''' Render a form <select> list for this property.
1780+
1781+
"size" is used to limit the length of the list labels
1782+
"height" is used to set the <select> tag's "size" attribute
1783+
"showid" includes the item ids in the list labels
1784+
"additional" lists properties which should be included in the
1785+
label
1786+
"sort_on" indicates the property to sort the list on as
1787+
(direction, property) where direction is '+' or '-'.
1788+
1789+
The remaining keyword arguments are used as conditions for
1790+
filtering the items in the list - they're passed as the
1791+
"filterspec" argument to a Class.filter() call.
17681792
17691793
If not editable, just display the value via plain().
17701794
'''

templates/classic/html/user.index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
<th tal:condition="context/is_edit_ok" i18n:translate="">Retire</th>
2020
</tr>
2121
<tal:block repeat="user context/list">
22-
<tr tal:condition="user/is_view_ok"
23-
tal:attributes="class python:['normal', 'alt'][repeat['user'].index%6/3]">
22+
<tr tal:attributes="class python:['normal', 'alt'][repeat['user'].index%6/3]">
2423
<td>
2524
<a tal:attributes="href string:user${user/id}"
2625
tal:content="user/username">username</a>

0 commit comments

Comments
 (0)