[Zope3-checkins] CVS: zopeproducts/zwiki - READMDE.txt:1.2 TODO.txt:1.2 VERSION.txt:1.2 add.pt:1.2 browser.py:1.4 comment_page.pt:1.2 configure.zcml:1.6 interfaces.py:1.2 parents_page.pt:1.2 view_page.pt:1.3 zwiki.py:1.6
Viktorija Zaksiene
ryzaja@codeworks.lt
Mon, 7 Apr 2003 03:16:02 -0400
Update of /cvs-repository/zopeproducts/zwiki
In directory cvs.zope.org:/tmp/cvs-serv19804
Modified Files:
READMDE.txt TODO.txt VERSION.txt add.pt browser.py
comment_page.pt configure.zcml interfaces.py parents_page.pt
view_page.pt zwiki.py
Log Message:
Removed all trailing whitespaces.
=== zopeproducts/zwiki/READMDE.txt 1.1 => 1.2 ===
--- zopeproducts/zwiki/READMDE.txt:1.1 Sun Apr 6 21:47:51 2003
+++ zopeproducts/zwiki/READMDE.txt Mon Apr 7 03:15:31 2003
@@ -1,7 +1,7 @@
ZWiki for Zope 3
================
- This product is a port/rewrite of the famous Zope 2 product Zwiki. At the
+ This product is a port/rewrite of the famous Zope 2 product Zwiki. At the
current stage only the most basic Wiki functionalities are implemented and
much more work needs to be done.
@@ -20,4 +20,4 @@
- Assinging parents, allowing to create a "virtual" hierarchy.
- - Writing comments about the Wiki Page.
\ No newline at end of file
+ - Writing comments about the Wiki Page.
=== zopeproducts/zwiki/TODO.txt 1.1 => 1.2 ===
--- zopeproducts/zwiki/TODO.txt:1.1 Sun Apr 6 21:47:51 2003
+++ zopeproducts/zwiki/TODO.txt Mon Apr 7 03:15:31 2003
@@ -25,7 +25,7 @@
- Make sure FTP and WebDAV work.
- Have a "Jump to" form on the WikiPage view.
-
+
- Create a Management screen (advancedform) that is accessible for users
without management rights.
@@ -39,7 +39,7 @@
- When creating a Wiki, the FrontPage WikiPage should be created by
default.
- - Implement a custom traverser for WikiPages, so that URLs can represent
+ - Implement a custom traverser for WikiPages, so that URLs can represent
the page hierarchy.
- Implement search.
@@ -49,4 +49,4 @@
- Implement events, so that we can have E-mail subscriptions to Wiki
changes.
- - Implements E-mail subscriptions.
\ No newline at end of file
+ - Implements E-mail subscriptions.
=== zopeproducts/zwiki/VERSION.txt 1.1 => 1.2 ===
--- zopeproducts/zwiki/VERSION.txt:1.1 Sun Apr 6 21:47:51 2003
+++ zopeproducts/zwiki/VERSION.txt Mon Apr 7 03:15:31 2003
@@ -1 +1 @@
-zwiki for z3 0.0.1
\ No newline at end of file
+zwiki for z3 0.0.1
=== zopeproducts/zwiki/add.pt 1.1 => 1.2 ===
--- zopeproducts/zwiki/add.pt:1.1 Sat Apr 5 15:50:02 2003
+++ zopeproducts/zwiki/add.pt Mon Apr 7 03:15:31 2003
@@ -36,7 +36,7 @@
<td class="Selector">
<input type="radio" name="type_name" value="" />
-
+
</td>
<td class="TypeName">
=== zopeproducts/zwiki/browser.py 1.3 => 1.4 ===
--- zopeproducts/zwiki/browser.py:1.3 Sun Apr 6 21:47:51 2003
+++ zopeproducts/zwiki/browser.py Mon Apr 7 03:15:31 2003
@@ -81,13 +81,13 @@
def renderWikiLinks(self, source):
"""Add Wiki Links to the source"""
-
+
html = str(source)
html = re.sub(protectedLine, self._protectLine, html)
# html = re.sub(interwikilink, self._interwikilinkReplace, html)
html = re.sub(wikilink, self._wikilinkReplace, html)
return html
-
+
def render(self):
"""Render the wiki page source."""
html = self.renderWikiLinks(self.context.source)
@@ -140,7 +140,7 @@
return '<a href="%s%s">%s%s</a>' % (path, id, path, id)
# otherwise fall through to normal link processing
-
+
# if it's an ordinary url, link to it
if re.match(url,m):
# except, if preceded by " or = it should probably be left alone
@@ -161,11 +161,11 @@
else:
return '%s<a href="%s/+/AddWikiPage=%s">?</a>' %(
morig, getPath(wiki), quote(m))
-
-
+
+
def _interwikilinkReplace(self, match, allowed=0, state=None, text=''):
"""Replace an occurrence of interwikilink with a suitable hyperlink.
-
+
To be used as a re.sub repl function *and* get a proper value
for literal context, 'allowed', etc.
"""
@@ -175,16 +175,16 @@
# to find. Otherwise the localname will get wiki-linked.
if re.match('^!', match.group(0)):
return match.group(0)
-
+
localname = match.group('local')
remotename = match.group('remote') # named groups come in handy here!
-
+
# NB localname could be [bracketed]
if re.match(bracketedexpr,localname):
localname = re.sub(bracketedexpr, r'\1', localname)
-
+
# look for a RemoteWikiURL definition
- if hasattr(self.aq_parent, localname):
+ if hasattr(self.aq_parent, localname):
localpage = getattr(self.aq_parent,localname)
# local page found - search for "RemoteWikiUrl: url"
m = re.search(remotewikiurl, str(localpage))
@@ -193,13 +193,13 @@
# something's not right somewhere.. I have lost my grip on this
# whole quoting issue.
remoteurl = html_unquote(m.group(1))
-
+
# we have a valid inter-wiki link
link = '<a href="%s%s">%s:%s</a>' % \
(remoteurl, remotename, localname, remotename)
# protect it from any later wiki-izing passes
return re.sub(wikilink, r'!\1', link)
-
+
# otherwise, leave alone
return match.group(0)
@@ -213,7 +213,7 @@
def availableWikis(self):
wiki = getParent(self.context)
return wiki.keys()
-
+
def setParents(self, parents):
hier = getAdapter(self.context, IWikiPageHierarchy)
hier.reparent(parents)
@@ -228,12 +228,12 @@
html += self._branchHTML(subs)
html += '</ul>\n'
return html
-
+
def branch(self):
hier = getAdapter(self.context, IWikiPageHierarchy)
children = hier.findChildren()
return self._branchHTML(children)
-
+
class WikiPageComment:
@@ -241,4 +241,4 @@
self.context.comment(comment, self.request.user.getLogin())
return self.request.response.redirect('.')
-
+
=== zopeproducts/zwiki/comment_page.pt 1.1 => 1.2 ===
--- zopeproducts/zwiki/comment_page.pt:1.1 Sun Apr 6 21:47:51 2003
+++ zopeproducts/zwiki/comment_page.pt Mon Apr 7 03:15:31 2003
@@ -7,7 +7,7 @@
<div metal:fill-slot="body">
<form action="addComment.html" method="post">
-
+
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td>Comment</td>
@@ -19,7 +19,7 @@
<input type="submit" name="submit" value="Submit" />
</form>
-
+
</div>
</body>
</html>
=== zopeproducts/zwiki/configure.zcml 1.5 => 1.6 ===
--- zopeproducts/zwiki/configure.zcml:1.5 Sun Apr 6 21:47:51 2003
+++ zopeproducts/zwiki/configure.zcml Mon Apr 7 03:15:31 2003
@@ -43,7 +43,7 @@
title="Wiki Page"
description="A Wiki Page" />
- <!-- XXX: This security needs to be improved. -->
+ <!-- XXX: This security needs to be improved. -->
<require
permission="zope.View"
interface=".interfaces.IWikiPage"
@@ -66,11 +66,11 @@
<browser:menu
id="add_wiki"
title="Menu of objects to be added to wikis."/>
-
+
<!-- Custom adding view. -->
<browser:view
for=".interfaces.IWiki"
- name="+"
+ name="+"
class=".browser.WikiAdding"
permission="zope.ManageContent"
allowed_attributes="addingInfo"
@@ -80,11 +80,11 @@
<browser:page name="index.html" template="add.pt" />
<browser:page name="action.html" attribute="action" />
</browser:view>
-
-
+
+
<browser:menuItem menu="add_content"
for="zope.app.interfaces.container.IAdding"
- title="Wiki"
+ title="Wiki"
action="Wiki"
description="A simple Wiki."/>
@@ -128,7 +128,7 @@
for=".interfaces.IWikiPage"
class=".browser.EditWikiParents"
permission="zope.ManageContent">
- <browser:page name="parents.html" template="parents_page.pt"
+ <browser:page name="parents.html" template="parents_page.pt"
menu="zmi_views" title="Parents" />
<browser:page name="setParents.html" attribute="setParents" />
</browser:pages>
@@ -137,7 +137,7 @@
for=".interfaces.IWikiPage"
class=".browser.WikiPageComment"
permission="zope.ManageContent">
- <browser:page name="commentForm.html" template="comment_page.pt"
+ <browser:page name="commentForm.html" template="comment_page.pt"
menu="zmi_views" title="Add Comment" />
<browser:page name="addComment.html" attribute="comment" />
</browser:pages>
=== zopeproducts/zwiki/interfaces.py 1.1 => 1.2 ===
--- zopeproducts/zwiki/interfaces.py:1.1 Sat Apr 5 15:50:02 2003
+++ zopeproducts/zwiki/interfaces.py Mon Apr 7 03:15:31 2003
@@ -26,7 +26,7 @@
class IWiki(IContentContainer):
"""A simple Wiki Page container.
-
+
A simple marker interface, so that we can define special views on
Wikis."""
@@ -71,5 +71,5 @@
"""Reset the parents the Wiki page belongs to.
The parents attribute is a list of unicode strings that contain the
- names of the parent wiki pages.
+ names of the parent wiki pages.
"""
=== zopeproducts/zwiki/parents_page.pt 1.1 => 1.2 ===
--- zopeproducts/zwiki/parents_page.pt:1.1 Sun Apr 6 21:47:51 2003
+++ zopeproducts/zwiki/parents_page.pt Mon Apr 7 03:15:31 2003
@@ -7,7 +7,7 @@
<div metal:fill-slot="body">
<form action="setParents.html" method="post">
-
+
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td>Parents</td>
@@ -30,7 +30,7 @@
<input type="submit" name="submit" value="Reparent" />
</form>
-
+
<h3>Branch</h3>
<p tal:replace="structure view/branch" />
=== zopeproducts/zwiki/view_page.pt 1.2 => 1.3 ===
--- zopeproducts/zwiki/view_page.pt:1.2 Sun Apr 6 21:47:51 2003
+++ zopeproducts/zwiki/view_page.pt Mon Apr 7 03:15:31 2003
@@ -7,7 +7,7 @@
<div metal:fill-slot="body">
<h1 tal:content="structure view/breadcrumbs">Wikis/WikiPage</h1>
- <div>Last modified by <b tal:content="view/author">Stephan Richter</b> on
+ <div>Last modified by <b tal:content="view/author">Stephan Richter</b> on
<span tal:replace="view/modified">March 4, 2002.</span></div>
<br/>
=== zopeproducts/zwiki/zwiki.py 1.5 => 1.6 ===
--- zopeproducts/zwiki/zwiki.py:1.5 Sun Apr 6 21:47:51 2003
+++ zopeproducts/zwiki/zwiki.py Mon Apr 7 03:15:31 2003
@@ -78,7 +78,7 @@
def setParents(self, parents):
data = self._annotations.get(HierarchyKey)
self._annotations[HierarchyKey] = tuple(parents)
-
+
def getParents(self):
return self._annotations[HierarchyKey]
@@ -93,14 +93,14 @@
name = self.getParents()[0]
wrapped = ContextWrapper(wiki[name], wiki, name=name)
hier = getAdapter(wrapped, IWikiPageHierarchy)
- return hier.path() + [self.context]
-
-
+ return hier.path() + [self.context]
+
+
def findChildren(self, recursive=True):
"See zopeproducts.zwiki.interfaces.IWikiPageHierarchy"
wiki = getParent(self.context)
children = []
- for pageName in wiki:
+ for pageName in wiki:
wrapped = ContextWrapper(wiki[pageName], wiki,
name=pageName)
hier = getAdapter(wrapped, IWikiPageHierarchy)
@@ -111,7 +111,7 @@
subs = ()
children.append((wrapped, subs))
return children
-
+
comment_template = '''