Changeset 512

Show
Ignore:
Timestamp:
05/30/06 13:47:00
Author:
johnsa
Message:

added calendar sharing to admin client UI

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/deployment/webadmin/webapp/resources/default/default/default.css

    r231 r512  
    329329  margin-top: 1em; 
    330330} 
     331#sharingBox { 
     332  margin: 2em 0; 
     333  border-top: 1px solid #333; 
     334} 
     335#sharingBox h3 { 
     336  padding: 1em 0 0.5em 0.5em; 
     337} 
     338#sharingBox h5 { 
     339  padding: 1em 0 0.5em 0; 
     340} 
     341#sharingBox ul { 
     342  font-size: 0.8em; 
     343  margin: 0 1em; 
     344} 
     345#shareForm { 
     346  margin: 1em 0; 
     347  padding: 0.5em; 
     348  border-top: 1px dotted #666; 
     349} 
     350table.common { 
     351  width: 100%; 
     352  font-size: 0.9em; 
     353  margin: 0px; 
     354  padding: 0px; 
     355} 
     356table.common th { 
     357  text-align: left; 
     358  vertical-align: top; 
     359  padding: 0.5em; 
     360  background-color: #ddd; 
     361  color: black; 
     362  white-space: nowrap; 
     363} 
     364table.common th.commonHeader { 
     365  vertical-align: middle; 
     366  background-color: #666; 
     367  color: #eee; 
     368  padding: 0.2em 0.5em; 
     369  text-align: left; 
     370  font-weight: normal; 
     371} 
    331372#deleteListTable { 
    332373  margin: 1em 0em 2em 1em; 
  • trunk/calendar3/deployment/webadmin/webapp/resources/default/default/default.xsl

    r495 r512  
    7979  <xsl:variable name="calendar-fetchForUpdate" select="/bedeworkadmin/urlPrefixes/calendar/fetchForUpdate/a/@href"/><!-- used --> 
    8080  <xsl:variable name="calendar-update" select="/bedeworkadmin/urlPrefixes/calendar/update/a/@href"/><!-- used --> 
     81  <xsl:variable name="calendar-setAccess" select="/bedework/urlPrefixes/calendar/setAccess/a/@href"/> 
    8182  <!-- all good - no need to clean any of these out  --> 
    8283  <xsl:variable name="subscriptions-fetch" select="/bedeworkadmin/urlPrefixes/subscriptions/fetch/a/@href"/> 
     
    16371638      </table> 
    16381639    </form> 
     1640    <div id="sharingBox"> 
     1641      <h3>Sharing</h3> 
     1642      Sharing may be added to a calendar once created. 
     1643    </div> 
    16391644  </xsl:template> 
    16401645 
     
    17271732      </table> 
    17281733    </form> 
     1734    <div id="sharingBox"> 
     1735      <xsl:variable name="calPath" select="path"/> 
     1736      <h3>Sharing</h3> 
     1737      <table class="common"> 
     1738        <tr> 
     1739          <th class="commonHeader" colspan="2">Current access:</th> 
     1740        </tr> 
     1741        <tr> 
     1742          <th>Owner:</th> 
     1743          <td> 
     1744            <xsl:value-of select="name(acl/ace[principal/property/owner]/grant/*)"/> 
     1745          </td> 
     1746        </tr> 
     1747        <xsl:if test="acl/ace/principal/href"> 
     1748          <tr> 
     1749            <th>Users:</th> 
     1750            <td> 
     1751              <xsl:for-each select="acl/ace[principal/href]"> 
     1752                <xsl:value-of select="principal/href"/> (<xsl:value-of select="name(grant/*)"/>)<br/> 
     1753              </xsl:for-each> 
     1754            </td> 
     1755          </tr> 
     1756        </xsl:if> 
     1757      </table> 
     1758      <form name="calendarShareForm" action="{$calendar-setAccess}" id="shareForm"> 
     1759        <input type="hidden" name="calPath" value="{$calPath}"/> 
     1760        <p> 
     1761          Share with group:<br/> 
     1762          <input type="text" name="who" size="20"/> 
     1763          <input type="hidden" value="group" name="whoType"/> 
     1764          <!--<input type="radio" value="user" name="whoType" checked="checked"/> user 
     1765          <input type="radio" value="group" name="whoType"/> group--> 
     1766        </p> 
     1767        <p> 
     1768          Access rights:<br/> 
     1769          <input type="radio" value="R" name="how" checked="checked"/> read<br/> 
     1770          <input type="radio" value="Rc" name="how"/> read/write content<br/> 
     1771          <input type="radio" value="f" name="how"/> read free/busy only<br/> 
     1772          <input type="radio" value="d" name="how"/> default (reset access) 
     1773        </p> 
     1774        <input type="submit" name="submit" value="Submit"/> 
     1775      </form> 
     1776    </div> 
    17291777  </xsl:template> 
    17301778 
  • trunk/calendar3/webadmin/war/WEB-INF/struts-config.xml

    r502 r512  
    315315    </action> 
    316316 
     317    <action    path="/calendar/setAccess" 
     318               type="org.bedework.webcommon.access.AccessAction" 
     319               name="peForm" 
     320               scope="session" 
     321               validate="false"> 
     322      <forward name="success" path="/calendar/showModForm.rdo" redirect="true" /> 
     323      <forward name="error" path="/calendar/showModForm.rdo" redirect="true" /> 
     324      <forward name="notFound" path="/calendar/showModForm.rdo" redirect="true" /> 
     325      <forward name="doNothing" path="/calendar/showModForm.rdo" redirect="true" /> 
     326    </action> 
     327 
    317328    <!-- =============================================================== 
    318329                         Subscription Actions 
  • trunk/calendar3/webadmin/war/docs/calendar/displayCalendarCommon.jsp

    r4 r512  
    11<%@ taglib uri='struts-bean' prefix='bean' %> 
    22<%@ taglib uri='struts-logic' prefix='logic' %> 
    3 <%@ taglib uri='struts-html' prefix='html' %> 
     3<%@ taglib uri='bedework' prefix='bw' %> 
    44 
    55<bean:define id="curcal" name="peForm" property="calendar"/> 
    66<currentCalendar> 
    77  <id><bean:write name="curcal" property="id" /></id> 
    8   <name><bean:write name="curcal" property="name" /></name
    9   <summary><bean:write name="curcal" property="summary" /></summary
    10   <desc><bean:write name="curcal" property="description" /></desc
    11   <path><bean:write name="curcal" property="path" /></path
     8  <bw:emitText name="curcal" property="name" /
     9  <bw:emitText name="curcal" property="path" /
     10  <bw:emitText name="curcal" property="encodedPath" /
     11  <bw:emitText name="curcal" property="description" tagName="desc" /
    1212  <calendarCollection><bean:write name="curcal" property="calendarCollection" /></calendarCollection> 
    13   <mailListId><bean:write name="calendar" property="mailListId" /></mailListId> 
     13  <bw:emitText name="curcal" property="mailListId" /> 
     14  <bw:emitCurrentPrivs name="curcal" property="currentAccess" /> 
     15  <bw:emitAcl name="curcal" property="currentAccess" /> 
    1416</currentCalendar> 
  • trunk/calendar3/webadmin/war/docs/header.jsp

    r339 r512  
    106106      <fetchForUpdate><genurl:link page="/calendar/fetchForUpdate.do?b=de"/></fetchForUpdate><!-- keep --> 
    107107      <update><genurl:link page="/calendar/update.do?b=de"/></update><!-- keep --> 
     108      <setAccess><genurl:link page="/calendar/setAccess.do?b=de"/></setAccess> 
    108109    </calendar> 
    109110    <subscriptions> <!-- only those listed are used here (no need to clean up) -->