Help Wiki Improvements

Phil Bull philbull at gmail.com
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

-- 
Phil Bull
http://www.launchpad.net/people/philbull
-------------- next part --------------
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: philbull at gmail.com-20071127102823-8rzt7mdluvnqaz0x
# target_branch: http://bazaar.launchpad.net/%7Easommer/%2Bjunk/misc/
# testament_sha1: d532f650d665a34adcff364076e0a15dcfb3c2b8
# timestamp: 2007-11-27 10:59:14 +0000
# base_revision_id: asommer70 at gmail.com-20071023183919-\
#   5nf3f1l7nuvdtzvo
# 
# Begin patch
=== modified file 'ReleaseVersion.py'
--- ReleaseVersion.py	2007-10-23 18:39:19 +0000
+++ ReleaseVersion.py	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())):
         	try:
 	            release_html += "<p>" + version_strings[release.strip()] + "</p>"
+	            item_count += 1
         	except KeyError:
 	            "x"
 		
 	
 	# 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">
 		        <tbody>
 			<tr>
@@ -48,11 +54,10 @@
 		      </tbody>
 		      </table>
 		    </div>
-		    <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
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWSV8YGUAAb7fgEBwWf///1Jg
WQC/7//wUAQYXgGmgM0aEkpqnqemRqGR6ZqJ6E9TRiYIwJpoyGOYBNMAmQwABMEwAAASKCZEnqek
Yp+hMmgQ0DQ0DaGoaDmATTAJkMAATBMAAAElBDTFMIwink1TzU9pJlP1TT0Ag2oe1SRJEmxjGaOY
8zRjR+GNJ9Nrg77P6S2cO+ikNVdvq2xkkdO6kbo4OdMpgwzHYeGTPffCpZ36G2izx8Jstq6ZRnJM
jEk4v18nLF4Fo9nQ29erUZfGvXwc/Tz0m8dMnjRQblSNqiTZFkiciJxVNzJyMYfLTndzIdW11eUm
GCC+hobs3UCqVET2mbO+Nygo5vZnHgSCPQwA8XrMbPwSLVYeg2VrjBlCDRmTCwS9xvEtX5N4cC4S
0HFLQwKjp2FOTPRgqGqcBL3sE22QoWN2R+p6n0w9x3ksgovD4YhrLHXKZkSDMuriYiWoKAtEwI1D
iYnic0MTEcOm0fAVMmD3A0wH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