[CalendarServer-changes] [7966] CalendarServer/branches/users/glyph/imip-and-admin-html/ calendarserver/webadmin
source_changes at macosforge.org
source_changes at macosforge.org
Thu Aug 11 21:52:33 PDT 2011
Revision: 7966
http://trac.macosforge.org/projects/calendarserver/changeset/7966
Author: glyph at apple.com
Date: 2011-08-11 21:52:33 -0700 (Thu, 11 Aug 2011)
Log Message:
-----------
make no-proxies test pass, but add a failing assertion that the no-proxies message isn't displayed when there are proxies
Modified Paths:
--------------
CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/resource.py
CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/template.html
CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/test/test_resource.py
Modified: CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/resource.py
===================================================================
--- CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/resource.py 2011-08-12 04:52:20 UTC (rev 7965)
+++ CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/resource.py 2011-08-12 04:52:33 UTC (rev 7966)
@@ -277,6 +277,14 @@
@renderer
+ def noProxies(self, request, tag):
+ """
+ Renderer which shows its tag if there are no proxies for this resource.
+ """
+ return tag
+
+
+ @renderer
@inlineCallbacks
def proxyRows(self, request, tag):
"""
Modified: CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/template.html
===================================================================
--- CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/template.html 2011-08-12 04:52:20 UTC (rev 7965)
+++ CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/template.html 2011-08-12 04:52:33 UTC (rev 7966)
@@ -139,7 +139,8 @@
style="margin-top:15px">
<input type="hidden" id="hdn_resourceId" name="resourceId"
><t:attr name="value"><t:slot name="resourceId" /></t:attr></input>
-
+ <div t:render="noProxies" style="margin-top:15px"
+ >This resource has no proxies.</div>
<table cellspacing="0" cellpadding="3" border="1">
<tr class="odd">
<th colspan="2">Read-Only Proxies</th>
Modified: CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/test/test_resource.py
===================================================================
--- CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/test/test_resource.py 2011-08-12 04:52:20 UTC (rev 7965)
+++ CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/test/test_resource.py 2011-08-12 04:52:33 UTC (rev 7966)
@@ -313,7 +313,10 @@
self.assertEquals(len(lastRowCells), 3)
self.assertEquals(lastRowCells[-1].getAttribute("colspan"), "2")
+ self.assertNotIn("This resource has no proxies.",
+ ''.join(gatherTextNodes(document)))
+
@inlineCallbacks
def test_noProxiesListing(self):
"""
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110811/c45efdfc/attachment.html>
More information about the calendarserver-changes
mailing list