Skip to content

Commit 311be43

Browse files
author
Engelbert Gruber
committed
display links a html link in history.
1 parent 8d2fdfe commit 311be43

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

CHANGES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ are given with the most recent entry first.
33

44
2002-01-?? - 0.4.0??
55
. handle attachments with no name (eg tnef)
6-
6+
. display links a html link in history.
77

88
2002-01-16 - 0.4.0b2
99
Fixed:

roundup/htmltemplate.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: htmltemplate.py,v 1.58 2002-01-15 00:50:03 richard Exp $
18+
# $Id: htmltemplate.py,v 1.59 2002-01-17 07:58:24 grubert Exp $
1919

2020
__doc__ = """
2121
Template engine.
@@ -79,6 +79,7 @@ def do_plain(self, property, escape=0):
7979
if value is None: value = ''
8080
else: value = _('*encrypted*')
8181
elif isinstance(propclass, hyperdb.Date):
82+
# this gives "2002-01-17.06:54:39", maybe replace the "." by a " ".
8283
value = str(value)
8384
elif isinstance(propclass, hyperdb.Interval):
8485
value = str(value)
@@ -453,8 +454,21 @@ def do_history(self, **args):
453454

454455
for id, date, user, action, args in self.cl.history(self.nodeid):
455456
date_s = str(date).replace("."," ")
457+
arg_s = ""
458+
if action=='link' and type(args)==type(()):
459+
if len(args) == 3:
460+
arg_s += '<a href="%s%s">%s%s %s</a>'% (args[0],args[1],args[0],args[1],args[2])
461+
else:
462+
arg_s = str(arg)
463+
elif type(args)==type({}):
464+
for k in args.keys():
465+
# special treatment of date, maybe links to files, authors, recipient ?
466+
arg_s += '%s: %s,'%(k,str(args[k]))
467+
else:
468+
arg_s = str(args)
469+
# shouldnt _() be used ?
456470
l.append('<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>'%(
457-
date_s, user, action, args))
471+
date_s, user, action, arg_s))
458472
l.append('</table>')
459473
return '\n'.join(l)
460474

@@ -884,6 +898,9 @@ def render(self, form):
884898

885899
#
886900
# $Log: not supported by cvs2svn $
901+
# Revision 1.58 2002/01/15 00:50:03 richard
902+
# #502949 ] index view for non-issues and redisplay
903+
#
887904
# Revision 1.57 2002/01/14 23:31:21 richard
888905
# reverted the change that had plain() hyperlinking the link displays -
889906
# that's what link() is for!

0 commit comments

Comments
 (0)