diff src/pages/tickets/page_meta.py @ 973:2e75dc986e03

pages (tickets): URLs for list and new are set in the template for the whole subhierarchy
author Goffi <goffi@goffi.org>
date Fri, 10 Nov 2017 13:32:57 +0100
parents 4d1dcf97740f
children c8cafe316f6f
line wrap: on
line diff
--- a/src/pages/tickets/page_meta.py	Fri Nov 10 11:10:15 2017 +0100
+++ b/src/pages/tickets/page_meta.py	Fri Nov 10 13:32:57 2017 +0100
@@ -42,10 +42,12 @@
             node = u''
 
     data = self.getRData(request)
-
     data['service'] = service
     data['node'] = node
 
+    template_data = request.template_data
+    template_data[u'url_tickets_list'] = self.getPageByName('tickets_list').getURL(service.full(), node or u'@')
+    template_data[u'url_tickets_new'] = u'/' + ('/'.join(request.prepath + ['new']).decode('utf-8'))
 
 @defer.inlineCallbacks
 def prepare_render(self, request):