# HG changeset patch # User k0s # Date 1265674890 18000 # Node ID 20e3d138dc988e4420e9e34ecdf3092057c36c8f # Parent 527ccb76d0431240661f36b200aad81b7ef5a461 better way of doing up; this breaks old behaviour so incrementing version diff -r 527ccb76d043 -r 20e3d138dc98 decoupage/formatters.py --- a/decoupage/formatters.py Mon Feb 08 11:44:20 2010 -0500 +++ b/decoupage/formatters.py Mon Feb 08 19:21:30 2010 -0500 @@ -156,6 +156,23 @@ f['links'] = [ { 'text': text, 'link': link } for text, link in links ] + +class Up(object): + """ + provides an up link to the path above: + /up = .. + """ + + def __init__(self, arg): + self.up = arg.strip() + + def __call__(self, request, data): + path = request.path_info + if (path != '/') and self.up: + data['files'].insert(0, {'path': '..', + 'name': path.rsplit('/', 1)[0] + '/', + 'description': self.up}) + class CSS(object): """specify CSS used (whitespace separated list)""" diff -r 527ccb76d043 -r 20e3d138dc98 decoupage/templates/index.html --- a/decoupage/templates/index.html Mon Feb 08 11:44:20 2010 -0500 +++ b/decoupage/templates/index.html Mon Feb 08 19:21:30 2010 -0500 @@ -15,7 +15,6 @@

${title}