Skip to content

Commit 513fe5a

Browse files
author
Richard Jones
committed
allow dispname to be passed to renderWith [SF#1424587]
rename dispname to @dispname to avoid name clashes in the future force demo.py to have web debugging on (since it can't mail errors)
1 parent 4f0935e commit 513fe5a

File tree

8 files changed

+32
-8
lines changed

8 files changed

+32
-8
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Fixed:
1414
- Xapian indexer wasn't actually being used
1515
- fix reindexing in Xapian
1616
- fix indexing of message content on roundup-admin import
17+
- allow dispname to be passed to renderWith (sf bug 1424587)
18+
- rename dispname to @dispname to avoid name clashes in the future
1719

1820

1921
2006-02-03 1.0.1

demo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Copyright (c) 2003 Richard Jones ([email protected])
44
#
5-
# $Id: demo.py,v 1.23 2004-11-06 15:05:47 a1s Exp $
5+
# $Id: demo.py,v 1.24 2006-02-08 04:03:54 richard Exp $
66

77
import errno
88
import os
@@ -33,6 +33,7 @@ def install_demo(home, backend, template):
3333
config['TRACKER_HOME'] = home
3434
config['MAIL_DOMAIN'] = 'localhost'
3535
config['DATABASE'] = 'db'
36+
config['WEB_DEBUG'] = True
3637
if backend in ('mysql', 'postgresql'):
3738
config['RDBMS_HOST'] = 'localhost'
3839
config['RDBMS_USER'] = 'rounduptest'

doc/upgrading.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ See the classic tracker ``page.html`` if you're unsure where this should
2929
go.
3030

3131

32+
1.1 Query Display Name
33+
----------------------
34+
35+
The ``dispname`` web variable has been renamed ``@dispname`` to avoid
36+
clashing with other variables of the same name. If you are using the
37+
display name feature, you will need to edit your tracker's ``page.html``
38+
and ``issue.index.html`` pages to change ``dispname`` to ``@dispname``.
39+
40+
A side-effect of this change is that the renderWith method used in the
41+
``home.html`` page may now take a dispname argument.
42+
43+
3244
Migrating from 0.8.x to 1.0
3345
===========================
3446

roundup/cgi/actions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#$Id: actions.py,v 1.57 2006-02-08 03:47:28 richard Exp $
1+
#$Id: actions.py,v 1.58 2006-02-08 04:03:54 richard Exp $
22

33
import re, cgi, StringIO, urllib, Cookie, time, random, csv, codecs
44

@@ -913,7 +913,7 @@ def handle(self):
913913
self.client.opendb(self.client.user)
914914

915915
# set the session cookie
916-
if self.form.get('remember'):
916+
if self.form.has_key('remember'):
917917
self.client.set_cookie(self.client.user, expire=86400*365)
918918
else:
919919
self.client.set_cookie(self.client.user, expire=None)

roundup/cgi/templating.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,6 +2155,11 @@ def _post_init(self):
21552155
self.special_char = name[0]
21562156
self.startwith = int(self.form[name].value)
21572157

2158+
# dispname
2159+
self.dispname = None
2160+
if self.form.has_key('@dispname'):
2161+
self.dispname = self.form['@dispname'].value
2162+
21582163
def updateFromURL(self, url):
21592164
''' Parse the URL for query args, and update my attributes using the
21602165
values.

templates/classic/html/issue.index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
<tal:block metal:use-macro="templates/page/macros/icing">
33
<title metal:fill-slot="head_title" i18n:translate="" >
44
List of issues -
5-
<span tal:condition="python:request.form.has_key('dispname')" tal:replace="python:' %s - ' % request.form['dispname'].value" />
5+
<span tal:condition="request/dispname"
6+
tal:replace="python:' %s - '%request.dispname" />
67
<span tal:replace="config/TRACKER_NAME" i18n:name="tracker" />
78
</title>
89
<span metal:fill-slot="body_title" tal:omit-tag="python:1"
910
i18n:translate="">List of issues
10-
<span tal:condition="python:request.form.has_key('dispname')" tal:replace="python:' - %s' % request.form['dispname'].value" />
11+
<span tal:condition="request/dispname"
12+
tal:replace="python:' - %s' % request.dispname" />
1113
</span>
1214
<td class="content" metal:fill-slot="content">
1315

templates/classic/html/issue.search.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,10 @@
207207
<tr><td>&nbsp;</td>
208208
<td colspan="4" class="help" i18n:translate="">
209209
*: The "all text" field will look in message bodies and issue titles<br>
210+
<span tal:condition="python:request.user.hasPermission('Edit', 'query')">
210211
**: If you supply a name, the query will be saved off and available as a
211212
link in the sidebar
213+
</span>
212214
</td>
213215
</tr>
214216
</table>

templates/classic/html/page.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ <h2><span metal:define-slot="body_title">body title</span></h2>
4141
<span i18n:translate=""
4242
><b>Your Queries</b> (<a href="query?@template=edit">edit</a>)</span><br>
4343
<tal:block tal:repeat="qs request/user/queries">
44-
<a tal:attributes="href string:${qs/klass}?${qs/url}&dispname=${qs/name}"
44+
<a tal:attributes="href string:${qs/klass}?${qs/url}&@dispname=${qs/name}"
4545
tal:content="qs/name">link</a><br>
4646
</tal:block>
4747
</p>
@@ -53,9 +53,9 @@ <h2><span metal:define-slot="body_title">body title</span></h2>
5353
<span tal:condition="python:request.user.hasPermission('Create', 'issue')">
5454
<a href="issue?@template=item" i18n:translate="">Create New</a><br>
5555
</span>
56-
<a href="issue?@sort=-activity&@group=priority&@filter=status,assignedto&@columns=id,activity,title,creator,status&status=-1,1,2,3,4,5,6,7&assignedto=-1&dispname=Show%20Unassigned"
56+
<a href="issue?@sort=-activity&@group=priority&@filter=status,assignedto&@columns=id,activity,title,creator,status&status=-1,1,2,3,4,5,6,7&assignedto=-1&@dispname=Show%20Unassigned"
5757
i18n:translate="">Show Unassigned</a><br>
58-
<a href="issue?@sort=-activity&@group=priority&@filter=status&@columns=id,activity,title,creator,assignedto,status&status=-1,1,2,3,4,5,6,7&dispname=Show%20All"
58+
<a href="issue?@sort=-activity&@group=priority&@filter=status&@columns=id,activity,title,creator,assignedto,status&status=-1,1,2,3,4,5,6,7&@dispname=Show%20All"
5959
i18n:translate="">Show All</a><br>
6060
<a href="issue?@template=search" i18n:translate="">Search</a><br>
6161
<input type="submit" class="form-small" value="Show issue:"

0 commit comments

Comments
 (0)