Sorting on "realname" in nosy pop-up window
Andreas <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <2247052.5laexTS9q0@humpyham> |
Hi, I wanted to change slightly the properties of the pop-up windows on the nosy list which provides the user list. (1) being able to change the default number of entries from the issue.item.html template (2) getting the list sorted on "realname" instead on an alphabetic sort of the userids (1) required two changes, on in issue.item.html and one in user.help-search.html. In issue.item.html the parameter pagesize='75' is added. In _generic.help-list the tal:attributes="value request/pagesize" had to be added. (2) For the sorting on "realname" it was not very obvious to me. According to the documentation the parameter sort='realname' was required to the method classhelp was required. This I added to issue.item.html. But only after I added a hidden field in user.help-search.html this values was actually taken. I attached the 2 patch files "issue.item.html.patch" and "user.help-search..html.patch". There was back in 2005 already a posting for sorting on realname, see https://sourceforge.net/p/roundup/mailman/message/12294566/, but this didn't work without the hidden field for me. Furthermore, I assume that one "form" tag in _generic.help-list.html is too much, see attached patch. Maybe it is helpful for somebody else too. Andreas ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ Roundup-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/roundup-users
issue.item.html.patch
(text/x-patch, 829 B)
Index: html/issue.item.html
<+>UTF-8
===================================================================
--- html/issue.item.html (revision )
+++ html/issue.item.html (revision )
@@ -68,7 +68,7 @@
<td>
<span tal:replace="structure context/nosy/field" />
<span tal:condition="context/is_edit_ok" tal:replace="structure
-python:db.user.classhelp('username,realname,address', property='nosy', width='760', height='768', sort='realname', pagesize=75)" /><br>
+python:db.user.classhelp('username,realname,address', property='nosy', width='760', height='768', sort='realname', pagesize='75')" /><br>
<!--
<span tal:condition="context/is_edit_ok" tal:replace="structure
python:db.user.classhelp('username,realname,address,&:sort=realname', property='nosy', width='760', height='768', sort='realname', pagesize=100)" /><br>
user.help-search..html.patch
(text/x-patch, 989 B)
Index: html/user.help-search.html
<+>UTF-8
===================================================================
--- html/user.help-search.html (revision )
+++ html/user.help-search.html (revision )
@@ -68,8 +68,12 @@
<input type="hidden" name="@action" value="search">
<input type="submit" value="Search" i18n:attributes="value">
<input type="reset">
- <input type="hidden" value="username,realname,phone,organisation,roles" name="properties">
- <input type="text" name="@pagesize" id="sp-pagesize" value="25" size="2">
+ <input type="hidden" value="username,realname,phone,organisation,roles"
+ name="properties">
+ <input type="text" name="@pagesize" id="sp-pagesize" value="25"
+ tal:attributes="value request/pagesize" size="2">
+ <input type="hidden" name="@sort" id="sp-sort" value="realname"
+ tal:attributes="value python:sort_on" size="8">
<label for="sp-pagesize" i18n:translate="">Pagesize</label>
</td>
</tr>
_generic_.help-list.patch
(text/x-patch, 422 B)
Index: html/_generic.help-list.html
<+>UTF-8
===================================================================
--- html/_generic.help-list.html (revision )
+++ html/_generic.help-list.html (revision )
@@ -39,7 +39,7 @@
</tr>
</table>
- <form name=dummyform>
+ <!-- <form name=dummyform> -->
<table class="classhelp"
tal:define="
props python:request.form['properties'].value.split(',');