root/trunk/calendar3/deployment/webadmin/webapp/resources/en_US/default/default.xsl

Revision 2 (checked in by douglm, 7 years ago)

Initial import of bedework

Line 
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3 <xsl:output
4   method="html"
5   indent="yes"
6   media-type="text/html"
7   doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
8   doctype-system="http://www.w3.org/TR/html4/strict.dtd"
9   standalone="yes"
10   omit-xml-declaration="yes"/>
11    <!-- ======================================== -->
12   <!--      BEDEWORK ADMIN CLIENT STYLESHEET     -->
13   <!-- ========================================= -->
14
15   <!-- DEFINE INCLUDES -->
16   <xsl:include href="errors.xsl"/>
17   <xsl:include href="messages.xsl"/>
18
19   <!-- DEFINE GLOBAL CONSTANTS -->
20   <!-- URL of html resources (images, css, other html); by default this is
21        set to the application root, but for the admin client
22        this should be changed to point to a
23        web server over https to avoid mixed content errors, e.g.,
24   <xsl:variable name="resourcesRoot" select="'https://mywebserver.edu/myresourcesdir'"/>
25     -->
26   <xsl:variable name="resourcesRoot" select="/bedeworkadmin/approot"/>
27
28   <!-- URL of the XSL template directory -->
29   <!-- The approot is an appropriate place to put
30        included stylesheets and xml fragments. These are generally
31        referenced relatively (like errors.xsl and messages.xsl above);
32        this variable is here for your convenience if you choose to
33        reference it explicitly.  It is not used in this stylesheet, however,
34        and can be safely removed if you so choose. -->
35   <xsl:variable name="appRoot" select="/bedeworkadmin/approot"/>
36
37   <!-- Properly encoded prefixes to the application actions; use these to build
38        urls; allows the application to be used without cookies or within a portal. -->
39   <xsl:variable name="setup" select="/bedeworkadmin/urlPrefixes/setup/a/@href"/> <!-- used -->
40   <xsl:variable name="logout" select="/bedeworkadmin/urlPrefixes/logout/a/@href"/><!-- used -->
41   <xsl:variable name="event-showEvent" select="/bedeworkadmin/urlPrefixes/event/showEvent/a/@href"/>
42   <xsl:variable name="event-showModForm" select="/bedeworkadmin/urlPrefixes/event/showModForm/a/@href"/>
43   <xsl:variable name="event-showUpdateList" select="/bedeworkadmin/urlPrefixes/event/showUpdateList/a/@href"/><!-- used -->
44   <xsl:variable name="event-showDeleteConfirm" select="/bedeworkadmin/urlPrefixes/event/showDeleteConfirm/a/@href"/>
45   <xsl:variable name="event-initAddEvent" select="/bedeworkadmin/urlPrefixes/event/initAddEvent/a/@href"/><!-- used -->
46   <xsl:variable name="event-initUpdateEvent" select="/bedeworkadmin/urlPrefixes/event/initUpdateEvent/a/@href"/><!-- used -->
47   <xsl:variable name="event-delete" select="/bedeworkadmin/urlPrefixes/event/delete/a/@href"/>
48   <xsl:variable name="event-fetchForDisplay" select="/bedeworkadmin/urlPrefixes/event/fetchForDisplay/a/@href"/>
49   <xsl:variable name="event-fetchForUpdate" select="/bedeworkadmin/urlPrefixes/event/fetchForUpdate/a/@href"/>
50   <xsl:variable name="event-update" select="/bedeworkadmin/urlPrefixes/event/update/a/@href"/>
51   <xsl:variable name="event-showClockMap" select="/bedeworkadmin/urlPrefixes/event/showClockMap/a/@href"/>
52   <xsl:variable name="sponsor-showSponsor" select="/bedeworkadmin/urlPrefixes/sponsor/showSponsor/a/@href"/>
53   <xsl:variable name="sponsor-showReferenced" select="/bedeworkadmin/urlPrefixes/sponsor/showReferenced/a/@href"/>
54   <xsl:variable name="sponsor-showModForm" select="/bedeworkadmin/urlPrefixes/sponsor/showModForm/a/@href"/>
55   <xsl:variable name="sponsor-showUpdateList" select="/bedeworkadmin/urlPrefixes/sponsor/showUpdateList/a/@href"/>
56   <xsl:variable name="sponsor-showDeleteConfirm" select="/bedeworkadmin/urlPrefixes/sponsor/showDeleteConfirm/a/@href"/>
57   <xsl:variable name="sponsor-initAdd" select="/bedeworkadmin/urlPrefixes/sponsor/initAdd/a/@href"/><!-- used -->
58   <xsl:variable name="sponsor-initUpdate" select="/bedeworkadmin/urlPrefixes/sponsor/initUpdate/a/@href"/>
59   <xsl:variable name="sponsor-delete" select="/bedeworkadmin/urlPrefixes/sponsor/delete/a/@href"/>
60   <xsl:variable name="sponsor-fetchForDisplay" select="/bedeworkadmin/urlPrefixes/sponsor/fetchForDisplay/a/@href"/>
61   <xsl:variable name="sponsor-fetchForUpdate" select="/bedeworkadmin/urlPrefixes/sponsor/fetchForUpdate/a/@href"/>
62   <xsl:variable name="sponsor-update" select="/bedeworkadmin/urlPrefixes/sponsor/update/a/@href"/>
63   <xsl:variable name="location-showLocation" select="/bedeworkadmin/urlPrefixes/location/showLocation/a/@href"/>
64   <xsl:variable name="location-showReferenced" select="/bedeworkadmin/urlPrefixes/location/showReferenced/a/@href"/>
65   <xsl:variable name="location-showModForm" select="/bedeworkadmin/urlPrefixes/location/showModForm/a/@href"/>
66   <xsl:variable name="location-showUpdateList" select="/bedeworkadmin/urlPrefixes/location/showUpdateList/a/@href"/>
67   <xsl:variable name="location-showDeleteConfirm" select="/bedeworkadmin/urlPrefixes/location/showDeleteConfirm/a/@href"/>
68   <xsl:variable name="location-initAdd" select="/bedeworkadmin/urlPrefixes/location/initAdd/a/@href"/><!-- used -->
69   <xsl:variable name="location-initUpdate" select="/bedeworkadmin/urlPrefixes/location/initUpdate/a/@href"/>
70   <xsl:variable name="location-delete" select="/bedeworkadmin/urlPrefixes/location/delete/a/@href"/>
71   <xsl:variable name="location-fetchForDisplay" select="/bedeworkadmin/urlPrefixes/location/fetchForDisplay/a/@href"/>
72   <xsl:variable name="location-fetchForUpdate" select="/bedeworkadmin/urlPrefixes/location/fetchForUpdate/a/@href"/>
73   <xsl:variable name="location-update" select="/bedeworkadmin/urlPrefixes/location/update/a/@href"/>
74   <!-- cals should all be good -->
75   <xsl:variable name="calendar-fetch" select="/bedeworkadmin/urlPrefixes/calendar/fetch/a/@href"/><!-- used -->
76   <xsl:variable name="calendar-initAdd" select="/bedeworkadmin/urlPrefixes/calendar/initAdd/a/@href"/><!-- used -->
77   <xsl:variable name="calendar-delete" select="/bedeworkadmin/urlPrefixes/calendar/delete/a/@href"/>
78   <xsl:variable name="calendar-fetchForDisplay" select="/bedeworkadmin/urlPrefixes/calendar/fetchForDisplay/a/@href"/>
79   <xsl:variable name="calendar-fetchForUpdate" select="/bedeworkadmin/urlPrefixes/calendar/fetchForUpdate/a/@href"/><!-- used -->
80   <xsl:variable name="calendar-update" select="/bedeworkadmin/urlPrefixes/calendar/update/a/@href"/><!-- used -->
81   <!-- subs and views are all good - no need to clean any of these out -->
82   <xsl:variable name="subscriptions-fetch" select="/bedeworkadmin/urlPrefixes/subscriptions/fetch/a/@href"/>
83   <xsl:variable name="subscriptions-fetchForUpdate" select="/bedeworkadmin/urlPrefixes/subscriptions/fetchForUpdate/a/@href"/>
84   <xsl:variable name="subscriptions-initAdd" select="/bedeworkadmin/urlPrefixes/subscriptions/initAdd/a/@href"/>
85   <xsl:variable name="subscriptions-subscribe" select="/bedeworkadmin/urlPrefixes/subscriptions/subscribe/a/@href"/>
86   <xsl:variable name="view-fetch" select="/bedeworkadmin/urlPrefixes/view/fetch/a/@href"/>
87   <xsl:variable name="view-fetchForUpdate" select="/bedeworkadmin/urlPrefixes/view/fetchForUpdate/a/@href"/>
88   <xsl:variable name="view-addView" select="/bedeworkadmin/urlPrefixes/view/addView/a/@href"/>
89   <xsl:variable name="view-update" select="/bedeworkadmin/urlPrefixes/view/update/a/@href"/>
90   <!-- === -->
91   <xsl:variable name="timezones-showUpload" select="/bedeworkadmin/urlPrefixes/timezones/showUpload/a/@href"/>
92   <xsl:variable name="timezones-initUpload" select="/bedeworkadmin/urlPrefixes/timezones/initUpload/a/@href"/>
93   <xsl:variable name="timezones-upload" select="/bedeworkadmin/urlPrefixes/timezones/upload/a/@href"/>
94   <xsl:variable name="authuser-showModForm" select="/bedeworkadmin/urlPrefixes/authuser/showModForm/a/@href"/>
95   <xsl:variable name="authuser-showUpdateList" select="/bedeworkadmin/urlPrefixes/authuser/showUpdateList/a/@href"/>
96   <xsl:variable name="authuser-initUpdate" select="/bedeworkadmin/urlPrefixes/authuser/initUpdate/a/@href"/>
97   <xsl:variable name="authuser-fetchForUpdate" select="/bedeworkadmin/urlPrefixes/authuser/fetchForUpdate/a/@href"/>
98   <xsl:variable name="authuser-update" select="/bedeworkadmin/urlPrefixes/authuser/update/a/@href"/>
99   <xsl:variable name="admingroup-showModForm" select="/bedeworkadmin/urlPrefixes/admingroup/showModForm/a/@href"/>
100   <xsl:variable name="admingroup-showModMembersForm" select="/bedeworkadmin/urlPrefixes/admingroup/showModMembersForm/a/@href"/>
101   <xsl:variable name="admingroup-showUpdateList" select="/bedeworkadmin/urlPrefixes/admingroup/showUpdateList/a/@href"/>
102   <xsl:variable name="admingroup-showChooseGroup" select="/bedeworkadmin/urlPrefixes/admingroup/showChooseGroup/a/@href"/>
103   <xsl:variable name="admingroup-showDeleteConfirm" select="/bedeworkadmin/urlPrefixes/admingroup/showDeleteConfirm/a/@href"/>
104   <xsl:variable name="admingroup-initAdd" select="/bedeworkadmin/urlPrefixes/admingroup/initAdd/a/@href"/><!-- used -->
105   <xsl:variable name="admingroup-initUpdate" select="/bedeworkadmin/urlPrefixes/admingroup/initUpdate/a/@href"/><!-- used -->
106   <xsl:variable name="admingroup-delete" select="/bedeworkadmin/urlPrefixes/admingroup/delete/a/@href"/>
107   <xsl:variable name="admingroup-fetchUpdateList" select="/bedeworkadmin/urlPrefixes/admingroup/fetchUpdateList/a/@href"/><!-- used -->
108   <xsl:variable name="admingroup-fetchForUpdate" select="/bedeworkadmin/urlPrefixes/admingroup/fetchForUpdate/a/@href"/><!-- used -->
109   <xsl:variable name="admingroup-fetchForUpdateMembers" select="/bedeworkadmin/urlPrefixes/admingroup/fetchForUpdateMembers/a/@href"/><!-- used -->
110   <xsl:variable name="admingroup-update" select="/bedeworkadmin/urlPrefixes/admingroup/update/a/@href"/><!-- used -->
111   <xsl:variable name="admingroup-updateMembers" select="/bedeworkadmin/urlPrefixes/admingroup/updateMembers/a/@href"/><!-- used -->
112   <xsl:variable name="admingroup-switch" select="/bedeworkadmin/urlPrefixes/admingroup/switch/a/@href"/>
113
114   <!-- URL of the web application - includes web context
115   <xsl:variable name="urlPrefix" select="/bedeworkadmin/urlprefix"/> -->
116
117   <!-- Other generally useful global variables -->
118   <xsl:variable name="publicCal">/cal</xsl:variable>
119
120   <!--==== MAIN TEMPLATE  ====-->
121   <xsl:template match="/">
122     <html lang="en">
123       <head>
124         <title>Calendar Admin: Events Calendar Administration</title>
125         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
126         <link rel="stylesheet" href="{$resourcesRoot}/en_US/default/default.css"/>
127         <xsl:if test="/bedeworkadmin/page='modEvent'">
128           <script language="JavaScript" type="text/javascript" src="{$resourcesRoot}/resources/includes.js"></script>
129           <script type='text/javascript' src="{$resourcesRoot}/resources/autoComplete.js"></script>
130           <script type='text/javascript' src="{$resourcesRoot}/resources/ui.js"></script>
131         </xsl:if>
132         <!--<link rel="icon" type="image/ico" href="{}/favicon.ico" />-->
133       </head>
134       <body>
135         <xsl:call-template name="header"/>
136         <div id="content">
137           <xsl:choose>
138             <xsl:when test="/bedeworkadmin/page='eventList'">
139               <xsl:call-template name="eventList"/>
140             </xsl:when>
141             <xsl:when test="/bedeworkadmin/page='modEvent'">
142               <xsl:call-template name="modEvent"/>
143             </xsl:when>
144             <xsl:when test="/bedeworkadmin/page='displayEvent'">
145               <xsl:apply-templates select="/bedeworkadmin/event" mode="displayEvent"/>
146             </xsl:when>
147             <xsl:when test="/bedeworkadmin/page='sponsorList'">
148               <xsl:call-template name="sponsorList"/>
149             </xsl:when>
150             <xsl:when test="/bedeworkadmin/page='modSponsor'">
151               <xsl:call-template name="modSponsor"/>
152             </xsl:when>
153             <xsl:when test="/bedeworkadmin/page='deleteSponsorConfirm'">
154               <xsl:call-template name="deleteSponsorConfirm"/>
155             </xsl:when>
156             <xsl:when test="/bedeworkadmin/page='locationList'">
157               <xsl:call-template name="locationList"/>
158             </xsl:when>
159             <xsl:when test="/bedeworkadmin/page='modLocation'">
160               <xsl:call-template name="modLocation"/>
161             </xsl:when>
162             <xsl:when test="/bedeworkadmin/page='deleteLocationConfirm'">
163               <xsl:call-template name="deleteLocationConfirm"/>
164             </xsl:when>
165             <xsl:when test="/bedeworkadmin/page='calendarList' or /bedeworkadmin/page='modCalendar'">
166               <xsl:apply-templates select="/bedeworkadmin/calendars"/>
167             </xsl:when>
168             <xsl:when test="/bedeworkadmin/page='subscriptions' or /bedeworkadmin/page='modSubscription'">
169               <xsl:apply-templates select="/bedeworkadmin/subscriptions"/>
170             </xsl:when>
171             <xsl:when test="/bedeworkadmin/page='views'">
172               <xsl:apply-templates select="/bedeworkadmin/views" mode="viewList"/>
173             </xsl:when>
174             <xsl:when test="/bedeworkadmin/page='modView'">
175               <xsl:call-template name="modView"/>
176             </xsl:when>
177             <xsl:when test="/bedeworkadmin/page='authUserList'">
178               <xsl:call-template name="authUserList"/>
179             </xsl:when>
180             <xsl:when test="/bedeworkadmin/page='modAuthUser'">
181               <xsl:call-template name="modAuthUser"/>
182             </xsl:when>
183             <xsl:when test="/bedeworkadmin/page='chooseGroup'">
184               <xsl:apply-templates select="/bedeworkadmin/groups" mode="chooseGroup"/>
185             </xsl:when>
186             <xsl:when test="/bedeworkadmin/page='adminGroupList'">
187               <xsl:call-template name="listAdminGroups"/>
188             </xsl:when>
189             <xsl:when test="/bedeworkadmin/page='modAdminGroup'">
190               <xsl:call-template name="modAdminGroup"/>
191             </xsl:when>
192             <xsl:when test="/bedeworkadmin/page='modAdminGroupMembers'">
193               <xsl:call-template name="modAdminGroupMembers"/>
194             </xsl:when>
195             <xsl:when test="/bedeworkadmin/page='noGroup'">
196               <h2>No administrative group</h2>
197               <p>Your userid has not been assigned to an administrative group.
198                 Please inform your administrator.</p>
199             </xsl:when>
200             <xsl:when test="/bedeworkadmin/page='uploadTimezones'">
201               <xsl:call-template name="uploadTimezones"/>
202             </xsl:when>
203             <xsl:when test="/bedeworkadmin/page='noAccess'">
204               <h2>No Access</h2>
205               <p>
206                 You have no access to the action you just attempted. If you believe
207                 you should have access and the problem persists, contact your
208                 administrator.
209               </p>
210               <p><a href="{$setup}">continue</a></p>
211             </xsl:when>
212             <xsl:when test="/bedeworkadmin/page='error'">
213               <h2>Application error</h2>
214               <p>An application error occurred.</p>
215               <p><a href="{$setup}">continue</a></p>
216             </xsl:when>
217             <xsl:otherwise>
218               <xsl:call-template name="mainMenu"/>
219             </xsl:otherwise>
220           </xsl:choose>
221         </div>
222         <!-- footer -->
223         <xsl:call-template name="footer"/>
224       </body>
225     </html>
226   </xsl:template>
227
228   <!--==============================================-->
229   <!--==============================================-->
230   <!--============= PAGE TEMPLATES =================-->
231   <!--==============================================-->
232   <!--==============================================-->
233
234   <!--+++++++++++++++ Main Menu ++++++++++++++++++++-->
235   <xsl:template name="mainMenu">
236     <h2 class="menuTitle">Main Menu</h2>
237     <table id="mainMenuTable">
238       <tr>
239         <th>Events</th>
240         <td>
241           <a href="{$event-initAddEvent}" >
242             Add
243           </a>
244         </td>
245         <td>
246           <a href="{$event-initUpdateEvent}" >
247             Edit / Delete
248           </a>
249         </td>
250         <td>
251           Event ID:
252           <xsl:copy-of select="/bedeworkadmin/formElements/*"/>
253         </td>
254       </tr>
255       <tr>
256         <th>Contacts</th>
257         <td>
258           <a href="{$sponsor-initAdd}" >
259             Add
260           </a>
261         </td>
262         <td>
263           <a href="{$sponsor-initUpdate}" >
264             Edit / Delete
265           </a>
266         </td>
267       </tr>
268       <tr>
269         <th>Locations</th>
270         <td>
271           <a href="{$location-initAdd}" >
272             Add
273           </a>
274         </td>
275         <td>
276           <a href="{$location-initUpdate}" >
277             Edit / Delete
278           </a>
279         </td>
280       </tr>
281     </table>
282
283
284     <!-- Content admin and super user segment of the page.
285          Super user will have content admin access. -->
286
287     <xsl:if test="/bedeworkadmin/userInfo/contentAdminUser='true'">
288       <h2 class="menuTitle">Administrator's Menu</h2>
289       <xsl:if test="/bedeworkadmin/userInfo/superUser='true'">
290         <ul class="adminMenu">
291           <li>
292             <a href="{$calendar-fetch}">
293               Manage calendars
294             </a>
295           </li>
296           <li>
297             <a href="{$subscriptions-fetch}">
298               Manage subscriptions
299             </a>
300           </li>
301           <li>
302             <a href="{$view-fetch}">
303               Manage views
304             </a>
305           </li>
306           <li>
307             <a href="{$timezones-initUpload}" >
308               Upload and replace system timezones
309             </a>
310           </li>
311         </ul>
312       </xsl:if>
313       <h4 class="menuTitle">User management</h4>
314       <ul class="adminMenu">
315         <xsl:if test="/bedeworkadmin/userInfo/userMaintOK='true'">
316           <li>
317             <a href="{$authuser-initUpdate}" >
318               List authorised users
319             </a>
320           </li>
321         </xsl:if>
322         <xsl:if test="/bedeworkadmin/userInfo/adminGroupMaintOk='true'">
323           <li>
324             Admin Groups:
325             <a href="{$admingroup-initAdd}">
326               Add
327             </a> |
328             <a href="{$admingroup-initUpdate}">
329               Edit / Delete
330             </a>
331           </li>
332         </xsl:if>
333         <li>
334           <a href="{$admingroup-switch}" >
335             Choose group...
336           </a>
337         </li>
338       </ul>
339     </xsl:if>
340   </xsl:template>
341
342   <!--++++++++++++++++++ Events ++++++++++++++++++++-->
343   <xsl:template name="eventList">
344     <p>Select the event that you would like to update:</p>
345
346     <form name="peForm" method="post" action="{$event-showUpdateList}">
347       <table>
348         <tr>
349           <td style="padding-right: 1em;">Show:</td>
350           <td>
351             <xsl:copy-of select="/bedeworkadmin/formElements/form/listAllSwitchFalse/*"/>
352             Active
353           </td>
354           <td>
355             <xsl:copy-of select="/bedeworkadmin/formElements/form/listAllSwitchTrue/*"/>
356             All
357           </td>
358         </tr>
359       </table>
360     </form>
361
362     <table id="commonListTable">
363       <tr>
364         <th>Title</th>
365         <th>Start Date</th>
366         <th>End Date</th>
367         <th>Description</th>
368       </tr>
369
370       <xsl:for-each select="/bedeworkadmin/events/event">
371         <tr>
372           <td>
373             <xsl:copy-of select="title/*"/>
374           </td>
375           <td class="date">
376             <xsl:value-of select="start"/>
377           </td>
378           <td class="date">
379             <xsl:value-of select="end"/>
380           </td>
381           <td>
382             <xsl:value-of select="desc"/>
383           </td>
384         </tr>
385       </xsl:for-each>
386     </table>
387   </xsl:template>
388
389   <xsl:template name="modEvent">
390     <h2>Event Information</h2>
391
392     <xsl:variable name="modEventAction" select="/bedeworkadmin/formElements/form/@action"/>
393     <form  name="peForm" method="post" action="{$modEventAction}">
394       <table class="eventFormTable">
395         <tr>
396           <td class="fieldName">
397             Title:
398           </td>
399           <td>
400             <xsl:copy-of select="/bedeworkadmin/formElements/form/title/*"/>
401           </td>
402         </tr>
403
404         <tr>
405           <td class="fieldName">
406             Calendar**:
407           </td>
408           <td>
409             <xsl:if test="/bedeworkadmin/formElements/form/calendar/preferred/select/option">
410               <select name="prefCalendarId">
411                 <option value="-1">
412                   Select preferred:
413                 </option>
414                 <xsl:copy-of select="/bedeworkadmin/formElements/form/calendar/preferred/select/*"/>
415               </select>
416               or Calendar (all):
417             </xsl:if>
418             <select name="calendarId">
419               <option value="-1">
420                 Select:
421               </option>
422               <xsl:copy-of select="/bedeworkadmin/formElements/form/calendar/all/select/*"/>
423             </select>
424             <xsl:text> </xsl:text>
425             <a href="" target="_blank">Calendar Definitions</a>
426           </td>
427         </tr>
428
429         <tr>
430           <td class="fieldName">
431             Date &amp; Time:
432           </td>
433           <td>
434             <!-- Set the timefields class for the first load of the page;
435                  subsequent changes will take place using javascript without a
436                  page reload. -->
437             <xsl:variable name="timeFieldsClass">
438               <xsl:choose>
439                 <xsl:when test="/bedeworkadmin/formElements/form/allDay/input/@checked='checked'">hidden</xsl:when>
440                 <xsl:otherwise>timeFields</xsl:otherwise>
441               </xsl:choose>
442             </xsl:variable>
443             <xsl:choose>
444               <xsl:when test="/bedeworkadmin/formElements/form/allDay/input/@checked='checked'">
445                 <input type="checkbox" name="eventStartDate.dateOnly" onchange="swapAllDayEvent(this)" value="on" checked="checked"/>
446               </xsl:when>
447               <xsl:otherwise>
448                 <input type="checkbox" name="eventStartDate.dateOnly" onchange="swapAllDayEvent(this)"/>
449               </xsl:otherwise>
450             </xsl:choose>
451             all day event<br/>
452             <div class="dateStartEndBox">
453               <strong>Start:</strong>
454               <div class="dateFields">
455                 <span class="startDateLabel">Date </span>
456                 <xsl:copy-of select="/bedeworkadmin/formElements/form/start/month/*"/>
457                 <xsl:copy-of select="/bedeworkadmin/formElements/form/start/day/*"/>
458                 <xsl:copy-of select="/bedeworkadmin/formElements/form/start/year/*"/>
459               </div>
460               <img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>
461               <div class="{$timeFieldsClass}" id="startTimeFields">
462                 <xsl:copy-of select="/bedeworkadmin/formElements/form/start/hour/*"/>
463                 <xsl:copy-of select="/bedeworkadmin/formElements/form/start/minute/*"/>
464                 <xsl:if test="/bedeworkadmin/formElements/form/start/ampm">
465                   <xsl:copy-of select="/bedeworkadmin/formElements/form/start/ampm/*"/>
466                 </xsl:if>
467                 <xsl:text> </xsl:text>
468                 <a href="javascript:launchClockMap('showClockMap.do?dateType=eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a>
469               </div>
470             </div>
471             <div class="dateStartEndBox">
472               <strong>End:</strong>
473               <xsl:choose>
474                 <xsl:when test="/bedeworkadmin/formElements/form/end/type='E'">
475                   <input type="radio" name="eventEndType" value="E" checked="checked" onClick="changeClass('endDateTime','shown');changeClass('endDuration','hidden');"/>
476                 </xsl:when>
477                 <xsl:otherwise>
478                   <input type="radio" name="eventEndType" value="E" onClick="changeClass('endDateTime','shown');changeClass('endDuration','hidden');"/>
479                 </xsl:otherwise>
480               </xsl:choose>
481               Date
482               <xsl:variable name="endDateTimeClass">
483                 <xsl:choose>
484                   <xsl:when test="/bedeworkadmin/formElements/form/end/type='E'">shown</xsl:when>
485                   <xsl:otherwise>hidden</xsl:otherwise>
486                 </xsl:choose>
487               </xsl:variable>
488               <div class="{$endDateTimeClass}" id="endDateTime">
489                 <div class="dateFields">
490                   <xsl:copy-of select="/bedeworkadmin/formElements/form/end/dateTime/month/*"/>
491                   <xsl:copy-of select="/bedeworkadmin/formElements/form/end/dateTime/day/*"/>
492                   <xsl:copy-of select="/bedeworkadmin/formElements/form/end/dateTime/year/*"/>
493                 </div>
494                 <img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>
495                 <div class="{$timeFieldsClass}" id="endTimeFields">
496                   <xsl:copy-of select="/bedeworkadmin/formElements/form/end/dateTime/hour/*"/>
497                   <xsl:copy-of select="/bedeworkadmin/formElements/form/end/dateTime/minute/*"/>
498                   <xsl:if test="/bedeworkadmin/formElements/form/end/dateTime/ampm">
499                     <xsl:copy-of select="/bedeworkadmin/formElements/form/end/dateTime/ampm/*"/>
500                   </xsl:if>
501                   <xsl:text> </xsl:text>
502                   <a href="javascript:launchClockMap('showClockMap.do?dateType=eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a>
503                 </div>
504               </div><br/>
505               <div class="dateFields">
506                 <xsl:choose>
507                   <xsl:when test="/bedeworkadmin/formElements/form/end/type='D'">
508                     <input type="radio" name="eventEndType" value="D" checked="checked" onClick="changeClass('endDateTime','hidden');changeClass('endDuration','shown');"/>
509                   </xsl:when>
510                   <xsl:otherwise>
511                     <input type="radio" name="eventEndType" value="D" onClick="changeClass('endDateTime','hidden');changeClass('endDuration','shown');"/>
512                   </xsl:otherwise>
513                 </xsl:choose>
514                 Duration
515                 <xsl:variable name="endDurationClass">
516                   <xsl:choose>
517                     <xsl:when test="/bedeworkadmin/formElements/form/end/type='D'">shown</xsl:when>
518                     <xsl:otherwise>hidden</xsl:otherwise>
519                   </xsl:choose>
520                 </xsl:variable>
521                 <div class="{$endDurationClass}" id="endDuration">
522                   <div class="durationBox">
523                     <input type="radio" name="eventDuration.type" value="daytime" checked="checked"/>
524                     <xsl:copy-of select="/bedeworkadmin/formElements/form/end/duration/days/*"/>days
525                     <xsl:copy-of select="/bedeworkadmin/formElements/form/end/duration/hours/*"/>hours
526                     <xsl:copy-of select="/bedeworkadmin/formElements/form/end/duration/minutes/*"/>minutes
527                   </div>
528                   <span class="durationSpacerText">or</span>
529                   <div class="durationBox">
530                     <input type="radio" name="eventDuration.type" value="weeks"/>
531                     <xsl:copy-of select="/bedeworkadmin/formElements/form/end/duration/weeks/*"/>weeks
532                   </div>
533                 </div>
534               </div><br/>
535               <xsl:variable name="noDurationClass">
536                 <xsl:choose>
537                   <xsl:when test="/bedeworkadmin/formElements/form/allDay/input/@checked='checked'">hidden</xsl:when>
538                   <xsl:otherwise>dateFields</xsl:otherwise>
539                 </xsl:choose>
540               </xsl:variable>
541               <div class="{$noDurationClass}" id="noDuration">
542                 <xsl:choose>
543                   <xsl:when test="/bedeworkadmin/formElements/form/end/type='N'">
544                     <input type="radio" name="eventEndType" value="N" checked="checked" onClick="changeClass('endDateTime','hidden');changeClass('endDuration','hidden');"/>
545                   </xsl:when>
546                   <xsl:otherwise>
547                     <input type="radio" name="eventEndType" value="N" onClick="changeClass('endDateTime','hidden');changeClass('endDuration','hidden');"/>
548                   </xsl:otherwise>
549                 </xsl:choose>
550                 This event has no duration / end date
551               </div>
552             </div>
553           </td>
554         </tr>
555
556         <!--  Category  -->
557         <tr>
558           <td class="fieldName">
559             Category**:
560           </td>
561           <td>
562             <xsl:if test="/bedeworkadmin/formElements/form/calendar/preferred/select/option">
563               <select name="prefCategoryId">
564                 <option value="-1">
565                   Select preferred:
566                 </option>
567                 <xsl:copy-of select="/bedeworkadmin/formElements/form/category/preferred/select/*"/>
568               </select>
569               Category (all):
570             </xsl:if>
571             <select name="categoryId">
572               <option value="-1">
573                 Select:
574               </option>option>
575               <xsl:copy-of select="/bedeworkadmin/formElements/form/category/all/select/*"/>
576             </select>
577           </td>
578         </tr>
579
580         <!--  Description  -->
581         <tr>
582           <td class="fieldName">
583             Description:
584           </td>
585           <td>
586             <xsl:copy-of select="/bedeworkadmin/formElements/form/desc/*"/>
587             <div class="fieldInfo">
588               Enter all pertinent information, including the academic titles of
589               all speakers and/or participants.
590               <span class="maxCharNotice">(<xsl:value-of select="/bedeworkadmin/formElements/form/descLength"/> characters max.)</span>
591             </div>
592           </td>
593         </tr>
594         <!-- Cost -->
595         <tr>
596           <td class="optional">
597             Price:
598           </td>
599           <td>
600             <xsl:copy-of select="/bedeworkadmin/formElements/form/cost/*"/>
601             <xsl:text> </xsl:text>
602             <span class="fieldInfo">(optional: if any, and place to purchase tickets)</span>
603           </td>
604         </tr>
605         <!-- Url -->
606         <tr>
607           <td class="optional">
608             URL:
609           </td>
610           <td>
611             <xsl:copy-of select="/bedeworkadmin/formElements/form/link/*"/>
612             <xsl:text> </xsl:text>
613             <span class="fieldInfo">(optional: for more information about the event)</span>
614           </td>
615         </tr>
616         <!-- Location -->
617         <tr>
618           <td class="fieldName">
619             Location**:
620           </td>
621           <td>
622             <xsl:if test="/bedeworkadmin/formElements/form/location/preferred/select/option">
623               <select name="prefLocationId">
624                 <option value="-1">
625                   Select preferred:
626                 </option>
627                 <xsl:copy-of select="/bedeworkadmin/formElements/form/location/preferred/select/*"/>
628               </select>
629               or Location (all):
630             </xsl:if>
631             <select name="locationId">
632               <option value="-1">
633                 Select:
634               </option>
635               <xsl:copy-of select="/bedeworkadmin/formElements/form/location/all/select/*"/>
636             </select>
637           </td>
638         </tr>
639
640        <xsl:if test="/bedeworkadmin/formElements/form/location/address">
641           <tr>
642             <td class="fieldName" colspan="2">
643               <span class="std-text"><span class="bold">or</span> add</span>
644             </td>
645           </tr>
646           <tr>
647             <td class="fieldName">
648               Address:
649             </td>
650             <td>
651               <xsl:variable name="addressFieldName" select="/bedeworkadmin/formElements/form/location/address/input/@name"/>
652               <xsl:variable name="calLocations">
653                 <xsl:for-each select="/bedeworkadmin/formElements/form/location/all/select/option">"<xsl:value-of select="."/>"<xsl:if test="position()!=last()">,</xsl:if></xsl:for-each>
654               </xsl:variable>
655               <input type="text" size="30" name="{$addressFieldName}" autocomplete="off" onfocus='autoComplete(this,event,new Array({$calLocations}));'/>
656               <div class="fieldInfo">
657                 Please include room, building, and campus (if not Seattle).
658               </div>
659             </td>
660           </tr>
661           <tr>
662             <td class="optional">
663               <span class="std-text">Location URL:</span>
664             </td>
665             <td>
666               <xsl:copy-of select="/bedeworkadmin/formElements/form/location/link/*"/>
667               <xsl:text> </xsl:text>
668               <span class="fieldInfo">(optional: for information about the location)</span>
669             </td>
670           </tr>
671         </xsl:if>
672
673         <!-- Sponsor -->
674         <tr>
675           <td class="fieldName">
676             Contact**:
677           </td>
678           <td>
679             <xsl:if test="/bedeworkadmin/formElements/form/sponsor/preferred/select/option">
680               <select name="prefSponsorId">
681                 <option value="-1">
682                   Select preferred:
683                 </option>option>
684                 <xsl:copy-of select="/bedeworkadmin/formElements/form/sponsor/preferred/select/*"/>
685               </select>
686               or Contact (all):
687             </xsl:if>
688             <select name="sponsorId">
689               <option value="-1">
690                 Select:
691               </option>
692               <xsl:copy-of select="/bedeworkadmin/formElements/form/sponsor/all/select/*"/>
693             </select>
694           </td>
695         </tr>
696         <tr>
697           <td colspan="2" style="padding-top: 1em;">
698             <span class="fieldInfo">
699               **<strong>If "preferred values" are enabled</strong>
700               by your administrator, the category, location, and contact lists will
701               contain only those value you've used previously.  If you don't find the value
702               you need in one of these lists, use the "all" list adjacent to each
703               of these fields.  The event you select from the "all" list will be added
704               to your preferred list from that point on.  <strong>Note: if you don't
705               find a location or contact at all, you can add a new one from the
706               <a href="{$setup}">main menu</a>.</strong>
707               Only administrators can create categories, however.
708               To make sure you've used the
709               correct category, please see the
710               <a href="" target="_blank">Calendar Definitions</a>
711             </span>
712           </td>
713         </tr>
714
715         <xsl:if test="/bedeworkadmin/formElements/form/sponsor/name">
716           <tr>
717             <td class="fieldName" colspan="2">
718               <span class="std-text"><span class="bold">or</span> add</span>
719             </td>
720           </tr>
721           <tr>
722             <td class="fieldName">
723               Contact:
724             </td>
725             <td>
726               <xsl:copy-of select="/bedeworkadmin/formElements/form/sponsor/name/*"/>
727             </td>
728           </tr>
729           <tr>
730             <td class="fieldName">
731               Contact Phone Number:
732             </td>
733             <td>
734               <xsl:copy-of select="/bedeworkadmin/formElements/form/sponsor/phone/*"/>-
735               <xsl:text> </xsl:text>
736               <span class="fieldInfo">(optional)</span>
737             </td>
738           </tr>
739           <tr>
740             <td class="optional">
741               Contact's URL:
742             </td>
743             <td>
744               <xsl:copy-of select="/bedeworkadmin/formElements/form/sponsor/link/*"/>
745               <xsl:text> </xsl:text>
746               <span class="fieldInfo">(optional)</span>
747             </td>
748           </tr>
749           <tr>
750             <td class="optional">
751               Contact Email Address:
752             </td>
753             <td>
754               <xsl:copy-of select="/bedeworkadmin/formElements/form/sponsor/email/*"/>
755               <xsl:text> </xsl:text>
756               <span class="fieldInfo">(optional)</span> test
757               <div id="sponsorEmailAlert">&#160;</div> <!-- space for email warning -->
758             </td>
759           </tr>
760         </xsl:if>
761       </table>
762
763       <table border="0" width="100%" id="submitTable">
764         <tr>
765           <xsl:choose>
766             <xsl:when test="/bedeworkadmin/creating='true'">
767               <td>
768                 <input type="submit" name="addEvent" value="Add Event" class="padRight"/>
769                 <input type="submit" name="cancelled" value="Cancel"/>
770                 <input type="reset" value="Clear"/>
771               </td>
772             </xsl:when>
773             <xsl:otherwise>
774               <td>
775                 <input type="submit" name="updateEvent" value="Update Event" class="padRight"/>
776                 <input type="submit" name="cancelled" value="Cancel" class="padRight"/>
777                 <input type="reset" value="Reset" class="padRight"/>
778                 <input type="submit" name="copy" value="Duplicate Event"/>
779               </td>
780               <td align="right">
781                 <input type="submit" name="delete" value="Delete Event"/>
782               </td>
783             </xsl:otherwise>
784           </xsl:choose>
785         </tr>
786       </table>
787     </form>
788   </xsl:template>
789
790   <xsl:template match="event" mode="displayEvent">
791     <h2>Event Information</h2>
792
793     <table class="eventFormTable">
794       <tr>
795         <td class="fieldName">
796           ID:
797         </td>
798         <td>
799           <xsl:value-of select="id"/>
800         </td>
801       </tr>
802
803       <tr>
804         <td class="fieldName">
805           Title:
806         </td>
807         <td>
808           <xsl:value-of select="title"/>
809         </td>
810       </tr>
811
812       <tr>
813         <td class="fieldName">
814           Calendar:
815         </td>
816         <td>
817           <xsl:value-of select="calendar"/>
818         </td>
819       </tr>
820
821       <tr>
822         <td class="fieldName">
823           Start:
824         </td>
825         <td>
826           <xsl:value-of select="start/year"/>-<xsl:value-of select="start/month"/>-<xsl:value-of select="start/day"/>
827           <xsl:text> </xsl:text>
828           <xsl:choose>
829             <xsl:when test="start/allDay='true'">
830               <strong>all day event</strong>
831             </xsl:when>
832             <xsl:otherwise>
833               <xsl:value-of select="start/hour"/>:<xsl:value-of select="start/minute"/>
834               <xsl:if test="start/ampm">
835                 <xsl:value-of select="start/ampm"/>
836               </xsl:if>
837             </xsl:otherwise>
838           </xsl:choose>
839         </td>
840       </tr>
841       <tr>
842         <td class="fieldName">
843           End:
844         </td>
845         <td>
846           <xsl:choose>
847             <xsl:when test="end/endtype = 'none'">
848               <div class="dateFields" id="noDuration">
849                 This event has no duration / end date
850               </div>
851             </xsl:when>
852             <xsl:when test="end/endtype = 'duration'">
853               <div class="dateFields">
854                 <div class="hidden" id="endDuration">
855                   <div class="durationBox">
856                     <input type="text" name="eventDuration.daysStr" size="2" value="0" onChange="window.document.peForm.durationType[0].checked = true;"/>days
857                     <input type="text" name="eventDuration.hoursStr" size="2" value="1" onChange="window.document.peForm.durationType[0].checked = true;"/>hours
858                     <input type="text" name="eventDuration.minutesStr" size="2" value="0" onChange="window.document.peForm.durationType[0].checked = true;"/>minutes
859                   </div>
860                   <span class="durationSpacerText">or</span>
861                   <div class="durationBox">
862                     <input type="text" name="eventDuration.weeksStr" size="2" value="0" onChange="window.document.peForm.durationType[1].checked = true;"/>weeks
863                   </div>
864                 </div>
865               </div>
866             </xsl:when>
867             <xsl:otherwise>
868               <xsl:value-of select="end/dateTime/year"/>-<xsl:value-of select="end/dateTime/month"/>-<xsl:value-of select="end/dateTime/day"/>
869               <xsl:text> </xsl:text>
870               <xsl:value-of select="end/dateTime/hour"/>:<xsl:value-of select="end/dateTime/minute"/>
871               <xsl:text> </xsl:text>
872               <xsl:if test="end/dateTime/ampm">
873                 <xsl:value-of select="end/dateTime/ampm"/>
874               </xsl:if>
875             </xsl:otherwise>
876           </xsl:choose>
877         </td>
878       </tr>
879
880       <!--  Category  -->
881       <tr>
882         <td class="fieldName">
883           Category:
884         </td>
885         <td>
886           <xsl:value-of select="category"/>
887         </td>
888       </tr>
889
890       <!--  Description  -->
891       <tr>
892         <td class="fieldName">
893           Description:
894         </td>
895         <td>
896           <xsl:value-of select="desc"/>
897         </td>
898       </tr>
899       <!-- Cost -->
900       <tr>
901         <td class="optional">
902           Price:
903         </td>
904         <td>
905           <xsl:value-of select="cost"/>
906         </td>
907       </tr>
908       <!-- Url -->
909       <tr>
910         <td class="optional">
911           URL:
912         </td>
913         <td>
914           <xsl:variable name="eventLink" select="link"/>
915           <a href="{$eventLink}"><xsl:value-of select="link"/></a>
916         </td>
917       </tr>
918       <!-- Location -->
919       <tr>
920         <td class="fieldName">
921           Location:
922         </td>
923         <td>
924           <xsl:value-of select="location"/>
925         </td>
926       </tr>
927
928       <!-- Sponsor -->
929       <tr>
930         <td class="fieldName">
931           Contact:
932         </td>
933         <td>
934           <xsl:value-of select="sponsor"/>
935         </td>
936       </tr>
937
938       <!-- Owner -->
939       <tr>
940         <td class="fieldName">
941           Owner:
942         </td>
943         <td>
944           <xsl:value-of select="creator"/>
945         </td>
946       </tr>
947
948     </table>
949
950
951     <xsl:if test="/bedeworkadmin/canEdit = 'true' or /bedeworkadmin/userInfo/superUser = 'true'">
952       <xsl:variable name="id" select="id"/>
953       <h3><a href="{$event-fetchForUpdate}&amp;eventId={$id}">Edit Event</a></h3>
954     </xsl:if>
955   </xsl:template>
956
957   <!--+++++++++++++++ Sponsors (Contacts) ++++++++++++++++++++-->
958   <xsl:template name="sponsorList">
959     <p>
960       Select the contact you would like to update:
961     </p>
962
963     <table id="commonListTable">
964       <tr>
965         <th>Name</th>
966         <th>Phone</th>
967         <th>Email</th>
968         <th>URL</th>
969       </tr>
970
971       <xsl:for-each select="/bedeworkadmin/sponsors/sponsor">
972         <tr>
973           <td>
974             <xsl:copy-of select="name" />
975           </td>
976           <td>
977             <xsl:value-of select="phone" />
978           </td>
979           <td>
980             <xsl:variable name="email" select="email"/>
981             <a href="mailto:{$email}">
982               <xsl:value-of select="email"/>
983             </a>
984           </td>
985           <td>
986             <xsl:variable name="link" select="link" />
987             <a href="{$link}" target="linktest">
988               <xsl:value-of select="link" />
989             </a>
990           </td>
991         </tr>
992       </xsl:for-each>
993     </table>
994   </xsl:template>
995
996   <xsl:template name="modSponsor">
997     <form action="{$sponsor-update}" method="post">
998       <h2>Contact Information</h2>
999
1000       <table id="eventFormTable">
1001         <tr>
1002           <td class="fieldName">
1003             Contact:
1004           </td>
1005           <td>
1006             <xsl:copy-of select="/bedeworkadmin/formElements/form/name/*"/>
1007           </td>
1008         </tr>
1009         <tr>
1010           <td class="fieldName">
1011             Contact Phone Number:
1012           </td>
1013           <td>
1014             <xsl:copy-of select="/bedeworkadmin/formElements/form/phone/*"/> -
1015             <span class="fieldInfo">(optional)</span>
1016           </td>
1017         </tr>
1018         <tr>
1019           <td class="optional">
1020             Contact's URL:
1021           </td>
1022           <td>
1023             <xsl:copy-of select="/bedeworkadmin/formElements/form/link/*"/>
1024             <span class="fieldInfo">(optional)</span>
1025           </td>
1026         </tr>
1027         <tr>
1028           <td class="optional">
1029             Contact Email Address:
1030           </td>
1031           <td>
1032             <xsl:copy-of select="/bedeworkadmin/formElements/form/email/*"/>
1033             <span class="fieldInfo">(optional)</span>
1034           </td>
1035         </tr>
1036       </table>
1037
1038       <table border="0" width="100%" id="submitTable">
1039         <tr>
1040           <xsl:choose>
1041             <xsl:when test="/bedeworkadmin/creating='true'">
1042               <td>
1043                 <input type="submit" name="addSponsor" value="Add Contact" class="padRight"/>
1044                 <input type="submit" name="forwardto" value="Cancel"/>
1045                 <input type="reset" value="Clear"/>
1046               </td>
1047             </xsl:when>
1048             <xsl:otherwise>
1049               <td>
1050                 <input type="submit" name="updateSponsor" value="Update Contact" class="padRight"/>
1051                 <input type="submit" name="forwardto" value="Cancel" class="padRight"/>
1052                 <input type="reset" value="Reset" class="padRight"/>
1053               </td>
1054               <td align="right">
1055                 <input type="submit" name="delete" value="Delete Contact"/>
1056               </td>
1057             </xsl:otherwise>
1058           </xsl:choose>
1059         </tr>
1060       </table>
1061
1062     </form>
1063   </xsl:template>
1064
1065   <xsl:template name="deleteSponsorConfirm">
1066     <p>
1067       <h2>Ok to delete this contact?</h2>
1068       <xsl:copy-of select="/bedeworkadmin/formElements/*"/>
1069     </p>
1070
1071     <table id="commonListTable">
1072       <tr>
1073         <th>Name</th>
1074         <td><xsl:value-of select="/bedeworkadmin/sponsor/name" /></td>
1075       </tr>
1076       <tr>
1077         <th>Phone</th>
1078         <td><xsl:value-of select="/bedeworkadmin/sponsor/phone" /></td>
1079       </tr>
1080       <tr>
1081         <th>Email</th>
1082         <td><xsl:value-of select="/bedeworkadmin/sponsor/email" /></td>
1083       </tr>
1084       <tr>
1085         <th>URL</th>
1086         <td><xsl:value-of select="/bedeworkadmin/sponsor/link" /></td>
1087       </tr>
1088     </table>
1089   </xsl:template>
1090
1091    <!--+++++++++++++++ Locations ++++++++++++++++++++-->
1092   <xsl:template name="locationList">
1093     <p>
1094       Select the location that you would like to update:
1095     </p>
1096
1097     <table id="commonListTable">
1098       <tr>
1099         <th>Address</th>
1100         <th>Subaddress</th>
1101         <th>URL</th>
1102       </tr>
1103
1104       <xsl:for-each select="/bedeworkadmin/locations/location">
1105         <tr>
1106           <td>
1107             <xsl:copy-of select="address/*"/>
1108           </td>
1109           <td>
1110             <xsl:value-of select="subaddress"/>
1111           </td>
1112           <td>
1113             <xsl:variable name="link" select="link" />
1114             <a href="{$link}" target="linktest">
1115               <xsl:value-of select="link" />
1116             </a>
1117           </td>
1118         </tr>
1119       </xsl:for-each>
1120     </table>
1121   </xsl:template>
1122
1123   <xsl:template name="modLocation">
1124     <form action="{$location-update}" method="post">
1125       <h2>Location Information</h2>
1126
1127       <table id="eventFormTable">
1128         <tr>
1129           <td class="fieldName">
1130             Address:
1131           </td>
1132           <td>
1133             <xsl:copy-of select="/bedeworkadmin/formElements/form/address/*"/>
1134           </td>
1135         </tr>
1136         <tr>
1137           <td class="optional">
1138             Subaddress:
1139           </td>
1140           <td>
1141             <xsl:copy-of select="/bedeworkadmin/formElements/form/subaddress/*"/>
1142             <span class="fieldInfo">(optional)</span>
1143           </td>
1144         </tr>
1145         <tr>
1146           <td class="optional">
1147             Location's URL:
1148           </td>
1149           <td>
1150             <xsl:copy-of select="/bedeworkadmin/formElements/form/link/*"/>
1151             <span class="fieldInfo">(optional)</span>
1152           </td>
1153         </tr>
1154       </table>
1155
1156       <table border="0" width="100%" id="submitTable">
1157         <tr>
1158           <xsl:choose>
1159             <xsl:when test="/bedeworkadmin/creating='true'">
1160               <td>
1161                 <input type="submit" name="addLocation" value="Add Location" class="padRight"/>
1162                 <input type="submit" name="forwardto" value="Cancel"/>
1163                 <input type="reset" value="Clear"/>
1164               </td>
1165             </xsl:when>
1166             <xsl:otherwise>
1167               <td>
1168                 <input type="submit" name="updateLocation" value="Update Location" class="padRight"/>
1169                 <input type="submit" name="forwardto" value="Cancel" class="padRight"/>
1170                 <input type="reset" value="Reset" class="padRight"/>
1171               </td>
1172               <td align="right">
1173                 <input type="submit" name="delete" value="Delete Contact"/>
1174               </td>
1175             </xsl:otherwise>
1176           </xsl:choose>
1177         </tr>
1178       </table>
1179     </form>
1180   </xsl:template>
1181
1182   <xsl:template name="deleteLocationConfirm">
1183     <h2>Ok to delete this location?</h2>
1184     <xsl:copy-of select="/bedeworkadmin/formElements/*"/>
1185
1186     <table id="eventFormTable">
1187         <tr>
1188           <td class="fieldName">
1189             Address:
1190           </td>
1191           <td>
1192             <xsl:copy-of select="/bedeworkadmin/location/address/*"/>
1193           </td>
1194         </tr>
1195         <tr>
1196           <td class="optional">
1197             Subaddress:
1198           </td>
1199           <td>
1200             <xsl:copy-of select="/bedeworkadmin/location/subaddress/*"/>
1201             <span class="fieldInfo">(optional)</span>
1202           </td>
1203         </tr>
1204         <tr>
1205           <td class="optional">
1206             Location's URL:
1207           </td>
1208           <td>
1209             <xsl:copy-of select="/bedeworkadmin/location/link/*"/>
1210             <span class="fieldInfo">(optional)</span>
1211           </td>
1212         </tr>
1213       </table>
1214   </xsl:template>
1215
1216 <!--+++++++++++++++ Calendars ++++++++++++++++++++-->
1217   <xsl:template match="calendars">
1218     <table id="calendarTable">
1219       <tr>
1220         <td class="cals">
1221           <h3>Public calendars</h3>
1222           <ul id="calendarTree">
1223             <xsl:apply-templates select="calendar" mode="calendars"/>
1224           </ul>
1225         </td>
1226         <td class="calendarContent">
1227           <xsl:choose>
1228             <xsl:when test="/bedeworkadmin/page='calendarList'">
1229               <xsl:call-template name="calendarList"/>
1230             </xsl:when>
1231             <xsl:when test="/bedeworkadmin/creating='true'">
1232               <xsl:apply-templates select="/bedeworkadmin/currentCalendar" mode="addCalendar"/>
1233             </xsl:when>
1234             <xsl:otherwise>
1235               <xsl:apply-templates select="/bedeworkadmin/currentCalendar" mode="modCalendar"/>
1236             </xsl:otherwise>
1237           </xsl:choose>
1238         </td>
1239       </tr>
1240     </table>
1241   </xsl:template>
1242
1243   <xsl:template match="calendar" mode="calendars">
1244     <xsl:variable name="id" select="id"/>
1245     <xsl:variable name="itemClass">
1246       <xsl:choose>
1247         <xsl:when test="calendarCollection='false'">folder</xsl:when>
1248         <xsl:otherwise>calendar</xsl:otherwise>
1249       </xsl:choose>
1250     </xsl:variable>
1251     <li class="{$itemClass}">
1252       <a href="{$calendar-fetchForUpdate}&amp;calId={$id}" title="update">
1253         <xsl:value-of select="name"/>
1254       </a>
1255       <xsl:if test="calendarCollection='false'">
1256         <xsl:text> </xsl:text>
1257         <a href="{$calendar-initAdd}&amp;calId={$id}" title="add a calendar or folder">
1258           <img src="{$resourcesRoot}/resources/calAddIcon.gif" width="13" height="13" alt="add a calendar or folder" border="0"/>
1259         </a>
1260       </xsl:if>
1261       <xsl:if test="calendar">
1262         <ul>
1263           <xsl:apply-templates select="calendar" mode="calendars">
1264             <xsl:sort select="title" order="ascending" case-order="upper-first"/>
1265           </xsl:apply-templates>
1266         </ul>
1267       </xsl:if>
1268     </li>
1269   </xsl:template>
1270
1271   <xsl:template match="currentCalendar" mode="addCalendar">
1272     <h3>Add Calendar / Folder</h3>
1273     <form name="modCalForm" action="{$calendar-update}">
1274       <table class="eventFormTable">
1275         <tr>
1276           <th>Name:</th>
1277           <td>
1278             <xsl:value-of select="name"/>
1279           </td>
1280         </tr>
1281       </table>
1282     </form>
1283   </xsl:template>
1284
1285   <xsl:template match="currentCalendar" mode="modCalendar">
1286     <xsl:choose>
1287       <xsl:when test="calendarCollection='true'">
1288         <h3>Modify Calendar</h3>
1289       </xsl:when>
1290       <xsl:otherwise>
1291         <h3>Modify Folder</h3>
1292       </xsl:otherwise>
1293     </xsl:choose>
1294     <form name="modCalForm" action="{$calendar-update}">
1295       <table class="eventFormTable">
1296         <tr>
1297           <th>Path:</th>
1298           <td>
1299             <xsl:value-of select="path"/>
1300           </td>
1301         </tr>
1302         <tr>
1303           <th>Name:</th>
1304           <td>
1305             <xsl:value-of select="name"/>
1306           </td>
1307         </tr>
1308         <tr>
1309           <th>Summary:</th>
1310           <td>
1311             <xsl:variable name="curCalSummary" select="summary"/>
1312             <input type="text" name="calendar.summary" value="{$curCalSummary}" size="40"/>
1313           </td>
1314         </tr>
1315         <tr>
1316           <th>Description:</th>
1317           <td>
1318             <textarea name="calendar.description" width="60" height="20">
1319               <xsl:value-of select="desc"/>
1320             </textarea>
1321           </td>
1322         </tr>
1323         <tr>
1324           <th>Calendar/Folder:</th>
1325           <td>
1326             <xsl:choose>
1327               <xsl:when test="calendarCollection='true'">
1328                 <input type="radio" value="true" name="calendarCollection" checked="checked"/> Calendar
1329                 <input type="radio" value="false" name="calendarCollection"/> Folder
1330               </xsl:when>
1331               <xsl:otherwise>
1332                 <input type="radio" value="true" name="calendarCollection"/> Calendar
1333                 <input type="radio" value="false" name="calendarCollection" checked="checked"/> Folder
1334               </xsl:otherwise>
1335             </xsl:choose>
1336           </td>
1337         </tr>
1338       </table>
1339
1340       <table border="0" width="100%" id="submitTable">
1341         <tr>
1342           <td>
1343             <input type="submit" name="updateCalendar" value="Update Calendar" class="padRight"/>
1344             <input type="submit" name="cancelled" value="Cancel" class="padRight"/>
1345             <input type="reset" value="Reset" class="padRight"/>
1346           </td>
1347           <td align="right">
1348             <input type="submit" name="delete" value="Delete Calendar"/>
1349           </td>
1350         </tr>
1351       </table>
1352
1353       <xsl:choose>
1354         <xsl:when test="calendarCollection='true'">
1355           <p><a href="">convert to folder</a> (calendar must be empty)</p>
1356         </xsl:when>
1357         <xsl:otherwise>
1358           <p><a href="">convert to calendar</a> (folder must be empty)</p>
1359         </xsl:otherwise>
1360       </xsl:choose>
1361     </form>
1362   </xsl:template>
1363
1364   <xsl:template name="calendarList">
1365     <h3>Manage Calendars</h3>
1366     <ul>
1367       <li>Select an item from the calendar list on the left to modify
1368       a calendar or folder.</li>
1369       <li>Select the
1370       <img src="{$resourcesRoot}/resources/calAddIcon.gif" width="13" height="13" alt="true" border="0"/>
1371       icon to add a new calendar or folder to the tree.
1372         <ul>
1373           <li>Folders may only contain calendars and subfolders.</li>
1374           <li>Calendars may only contain events (and other calendar items).</li>
1375           <li>
1376             If a calendar is empty, it may be converted to a folder and vice
1377             versa.  If a calendar or folder are not empty, it may not be
1378             converted.
1379           </li>
1380         </ul>
1381       </li>
1382     </ul>
1383   </xsl:template>
1384
1385   <!--+++++++++++++++ Subscriptions ++++++++++++++++++++-->
1386   <xsl:template match="subscriptions">
1387     <table id="subsTable">
1388       <tr>
1389         <td class="cals">
1390           <h3>Public calendars</h3>
1391           <p class="smaller">
1392             Select a calendar below to add a <em><strong>new</strong></em>
1393             internal subscription or
1394             <a href="{$subscriptions-initAdd}&amp;calUri=please enter a calendar uri">subscribe to an external calendar</a>.
1395           </p>
1396           <ul id="calendarTree">
1397             <xsl:apply-templates select="/bedeworkadmin/subscriptions/subscribe/calendars/calendar" mode="subscribe"/>
1398           </ul>
1399         </td>
1400         <td class="subs">
1401           <xsl:choose>
1402             <xsl:when test="/bedeworkadmin/page='subscriptions'">
1403               <xsl:call-template name="subscriptionList"/>
1404             </xsl:when>
1405             <xsl:when test="/bedeworkadmin/creating='true'">
1406               <xsl:apply-templates select="subscription" mode="addSubscription"/>
1407             </xsl:when>
1408             <xsl:otherwise>
1409               <xsl:apply-templates select="subscription" mode="modSubscription"/>
1410             </xsl:otherwise>
1411           </xsl:choose>
1412         </td>
1413       </tr>
1414     </table>
1415   </xsl:template>
1416
1417   <xsl:template match="calendar" mode="subscribe">
1418     <xsl:variable name="id" select="id"/>
1419     <xsl:variable name="itemClass">
1420       <xsl:choose>
1421         <xsl:when test="calendarCollection='false'">folder</xsl:when>
1422         <xsl:otherwise>calendar</xsl:otherwise>
1423       </xsl:choose>
1424     </xsl:variable>
1425     <li class="{$itemClass}">
1426       <a href="{$subscriptions-initAdd}&amp;calId={$id}">
1427         <xsl:value-of select="name"/>
1428       </a>
1429       <xsl:if test="calendar">
1430         <ul>
1431           <xsl:apply-templates select="calendar" mode="subscribe">
1432             <xsl:sort select="title" order="ascending" case-order="upper-first"/>
1433           </xsl:apply-templates>
1434         </ul>
1435       </xsl:if>
1436     </li>
1437   </xsl:template>
1438
1439   <xsl:template match="subscription" mode="addSubscription">
1440     <h2>Add new subscription</h2>
1441     <p class="note">*the subsciption name must be unique</p>
1442     <form name="subscribeForm" action="{$subscriptions-subscribe}" method="post">
1443       <table class="eventFormTable">
1444         <tr>
1445           <th>Name*:</th>
1446           <td>
1447             <xsl:variable name="subName" select="name"/>
1448             <input value="{$subName}" name="subscription.name" size="60"/>
1449           </td>
1450         </tr>
1451         <xsl:if test="internal='false'">
1452           <tr>
1453             <th>Uri:</th>
1454             <td>
1455               <xsl:variable name="subUri" select="uri"/>
1456               <input value="{$subUri}" name="subscription.uri" size="60"/>
1457             </td>
1458           </tr>
1459         </xsl:if>
1460         <tr>
1461           <th>Display:</th>
1462           <td>
1463             <input type="radio" value="true" name="subscription.display"/> yes
1464             <input type="radio" value="false" name="subscription.display" checked="checked"/> no
1465           </td>
1466         </tr>
1467         <tr>
1468           <th>Style:</th>
1469           <td>
1470             <xsl:variable name="subStyle" select="style"/>
1471             <input value="{$subStyle}" name="subscription.style" size="60"/>
1472           </td>
1473         </tr>
1474       </table>
1475       <table border="0" width="100%" id="submitTable">
1476         <tr>
1477           <td>
1478             <input type="submit" name="addSubscription" value="Add Subscription" class="padRight"/>
1479             <input type="submit" name="cancelled" value="Cancel"/>
1480             <input type="reset" value="Clear"/>
1481           </td>
1482         </tr>
1483       </table>
1484     </form>
1485   </xsl:template>
1486
1487   <xsl:template match="subscription" mode="modSubscription">
1488     <h2>Modify subscription</h2>
1489     <form name="subscribeForm" action="{$subscriptions-subscribe}" method="post">
1490       <table class="eventFormTable">
1491         <tr>
1492           <th>Name*:</th>
1493           <td>
1494             <xsl:value-of select="name"/>
1495           </td>
1496         </tr>
1497         <xsl:choose>
1498           <xsl:when test="internal='false'">
1499             <tr>
1500               <th>Uri:</th>
1501               <td>
1502                 <xsl:variable name="subUri" select="uri"/>
1503                 <input value="{$subUri}" name="subscription.uri" size="60"/>
1504               </td>
1505             </tr>
1506           </xsl:when>
1507           <xsl:otherwise>
1508             <tr>
1509               <th>Uri:</th>
1510               <td>
1511                 <xsl:value-of select="uri"/>
1512               </td>
1513             </tr>
1514           </xsl:otherwise>
1515         </xsl:choose>
1516         <tr>
1517           <th>Display:</th>
1518           <td>
1519             <xsl:choose>
1520               <xsl:when test="display='true'">
1521                 <input type="radio" value="true" name="subscription.display" checked="checked"/> yes
1522                 <input type="radio" value="false" name="subscription.display"/> no
1523               </xsl:when>
1524               <xsl:otherwise>
1525                 <input type="radio" value="true" name="subscription.display"/> yes
1526                 <input type="radio" value="false" name="subscription.display" checked="checked"/> no
1527               </xsl:otherwise>
1528             </xsl:choose>
1529           </td>
1530         </tr>
1531         <tr>
1532           <th>Style:</th>
1533           <td>
1534             <xsl:variable name="subStyle" select="style"/>
1535             <input value="{$subStyle}" name="subscription.style" size="60"/>
1536           </td>
1537         </tr>
1538       </table>
1539       <table border="0" width="100%" id="submitTable">
1540         <tr>
1541           <td>
1542             <input type="submit" name="updateSubscription" value="Update Subscription" class="padRight"/>
1543             <input type="submit" name="cancelled" value="Cancel" class="padRight"/>
1544             <input type="reset" value="Reset" class="padRight"/>
1545           </td>
1546           <td align="right">
1547             <input type="submit" name="delete" value="Delete Subscription"/>
1548           </td>
1549         </tr>
1550       </table>
1551     </form>
1552   </xsl:template>
1553
1554   <xsl:template name="subscriptionList">
1555     <h3>Current subscriptions</h3>
1556     <table id="commonListTable">
1557       <tr>
1558         <th>Name</th>
1559         <th>URI</th>
1560         <th>Style</th>
1561         <th>Display</th>
1562         <th>External</th>
1563         <th>Deleted?</th>
1564       </tr>
1565       <xsl:for-each select="subscription">
1566         <xsl:sort select="name" order="ascending" case-order="upper-first"/>
1567         <tr>
1568           <td>
1569             <xsl:variable name="subname" select="name"/>
1570             <a href="{$subscriptions-fetchForUpdate}&amp;subname={$subname}">
1571               <xsl:value-of select="name"/>
1572             </a>
1573           </td>
1574           <td>
1575             <xsl:value-of select="uri"/>
1576           </td>
1577           <td>
1578             <xsl:value-of select="style"/>
1579           </td>
1580           <td class="center">
1581             <xsl:if test="display='true'">
1582               <img src="{$resourcesRoot}/resources/greenCheckIcon.gif" width="13" height="13" alt="true" border="0"/>
1583             </xsl:if>
1584           </td>
1585           <td class="center">
1586             <xsl:if test="internal='false'">
1587               <img src="{$resourcesRoot}/resources/greenCheckIcon.gif" width="13" height="13" alt="true" border="0"/>
1588             </xsl:if>
1589           </td>
1590           <td class="center">
1591             <xsl:if test="calendarDeleted='true'">
1592               <img src="{$resourcesRoot}/resources/redCheckIcon.gif" width="13" height="13" alt="true" border="0"/>
1593             </xsl:if>
1594           </td>
1595         </tr>
1596       </xsl:for-each>
1597     </table>
1598     <h4><a href="{$subscriptions-initAdd}&amp;calUri=please enter a calendar uri">Subscribe to a remote calendar</a> (by URI)</h4>
1599   </xsl:template>
1600
1601   <!--+++++++++++++++ Views ++++++++++++++++++++-->
1602   <xsl:template match="views" mode="viewList">
1603
1604     <h3>Add a new view</h3>
1605     <form name="addView" action="{$view-addView}" method="post">
1606       <input type="text" name="name" size="60"/>
1607       <input type="submit" value="add view" name="addview"/>
1608     </form>
1609
1610     <h3>Views</h3>
1611     <table id="commonListTable">
1612       <tr>
1613         <th>Name</th>
1614         <th>Included subscriptions</th>
1615       </tr>
1616
1617       <xsl:for-each select="view">
1618         <xsl:sort select="name" order="ascending" case-order="upper-first"/>
1619         <tr>
1620           <td>
1621             <xsl:variable name="viewName" select="name"/>
1622             <a href="{$view-fetchForUpdate}&amp;name={$viewName}">
1623               <xsl:value-of select="name"/>
1624             </a>
1625           </td>
1626           <td>
1627             <xsl:for-each select="subscriptions/subscription">
1628               <xsl:value-of select="name"/>
1629               <xsl:if test="position()!=last()">, </xsl:if>
1630             </xsl:for-each>
1631           </td>
1632         </tr>
1633       </xsl:for-each>
1634     </table>
1635   </xsl:template>
1636
1637   <xsl:template name="modView">
1638     <xsl:variable name="viewName" select="/bedeworkadmin/views/view/name"/>
1639
1640     <h2>Update View</h2>
1641
1642     <h3 class="viewName"><xsl:value-of select="$viewName"/></h3>
1643     <table id="viewsTable">
1644       <tr>
1645         <td class="subs">
1646           <h3>Available Subscriptions:</h3>
1647
1648           <table class="subscriptionsList">
1649             <xsl:for-each select="/bedeworkadmin/subscriptions/subscription">
1650               <xsl:sort select="name" order="ascending" case-order="upper-first"/>
1651               <xsl:if test="not(/bedeworkadmin/views/view/subscriptions/subscription/name=name)">
1652                 <tr>
1653                   <td>
1654                     <xsl:value-of select="name"/>
1655                   </td>
1656                   <td>
1657                     <xsl:variable name="subAddName" select="name"/>
1658                     <a href="{$view-update}&amp;name={$viewName}&amp;add={$subAddName}">
1659                       <img src="{$resourcesRoot}/resources/arrowRight.gif"
1660                         width="13" height="13" border="0"
1661                         alt="add subscription"/>
1662                     </a>
1663                   </td>
1664                 </tr>
1665               </xsl:if>
1666             </xsl:for-each>
1667           </table>
1668         </td>
1669         <td class="view">
1670           <h3>Active Subscriptions:</h3>
1671           <table class="subscriptionsList">
1672             <xsl:for-each select="/bedeworkadmin/views/view/subscriptions/subscription">
1673               <xsl:sort select="name" order="ascending" case-order="upper-first"/>
1674               <tr>
1675                 <td>
1676                   <xsl:variable name="subRemoveName" select="name"/>
1677                   <a href="{$view-update}&amp;name={$viewName}&amp;remove={$subRemoveName}">
1678                     <img src="{$resourcesRoot}/resources/arrowLeft.gif"
1679                         width="13" height="13" border="0"
1680                         alt="add subscription"/>
1681                   </a>
1682                 </td>
1683                 <td>
1684                   <xsl:value-of select="name"/>
1685                 </td>
1686               </tr>
1687             </xsl:for-each>
1688           </table>
1689         </td>
1690       </tr>
1691     </table>
1692
1693     <p><a href="{$view-fetch}">return to views listing</a></p>
1694   </xsl:template>
1695
1696   <!--+++++++++++++++ Timezones ++++++++++++++++++++-->
1697   <xsl:template name="uploadTimezones">
1698     <h2>Upload Timezones</h2>
1699     <xsl:copy-of select="/bedeworkadmin/formElements/*"/>
1700   </xsl:template>
1701
1702   <!--+++++++++++++++ Authuser ++++++++++++++++++++-->
1703   <xsl:template name="authUserList">
1704
1705     <p>Click on the user that you would like to update:</p>
1706
1707     <table id="commonListTable">
1708       <tr>
1709         <th>Userid</th>
1710         <th>Roles</th>
1711       </tr>
1712
1713       <xsl:for-each select="bedeworkadmin/authUsers/authUser">
1714         <tr>
1715           <td>
1716             <xsl:copy-of select="account/*"/>
1717           </td>
1718           <td>
1719             <xsl:if test="publicEventUser='true'">
1720               publicEvent; <xsl:text> </xsl:text>
1721             </xsl:if>
1722             <xsl:if test="superUser='true'">
1723               superUser; <xsl:text> </xsl:text>
1724             </xsl:if>
1725             <xsl:if test="alertUser='true'">
1726               alert; <xsl:text> </xsl:text>
1727             </xsl:if>
1728           </td>
1729         </tr>
1730       </xsl:for-each>
1731     </table>
1732   </xsl:template>
1733
1734   <xsl:template name="modAuthUser">
1735
1736     <xsl:variable name="modAuthUserAction" select="/bedeworkadmin/formElements/form/@action"/>
1737     <form action="{$modAuthUserAction}" method="post">
1738       <table id="eventFormTable">
1739         <tr>
1740           <td class="fieldName">
1741             Account:
1742           </td>
1743           <td>
1744             <xsl:value-of select="/bedeworkadmin/formElements/form/account"/>
1745           </td>
1746         </tr>
1747         <tr>
1748           <td class="fieldName">
1749             Alerts:
1750           </td>
1751           <td>
1752             <xsl:copy-of select="/bedeworkadmin/formElements/form/alerts/*"/>
1753           </td>
1754         </tr>
1755         <tr>
1756           <td class="fieldName">
1757             Public Events:
1758           </td>
1759           <td>
1760             <xsl:copy-of select="/bedeworkadmin/formElements/form/publicEvents/*"/>
1761           </td>
1762         </tr>
1763         <tr>
1764           <td class="fieldName">
1765             Super User:
1766           </td>
1767           <td>
1768             <xsl:copy-of select="/bedeworkadmin/formElements/form/superUser/*"/>
1769           </td>
1770         </tr>
1771         <tr>
1772           <td class="optional">
1773             Email:
1774           </td>
1775           <td>
1776             <xsl:copy-of select="/bedeworkadmin/formElements/form/email/*"/>
1777             <span class="fieldInfo">(optional)</span>
1778           </td>
1779         </tr>
1780         <tr>
1781           <td class="optional">
1782             Phone:
1783           </td>
1784           <td>
1785             <xsl:copy-of select="/bedeworkadmin/formElements/form/phone/*"/>
1786             <span class="fieldInfo">(optional)</span>
1787           </td>
1788         </tr>
1789         <tr>
1790           <td class="optional">
1791             Department:
1792           </td>
1793           <td>
1794             <xsl:copy-of select="/bedeworkadmin/formElements/form/dept/*"/>
1795             <span class="fieldInfo">(optional)</span>
1796           </td>
1797         </tr>
1798         <tr>
1799           <td class="optional">
1800             Last name:
1801           </td>
1802           <td>
1803             <xsl:copy-of select="/bedeworkadmin/formElements/form/lastName/*"/>
1804             <span class="fieldInfo">(optional)</span>
1805           </td>
1806         </tr>
1807         <tr>
1808           <td class="optional">
1809             First name:
1810           </td>
1811           <td>
1812             <xsl:copy-of select="/bedeworkadmin/formElements/form/firstName/*"/>
1813             <span class="fieldInfo">(optional)</span>
1814           </td>
1815         </tr>
1816       </table>
1817       <br />
1818
1819       <input type="submit" name="modAuthUser" value="Update"/>
1820       <input type="reset" value="Reset"/>
1821     </form>
1822   </xsl:template>
1823
1824
1825   <!--+++++++++++++++ Admin Groups ++++++++++++++++++++-->
1826
1827   <xsl:template name="listAdminGroups">
1828     <form name="adminGroupMembersForm" method="post" action="{$admingroup-initUpdate}">
1829       <xsl:choose>
1830         <xsl:when test="/bedeworkadmin/groups/showMembers='true'">
1831           <input type="radio" name="showAgMembers" value="false" onclick="document.adminGroupMembersForm.submit();"/>
1832           Hide members
1833           <input type="radio" name="showAgMembers" value="true" checked="checked" onclick="document.adminGroupMembersForm.submit();"/>
1834           Show members
1835         </xsl:when>
1836         <xsl:otherwise>
1837           <input type="radio" name="showAgMembers" value="false" checked="checked" onclick="document.adminGroupMembersForm.submit();"/>
1838           Hide members
1839           <input type="radio" name="showAgMembers" value="true" onclick="document.adminGroupMembersForm.submit();"/>
1840           Show members
1841         </xsl:otherwise>
1842       </xsl:choose>
1843     </form>
1844
1845     <p>Click on the group name to modify the group owner or description.<br/>
1846     Click "add/remove members" to modify group membership.</p>
1847
1848     <table id="commonListTable">
1849       <tr>
1850         <th>Name</th>
1851         <th>Description</th>
1852         <xsl:if test="/bedeworkadmin/groups/showMembers='true'">
1853           <th>Members</th>
1854         </xsl:if>
1855         <th></th>
1856       </tr>
1857       <xsl:for-each select="/bedeworkadmin/groups/group">
1858         <xsl:variable name="groupName"><xsl:copy-of select="name/*"/></xsl:variable>
1859         <!-- this data (groupname) apparently needs cleaning: there is %0A and other characters in it -->
1860         <tr>
1861           <td>
1862             <a href="{$admingroup-fetchForUpdate}&amp;adminGroupName={$groupName}">
1863               <xsl:value-of select="name"/>
1864             </a>
1865           </td>
1866           <td>
1867             <xsl:value-of select="desc"/>
1868           </td>
1869           <xsl:if test="/bedeworkadmin/groups/showMembers='true'">
1870             <td>
1871               <xsl:for-each select="members/member">
1872                   <xsl:value-of select="."/>&#160;
1873               </xsl:for-each>
1874             </td>
1875           </xsl:if>
1876           <td>
1877             <a href="{$admingroup-fetchForUpdateMembers}&amp;adminGroupName={$groupName}">Add/Remove members</a>
1878           </td>
1879         </tr>
1880       </xsl:for-each>
1881     </table>
1882   </xsl:template>
1883
1884   <xsl:template match="groups" mode="chooseGroup">
1885     <h2>Choose Your Administrative Group</h2>
1886
1887     <table id="commonListTable">
1888
1889       <tr>
1890         <th>Name</th>
1891         <th>Description</th>
1892       </tr>
1893
1894       <xsl:for-each select="group">
1895         <tr>
1896           <td>
1897             <xsl:copy-of select="name"/>
1898           </td>
1899           <td>
1900             <xsl:value-of select="desc"/>
1901           </td>
1902         </tr>
1903       </xsl:for-each>
1904     </table>
1905   </xsl:template>
1906
1907   <xsl:template name="modAdminGroup">
1908
1909     <form name="peForm" method="post" action="{$admingroup-update}">
1910       <table id="adminGroupFormTable">
1911         <tr>
1912           <td class="fieldName">
1913             Name:
1914           </td>
1915           <td>
1916             <xsl:choose>
1917               <xsl:when test="/bedeworkadmin/creating = 'true'">
1918                 <xsl:copy-of select="/bedeworkadmin/formElements/form/name/*"/>
1919               </xsl:when>
1920               <xsl:otherwise>
1921                 <xsl:value-of  select="/bedeworkadmin/formElements/form/name"/>
1922               </xsl:otherwise>
1923             </xsl:choose>
1924           </td>
1925         </tr>
1926         <tr>
1927           <td class="fieldName">
1928             Description:
1929           </td>
1930           <td>
1931             <xsl:copy-of select="/bedeworkadmin/formElements/form/desc/*"/>
1932           </td>
1933         </tr>
1934         <tr>
1935           <td class="fieldName">
1936             Group owner:
1937           </td>
1938           <td>
1939             <xsl:copy-of select="/bedeworkadmin/formElements/form/groupOwner/*"/>
1940           </td>
1941         </tr>
1942         <tr>
1943           <td class="fieldName">
1944             Events owner:
1945           </td>
1946           <td>
1947             <xsl:copy-of select="/bedeworkadmin/formElements/form/eventsOwner/*"/>
1948           </td>
1949         </tr>
1950       </table>
1951       <table border="0" width="100%" id="submitTable">
1952         <tr>
1953           <td>
1954             <xsl:choose>
1955               <xsl:when test="/bedeworkadmin/creating = 'true'">
1956                 <input type="submit" name="updateAdminGroup" value="Add Admin Group" class="padRight"/>
1957                 <input type="submit" name="cancelled" value="Cancel"/>
1958                 <input type="reset" value="Clear"/>
1959               </xsl:when>
1960               <xsl:otherwise>
1961                 <input type="submit" name="updateAdminGroup" value="Update Admin Group" class="padRight"/>
1962                 <input type="submit" name="cancelled" value="Cancel"/>
1963                 <input type="reset" value="Reset"/>
1964               </xsl:otherwise>
1965             </xsl:choose>
1966           </td>
1967           <td align="right">
1968             <input type="submit" name="delete" value="Delete"/>
1969           </td>
1970         </tr>
1971       </table>
1972     </form>
1973   </xsl:template>
1974
1975   <xsl:template name="modAdminGroupMembers">
1976
1977     <p><a href="{$admingroup-initUpdate}">return to Admin Group listing</a></p>
1978
1979     <form name="adminGroupMembersForm" method="post" action="{$admingroup-updateMembers}">
1980       <table id="adminGroupFormTable">
1981         <tr>
1982           <td class="fieldName">
1983             Name:
1984           </td>
1985           <td>
1986             <xsl:value-of select="/bedeworkadmin/adminGroup/name"/>
1987           </td>
1988         </tr>
1989         <tr>
1990           <td class="fieldName">
1991             Members:
1992           </td>
1993           <td>
1994             <xsl:for-each select="/bedeworkadmin/adminGroup/members/member">
1995               <xsl:value-of select="."/>&#160;
1996             </xsl:for-each>
1997           </td>
1998         </tr>
1999         <tr>
2000           <td class="fieldName">
2001             Add/remove member:
2002           </td>
2003           <td>
2004             <input type="text" name="updGroupMember" size="15"/>
2005             <input type="submit" name="addGroupMember" value="Add"/>
2006             <input type="submit" name="removeGroupMember" value="Remove"/>
2007           </td>
2008         </tr>
2009       </table>
2010     </form>
2011   </xsl:template>
2012
2013   <!--==== HEADER TEMPLATES and NAVIGATION  ====-->
2014
2015   <xsl:template name="header">
2016     <div id="header">
2017      <!-- Uncomment this code and replace the following logo
2018           to brand your administrative interface.
2019
2020       <img id="logo"
2021           alt="logo"
2022           src="{$resourcesRoot}/resources/caladminlogo.gif"
2023           align="right"
2024           border="0"/> -->
2025
2026       <!-- set the page heading: -->
2027       <h1>
2028         <xsl:choose>
2029           <xsl:when test="/bedeworkadmin/page='modEvent' or
2030                           /bedeworkadmin/page='eventList'">
2031             <xsl:choose>
2032               <xsl:when test="/bedeworkadmin/creating='true'">
2033                 Add a Public Event
2034               </xsl:when>
2035               <xsl:otherwise>
2036                 Update a Public Event
2037               </xsl:otherwise>
2038             </xsl:choose>
2039           </xsl:when>
2040           <xsl:when test="/bedeworkadmin/page='displayEvent'">
2041             Display Event
2042           </xsl:when>
2043           <xsl:when test="/bedeworkadmin/page='sponsorList'">
2044             Manage Contacts
2045           </xsl:when>
2046           <xsl:when test="/bedeworkadmin/page='modSponsor'">
2047             Update Contact Info
2048           </xsl:when>
2049           <xsl:when test="/bedeworkadmin/page='deleteSponsorConfirm'">
2050             Delete Contact
2051           </xsl:when>
2052           <xsl:when test="/bedeworkadmin/page='locationList'">
2053             Manage Locations
2054           </xsl:when>
2055           <xsl:when test="/bedeworkadmin/page='modLocation'">
2056             Update Location
2057           </xsl:when>
2058           <xsl:when test="/bedeworkadmin/page='deleteLocationConfirm'">
2059             Delete Location
2060           </xsl:when>
2061           <xsl:when test="/bedeworkadmin/page='calendarList' or /bedeworkadmin/page='modCalendar'">
2062             Manage Calendars
2063           </xsl:when>
2064           <xsl:when test="/bedeworkadmin/page='subscriptions' or /bedeworkadmin/page='modSubscription'">
2065             Manage Subscriptions
2066           </xsl:when>
2067           <xsl:when test="/bedeworkadmin/page='views' or /bedeworkadmin/page='modView'">
2068             Manage Views
2069           </xsl:when>
2070           <xsl:when test="/bedeworkadmin/page='authUserList'">
2071             Manage Authorized Users
2072           </xsl:when>
2073           <xsl:when test="/bedeworkadmin/page='modAuthUser'">
2074             Update Authorized User
2075           </xsl:when>
2076           <xsl:when test="/bedeworkadmin/page='chooseGroup'">
2077             Choose Administrative Group
2078           </xsl:when>
2079           <xsl:when test="/bedeworkadmin/page='adminGroupList'">
2080             Manage Administrative Groups
2081           </xsl:when>
2082           <xsl:when test="/bedeworkadmin/page='modAdminGroup'">
2083             <xsl:choose>
2084               <xsl:when test="/bedeworkadmin/creating = 'true'">
2085                 Add Administrative Group
2086               </xsl:when>
2087               <xsl:otherwise>
2088                 Update Administrative Group
2089               </xsl:otherwise>
2090             </xsl:choose>
2091           </xsl:when>
2092           <xsl:when test="/bedeworkadmin/page='modAdminGroupMembers'">
2093             Update Administrative Group Members
2094           </xsl:when>
2095           <xsl:when test="/bedeworkadmin/page='noGroup'">
2096             No Administrative Group
2097           </xsl:when>
2098           <xsl:when test="/bedeworkadmin/page='uploadTimezones'">
2099             Time Zones
2100           </xsl:when>
2101           <xsl:when test="/bedeworkadmin/page='noAccess'">
2102             Access Denied
2103           </xsl:when>
2104           <xsl:when test="/bedeworkadmin/page='error'">
2105             Error
2106           </xsl:when>
2107           <xsl:otherwise>
2108             Bedework Calendar Administration
2109           </xsl:otherwise>
2110         </xsl:choose>
2111       </h1>
2112
2113       <xsl:if test="/bedeworkadmin/message">
2114         <div id="messages">
2115           <p><xsl:apply-templates select="/bedeworkadmin/message"/></p>
2116         </div>
2117       </xsl:if>
2118       <xsl:if test="/bedeworkadmin/error">
2119         <div id="errors">
2120           <p><xsl:apply-templates select="/bedeworkadmin/error"/></p>
2121         </div>
2122       </xsl:if>
2123
2124     </div>
2125     <table id="statusBarTable">
2126       <tr>
2127         <td class="leftCell">
2128           <a href="{$setup}">Main Menu</a> |
2129           <a href="{$publicCal}" target="calendar">Launch Calendar</a> |
2130           <a href="{$logout}">Log Out</a> |
2131           <!-- Enable the following two items when debugging skins only -->
2132           <a href="?refreshXslt=yes">Refresh XSL</a> |
2133           <a href="?noxslt=yes">Show XML</a> (view source)
2134         </td>
2135         <xsl:if test="/bedeworkadmin/userInfo/user">
2136           <td class="rightCell">
2137             Logged in as:
2138             <span class="status">
2139               <xsl:value-of select="/bedeworkadmin/userInfo/user"/>
2140             </span>
2141             &#160;
2142             <xsl:if test="/bedeworkadmin/userInfo/group">
2143               Group:
2144               <span class="status">
2145                 <xsl:value-of select="/bedeworkadmin/userInfo/group"/>
2146               </span>
2147             </xsl:if>
2148           </td>
2149         </xsl:if>
2150       </tr>
2151     </table>
2152     <table width="100%" border="0" cellpadding="0" cellspacing="0">
2153       <tr>
2154         <td width="50%"><img alt="" src="{$resourcesRoot}/resources/std-title-space.gif"
2155                              width="100%" height="16" border="0"/></td>
2156         <td><img src="{$resourcesRoot}/resources/std-title.gif" width="485" height="16"
2157                  border="0"
2158                  alt="Calendar of Events"/></td>
2159         <td width="50%"><img alt="" src="{$resourcesRoot}/resources/std-title-space.gif"
2160                              width="100%" height="16" border="0"/></td>
2161       </tr>
2162     </table>
2163   </xsl:template>
2164
2165   <!--==== FOOTER ====-->
2166   <xsl:template name="footer">
2167     <div id="footer">
2168       <a href="http://www.bedework.org/">Bedework website</a>
2169     </div>
2170   </xsl:template>
2171 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.