Commit 0080c2bc authored by Andreas Jung's avatar Andreas Jung

No commit message

No commit message
parent 5201903d
...@@ -81,7 +81,7 @@ class ZPT(Script, PageTemplate, Historical, Cacheable, ...@@ -81,7 +81,7 @@ class ZPT(Script, PageTemplate, Historical, Cacheable,
+ Cacheable.manage_options + Cacheable.manage_options
_properties=({'id':'title', 'type': 'string', 'mode': 'wd'}, _properties=({'id':'title', 'type': 'ustring', 'mode': 'w'},
{'id':'content_type', 'type':'string', 'mode': 'w'}, {'id':'content_type', 'type':'string', 'mode': 'w'},
{'id':'expand', 'type':'boolean', 'mode': 'w'}, {'id':'expand', 'type':'boolean', 'mode': 'w'},
) )
...@@ -281,6 +281,10 @@ class ZPT(Script, PageTemplate, Historical, Cacheable, ...@@ -281,6 +281,10 @@ class ZPT(Script, PageTemplate, Historical, Cacheable,
self.REQUEST.RESPONSE.setHeader('Content-Type', self.content_type) self.REQUEST.RESPONSE.setHeader('Content-Type', self.content_type)
return self.read() return self.read()
security.declareProtected(view_manage_screens, 'html')
def html(self):
return self.content_type == 'text/html'
security.declareProtected(view_management_screens, 'get_size') security.declareProtected(view_management_screens, 'get_size')
def get_size(self): def get_size(self):
return len(self.read()) return len(self.read())
...@@ -315,6 +319,7 @@ class ZPT(Script, PageTemplate, Historical, Cacheable, ...@@ -315,6 +319,7 @@ class ZPT(Script, PageTemplate, Historical, Cacheable,
'title': 'This template has an error'},) 'title': 'This template has an error'},)
return icons return icons
security.declareProtected(view, 'pt_source_file')
def pt_source_file(self): def pt_source_file(self):
"""Returns a file name to be compiled into the TAL code.""" """Returns a file name to be compiled into the TAL code."""
try: try:
......
...@@ -39,10 +39,9 @@ ...@@ -39,10 +39,9 @@
</div> </div>
</td> </td>
<td align="left" valign="top" colspan=2> <td align="left" valign="top" colspan=2>
<!--
<a href="source.html" tal:condition="context/html">Browse HTML source</a> <a href="source.html" tal:condition="context/html">Browse HTML source</a>
<a href="source.xml" tal:condition="not:context/html">Browse XML source</a> <a href="source.xml" tal:condition="not:context/html">Browse XML source</a>
-->
<br> <br>
<input type="hidden" name="expand:int:default" value="0"> <input type="hidden" name="expand:int:default" value="0">
<input type="checkbox" value="1" name="expand:int" <input type="checkbox" value="1" name="expand:int"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment