[Zope-CVS] SVN: zversioning/trunk/src/versioning/demo/ Added
View-Class for ReST
Volker Bachschneider
vbachs at dzug.org
Mon Oct 11 08:01:59 EDT 2004
Log message for revision 27968:
Added View-Class for ReST
Changed:
U zversioning/trunk/src/versioning/demo/browser/configure.zcml
U zversioning/trunk/src/versioning/demo/browser/info.pt
U zversioning/trunk/src/versioning/demo/interfaces.py
U zversioning/trunk/src/versioning/demo/vproposal.py
-=-
Modified: zversioning/trunk/src/versioning/demo/browser/configure.zcml
===================================================================
--- zversioning/trunk/src/versioning/demo/browser/configure.zcml 2004-10-11 12:01:51 UTC (rev 27967)
+++ zversioning/trunk/src/versioning/demo/browser/configure.zcml 2004-10-11 12:01:59 UTC (rev 27968)
@@ -8,6 +8,7 @@
<browser:page
for="..interfaces.IVProposal"
name="index.html"
+ class=".view.RenderReST"
template="info.pt"
permission="zope.View"
menu="zmi_views"
Modified: zversioning/trunk/src/versioning/demo/browser/info.pt
===================================================================
--- zversioning/trunk/src/versioning/demo/browser/info.pt 2004-10-11 12:01:51 UTC (rev 27967)
+++ zversioning/trunk/src/versioning/demo/browser/info.pt 2004-10-11 12:01:59 UTC (rev 27968)
@@ -5,22 +5,22 @@
<h1 tal:content="context/title">Versionable Proposal</h1>
<div><h4 i18n:translate="">Use Cases</h4>
- <div tal:content="structure context/rusecase | nothing">
+ <div tal:content="structure view/usecase | nothing">
What Situations we will solve
</div><a href="./@@EditUseCase.html" i18n:translate="">Edit</a>
</div>
<div><h4 i18n:translate="">Concept</h4>
- <div tal:content="structure context/rconcept | nothing">
+ <div tal:content="structure view/concept | nothing">
Technical Concept
</div><a href="./@@EditConcept.html" i18n:translate="">Edit</a>
</div>
<div><h4 i18n:translate="">Todo</h4>
- <div tal:content="structure context/rtodo | nothing">
+ <div tal:content="structure view/todo | nothing">
Steps to go
</div><a href="./@@EditTodo.html" i18n:translate="">Edit</a>
</div>
<div><h4 i18n:translate="">Issues</h4>
- <div tal:content="structure context/rissues | nothing">
+ <div tal:content="structure view/issues | nothing">
Open Issues
</div><a href="./@@EditIssues.html" i18n:translate="">Edit</a>
</div>
Modified: zversioning/trunk/src/versioning/demo/interfaces.py
===================================================================
--- zversioning/trunk/src/versioning/demo/interfaces.py 2004-10-11 12:01:51 UTC (rev 27967)
+++ zversioning/trunk/src/versioning/demo/interfaces.py 2004-10-11 12:01:59 UTC (rev 27968)
@@ -11,16 +11,4 @@
usecase = Text(title=_("Use Case"))
concept = Text(title=_("Concept"),required=False)
todo = Text(title=_("Todo"),required=False)
- issues = Text(title=_("Open Issues"),required=False)
-
- def rusecase():
- """Render usecase to HTML"""
-
- def rconcept():
- """Render usecase to HTML"""
-
- def rtodo():
- """Render usecase to HTML"""
-
- def rissues():
- """Render usecase to HTML"""
\ No newline at end of file
+ issues = Text(title=_("Open Issues"),required=False)
\ No newline at end of file
Modified: zversioning/trunk/src/versioning/demo/vproposal.py
===================================================================
--- zversioning/trunk/src/versioning/demo/vproposal.py 2004-10-11 12:01:51 UTC (rev 27967)
+++ zversioning/trunk/src/versioning/demo/vproposal.py 2004-10-11 12:01:59 UTC (rev 27968)
@@ -1,6 +1,5 @@
import persistent
import zope.interface
-from zope.app.renderer.rest import ReStructuredTextToHTMLRenderer
from zope.app.dublincore.interfaces import IZopeDublinCore
from versioning.demo.interfaces import IVProposal
@@ -25,22 +24,6 @@
"""Get proposal title in Dublin Core."""
dc = IZopeDublinCore(self)
return dc.title
-
- def rusecase(self):
- html = ReStructuredTextToHTMLRenderer(self.usecase.encode('utf-8'),None)
- return unicode(html.render(),'utf-8')
-
- def rconcept(self):
- html = ReStructuredTextToHTMLRenderer(self.concept.encode('utf-8'),None)
- return unicode(html.render(),'utf-8')
-
- def rtodo(self):
- html = ReStructuredTextToHTMLRenderer(self.todo.encode('utf-8'),None)
- return unicode(html.render(),'utf-8')
-
- def rissues(self):
- html = ReStructuredTextToHTMLRenderer(self.issues.encode('utf-8'),None)
- return unicode(html.render(),'utf-8')
title=property(getTitle,setTitle)
More information about the Zope-CVS
mailing list