diff --git a/composer/message/instance.py b/composer/message/instance.py index 1e0f889..86666fd 100644 --- a/composer/message/instance.py +++ b/composer/message/instance.py @@ -62,7 +62,7 @@ class MessageInstance(Instance): if self.client is None: return '' if zope29: - path = self.client.manager.getPhysicalPath() + path = self.client.manager.getPhysicalPath()[:-3] url = request.physicalPathToURL(path) else: url = absoluteURL(self.client.manager, request) diff --git a/organize/browser/service.py b/organize/browser/service.py index ab67c4d..e718864 100644 --- a/organize/browser/service.py +++ b/organize/browser/service.py @@ -207,6 +207,7 @@ class CheckoutView(ServiceManagerView): result.append(dict(service=service.title, fromTo=self.getFromTo(service), location=service.location, + locationUrl=service.locationUrl, number=reg.number, serviceObject=service)) return result @@ -223,7 +224,12 @@ class CheckoutView(ServiceManagerView): def listRegistrationsText(self): result = [] for info in self.getRegistrationsInfo(): - line = '\n'.join((info['service'], info['fromTo'], info['location'])) + location, locationUrl = info['location'], info['locationUrl'] + if locationUrl.startswith('/'): + locationUrl = self.request.get('SERVER_URL') + locationUrl + locationInfo = (locationUrl and '%s (%s)' % (location, locationUrl) + or location) + line = '\n'.join((info['service'], info['fromTo'], locationInfo)) if info['serviceObject'].allowRegWithNumber: line += '\nTeilnehmer: %s\n' % info['number'] result.append(line) @@ -251,9 +257,13 @@ class CheckoutView(ServiceManagerView): def listRegistrationsHtml(self): result = [] for info in self.getRegistrationsInfo(): + location, locationUrl = info['location'], info['locationUrl'] + locationInfo = (locationUrl + and ('%s' % (locationUrl, location)) + or location) line = self.row % (info['number'], info['service'], - info['fromTo'].replace(' ', '  '), - info['location']) + info['fromTo'].replace(' ', '  '), + locationInfo) result.append(line) return self.html % '\n'.join(result) diff --git a/organize/interfaces.py b/organize/interfaces.py index 58d1d4c..6c1feba 100644 --- a/organize/interfaces.py +++ b/organize/interfaces.py @@ -261,9 +261,14 @@ class IService(Interface): description=_(u'Web address (URL) for more information ' 'about the service.'), required=False,) - infoUrl = schema.TextLine( + info = schema.TextLine( title=_(u'Additional information'), - description=_(u'Web address (URL) of a document that ' + description=_(u'Name/title of a document or web page that ' + 'offers additional information.'), + required=False,) + infoUrl = schema.TextLine( + title=_(u'URL for additional information'), + description=_(u'Web address (URL) of a document or web page that ' 'offers additional information.'), required=False,)