Roundup Tracker - Issues

Message4801

Author rouilj
Recipients rouilj
Date 2013-02-23.04:46:14
Message-id <1361594775.32.0.757908199684.issue2550795@psf.upfronthosting.co.za>
In-reply-to
In the classic (and minimal, devel and responsive) templates
the page.html menu column has a number of href links that include
entries like:

   '@dispname': i18n.gettext('Show Unassigned')

the space needs to be url encoded to %20 so that the page will validate.
These can be manually changed to %20, so they read:

   '@dispname': i18n.gettext('Show%20Unassigned')

The user's defined queries at the top of the column needs to be
fixed as well. To fix those replace:

  a href="#" tal:attributes="href
string:${qs/klass}?${qs/url}&@dispname=${qs/name}"
       tal:content="qs/name"

with:

  a href="#" tal:attributes="href
python:'%s?%s&@dispname=%s'%(qs.klass,qs.url,utils.urlquote(qs.name.plain()))"
       tal:content="qs/name"

and add a file with the following contents in the extension
directory of the tracker:

==============
import urllib

def urlquote(item):
    ''' make urllib.quote callable from a template.
    '''
    return urllib.quote(item)

def init(instance):
    instance.registerUtil('urlquote', urlquote)
===============

to make the utils.urlquote function exist. I am not sure if
there is a way to access urllib.quote directly without this utility
function or not.
History
Date User Action Args
2013-02-23 04:46:15rouiljsetrecipients: + rouilj
2013-02-23 04:46:15rouiljsetmessageid: <1361594775.32.0.757908199684.issue2550795@psf.upfronthosting.co.za>
2013-02-23 04:46:15rouiljlinkissue2550795 messages
2013-02-23 04:46:14rouiljcreate