[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container/Views/Browser - Adding.py:1.14 Contents.py:1.16 add.pt:1.7 configure.zcml:1.6
runyaga
runyaga@thisbox.com
Wed, 4 Dec 2002 08:56:12 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container/Views/Browser
In directory cvs.zope.org:/tmp/cvs-serv2875
Modified Files:
Adding.py Contents.py add.pt configure.zcml
Log Message:
=== Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/Adding.py 1.13 => 1.14 ===
--- Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/Adding.py:1.13 Sun Dec 1 05:32:28 2002
+++ Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/Adding.py Wed Dec 4 08:56:12 2002
@@ -23,7 +23,6 @@
from Zope.ComponentArchitecture \
import getView, getService, createObject, \
queryFactory, queryView, getAdapter
-from Zope.App.PageTemplate import ViewPageTemplateFile
from Zope.ContextWrapper import ContextMethod, getbaseobject
from Zope.Proxy.ContextWrapper import ContextWrapper
from Zope.Event import publish
@@ -93,8 +92,6 @@
#
############################################################
-
- index = ViewPageTemplateFile("add.pt")
def addingInfo(self):
"""Return menu data"""
=== Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/Contents.py 1.15 => 1.16 ===
--- Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/Contents.py:1.15 Tue Dec 3 12:43:48 2002
+++ Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/Contents.py Wed Dec 4 08:56:12 2002
@@ -95,11 +95,16 @@
return in_date.strftime(format)
return undefined
+#SteveA recommneded that getSize return
+#a tuple (magnitude, (size, text_label))
+#this way we can sort things intelligibly
+#that dont have sizes.
+
def getSize(obj):
try:
size=int(obj.getSize())
except (AttributeError, ValueError):
- return u'N/A'
+ return (0, u'N/A')
result = u''
if size < 1024:
@@ -108,5 +113,5 @@
result = "%0.02f MB" % (size / 1048576.0)
else:
result = "%d KB" % (size / 1024.0)
- return result
+ return (size, result)
=== Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/add.pt 1.6 => 1.7 ===
--- Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/add.pt:1.6 Sat Nov 30 13:34:34 2002
+++ Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/add.pt Wed Dec 4 08:56:12 2002
@@ -23,7 +23,6 @@
<body>
<div metal:fill-slot="body">
-
<form action="action.html" method="POST">
<table class="TypeListing" cellpadding="3">
=== Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/configure.zcml 1.5 => 1.6 ===
--- Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/configure.zcml:1.5 Sun Jun 23 13:32:44 2002
+++ Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/configure.zcml Wed Dec 4 08:56:12 2002
@@ -13,7 +13,7 @@
factory=".Adding."
permission="Zope.ManageContent"
>
- <browser:page name="index.html" attribute="index" />
+ <browser:page name="index.html" template="add.pt" />
<browser:page name="action.html" attribute="action" />
</browser:view>