Help Wiki Improvements

Phil Bull philbull at
Tue Nov 27 11:38:25 UTC 2007

Hi Adam,

On Sun, 2007-11-25 at 20:07 -0500, Adam Sommer wrote:
> Thanks for the link Matt, that's really cool.  Just wanted to report
> that I installed MoinMoin 1.3.4, the Ubuntu theme, and the macro.
> Everything worked fine with my setup, but you've mentioned previously
> that help.u.c has been heavily modified so it should definitely be
> tested with the running version.

I tested the macro on MoinMoin 1.5.2 on Dapper, with the h.u.c theme.
I'm not sure if this is the case with version 1.3.4, but there were some
issues with the line break tags (<br>) being added for padding. The
padding is added beneath the point in the document where the macro was
added, and not under the floating div inserted by the macro as desired.
The CSS should handle the padding anyway - it pads fine on 1.5.2.

Also, the floating div still displays if no valid distro codes are
entered (so you just get the "Release" title bar and nothing else). I've
attached a bzr bundle which addresses these two issues.

I'd also like to note that the macro seems very robust - I've tried
passing numerous nonsense/empty strings as arguments and as items in
UbuntuVersions, and it seems to handle these just fine. The
UbuntuVersions page will need to be access-controlled, as it seems to
allow the inclusion of arbitrary HTML through the macro. However, this
may be useful, as we can choose different formatting for
LTS/development/obsolete releases.

> I think everything should work fine though.  Regarding posting the
> code to the Spec Page I wasn't sure on where to place it?  Or can a
> link to the bzr branch, be sufficient?

I'd imagine that a link to your bzr branch would be the best way of
posting the code.

Hopefully we can have this macro tested and online pretty soon.

Thanks for all of your hard work,


Phil Bull
-------------- next part --------------
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: philbull at
# target_branch:
# testament_sha1: d532f650d665a34adcff364076e0a15dcfb3c2b8
# timestamp: 2007-11-27 10:59:14 +0000
# base_revision_id: asommer70 at\
#   5nf3f1l7nuvdtzvo
# Begin patch
=== modified file ''
---	2007-10-23 18:39:19 +0000
+++	2007-11-27 10:28:23 +0000
@@ -24,17 +24,23 @@
 			version_strings[pair[0]] = pair[1].strip()
+	# Set item count (number of items added to list) to zero
+	item_count = 0
 	# Search through the listings on the UbuntuVersion page and add them to the Versions table.
 	for release in args_list:        
 	    if (version_strings.has_key(release.strip())):
 	            release_html += "<p>" + version_strings[release.strip()] + "</p>"
+	            item_count += 1
         	except KeyError:
 	# Setup the html table.
-	html = """<div>
+	if(item_count > 0):
+		# If there are some items to add to the list, display the list
+		html = """<div>
 		       <table class="versionTable">
@@ -48,11 +54,10 @@
-		    <br><br><br>""" 
-	# If more than one release is chosen add some extra newlines to make things pretty.
-	if (len(args_list) > 1):
-		html += "<br><br>"
+		    """ 
+	else:
+		# Else, don't display the list
+		html = ""
 	return macro.formatter.rawHTML(html)

# Begin bundle

More information about the ubuntu-doc mailing list