[Checkins] SVN: zope3org/trunk/src/zorg/wikification/browser/ Fixed
a problem with relative URLs
Uwe Oestermeier
uwe_oestermeier at iwm-kmrc.de
Wed May 17 09:32:44 EDT 2006
Log message for revision 68168:
Fixed a problem with relative URLs
Changed:
U zope3org/trunk/src/zorg/wikification/browser/README.txt
A zope3org/trunk/src/zorg/wikification/browser/images/image.gif
U zope3org/trunk/src/zorg/wikification/browser/templates/wiki_folder.pt
U zope3org/trunk/src/zorg/wikification/browser/templates/wiki_image.pt
U zope3org/trunk/src/zorg/wikification/browser/templates/wiki_newpage.pt
U zope3org/trunk/src/zorg/wikification/browser/templates/wiki_rename.pt
U zope3org/trunk/src/zorg/wikification/browser/templates/wiki_upload.pt
U zope3org/trunk/src/zorg/wikification/browser/wikilink.py
-=-
Modified: zope3org/trunk/src/zorg/wikification/browser/README.txt
===================================================================
--- zope3org/trunk/src/zorg/wikification/browser/README.txt 2006-05-17 11:38:43 UTC (rev 68167)
+++ zope3org/trunk/src/zorg/wikification/browser/README.txt 2006-05-17 13:32:44 UTC (rev 68168)
@@ -220,7 +220,7 @@
>>> print edit_page.renderBody()
<BLANKLINE>
...
- <p>A <a href="http://127.0.0.1/site/New%20Label">New Label</a></p>
+ <p>A <a href="http://127.0.0.1/site/New%20Label001">New Label</a></p>
...
The more typical usecase is that we want a global substitution. All wikilinks
Added: zope3org/trunk/src/zorg/wikification/browser/images/image.gif
===================================================================
(Binary files differ)
Property changes on: zope3org/trunk/src/zorg/wikification/browser/images/image.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: zope3org/trunk/src/zorg/wikification/browser/templates/wiki_folder.pt
===================================================================
--- zope3org/trunk/src/zorg/wikification/browser/templates/wiki_folder.pt 2006-05-17 11:38:43 UTC (rev 68167)
+++ zope3org/trunk/src/zorg/wikification/browser/templates/wiki_folder.pt 2006-05-17 13:32:44 UTC (rev 68168)
@@ -54,7 +54,9 @@
</td>
</tr>
<tr>
- <td>
+ <td>
+ <input tal:condition="view/isUnique" type="hidden"
+ name="scope" id="scope" value="on">
</td>
<td>
<input name="entry_submit" type="submit" value="Submit">
Modified: zope3org/trunk/src/zorg/wikification/browser/templates/wiki_image.pt
===================================================================
--- zope3org/trunk/src/zorg/wikification/browser/templates/wiki_image.pt 2006-05-17 11:38:43 UTC (rev 68167)
+++ zope3org/trunk/src/zorg/wikification/browser/templates/wiki_image.pt 2006-05-17 13:32:44 UTC (rev 68168)
@@ -59,13 +59,23 @@
</td>
</tr>
<tr>
- <td>
+ <td>
+ <input tal:condition="view/isUnique" type="hidden"
+ name="scope" id="scope" value="on">
</td>
<td>
<input name="entry_submit" type="submit" value="Submit">
<input name="cancel_submit" type="reset" value="Cancel"/>
</td>
</tr>
+ <tr>
+ <td colspan="2">
+ You can change the position and the size of the image after the upload.
+ Select the image in the WYSIWYG edit mode and click
+ the image icon:<img src="/@@/images/image.gif" alt="Image"
+ title="" height="20" width="20" />
+ </td>
+ </tr>
</table>
</form>
</div>
\ No newline at end of file
Modified: zope3org/trunk/src/zorg/wikification/browser/templates/wiki_newpage.pt
===================================================================
--- zope3org/trunk/src/zorg/wikification/browser/templates/wiki_newpage.pt 2006-05-17 11:38:43 UTC (rev 68167)
+++ zope3org/trunk/src/zorg/wikification/browser/templates/wiki_newpage.pt 2006-05-17 13:32:44 UTC (rev 68168)
@@ -54,7 +54,9 @@
</tr>
<tr>
- <td>
+ <td>
+ <input tal:condition="view/isUnique" type="hidden"
+ name="scope" id="scope" value="on">
</td>
<td>
<input name="entry_submit" type="submit" value="Submit">
Modified: zope3org/trunk/src/zorg/wikification/browser/templates/wiki_rename.pt
===================================================================
--- zope3org/trunk/src/zorg/wikification/browser/templates/wiki_rename.pt 2006-05-17 11:38:43 UTC (rev 68167)
+++ zope3org/trunk/src/zorg/wikification/browser/templates/wiki_rename.pt 2006-05-17 13:32:44 UTC (rev 68168)
@@ -28,7 +28,10 @@
</td>
</tr>
<tr>
- <td>
+ <td>
+ <input tal:condition="view/isUnique" type="hidden"
+ name="scope" id="scope" value="on">
+
</td>
<td>
<input name="entry_submit" type="submit" value="Submit">
Modified: zope3org/trunk/src/zorg/wikification/browser/templates/wiki_upload.pt
===================================================================
--- zope3org/trunk/src/zorg/wikification/browser/templates/wiki_upload.pt 2006-05-17 11:38:43 UTC (rev 68167)
+++ zope3org/trunk/src/zorg/wikification/browser/templates/wiki_upload.pt 2006-05-17 13:32:44 UTC (rev 68168)
@@ -60,7 +60,9 @@
</td>
</tr>
<tr>
- <td>
+ <td>
+ <input tal:condition="view/isUnique" type="hidden"
+ name="scope" id="scope" value="on">
</td>
<td>
<input name="entry_submit" type="submit" value="Submit">
Modified: zope3org/trunk/src/zorg/wikification/browser/wikilink.py
===================================================================
--- zope3org/trunk/src/zorg/wikification/browser/wikilink.py 2006-05-17 11:38:43 UTC (rev 68167)
+++ zope3org/trunk/src/zorg/wikification/browser/wikilink.py 2006-05-17 13:32:44 UTC (rev 68168)
@@ -269,7 +269,7 @@
... <img src="http://www.iwm-kmrc.de/image.gif"/>
... <img src="images/image.gif"/>'''
- >>> processor = RelativeLinkProcessor("http://www.iwm-kmrc.de")
+ >>> processor = RelativeLinkProcessor("http://www.iwm-kmrc.de/")
>>> processor.feed(html)
>>> print processor.output()
<p><a href="http://www.iwm-kmrc.de">Absolute</a></p>
@@ -286,6 +286,8 @@
def onRelativeLink(self, link) :
""" Event handler that can be specialized. """
+ if self.base_url.endswith('/') :
+ return self.base_url + link
return "%s/%s" % (self.base_url, link)
@@ -382,6 +384,7 @@
(True, 'http://127.0.0.1/site/folder/emptysubfolder/@@wikiedit.html?add=b')
+
"""
page = self.page
site_url = zapi.absoluteURL(page.site, page.request)
@@ -402,7 +405,10 @@
if IFile.providedBy(node) :
if node.contentType not in page.supported :
return False, self.absoluteLink(node)
-
+
+ if node is None :
+ return False, link
+
return False, self.absoluteWikiLink(node)
More information about the Checkins
mailing list