[Bedework-commit] r512 - in trunk/calendar3:
deployment/webadmin/webapp/resources/default/default
webadmin/war/WEB-INF webadmin/war/docs webadmin/war/docs/calendar
svnadmin at bedework.org
svnadmin at bedework.org
Tue May 30 13:47:01 EDT 2006
Author: johnsa
Date: 2006-05-30 13:47:00 -0400 (Tue, 30 May 2006)
New Revision: 512
Modified:
trunk/calendar3/deployment/webadmin/webapp/resources/default/default/default.css
trunk/calendar3/deployment/webadmin/webapp/resources/default/default/default.xsl
trunk/calendar3/webadmin/war/WEB-INF/struts-config.xml
trunk/calendar3/webadmin/war/docs/calendar/displayCalendarCommon.jsp
trunk/calendar3/webadmin/war/docs/header.jsp
Log:
added calendar sharing to admin client UI
Modified: trunk/calendar3/deployment/webadmin/webapp/resources/default/default/default.css
===================================================================
--- trunk/calendar3/deployment/webadmin/webapp/resources/default/default/default.css 2006-05-30 05:17:28 UTC (rev 511)
+++ trunk/calendar3/deployment/webadmin/webapp/resources/default/default/default.css 2006-05-30 17:47:00 UTC (rev 512)
@@ -328,6 +328,47 @@
width: 98%; /* less than 100% helps avoid IE weirdness */
margin-top: 1em;
}
+#sharingBox {
+ margin: 2em 0;
+ border-top: 1px solid #333;
+}
+#sharingBox h3 {
+ padding: 1em 0 0.5em 0.5em;
+}
+#sharingBox h5 {
+ padding: 1em 0 0.5em 0;
+}
+#sharingBox ul {
+ font-size: 0.8em;
+ margin: 0 1em;
+}
+#shareForm {
+ margin: 1em 0;
+ padding: 0.5em;
+ border-top: 1px dotted #666;
+}
+table.common {
+ width: 100%;
+ font-size: 0.9em;
+ margin: 0px;
+ padding: 0px;
+}
+table.common th {
+ text-align: left;
+ vertical-align: top;
+ padding: 0.5em;
+ background-color: #ddd;
+ color: black;
+ white-space: nowrap;
+}
+table.common th.commonHeader {
+ vertical-align: middle;
+ background-color: #666;
+ color: #eee;
+ padding: 0.2em 0.5em;
+ text-align: left;
+ font-weight: normal;
+}
#deleteListTable {
margin: 1em 0em 2em 1em;
}
Modified: trunk/calendar3/deployment/webadmin/webapp/resources/default/default/default.xsl
===================================================================
--- trunk/calendar3/deployment/webadmin/webapp/resources/default/default/default.xsl 2006-05-30 05:17:28 UTC (rev 511)
+++ trunk/calendar3/deployment/webadmin/webapp/resources/default/default/default.xsl 2006-05-30 17:47:00 UTC (rev 512)
@@ -78,6 +78,7 @@
<xsl:variable name="calendar-fetchForDisplay" select="/bedeworkadmin/urlPrefixes/calendar/fetchForDisplay/a/@href"/>
<xsl:variable name="calendar-fetchForUpdate" select="/bedeworkadmin/urlPrefixes/calendar/fetchForUpdate/a/@href"/><!-- used -->
<xsl:variable name="calendar-update" select="/bedeworkadmin/urlPrefixes/calendar/update/a/@href"/><!-- used -->
+ <xsl:variable name="calendar-setAccess" select="/bedework/urlPrefixes/calendar/setAccess/a/@href"/>
<!-- all good - no need to clean any of these out -->
<xsl:variable name="subscriptions-fetch" select="/bedeworkadmin/urlPrefixes/subscriptions/fetch/a/@href"/>
<xsl:variable name="subscriptions-fetchForUpdate" select="/bedeworkadmin/urlPrefixes/subscriptions/fetchForUpdate/a/@href"/>
@@ -1636,6 +1637,10 @@
</tr>
</table>
</form>
+ <div id="sharingBox">
+ <h3>Sharing</h3>
+ Sharing may be added to a calendar once created.
+ </div>
</xsl:template>
<xsl:template match="currentCalendar" mode="modCalendar">
@@ -1726,6 +1731,49 @@
</tr>
</table>
</form>
+ <div id="sharingBox">
+ <xsl:variable name="calPath" select="path"/>
+ <h3>Sharing</h3>
+ <table class="common">
+ <tr>
+ <th class="commonHeader" colspan="2">Current access:</th>
+ </tr>
+ <tr>
+ <th>Owner:</th>
+ <td>
+ <xsl:value-of select="name(acl/ace[principal/property/owner]/grant/*)"/>
+ </td>
+ </tr>
+ <xsl:if test="acl/ace/principal/href">
+ <tr>
+ <th>Users:</th>
+ <td>
+ <xsl:for-each select="acl/ace[principal/href]">
+ <xsl:value-of select="principal/href"/> (<xsl:value-of select="name(grant/*)"/>)<br/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:if>
+ </table>
+ <form name="calendarShareForm" action="{$calendar-setAccess}" id="shareForm">
+ <input type="hidden" name="calPath" value="{$calPath}"/>
+ <p>
+ Share with group:<br/>
+ <input type="text" name="who" size="20"/>
+ <input type="hidden" value="group" name="whoType"/>
+ <!--<input type="radio" value="user" name="whoType" checked="checked"/> user
+ <input type="radio" value="group" name="whoType"/> group-->
+ </p>
+ <p>
+ Access rights:<br/>
+ <input type="radio" value="R" name="how" checked="checked"/> read<br/>
+ <input type="radio" value="Rc" name="how"/> read/write content<br/>
+ <input type="radio" value="f" name="how"/> read free/busy only<br/>
+ <input type="radio" value="d" name="how"/> default (reset access)
+ </p>
+ <input type="submit" name="submit" value="Submit"/>
+ </form>
+ </div>
</xsl:template>
<xsl:template name="calendarList">
Modified: trunk/calendar3/webadmin/war/WEB-INF/struts-config.xml
===================================================================
--- trunk/calendar3/webadmin/war/WEB-INF/struts-config.xml 2006-05-30 05:17:28 UTC (rev 511)
+++ trunk/calendar3/webadmin/war/WEB-INF/struts-config.xml 2006-05-30 17:47:00 UTC (rev 512)
@@ -314,6 +314,17 @@
<forward name="delete" path="/calendar/showDeleteConfirm.rdo" redirect="true" />
</action>
+ <action path="/calendar/setAccess"
+ type="org.bedework.webcommon.access.AccessAction"
+ name="peForm"
+ scope="session"
+ validate="false">
+ <forward name="success" path="/calendar/showModForm.rdo" redirect="true" />
+ <forward name="error" path="/calendar/showModForm.rdo" redirect="true" />
+ <forward name="notFound" path="/calendar/showModForm.rdo" redirect="true" />
+ <forward name="doNothing" path="/calendar/showModForm.rdo" redirect="true" />
+ </action>
+
<!-- ===============================================================
Subscription Actions
=============================================================== -->
Modified: trunk/calendar3/webadmin/war/docs/calendar/displayCalendarCommon.jsp
===================================================================
--- trunk/calendar3/webadmin/war/docs/calendar/displayCalendarCommon.jsp 2006-05-30 05:17:28 UTC (rev 511)
+++ trunk/calendar3/webadmin/war/docs/calendar/displayCalendarCommon.jsp 2006-05-30 17:47:00 UTC (rev 512)
@@ -1,14 +1,16 @@
<%@ taglib uri='struts-bean' prefix='bean' %>
<%@ taglib uri='struts-logic' prefix='logic' %>
-<%@ taglib uri='struts-html' prefix='html' %>
+<%@ taglib uri='bedework' prefix='bw' %>
<bean:define id="curcal" name="peForm" property="calendar"/>
<currentCalendar>
<id><bean:write name="curcal" property="id" /></id>
- <name><bean:write name="curcal" property="name" /></name>
- <summary><bean:write name="curcal" property="summary" /></summary>
- <desc><bean:write name="curcal" property="description" /></desc>
- <path><bean:write name="curcal" property="path" /></path>
+ <bw:emitText name="curcal" property="name" />
+ <bw:emitText name="curcal" property="path" />
+ <bw:emitText name="curcal" property="encodedPath" />
+ <bw:emitText name="curcal" property="description" tagName="desc" />
<calendarCollection><bean:write name="curcal" property="calendarCollection" /></calendarCollection>
- <mailListId><bean:write name="calendar" property="mailListId" /></mailListId>
+ <bw:emitText name="curcal" property="mailListId" />
+ <bw:emitCurrentPrivs name="curcal" property="currentAccess" />
+ <bw:emitAcl name="curcal" property="currentAccess" />
</currentCalendar>
Modified: trunk/calendar3/webadmin/war/docs/header.jsp
===================================================================
--- trunk/calendar3/webadmin/war/docs/header.jsp 2006-05-30 05:17:28 UTC (rev 511)
+++ trunk/calendar3/webadmin/war/docs/header.jsp 2006-05-30 17:47:00 UTC (rev 512)
@@ -105,6 +105,7 @@
<fetchForDisplay><genurl:link page="/calendar/fetchForDisplay.do?b=de"/></fetchForDisplay>
<fetchForUpdate><genurl:link page="/calendar/fetchForUpdate.do?b=de"/></fetchForUpdate><!-- keep -->
<update><genurl:link page="/calendar/update.do?b=de"/></update><!-- keep -->
+ <setAccess><genurl:link page="/calendar/setAccess.do?b=de"/></setAccess>
</calendar>
<subscriptions> <!-- only those listed are used here (no need to clean up) -->
<fetch><genurl:link page="/subs/fetch.do?b=de"/></fetch>
More information about the Bedework-commit
mailing list