summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0069a0a)
raw | patch | inline | side by side (parent: 0069a0a)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 2 Apr 2002 01:40:59 +0000 (01:40 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 2 Apr 2002 01:40:59 +0000 (01:40 +0000) |
multilinks. When true, it only displays the linked node id as the anchor
text. The link value is displayed as a tooltip using the title anchor
attribute.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@687 57a73879-2fb5-44c3-a270-3262357dd7e2
text. The link value is displayed as a tooltip using the title anchor
attribute.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@687 57a73879-2fb5-44c3-a270-3262357dd7e2
diff --git a/CHANGES.txt b/CHANGES.txt
index 1460cbb65cdf4fbc3326093b2f6231a463275f51..bca00229d1fb93f12f4ced8169fbca881d0083ca 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
This file contains the changes to the Roundup system over time. The entries
are given with the most recent entry first.
-2002-03-?? - 0.4.1
+0.4.2
+Feature:
+ . link() htmltemplate function now has a "showid" option for links and
+ multilinks. When true, it only displays the linked node id as the anchor
+ text. The link value is displayed as a tooltip using the title anchor
+ attribute.
+ To use in eg. the superseder field, have something like this:
+ <td>
+ <display call="field('superseder', showid=1)">
+ <display call="classhelp('issue', 'id,title', label='list', width=500)">
+ <property name="superseder">
+ <br>View: <display call="link('superseder', showid=1)">
+ </property>
+ </td>
+
+2002-03-25 - 0.4.1
Feature:
. use blobfiles in back_anydbm which is used in back_bsddb.
change test_db as dirlist does not work for subdirectories.
diff --git a/doc/customizing.txt b/doc/customizing.txt
index 9d3f202383754e410f193413a91259e58504f9d7..cf9f18a7aedfd7aea12535c321c3409b677d25f1 100644 (file)
--- a/doc/customizing.txt
+++ b/doc/customizing.txt
| |text. |
| |Options: |
| |property (property name) - the property to use in the second case. |
+| |showid - use the linked node id as the link text (linked node |
+| | "value" will be set as a tooltip) |
+---------+-------------------------------------------------------------------+
|count |For a Multilink property, display a count of the number of links in|
| |the list. |
"note" field, which is a text area for entering a note to go along with a
change.
+The <property> tag used in the index may also be used here - it checks to see
+if the nominated Multilink property has any entries. This can be used to
+eliminate sections of the editor section if the property has no entries::
+
+ <td class="form-text">
+ <display call="field('superseder', size=40, showid=1)">
+ <display call="classhelp('issue', 'id,title', label='list', width=500)">
+ <property name="superseder">
+ <br>View: <display call="link('superseder', showid=1)">
+ </property>
+ </td>
+
+The "View: " part with the links will only display if the superseder property
+has values.
+
When a change is submitted, the system automatically generates a message
describing the changed properties.
The <property> tag used in the index may also be used here - it checks to see
if the nominated Multilink property has any entries. This can be used to
-eliminate sections of the spool section if the property has no entries.::
+eliminate sections of the spool section if the property has no entries::
<property name="files">
<tr class="strong-header">
index d85684f1142502272ed2d79fbaa55822a047b25c..59ce26cc19cf92fd964d59f47e7e4eaa2aa6e7de 100644 (file)
--- a/roundup/htmltemplate.py
+++ b/roundup/htmltemplate.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: htmltemplate.py,v 1.84 2002-03-29 19:41:48 rochecompaan Exp $
+# $Id: htmltemplate.py,v 1.85 2002-04-02 01:40:58 richard Exp $
__doc__ = """
Template engine.
"""
-import os, re, StringIO, urllib, cgi, errno, types
+import os, re, StringIO, urllib, cgi, errno, types, urllib
import hyperdb, date
from i18n import _
return _('[Menu: not a link]')
#XXX deviates from spec
- def do_link(self, property=None, is_download=0):
+ def do_link(self, property=None, is_download=0, showid=0):
'''For a Link or Multilink property, display the names of the linked
nodes, hyperlinked to the item views on those nodes.
For other properties, link to this node with the property as the
linkcl = self.db.classes[linkname]
k = linkcl.labelprop()
linkvalue = cgi.escape(linkcl.get(value, k))
+ if showid:
+ label = value
+ title = ' title="%s"'%linkvalue
+ # note ... this should be urllib.quote(linkcl.get(value, k))
+ else:
+ label = linkvalue
if is_download:
- return '<a href="%s%s/%s">%s</a>'%(linkname, value,
- linkvalue, linkvalue)
+ return '<a href="%s%s/%s"%s>%s</a>'%(linkname, value,
+ linkvalue, title, label)
else:
- return '<a href="%s%s">%s</a>'%(linkname, value, linkvalue)
+ return '<a href="%s%s"%s>%s</a>'%(linkname, value, title, label)
if isinstance(propclass, hyperdb.Multilink):
linkname = propclass.classname
linkcl = self.db.classes[linkname]
l = []
for value in value:
linkvalue = cgi.escape(linkcl.get(value, k))
+ if showid:
+ label = value
+ title = ' title="%s"'%linkvalue
+ # note ... this should be urllib.quote(linkcl.get(value, k))
+ else:
+ label = linkvalue
if is_download:
- l.append('<a href="%s%s/%s">%s</a>'%(linkname, value,
- linkvalue, linkvalue))
+ l.append('<a href="%s%s/%s"%s>%s</a>'%(linkname, value,
+ linkvalue, title, label))
else:
- l.append('<a href="%s%s">%s</a>'%(linkname, value,
- linkvalue))
+ l.append('<a href="%s%s"%s>%s</a>'%(linkname, value,
+ title, label))
return ', '.join(l)
if is_download:
return '<a href="%s%s/%s">%s</a>'%(self.classname, self.nodeid,
#
# $Log: not supported by cvs2svn $
+# Revision 1.84 2002/03/29 19:41:48 rochecompaan
+# . Fixed display of mutlilink properties when using the template
+# functions, menu and plain.
+#
# Revision 1.83 2002/02/27 04:14:31 richard
# Ran it through pychecker, made fixes
#
index 6d3dddd498a82164da1f505b2e0d3fd31f034995..53d058aef25eb2d1aabd5af5b9cce43997e283dc 100644 (file)
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Superseder</span></td>
- <td class="form-text"><display call="field('superseder', size=40, showid=1)">
- <display call="classhelp('issue', 'id,title', label='list', width=500)"></td>
+ <td class="form-text">
+ <display call="field('superseder', size=40, showid=1)">
+ <display call="classhelp('issue', 'id,title', label='list', width=500)">
+ <property name="superseder">
+ <br>View: <display call="link('superseder', showid=1)">
+ </property>
+ </td>
<td width=1% nowrap align=right><span class="form-label">Nosy List</span></td>
<td class="form-text"><display call="field('nosy')">
<display call="classhelp('user', 'username,realname,address,phone', label='list', width=500)"></td>
diff --git a/roundup/templates/extended/html/issue.item b/roundup/templates/extended/html/issue.item
index 0bdde8c30967ea59cb9fc477617ed505049fdd4a..84cfecb3542c61da89f198e60430d60442b2e23f 100644 (file)
-<!-- $Id: issue.item,v 1.10 2002-02-22 00:06:58 richard Exp $-->
+<!-- $Id: issue.item,v 1.11 2002-04-02 01:40:59 richard Exp $-->
<table border=0 cellspacing=0 cellpadding=2>
<tr class="strong-header">
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Superseder</span></td>
- <td class="form-text"><display call="field('superseder', size=40, showid=1)">
- <display call="classhelp('issue', 'id,title', label='list', width=500)"></td>
+ <td class="form-text">
+ <display call="field('superseder', size=40, showid=1)">
+ <display call="classhelp('issue', 'id,title', label='list', width=500)">
+ <property name="superseder">
+ <br>View: <display call="link('superseder', showid=1)">
+ </property>
+ </td>
<td width=1% nowrap align=right><span class="form-label">Support call</span></td>
- <td class="form-text"><display call="field('supportcall', size=40, showid=1)">
- <display call="classhelp('support', 'id,title', label='list', width=500)"></td>
+ <td class="form-text">
+ <display call="field('supportcall', size=40, showid=1)">
+ <display call="classhelp('support', 'id,title', label='list', width=500)">
+ <property name="supportcall">
+ <br>View: <display call="link('supportcall', showid=1)">
+ </property>
+ </td>
</tr>
<tr bgcolor="ffffea">
diff --git a/roundup/templates/extended/html/support.item b/roundup/templates/extended/html/support.item
index daa2d7ab60b35d27fbd99a6409cca2e1c0a6e3da..71ce756cc0d3ec2abcd1452ce34e031a9801d4eb 100644 (file)
-<!-- $Id: support.item,v 1.4 2002-01-22 00:21:32 richard Exp $-->
+<!-- $Id: support.item,v 1.5 2002-04-02 01:40:59 richard Exp $-->
<table border=0 cellspacing=0 cellpadding=2>
<tr class="strong-header">
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Superseder</span></td>
- <td class="form-text"><display call="field('superseder', size=40, showid=1)"></td>
+ <td class="form-text">
+ <display call="field('superseder', size=40, showid=1)">
+ <display call="classhelp('issue', 'id,title', label='list', width=500)">
+ <property name="superseder">
+ <br>View: <display call="link('superseder', showid=1)">
+ </property>
+ </td>
<td width=1% nowrap align=right><span class="form-label">Nosy List</span></td>
<td class="form-text"><display call="field('nosy')"></td>
</tr>