Changeset 1115

Show
Ignore:
Timestamp:
12/01/06 15:35:46
Author:
johnsa
Message:

more work on admin client events - display event now uses identical jsp as the public client (this will allow us to combine and simplify the code)

fixed up event deletion in admin client

Files:

Legend:

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

    r1114 r1115  
    11701170              <td align="right"> 
    11711171                <input type="submit" name="delete" value="Delete Event"/> 
    1172                 <input type="hidden" name="public" value="true"/> 
    11731172              </td> 
    11741173            </xsl:otherwise> 
     
    12491248 
    12501249  <xsl:template match="event" mode="displayEvent"> 
     1250    <xsl:variable name="calPath" select="calendar/path"/> 
     1251    <xsl:variable name="guid" select="guid"/> 
     1252    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
     1253 
    12511254    <xsl:choose> 
    12521255      <xsl:when test="/bedeworkadmin/page='deleteEventConfirm'"> 
     1256 
    12531257        <h2>Ok to delete this event?</h2> 
    12541258        <p style="width: 400px;">Note: we do not encourage deletion of old but correct events; we prefer to keep 
     
    12561260           that are truly erroneous.</p> 
    12571261        <p id="confirmButtons"> 
    1258           <xsl:copy-of select="/bedeworkadmin/formElements/*"/> 
     1262          <form action="{$event-delete}" method="post"> 
     1263            <input type="submit" name="cancelled" value="Cancel"/> 
     1264            <input type="submit" name="delete" value="Delete"/> 
     1265            <input type="hidden" name="calPath" value="{$calPath}"/> 
     1266            <input type="hidden" name="guid" value="{$guid}"/> 
     1267            <input type="hidden" name="recurrenceId" value="{$recurrenceId}"/> 
     1268          </form> 
    12591269        </p> 
    12601270      </xsl:when> 
     
    12651275 
    12661276    <table class="eventFormTable"> 
    1267       <tr> 
    1268         <th> 
    1269           ID: 
    1270         </th> 
    1271         <td> 
    1272           <xsl:value-of select="id"/> 
    1273         </td> 
    1274       </tr> 
    12751277 
    12761278      <tr> 
     
    12791281        </th> 
    12801282        <td> 
    1281           <xsl:value-of select="title"/> 
     1283          <strong><xsl:value-of select="summary"/></strong> 
     1284        </td> 
     1285      </tr> 
     1286 
     1287      <tr> 
     1288        <th> 
     1289          When: 
     1290        </th> 
     1291        <td> 
     1292          <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> 
     1293          <xsl:if test="start/allday = 'false'"> 
     1294            <span class="time"><xsl:value-of select="start/time"/></span> 
     1295          </xsl:if> 
     1296          <xsl:if test="(end/longdate != start/longdate) or 
     1297                        ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> 
     1298          <xsl:if test="end/longdate != start/longdate"> 
     1299            <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> 
     1300          </xsl:if> 
     1301          <xsl:choose> 
     1302            <xsl:when test="start/allday = 'true'"> 
     1303              <span class="time"><em>(all day)</em></span> 
     1304            </xsl:when> 
     1305            <xsl:when test="end/longdate != start/longdate"> 
     1306              <span class="time"><xsl:value-of select="end/time"/></span> 
     1307            </xsl:when> 
     1308            <xsl:when test="end/time != start/time"> 
     1309              <span class="time"><xsl:value-of select="end/time"/></span> 
     1310            </xsl:when> 
     1311          </xsl:choose> 
    12821312        </td> 
    12831313      </tr> 
     
    12881318        </th> 
    12891319        <td> 
    1290           <xsl:value-of select="calendar"/> 
    1291         </td> 
    1292       </tr> 
    1293  
    1294       <tr> 
    1295         <th> 
    1296           Start: 
    1297         </th> 
    1298         <td> 
    1299           <xsl:value-of select="start/year"/>-<xsl:value-of select="start/month"/>-<xsl:value-of select="start/day"/> 
    1300           <xsl:text> </xsl:text> 
    1301           <xsl:choose> 
    1302             <xsl:when test="start/allDay='true'"> 
    1303               <strong>all day event</strong> 
    1304             </xsl:when> 
    1305             <xsl:otherwise> 
    1306               <xsl:value-of select="start/hour"/>:<xsl:value-of select="start/minute"/> 
    1307               <xsl:if test="start/ampm"> 
    1308                 <xsl:value-of select="start/ampm"/> 
    1309               </xsl:if> 
    1310             </xsl:otherwise> 
    1311           </xsl:choose> 
    1312         </td> 
    1313       </tr> 
    1314       <tr> 
    1315         <th> 
    1316           End: 
    1317         </th> 
    1318         <td> 
    1319           <xsl:choose> 
    1320             <xsl:when test="end/endtype = 'none'"> 
    1321               <div class="dateFields" id="noDuration"> 
    1322                 This event has no duration / end date 
    1323               </div> 
    1324             </xsl:when> 
    1325             <xsl:when test="end/endtype = 'duration'"> 
    1326               <div class="dateFields"> 
    1327                 <div class="invisible" id="endDuration"> 
    1328                   <div class="durationBox"> 
    1329                     <input type="text" name="eventDuration.daysStr" size="2" value="0" onChange="window.document.peForm.durationType[0].checked = true;"/>days 
    1330                     <input type="text" name="eventDuration.hoursStr" size="2" value="1" onChange="window.document.peForm.durationType[0].checked = true;"/>hours 
    1331                     <input type="text" name="eventDuration.minutesStr" size="2" value="0" onChange="window.document.peForm.durationType[0].checked = true;"/>minutes 
    1332                   </div> 
    1333                   <span class="durationSpacerText">or</span> 
    1334                   <div class="durationBox"> 
    1335                     <input type="text" name="eventDuration.weeksStr" size="2" value="0" onChange="window.document.peForm.durationType[1].checked = true;"/>weeks 
    1336                   </div> 
    1337                 </div> 
    1338               </div> 
    1339             </xsl:when> 
    1340             <xsl:otherwise> 
    1341               <xsl:value-of select="end/dateTime/year"/>-<xsl:value-of select="end/dateTime/month"/>-<xsl:value-of select="end/dateTime/day"/> 
    1342               <xsl:text> </xsl:text> 
    1343               <xsl:value-of select="end/dateTime/hour"/>:<xsl:value-of select="end/dateTime/minute"/> 
    1344               <xsl:text> </xsl:text> 
    1345               <xsl:if test="end/dateTime/ampm"> 
    1346                 <xsl:value-of select="end/dateTime/ampm"/> 
    1347               </xsl:if> 
    1348             </xsl:otherwise> 
    1349           </xsl:choose> 
    1350         </td> 
    1351       </tr> 
    1352  
    1353       <!--  Category  --> 
    1354       <tr> 
    1355         <th> 
    1356           Category: 
    1357         </th> 
    1358         <td> 
    1359           <xsl:value-of select="category"/> 
     1320          <xsl:value-of select="calendar/path"/> 
    13601321        </td> 
    13611322      </tr> 
     
    13671328        </th> 
    13681329        <td> 
    1369           <xsl:value-of select="desc"/> 
     1330          <xsl:value-of select="description"/> 
    13701331        </td> 
    13711332      </tr> 
     
    13911352        </td> 
    13921353      </tr> 
     1354 
    13931355      <!-- Location --> 
    13941356      <tr> 
     
    13971359        </th> 
    13981360        <td> 
    1399           <xsl:value-of select="location"/> 
     1361          <xsl:value-of select="location/address"/><br/> 
     1362          <xsl:value-of select="location/subaddress"/> 
    14001363        </td> 
    14011364      </tr> 
     
    14071370        </th> 
    14081371        <td> 
    1409           <xsl:value-of select="contact"/> 
     1372          <xsl:value-of select="contact/name"/><br/> 
     1373          <xsl:value-of select="contact/phone"/><br/> 
     1374          <xsl:variable name="mailto" select="email"/> 
     1375          <a href="mailto:{$mailto}"><xsl:value-of select="email"/></a> 
     1376          <xsl:variable name="link" select="link"/> 
     1377          <a href="mailto:{$link}"><xsl:value-of select="link"/></a> 
    14101378        </td> 
    14111379      </tr> 
     
    14211389      </tr> 
    14221390 
     1391      <!--  Categories  --> 
     1392      <tr> 
     1393        <th> 
     1394          Categories: 
     1395        </th> 
     1396        <td> 
     1397          <xsl:for-each select="categories/category"> 
     1398            <xsl:value-of select="word"/><br/> 
     1399          </xsl:for-each> 
     1400        </td> 
     1401      </tr> 
     1402 
    14231403    </table> 
    14241404 
    14251405    <p> 
    14261406      <xsl:if test="/bedeworkadmin/canEdit = 'true' or /bedeworkadmin/userInfo/superUser = 'true'"> 
    1427         <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    1428         <xsl:variable name="guid" select="guid"/> 
    1429         <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    14301407        <input type="button" name="return" value="Edit event" onclick="javascript:location.replace('{$event-fetchForUpdate}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}')"/> 
    14311408      </xsl:if> 
    14321409 
    1433       <input type="button" name="return" value="Back to search results" onclick="javascript:history.back()"/> 
     1410      <input type="button" name="return" value="Back" onclick="javascript:history.back()"/> 
    14341411    </p> 
    14351412  </xsl:template> 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r1114 r1115  
    142142 
    143143  <!-- Other generally useful global variables --> 
    144   <xsl:variable name="confId" select="/bedework/confirmationid"/> 
    145144  <xsl:variable name="prevdate" select="/bedework/previousdate"/> 
    146145  <xsl:variable name="nextdate" select="/bedework/nextdate"/> 
     
    978977          <xsl:when test="recurring=true"> 
    979978            Remove: 
    980             <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;confirmationid={$confId}"> 
     979            <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}"> 
    981980              <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    982981              all 
    983982            </a> | 
    984             <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
     983            <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    985984              <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    986985              this instance 
     
    988987          </xsl:when> 
    989988          <xsl:otherwise> 
    990             <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}">Remove</a> 
     989            <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">Remove</a> 
    991990          </xsl:otherwise> 
    992991        </xsl:choose> 
     
    997996            Edit: <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}">master</a> | 
    998997            <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">instance</a> | 
    999             <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}">Delete All</a> 
     998            <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">Delete All</a> 
    1000999          </xsl:when> 
    10011000          <xsl:otherwise> 
    10021001            <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}">Edit</a> | 
    1003             <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}">Delete</a> 
     1002            <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">Delete</a> 
    10041003          </xsl:otherwise> 
    10051004        </xsl:choose> 
     
    13021301                  <xsl:when test="recurring=true"> 
    13031302                    Remove: 
    1304                     <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;confirmationid={$confId}"> 
     1303                    <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}"> 
    13051304                      <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    13061305                      all 
    13071306                    </a> | 
    1308                     <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
     1307                    <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    13091308                      <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    13101309                      this instance 
     
    13121311                  </xsl:when> 
    13131312                  <xsl:otherwise> 
    1314                     <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
     1313                    <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    13151314                      <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    13161315                      Remove 
     
    13231322                  <xsl:when test="recurring=true"> 
    13241323                    Edit: 
    1325                     <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;confirmationid={$confId}"> 
     1324                    <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}"> 
    13261325                      <img src="{$resourcesRoot}/resources/std-ical_iconEditDkGray.gif" width="12" height="16" border="0" alt="edit"/> 
    13271326                      master event 
    13281327                    </a> | 
    1329                     <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
     1328                    <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    13301329                      <img src="{$resourcesRoot}/resources/std-ical_iconEditDkGray.gif" width="12" height="16" border="0" alt="edit"/> 
    13311330                      this instance 
     
    13331332                  </xsl:when> 
    13341333                  <xsl:otherwise> 
    1335                     <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;confirmationid={$confId}"> 
     1334                    <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}"> 
    13361335                      <img src="{$resourcesRoot}/resources/std-ical_iconEditDkGray.gif" width="12" height="16" border="0" alt="edit"/> 
    13371336                      Edit 
     
    13511350              <xsl:choose> 
    13521351                <xsl:when test="recurring=true"> 
    1353                   <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;confirmationid={$confId}"> 
     1352                  <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}"> 
    13541353                    <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    13551354                    Delete All (recurring) 
     
    13571356                </xsl:when> 
    13581357                <xsl:otherwise> 
    1359                   <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
     1358                  <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    13601359                    <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    13611360                    Delete 
     
    16601659    change it without modifying includes.js --> 
    16611660    <form name="eventForm" method="post" action="{$addEvent}" id="standardForm"> 
    1662       <input type="hidden" name="confirmationid" value="{$confId}"/> 
    16631661      <input type="hidden" name="endType" value="date"/> 
    16641662      <h2>Add Event</h2> 
     
    22562254    change it without modifying includes.js --> 
    22572255    <form name="eventForm" method="post" action="{$updateEvent}" id="standardForm"> 
    2258       <input type="hidden" name="confirmationid" value="{$confId}"/> 
    22592256      <input type="hidden" name="endType" value="date"/> 
    22602257      <h2>Edit Event</h2> 
     
    22632260          <th colspan="2" class="commonHeader"> 
    22642261            <div id="eventActions"> 
    2265               <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
     2262              <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    22662263                <img src="{$resourcesRoot}/resources/glassFill-icon-viewGray.gif" width="13" height="13" border="0" alt="view"/> 
    22672264                View 
     
    22692266              <xsl:if test="currentAccess/current-user-privilege-set/privilege/unbind"> 
    22702267                | 
    2271                 <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPathEncoded}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
     2268                <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPathEncoded}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    22722269                  <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    22732270                  Delete 
     
    26142611            <input name="submit" type="submit" value="Submit Event"/>&#160; 
    26152612            <input name="cancelled" type="submit" value="Cancel"/> 
    2616             <input type="button" value="return to view" onclick="location.replace('{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}')"/> 
     2613            <input type="button" value="return to view" onclick="location.replace('{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}')"/> 
    26172614          </td> 
    26182615        </tr> 
     
    43754372      <xsl:when test="/bedework/creating = 'true'"> 
    43764373        <form name="addLocationForm" method="post" action="{$location-update}" id="standardForm"> 
    4377           <input type="hidden" name="confirmationid" value="{$confId}"/> 
    43784374          <h2>Manage Locations</h2> 
    43794375          <table class="common" cellspacing="0"> 
     
    44194415        <form name="editLocationForm" method="post" action="{$location-update}" id="standardForm"> 
    44204416          <input type="hidden" name="updateLocation" value="true"/> 
    4421           <input type="hidden" name="confirmationid" value="{$confId}"/> 
    44224417          <h2>Manage Locations</h2> 
    44234418          <table class="common" cellspacing="0"> 
     
    45964591    <form name="eventForm" method="post" action="{$schedule-attendeeRespond}" id="standardForm"> 
    45974592      <input type="hidden" name="updateEvent" value="true"/> 
    4598       <input type="hidden" name="confirmationid" value="{$confId}"/> 
    45994593      <input type="hidden" name="endType" value="date"/> 
    46004594      <h2>Meeting Request</h2>