From c34f2d79baa520b857410604e0e3ffc80bb0fc5e Mon Sep 17 00:00:00 2001 From: helmutm Date: Thu, 24 May 2007 12:55:12 +0000 Subject: [PATCH] more on i18n and German translations git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1766 fd906abe-77d9-0310-91a1-e0d9ade77398 --- browser/resource.py | 9 ++++++++- browser/resource_macros.pt | 14 +++++++++----- locales/de/LC_MESSAGES/loops.mo | Bin 2661 -> 3004 bytes locales/de/LC_MESSAGES/loops.po | 19 +++++++++++++++++++ 4 files changed, 36 insertions(+), 6 deletions(-) diff --git a/browser/resource.py b/browser/resource.py index d3c29ed..ed0acd7 100644 --- a/browser/resource.py +++ b/browser/resource.py @@ -157,7 +157,8 @@ class ResourceView(BaseView): response.setHeader('Content-Type', context.contentType) response.setHeader('Content-Length', len(data)) ct = context.contentType - if useAttachment or (not ct.startswith('image/') and ct != 'application/pdf'): + #if useAttachment or (not ct.startswith('image/') and ct != 'application/pdf'): + if useAttachment: response.setHeader('Content-Disposition', 'attachment; filename=%s' % zapi.getName(self.context)) return data @@ -166,6 +167,12 @@ class ResourceView(BaseView): """ Force download, e.g. of a PDF file """ return self.show(True) + @property + def viewable(self): + return True + ct = self.context.contentType + return ct.startswith('image/') or ct == 'application/pdf' + def getActions(self, category='object'): renderer = node_macros.macros['external_edit'] node = self.request.annotations.get('loops.view', {}).get('node') diff --git a/browser/resource_macros.pt b/browser/resource_macros.pt index 25a6d4c..62e19cd 100644 --- a/browser/resource_macros.pt +++ b/browser/resource_macros.pt @@ -49,16 +49,20 @@

Description

Download - - Download - + | + + View + + | Open for editing diff --git a/locales/de/LC_MESSAGES/loops.mo b/locales/de/LC_MESSAGES/loops.mo index c8ba35884e0bf37955398e1e0618648fc492db87..e6073c419f0223eb1e47eb57d567acd9f6534339 100644 GIT binary patch delta 1434 zcmYM!OKeP09LMp~nrWv+)o8U!b-ds8ev4>hq3V?o5s%PzPNz3%@6^3BDMDuDvG7=2 zq=|H6At7C$5s_HaNNO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