[CalendarServer-changes] [7965] 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:20 PDT 2011
Revision: 7965
http://trac.macosforge.org/projects/calendarserver/changeset/7965
Author: glyph at apple.com
Date: 2011-08-11 21:52:20 -0700 (Thu, 11 Aug 2011)
Log Message:
-----------
logic to elide the autoSchedule menu
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
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:09 UTC (rev 7964)
+++ CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/resource.py 2011-08-12 04:52:20 UTC (rev 7965)
@@ -244,6 +244,17 @@
@renderer
+ def autoSchedule(self, request, tag):
+ """
+ Renderer which elides its tag for non-resource-type principals.
+ """
+ if (self.principalResource.record.recordType != "users" and
+ self.principalResource.record.recordType != "groups"):
+ return tag
+ return ""
+
+
+ @renderer
def isAutoSchedule(self, request, tag):
"""
Renderer which sets the 'selected' attribute on its tag if the resource
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:09 UTC (rev 7964)
+++ CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/template.html 2011-08-12 04:52:20 UTC (rev 7965)
@@ -108,14 +108,15 @@
Unable to parse property to read: <b><t:slot name="davPropertyName" /></b>
</div>
- <t:invisible t:render="davProperty">
+ <t:transparent t:render="davProperty">
<div style="margin-top: 7px">Value of property
<b><t:slot name="davPropertyName" /></b>:</div>
<pre style="margin-top:5px; padding-top:0"><t:slot name="value" /></pre>
- </t:invisible>
+ </t:transparent>
<!-- autoScheduleHtml -->
+ <t:transparent t:render="autoSchedule">
<div style="margin-top:15px; border-bottom:1px #444444 dotted"></div>
<form id="frm_autoSchedule" name="autoScheduleForm" action="/admin/"
style="margin-top:15px">
@@ -130,6 +131,7 @@
<input type="submit" value="Change" />
</div>
</form>
+ </t:transparent>
<!-- currentProxiesHtml -->
<div style="margin-top:15px; border-bottom:1px #444444 dotted"></div>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110811/f0a85c47/attachment-0001.html>
More information about the calendarserver-changes
mailing list