Merge branch 'master' of ssh://git.cy55.de/home/git/loops into bbmaster
This commit is contained in:
commit
65ce2d9779
5 changed files with 16 additions and 9 deletions
|
@ -674,6 +674,8 @@ class BaseView(GenericView, I18NView):
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def xeditable(self):
|
def xeditable(self):
|
||||||
|
if self.typeOptions('no_external_edit'):
|
||||||
|
return False
|
||||||
ct = getattr(self.context, 'contentType', '')
|
ct = getattr(self.context, 'contentType', '')
|
||||||
if not ct or ct in ('application/pdf', 'application/x-pdf'):
|
if not ct or ct in ('application/pdf', 'application/x-pdf'):
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -387,8 +387,10 @@ class CreateConceptForm(CreateObjectForm):
|
||||||
include.remove('subtype')
|
include.remove('subtype')
|
||||||
parentType = self.target.conceptType
|
parentType = self.target.conceptType
|
||||||
subtypePred = self.conceptManager['issubtype']
|
subtypePred = self.conceptManager['issubtype']
|
||||||
|
tconcepts = (self.target.getChildren([subtypePred]) +
|
||||||
|
parentType.getChildren([subtypePred]))
|
||||||
types = [dict(token=ConceptTypeInfo(t).token, title=t.title)
|
types = [dict(token=ConceptTypeInfo(t).token, title=t.title)
|
||||||
for t in parentType.getChildren([subtypePred])]
|
for t in tconcepts]
|
||||||
if include or include is None:
|
if include or include is None:
|
||||||
return util.KeywordVocabulary(types + self.listTypes(include, ('hidden',)))
|
return util.KeywordVocabulary(types + self.listTypes(include, ('hidden',)))
|
||||||
return util.KeywordVocabulary(types)
|
return util.KeywordVocabulary(types)
|
||||||
|
|
|
@ -207,6 +207,7 @@ class ResourceView(BaseView):
|
||||||
data = context.data
|
data = context.data
|
||||||
if useAttachment:
|
if useAttachment:
|
||||||
filename = adapted(self.context).localFilename or getName(self.context)
|
filename = adapted(self.context).localFilename or getName(self.context)
|
||||||
|
if not self.typeOptions('no_normalize_download_filename'):
|
||||||
filename = NameChooser(getParent(self.context)).normalizeName(filename)
|
filename = NameChooser(getParent(self.context)).normalizeName(filename)
|
||||||
response.setHeader('Content-Disposition',
|
response.setHeader('Content-Disposition',
|
||||||
'attachment; filename=%s' % filename)
|
'attachment; filename=%s' % filename)
|
||||||
|
|
|
@ -33,11 +33,13 @@
|
||||||
<td style="white-space: nowrap; vertical-align: top; width: 10%"
|
<td style="white-space: nowrap; vertical-align: top; width: 10%"
|
||||||
i18n:translate="">You are here:</td>
|
i18n:translate="">You are here:</td>
|
||||||
<td>
|
<td>
|
||||||
|
<span>
|
||||||
<span style="white-space: nowrap"
|
<span style="white-space: nowrap"
|
||||||
tal:repeat="crumb crumbs">
|
tal:repeat="crumb crumbs">
|
||||||
<a tal:attributes="href crumb/url"
|
<a tal:attributes="href crumb/url"
|
||||||
tal:content="crumb/label" />
|
tal:content="crumb/label" />
|
||||||
<span tal:condition="not:repeat/crumb/end"> > </span></span>
|
<tal:delimiter
|
||||||
|
condition="not:repeat/crumb/end"> ></tal:delimiter></span> </span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Add table
Reference in a new issue