[rhmessaging-commits] rhmessaging commits: r2746 - mgmt/trunk/cumin/python/cumin.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Wed Nov 5 16:32:04 EST 2008
Author: eallen
Date: 2008-11-05 16:32:04 -0500 (Wed, 05 Nov 2008)
New Revision: 2746
Modified:
mgmt/trunk/cumin/python/cumin/formats.py
Log:
Added option to add a hash/bookmark to a formatted link
Modified: mgmt/trunk/cumin/python/cumin/formats.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/formats.py 2008-11-05 21:31:14 UTC (rev 2745)
+++ mgmt/trunk/cumin/python/cumin/formats.py 2008-11-05 21:32:04 UTC (rev 2746)
@@ -119,9 +119,9 @@
return string
-def fmt_link(href, content, class_="", id="", link_title=""):
- return "<a %s href=\"%s\"%s%s>%s</a>" % \
- (id and "id=\"%s\"" % id or "", href, class_ and " class=\"%s\" " % class_ or " ",
+def fmt_link(href, content, class_="", id="", link_title="", bm=""):
+ return "<a %s href=\"%s%s\"%s%s>%s</a>" % \
+ (id and "id=\"%s\"" % id or "", href, bm and "#%s" % bm or "", class_ and " class=\"%s\" " % class_ or " ",
link_title and "title=\"%s\"" % link_title or "", content)
def fmt_olink(session, object, selected=False, name=None, pre=16, post=0):
More information about the rhmessaging-commits
mailing list