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 c8ba358..e6073c4 100644 Binary files a/locales/de/LC_MESSAGES/loops.mo and b/locales/de/LC_MESSAGES/loops.mo differ diff --git a/locales/de/LC_MESSAGES/loops.po b/locales/de/LC_MESSAGES/loops.po index 9767ed0..4b55877 100644 --- a/locales/de/LC_MESSAGES/loops.po +++ b/locales/de/LC_MESSAGES/loops.po @@ -47,6 +47,9 @@ msgstr "Unterbegriffe" msgid "Title" msgstr "Titel" +msgid "Description" +msgstr "Beschreibung" + msgid "Related Items" msgstr "Verwandte Begriffe" @@ -71,6 +74,9 @@ msgstr "Inhalt" msgid "Create Resource, Type = " msgstr "Ressource anlegen, Typ = " +msgid "Edit Resource" +msgstr "Ressource bearbeiten" + msgid "Edit Resource..." msgstr "Ressource bearbeiten..." @@ -155,3 +161,16 @@ msgstr "Alle Versionen" msgid "Search results" msgstr "Suchergebnisse" +msgid "Download" +msgstr "Herunterladen" + +msgid "Open for editing" +msgstr "Zum Bearbeiten öffnen" + +msgid "View" +msgstr "Ansehen" + +msgid "Concept Assignments" +msgstr "Zugeordnete Begriffe" + +