Changeset 523

Show
Ignore:
Timestamp:
06/01/06 17:33:50
Author:
johnsa
Message:

more calendar suite pages for super-user to add and modify calendar suites.

Files:

Legend:

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

    r520 r523  
    9393  <xsl:variable name="system-update" select="/bedeworkadmin/urlPrefixes/system/update/a/@href"/> 
    9494  <xsl:variable name="calsuite-fetch" select="/bedeworkadmin/urlPrefixes/calsuite/fetch/a/@href"/> 
     95  <xsl:variable name="calsuite-fetchForUpdate" select="/bedeworkadmin/urlPrefixes/calsuite/fetchForUpdate/a/@href"/> 
    9596  <xsl:variable name="calsuite-add" select="/bedeworkadmin/urlPrefixes/calsuite/add/a/@href"/> 
    96   <xsl:variable name="calsuite-showForm" select="/bedeworkadmin/urlPrefixes/calsuite/showForm/a/@href"/> 
     97  <xsl:variable name="calsuite-update" select="/bedeworkadmin/urlPrefixes/calsuite/update/a/@href"/> 
     98  <xsl:variable name="calsuite-showAddForm" select="/bedeworkadmin/urlPrefixes/calsuite/showAddForm/a/@href"/> 
     99  <xsl:variable name="calsuite-setAccess" select="/bedeworkadmin/urlPrefixes/calsuite/setAccess/a/@href"/> 
    97100  <xsl:variable name="timezones-initUpload" select="/bedeworkadmin/urlPrefixes/timezones/initUpload/a/@href"/> 
    98101  <xsl:variable name="timezones-upload" select="/bedeworkadmin/urlPrefixes/timezones/upload/a/@href"/> 
     
    216219            </xsl:when> 
    217220            <xsl:when test="/bedeworkadmin/page='calSuiteList'"> 
    218               <xsl:call-template name="calSuiteList"/> 
     221              <xsl:apply-templates select="/bedeworkadmin/calSuites" mode="calSuiteList"/> 
     222            </xsl:when> 
     223            <xsl:when test="/bedeworkadmin/page='addCalSuite'"> 
     224              <xsl:call-template name="addCalSuite"/> 
    219225            </xsl:when> 
    220226            <xsl:when test="/bedeworkadmin/page='modCalSuite'"> 
    221               <xsl:call-template name="modCalSuite"/> 
     227              <xsl:apply-templates select="/bedeworkadmin/calSuite"/> 
    222228            </xsl:when> 
    223229            <xsl:when test="/bedeworkadmin/page='authUserList'"> 
     
    346352    <xsl:if test="/bedeworkadmin/userInfo/contentAdminUser='true'"> 
    347353      <h2 class="menuTitle">Administrator's Menu</h2> 
    348       <xsl:if test="/bedeworkadmin/userInfo/superUser='true'"> 
     354      <xsl:if test="/bedeworkadmin/currentCalSuite/currentAccess/current-user-privilege-set/privilege/write or /bedeworkadmin/userInfo/superUser='true'"> 
    349355        <ul class="adminMenu"> 
    350356          <li> 
     
    364370          </li> 
    365371        </ul> 
     372      </xsl:if> 
     373      <xsl:if test="/bedeworkadmin/userInfo/superUser='true'"> 
    366374        <h4 class="menuTitle">Super user features</h4> 
    367375        <ul class="adminMenu"> 
     
    23902398 
    23912399  <!--+++++++++++++++ Calendar Suites (calsuite) ++++++++++++++++++++--> 
    2392   <xsl:template name="calSuiteList"> 
     2400  <xsl:template match="calSuites" mode="calSuiteList"> 
    23932401    <h2>Manage Calendar Suites</h2> 
    2394     <p>List will go here</p> 
    2395     <p>For now: <a href="{$calsuite-showForm}">Add Calendar Suite</a></p> 
    2396   </xsl:template> 
    2397  
    2398   <xsl:template name="modCalSuite"> 
     2402 
     2403    <h4>Calendar suites:</h4> 
     2404    <p><input type="button" name="return" value="Add calendar suite" onclick="javascript:location.replace('{$calsuite-showAddForm}')"/></p> 
     2405 
     2406    <ul> 
     2407      <xsl:for-each select="calSuite"> 
     2408       <li> 
     2409         <xsl:variable name="name" select="name"/> 
     2410         <a href="{$calsuite-fetchForUpdate}&amp;name={$name}"> 
     2411           <xsl:value-of select="name"/> 
     2412         </a> 
     2413       </li> 
     2414      </xsl:for-each> 
     2415    </ul> 
     2416 
     2417  </xsl:template> 
     2418 
     2419  <xsl:template name="addCalSuite"> 
    23992420    <h2>Add Calendar Suite</h2> 
    24002421    <form name="calSuiteForm" action="{$calsuite-add}" method="post"> 
     
    24382459      </table> 
    24392460    </form> 
     2461  </xsl:template> 
     2462 
     2463  <xsl:template match="calSuite" name="modCalSuite"> 
     2464    <h2>Modify Calendar Suite</h2> 
     2465    <xsl:variable name="calSuiteName" select="name"/> 
     2466    <form name="calSuiteForm" action="{$calsuite-update}" method="post"> 
     2467      <table class="eventFormTable"> 
     2468        <tr> 
     2469          <th>Name:</th> 
     2470          <td> 
     2471            <input name="name" value="{$calSuiteName}" size="20"/> 
     2472          </td> 
     2473          <td> 
     2474            Name of your calendar suite 
     2475          </td> 
     2476        </tr> 
     2477        <tr> 
     2478          <th>Group:</th> 
     2479          <td> 
     2480            <xsl:variable name="group" select="group"/> 
     2481            <input name="groupName" value="{$group}" size="20"/> 
     2482          </td> 
     2483          <td> 
     2484            Name of admin group which contains event administrators and event owner to which preferences for the suite are attached 
     2485          </td> 
     2486        </tr> 
     2487        <tr> 
     2488          <th>Root calendar:</th> 
     2489          <td> 
     2490            <xsl:variable name="calPath" select="calPath"/> 
     2491            <input name="calPath" value="{$calPath}" size="20"/> 
     2492          </td> 
     2493          <td> 
     2494            Path of root calendar (not required if suite only consists of subscriptions and views) 
     2495          </td> 
     2496        </tr> 
     2497      </table> 
     2498      <table border="0" id="submitTable"> 
     2499        <tr> 
     2500          <td> 
     2501            <input type="submit" name="updateCalSuite" value="Update"/> 
     2502            <input type="submit" name="cancelled" value="Cancel"/> 
     2503            <input type="reset" value="Reset"/> 
     2504          </td> 
     2505        </tr> 
     2506      </table> 
     2507    </form> 
     2508    <div id="sharingBox"> 
     2509      <h3>Sharing</h3> 
     2510      <table class="common"> 
     2511        <tr> 
     2512          <th class="commonHeader" colspan="2">Current access:</th> 
     2513        </tr> 
     2514        <tr> 
     2515          <th>Owner:</th> 
     2516          <td> 
     2517            <xsl:value-of select="name(acl/ace[principal/property/owner]/grant/*)"/> 
     2518          </td> 
     2519        </tr> 
     2520        <xsl:if test="acl/ace/principal/href"> 
     2521          <tr> 
     2522            <th>Users:</th> 
     2523            <td> 
     2524              <xsl:for-each select="acl/ace[principal/href]"> 
     2525                <xsl:value-of select="principal/href"/> (<xsl:value-of select="name(grant/*)"/>)<br/> 
     2526              </xsl:for-each> 
     2527            </td> 
     2528          </tr> 
     2529        </xsl:if> 
     2530      </table> 
     2531      <form name="calendarShareForm" action="{$calendar-setAccess}" id="shareForm"> 
     2532        <input type="hidden" name="calSuite" value="{$calSuiteName}"/> 
     2533        <p> 
     2534          Share with:<br/> 
     2535          <input type="text" name="who" size="20"/> 
     2536          <input type="radio" value="user" name="whoType" checked="checked"/> user 
     2537          <input type="radio" value="group" name="whoType"/> group 
     2538        </p> 
     2539        <p> 
     2540          Access rights:<br/> 
     2541          <input type="radio" value="R" name="how" checked="checked"/> read<br/> 
     2542          <input type="radio" value="Rc" name="how"/> read/write content<br/> 
     2543          <input type="radio" value="f" name="how"/> read free/busy only<br/> 
     2544          <input type="radio" value="d" name="how"/> default (reset access) 
     2545        </p> 
     2546        <input type="submit" name="submit" value="Submit"/> 
     2547      </form> 
     2548    </div> 
    24402549  </xsl:template> 
    24412550 
     
    30883197        <xsl:if test="/bedeworkadmin/userInfo/user"> 
    30893198          <td class="rightCell"> 
    3090             <xsl:if test="/bedeworkadmin/calSuite"> 
     3199            <xsl:if test="/bedeworkadmin/currentCalSuite/name"> 
    30913200              Calendar Suite: 
    30923201              <span class="status"> 
    3093                 <xsl:value-of select="/bedeworkadmin/calSuite"/> 
     3202                <xsl:value-of select="/bedeworkadmin/currentCalSuite/name"/> 
    30943203              </span> 
    30953204              &#160; 
  • trunk/calendar3/deployment/webadmin/webapp/resources/default/default/errors.xsl

    r518 r523  
    3434      </xsl:when> 
    3535      <xsl:when test="id='org.bedework.client.error.nosuchcalendar'"> 
    36         Not found: there is no calendar identified by the id <em><xsl:value-of select="param"/></em> 
     36        Not found: there is no calendar identified by the path <em><xsl:value-of select="param"/></em> 
    3737      </xsl:when> 
    3838      <xsl:when test="id='org.bedework.client.error.calendar.referenced'"> 
  • trunk/calendar3/webadmin/war/WEB-INF/struts-config.xml

    r518 r523  
    405405    </action> 
    406406 
     407    <action    path="/calsuite/showAddForm" 
     408               type="org.bedework.webadmin.PERenderAction" 
     409               name="peForm" 
     410               scope="session" 
     411               validate="false"> 
     412      <forward name="success" path="/docs/calsuite/addCalSuite.jsp"/> 
     413    </action> 
     414 
    407415    <action    path="/calsuite/showModForm" 
    408416               type="org.bedework.webadmin.PERenderAction" 
     
    411419               validate="false"> 
    412420      <forward name="success" path="/docs/calsuite/modCalSuite.jsp"/> 
     421    </action> 
     422 
     423    <action    path="/calsuite/fetchForUpdate" 
     424               type="org.bedework.webcommon.calsuite.FetchCalSuiteAction" 
     425               name="peForm" 
     426               scope="session" 
     427               validate="false"> 
     428      <forward name="success" path="/calsuite/showModForm.rdo" redirect="true" /> 
    413429    </action> 
    414430 
     
    420436      <forward name="notAdded" path="/calsuite/showCalSuites.rdo" redirect="true" /> 
    421437      <forward name="success" path="/calsuite/showModForm.rdo" redirect="true" /> 
     438    </action> 
     439 
     440    <action    path="/calsuite/update" 
     441               type="org.bedework.webcommon.calsuite.UpdateCalSuiteAction" 
     442               name="peForm" 
     443               scope="session" 
     444               validate="false"> 
     445      <forward name="cancelled" path="/calsuite/showCalSuites.rdo" redirect="true"/> 
     446      <forward name="retry" path="/calsuite/showModForm.rdo" redirect="true"/> 
     447      <forward name="success" path="/calsuite/showModForm.rdo" redirect="true" /> 
     448    </action> 
     449 
     450    <action    path="/calsuite/setAccess" 
     451               type="org.bedework.webcommon.access.AccessAction" 
     452               name="peForm" 
     453               scope="session" 
     454               validate="false"> 
     455      <forward name="success" path="/calsuite/showModForm.rdo" redirect="true" /> 
     456      <forward name="error" path="/calsuite/showModForm.rdo" redirect="true" /> 
     457      <forward name="notFound" path="/calsuite/showModForm.rdo" redirect="true" /> 
     458      <forward name="doNothing" path="/calsuite/showModForm.rdo" redirect="true" /> 
    422459    </action> 
    423460 
  • trunk/calendar3/webadmin/war/docs/calsuite/calSuiteList.jsp

    r518 r523  
    99<page>calSuiteList</page> 
    1010 
    11 <calsuites> 
    12 <% /*  <logic:iterate id="calSuite" name="peForm" property="accessibleCalSuites" > 
    13     < % @include file="/docs/calsuite/emitCalSuite.jsp" %
    14   </logic:iterate> */ %> 
    15 </calsuites> 
     11<calSuites> 
     12  <logic:iterate id="calSuite" name="peForm" property="calSuites" > 
     13    <%@include file="/docs/calsuite/emitCalSuite.jsp"%
     14  </logic:iterate> 
     15</calSuites> 
    1616 
    1717<%@include file="/docs/footer.jsp"%> 
  • trunk/calendar3/webadmin/war/docs/calsuite/displayCalSuite.jsp

    r514 r523  
    99<page>displayCalSuite</page> 
    1010 
    11 <% /* used by included file */ 
    12    String rpitemp; %> 
    1311<calSuites> 
    14   <logic:iterate id="calSuite" name="peForm" property="editablecalSuites" > 
     12  <logic:iterate id="calSuite" name="peForm" property="calSuite" > 
    1513    <%@include file="/docs/calsuite/emitcalSuite.jsp"%> 
    1614  </logic:iterate> 
  • trunk/calendar3/webadmin/war/docs/calsuite/emitCalSuite.jsp

    r518 r523  
    55<html:xhtml/> 
    66 
    7 <calsuite> 
     7<calSuite> 
    88  <bw:emitText name="calSuite" property="name" /> 
    9   <bw:emitText name="calSuite" property="group.name" tagName="group" /> 
    10   <bw:emitText name="calSuite" property="calendar.path" tagName="calPath" /> 
    11 </calsuite> 
     9  <bw:emitText name="calSuite" property="group.account" tagName="group" /> 
     10  <bw:emitText name="calSuite" property="rootCalendar.path" tagName="calPath" /> 
     11  <bw:emitCurrentPrivs name="calSuite" property="currentAccess"/> 
     12  <bw:emitAcl name="calSuite" property="currentAccess" /> 
     13</calSuite> 
  • trunk/calendar3/webadmin/war/docs/calsuite/modCalSuite.jsp

    r518 r523  
    88 
    99<page>modCalSuite</page> 
    10 <creating><bean:write name="peForm" property="addingCalSuite"/></creating> 
    1110 
    12 <%/* <bean:define id="calSuite" name="peForm" property="calSuite"/> */%> 
    13 <calSuite> 
    14   <%/*<bw:emitText name="calSuite" property="name" /> 
    15   <bw:emitText name="calSuite" property="group.name" tagName="group" /> 
    16   <bw:emitText name="calSuite" property="calendar.path" tagName="calPath" />*/%> 
    17 </calSuite> 
     11<bean:define id="calSuite" name="peForm" property="calSuite"/> 
     12<%@include file="/docs/calsuite/emitCalSuite.jsp"%> 
    1813 
    1914<%@include file="/docs/footer.jsp"%> 
  • trunk/calendar3/webadmin/war/docs/header.jsp

    r520 r523  
    125125    <calsuite> 
    126126      <fetch><genurl:link page="/calsuite/showCalSuites.rdo?b=de"/></fetch> 
     127      <fetchForUpdate><genurl:link page="/calsuite/fetchForUpdate.do?b=de"/></fetchForUpdate> 
    127128      <add><genurl:link page="/calsuite/addCalSuite.do?b=de"/></add> 
    128       <showForm><genurl:link page="/calsuite/showModForm.rdo?b=de"/></showForm> 
     129      <update><genurl:link page="/calsuite/update.do?b=de"/></update> 
     130      <showAddForm><genurl:link page="/calsuite/showAddForm.rdo?b=de"/></showAddForm> 
     131      <showModForm><genurl:link page="/calsuite/showModForm.rdo?b=de"/></showModForm> 
     132      <setAccess><genurl:link page="/calsuite/setAccess.do?b=de"/></setAccess> 
    129133    </calsuite> 
    130134    <system> <!-- only those listed are used here (no need to clean up) --> 
     
    171175 
    172176  <logic:present name="peForm" property="currentCalSuite" > 
    173     <bw:emitText name="peForm" property="currentCalSuite.name" tagName="calSuite" /> 
     177    <currentCalSuite> 
     178      <bw:emitText name="peForm" property="currentCalSuite.name" tagName="name" /> 
     179      <bw:emitCurrentPrivs name="peForm" property="currentCalSuite.currentAccess" tagName="currentAccess"/> 
     180    </currentCalSuite> 
    174181  </logic:present> 
    175182