more on i18n and German translations
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1766 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
6d4cffaf0f
commit
c34f2d79ba
4 changed files with 36 additions and 6 deletions
|
@ -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')
|
||||
|
|
|
@ -49,16 +49,20 @@
|
|||
<p><i tal:content="item/description">Description</i></p>
|
||||
<p>
|
||||
<a href="#"
|
||||
tal:condition="nothing"
|
||||
i18n:translate=""
|
||||
tal:attributes="href string:${view/url}/.target${view/targetId}/download.html">
|
||||
Download
|
||||
</a>
|
||||
<a href="#"
|
||||
tal:attributes="href string:${view/url}/.target${view/targetId}/view">
|
||||
Download
|
||||
</a>
|
||||
<tal:view condition="item/viewable | nothing"> |
|
||||
<a href="#"
|
||||
i18n:translate=""
|
||||
tal:attributes="href string:${view/url}/.target${view/targetId}/view">
|
||||
View
|
||||
</a>
|
||||
</tal:view>
|
||||
<tal:xedit condition="item/xeditable"> |
|
||||
<a href="#" title="Edit with External Editor"
|
||||
i18n:translate=""
|
||||
tal:define="url string:${view/url}/.target${view/targetId}"
|
||||
tal:attributes="href string:$url/external_edit?version=this">
|
||||
Open for editing
|
||||
|
|
Binary file not shown.
|
@ -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"
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue