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

Revision 102 (checked in by johnsa, 7 years ago)

updated calendarReferenced jsp page to xmlize it
carried change and error message through stylesheets

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   <!-- 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   <xsl:variable name="view-remove" select="/bedeworkadmin/urlPrefixes/view/remove/a/@href"/>
91   <xsl:variable name="system-fetch" select="/bedeworkadmin/urlPrefixes/system/fetch/a/@href"/>
92   <xsl:variable name="system-update" select="/bedeworkadmin/urlPrefixes/system/update/a/@href"/>
93   <xsl:variable name="timezones-initUpload" select="/bedeworkadmin/urlPrefixes/timezones/initUpload/a/@href"/>
94   <xsl:variable name="timezones-upload" select="/bedeworkadmin/urlPrefixes/timezones/upload/a/@href"/>
95   <!-- === -->
96   <xsl:variable name="authuser-showModForm" select="/bedeworkadmin/urlPrefixes/authuser/showModForm/a/@href"/>
97   <xsl:variable name="authuser-showUpdateList" select="/bedeworkadmin/urlPrefixes/authuser/showUpdateList/a/@href"/>
98   <xsl:variable name="authuser-initUpdate" select="/bedeworkadmin/urlPrefixes/authuser/initUpdate/a/@href"/>
99   <xsl:variable name="authuser-fetchForUpdate" select="/bedeworkadmin/urlPrefixes/authuser/fetchForUpdate/a/@href"/><!-- used -->
100   <xsl:variable name="authuser-update" select="/bedeworkadmin/urlPrefixes/authuser/update/a/@href"/>
101   <xsl:variable name="prefs-fetchForUpdate" select="/bedeworkadmin/urlPrefixes/prefs/fetchForUpdate/a/@href"/><!-- used -->
102   <xsl:variable name="prefs-update" select="/bedeworkadmin/urlPrefixes/prefs/update/a/@href"/><!-- used -->
103   <xsl:variable name="admingroup-showModForm" select="/bedeworkadmin/urlPrefixes/admingroup/showModForm/a/@href"/>
104   <xsl:variable name="admingroup-showModMembersForm" select="/bedeworkadmin/urlPrefixes/admingroup/showModMembersForm/a/@href"/>
105   <xsl:variable name="admingroup-showUpdateList" select="/bedeworkadmin/urlPrefixes/admingroup/showUpdateList/a/@href"/>
106   <xsl:variable name="admingroup-showChooseGroup" select="/bedeworkadmin/urlPrefixes/admingroup/showChooseGroup/a/@href"/>
107   <xsl:variable name="admingroup-showDeleteConfirm" select="/bedeworkadmin/urlPrefixes/admingroup/showDeleteConfirm/a/@href"/>
108   <xsl:variable name="admingroup-initAdd" select="/bedeworkadmin/urlPrefixes/admingroup/initAdd/a/@href"/><!-- used -->
109   <xsl:variable name="admingroup-initUpdate" select="/bedeworkadmin/urlPrefixes/admingroup/initUpdate/a/@href"/><!-- used -->
110   <xsl:variable name="admingroup-delete" select="/bedeworkadmin/urlPrefixes/admingroup/delete/a/@href"/>
111   <xsl:variable name="admingroup-fetchUpdateList" select="/bedeworkadmin/urlPrefixes/admingroup/fetchUpdateList/a/@href"/><!-- used -->
112   <xsl:variable name="admingroup-fetchForUpdate" select="/bedeworkadmin/urlPrefixes/admingroup/fetchForUpdate/a/@href"/><!-- used -->
113   <xsl:variable name="admingroup-fetchForUpdateMembers" select="/bedeworkadmin/urlPrefixes/admingroup/fetchForUpdateMembers/a/@href"/><!-- used -->
114   <xsl:variable name="admingroup-update" select="/bedeworkadmin/urlPrefixes/admingroup/update/a/@href"/><!-- used -->
115   <xsl:variable name="admingroup-updateMembers" select="/bedeworkadmin/urlPrefixes/admingroup/updateMembers/a/@href"/><!-- used -->
116   <xsl:variable name="admingroup-switch" select="/bedeworkadmin/urlPrefixes/admingroup/switch/a/@href"/>
117
118   <!-- URL of the web application - includes web context
119   <xsl:variable name="urlPrefix" select="/bedeworkadmin/urlprefix"/> -->
120
121   <!-- Other generally useful global variables -->
122   <xsl:variable name="publicCal">/cal</xsl:variable>
123
124   <!--==== MAIN TEMPLATE  ====-->
125   <xsl:template match="/">
126     <html lang="en">
127       <head>
128         <title>Calendar Admin: Events Calendar Administration</title>
129         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
130         <link rel="stylesheet" href="{$resourcesRoot}/default/default/default.css"/>
131         <xsl:if test="/bedeworkadmin/page='modEvent'">
132           <script language="JavaScript" type="text/javascript" src="{$resourcesRoot}/resources/includes.js"></script>
133           <script type='text/javascript' src="{$resourcesRoot}/resources/autoComplete.js"></script>
134           <script type='text/javascript' src="{$resourcesRoot}/resources/ui.js"></script>
135         </xsl:if>
136         <link rel="icon" type="image/ico" href="{$resourcesRoot}/bedework.ico" />
137         <script language="JavaScript" type="text/javascript">
138         <xsl:comment>
139         <![CDATA[
140         // places the cursor in the first available form element when the page is loaded
141         // (if a form exists on the page)
142         function focusFirstElement() {
143           if (window.document.forms[0]) {
144             window.document.forms[0].elements[0].focus();
145           }
146         }]]>
147         </xsl:comment>
148       </script>
149       </head>
150       <body onLoad="focusFirstElement()">
151         <xsl:call-template name="header"/>
152         <div id="content">
153           <xsl:choose>
154             <xsl:when test="/bedeworkadmin/page='eventList'">
155               <xsl:call-template name="eventList"/>
156             </xsl:when>
157             <xsl:when test="/bedeworkadmin/page='modEvent'">
158               <xsl:call-template name="modEvent"/>
159             </xsl:when>
160             <xsl:when test="/bedeworkadmin/page='displayEvent'">
161               <xsl:apply-templates select="/bedeworkadmin/event" mode="displayEvent"/>
162             </xsl:when>
163             <xsl:when test="/bedeworkadmin/page='sponsorList'">
164               <xsl:call-template name="sponsorList"/>
165             </xsl:when>
166             <xsl:when test="/bedeworkadmin/page='modSponsor'">
167               <xsl:call-template name="modSponsor"/>
168             </xsl:when>
169             <xsl:when test="/bedeworkadmin/page='deleteSponsorConfirm'">
170               <xsl:call-template name="deleteSponsorConfirm"/>
171             </xsl:when>
172             <xsl:when test="/bedeworkadmin/page='locationList'">
173               <xsl:call-template name="locationList"/>
174             </xsl:when>
175             <xsl:when test="/bedeworkadmin/page='modLocation'">
176               <xsl:call-template name="modLocation"/>
177             </xsl:when>
178             <xsl:when test="/bedeworkadmin/page='deleteLocationConfirm'">
179               <xsl:call-template name="deleteLocationConfirm"/>
180             </xsl:when>
181             <xsl:when test="/bedeworkadmin/page='calendarList' or
182                             /bedeworkadmin/page='modCalendar' or
183                             /bedeworkadmin/page='deleteCalendarConfirm' or
184                             /bedeworkadmin/page='calendarReferenced'">
185               <xsl:apply-templates select="/bedeworkadmin/calendars"/>
186             </xsl:when>
187             <xsl:when test="/bedeworkadmin/page='subscriptions' or /bedeworkadmin/page='modSubscription'">
188               <xsl:apply-templates select="/bedeworkadmin/subscriptions"/>
189             </xsl:when>
190             <xsl:when test="/bedeworkadmin/page='views'">
191               <xsl:apply-templates select="/bedeworkadmin/views" mode="viewList"/>
192             </xsl:when>
193             <xsl:when test="/bedeworkadmin/page='modView'">
194               <xsl:call-template name="modView"/>
195             </xsl:when>
196             <xsl:when test="/bedeworkadmin/page='modSyspars'">
197               <xsl:call-template name="modSyspars"/>
198             </xsl:when>
199             <xsl:when test="/bedeworkadmin/page='deleteViewConfirm'">
200               <xsl:call-template name="deleteViewConfirm"/>
201             </xsl:when>
202             <xsl:when test="/bedeworkadmin/page='authUserList'">
203               <xsl:call-template name="authUserList"/>
204             </xsl:when>
205             <xsl:when test="/bedeworkadmin/page='modAuthUser'">
206               <xsl:call-template name="modAuthUser"/>
207             </xsl:when>
208             <xsl:when test="/bedeworkadmin/page='modPrefs'">
209               <xsl:call-template name="modPrefs"/>
210             </xsl:when>
211             <xsl:when test="/bedeworkadmin/page='chooseGroup'">
212               <xsl:apply-templates select="/bedeworkadmin/groups" mode="chooseGroup"/>
213             </xsl:when>
214             <xsl:when test="/bedeworkadmin/page='adminGroupList'">
215               <xsl:call-template name="listAdminGroups"/>
216             </xsl:when>
217             <xsl:when test="/bedeworkadmin/page='modAdminGroup'">
218               <xsl:call-template name="modAdminGroup"/>
219             </xsl:when>
220             <xsl:when test="/bedeworkadmin/page='modAdminGroupMembers'">
221               <xsl:call-template name="modAdminGroupMembers"/>
222             </xsl:when>
223             <xsl:when test="/bedeworkadmin/page='deleteAdminGroupConfirm'">
224               <xsl:call-template name="deleteAdminGroupConfirm"/>
225             </xsl:when>
226             <xsl:when test="/bedeworkadmin/page='noGroup'">
227               <h2>No administrative group</h2>
228               <p>Your userid has not been assigned to an administrative group.
229                 Please inform your administrator.</p>
230             </xsl:when>
231             <xsl:when test="/bedeworkadmin/page='uploadTimezones'">
232               <xsl:call-template name="uploadTimezones"/>
233             </xsl:when>
234             <xsl:when test="/bedeworkadmin/page='noAccess'">
235               <h2>No Access</h2>
236               <p>
237                 You have no access to the action you just attempted. If you believe
238                 you should have access and the problem persists, contact your
239                 administrator.
240               </p>
241               <p><a href="{$setup}">continue</a></p>
242             </xsl:when>
243             <xsl:when test="/bedeworkadmin/page='error'">
244               <h2>Application error</h2>
245               <p>An application error occurred.</p>
246               <p><a href="{$setup}">continue</a></p>
247             </xsl:when>
248             <xsl:otherwise>
249               <xsl:call-template name="mainMenu"/>
250             </xsl:otherwise>
251           </xsl:choose>
252         </div>
253         <!-- footer -->
254         <xsl:call-template name="footer"/>
255       </body>
256     </html>
257   </xsl:template>
258
259   <!--==============================================-->
260   <!--==============================================-->
261   <!--============= PAGE TEMPLATES =================-->
262   <!--==============================================-->
263   <!--==============================================-->
264
265   <!--+++++++++++++++ Main Menu ++++++++++++++++++++-->
266   <xsl:template name="mainMenu">
267     <h2 class="menuTitle">Main Menu</h2>
268     <table id="mainMenuTable">
269       <tr>
270         <th>Events</th>
271         <td>
272           <a href="{$event-initAddEvent}" >
273             Add
274           </a>
275         </td>
276         <td>
277           <a href="{$event-initUpdateEvent}" >
278             Edit / Delete
279           </a>
280         </td>
281         <!--
282         Disable direct selection by ID; we'll need to find another way
283         of quickly getting to events: search and grid views should be implemented. -->
284         <!--
285         <td>
286           Event ID:
287           <xsl:copy-of select="/bedeworkadmin/formElements/*"/>
288         </td>-->
289       </tr>
290       <tr>
291         <th>Contacts</th>
292         <td>
293           <a href="{$sponsor-initAdd}" >
294             Add
295           </a>
296         </td>
297         <td>
298           <a href="{$sponsor-initUpdate}" >
299             Edit / Delete
300           </a>
301         </td>
302       </tr>
303       <tr>
304         <th>Locations</th>
305         <td>
306           <a href="{$location-initAdd}" >
307             Add
308           </a>
309         </td>
310         <td>
311           <a href="{$location-initUpdate}" >
312             Edit / Delete
313           </a>
314         </td>
315       </tr>
316     </table>
317
318
319     <!-- Content admin and super user segment of the page.
320          Super user will have content admin access. -->
321
322     <xsl:if test="/bedeworkadmin/userInfo/contentAdminUser='true'">
323       <h2 class="menuTitle">Administrator's Menu</h2>
324       <xsl:if test="/bedeworkadmin/userInfo/superUser='true'">
325         <ul class="adminMenu">
326           <li>
327             <a href="{$calendar-fetch}">
328               Manage calendars
329             </a>
330           </li>
331           <li>
332             <a href="{$subscriptions-fetch}">
333               Manage subscriptions
334             </a>
335           </li>
336           <li>
337             <a href="{$view-fetch}">
338               Manage views
339             </a>
340           </li>
341           <li>
342             <a href="{$system-fetch}">
343               Manage system preferences
344             </a>
345           </li>
346           <li>
347             <a href="{$timezones-initUpload}" >
348               Upload and replace system timezones
349             </a>
350           </li>
351         </ul>
352       </xsl:if>
353       <h4 class="menuTitle">User management</h4>
354       <ul class="adminMenu">
355         <xsl:if test="/bedeworkadmin/userInfo/userMaintOK='true'">
356           <li>
357             <a href="{$authuser-initUpdate}" >
358               Manage public event administrators
359             </a>
360           </li>
361         </xsl:if>
362         <xsl:if test="/bedeworkadmin/userInfo/adminGroupMaintOk='true'">
363           <li>
364             <a href="{$admingroup-initUpdate}">
365               Manage admin groups
366             </a>
367           </li>
368         </xsl:if>
369         <li>
370           <a href="{$admingroup-switch}">
371             Choose/change group...
372           </a>
373         </li>
374         <xsl:if test="/bedeworkadmin/userInfo/userMaintOK='true'">
375           <li>
376             <form action="{$prefs-fetchForUpdate}" method="post">
377               Edit user preferences (enter userid): <input type="text" name="user" size="15"/>
378               <input type="submit" name="getPrefs" value="go"/>
379             </form>
380           </li>
381         </xsl:if>
382       </ul>
383     </xsl:if>
384   </xsl:template>
385
386   <!--++++++++++++++++++ Events ++++++++++++++++++++-->
387   <xsl:template name="eventList">
388     <p>Select the event that you would like to update:</p>
389
390     <form name="peForm" method="post" action="{$event-showUpdateList}">
391       <table>
392         <tr>
393           <td style="padding-right: 1em;">Show:</td>
394           <td>
395             <xsl:copy-of select="/bedeworkadmin/formElements/form/listAllSwitchFalse/*"/>
396             Active
397           </td>
398           <td>
399             <xsl:copy-of select="/bedeworkadmin/formElements/form/listAllSwitchTrue/*"/>
400             All
401           </td>
402         </tr>
403       </table>
404     </form>
405
406     <table id="commonListTable">
407       <tr>
408         <th>Title</th>
409         <th>Start Date</th>
410         <th>End Date</th>
411         <th>Description</th>
412       </tr>
413
414       <xsl:for-each select="/bedeworkadmin/events/event">
415         <tr>
416           <td>
417             <xsl:copy-of select="title/*"/>
418           </td>
419           <td class="date">
420             <xsl:value-of select="start"/>
421           </td>
422           <td class="date">
423             <xsl:value-of select="end"/>
424           </td>
425           <td>
426             <xsl:value-of select="desc"/>
427           </td>
428         </tr>
429       </xsl:for-each>
430     </table>
431   </xsl:template>
432
433   <xsl:template name="modEvent">
434     <h2>Event Information</h2>
435
436     <xsl:variable name="modEventAction" select="/bedeworkadmin/formElements/form/@action"/>
437     <form  name="peForm" method="post" action="{$modEventAction}">
438       <table class="eventFormTable">
439         <tr>
440           <td class="fieldName">
441             Title:
442           </td>
443           <td>
444             <xsl:copy-of select="/bedeworkadmin/formElements/form/title/*"/>
445           </td>
446         </tr>
447         <tr>
448           <td class="fieldName">
449             Calendar**:
450           </td>
451           <td>
452             <xsl:if test="/bedeworkadmin/formElements/form/calendar/preferred/select/option">
453               <select name="prefCalendarId">
454                 <option value="-1">
455                   Select preferred:
456                 </option>
457                 <xsl:copy-of select="/bedeworkadmin/formElements/form/calendar/preferred/select/*"/>
458               </select>
459               or Calendar (all):
460             </xsl:if>
461             <select name="calendarId">
462               <option value="-1">
463                 Select:
464               </option>
465               <xsl:copy-of select="/bedeworkadmin/formElements/form/calendar/all/select/*"/>
466             </select>
467             <xsl:text> </xsl:text>
468             <a href="" target="_blank">Calendar Definitions</a>
469           </td>
470         </tr>
471
472         <tr>
473           <td class="fieldName">
474             Date &amp; Time:
475           </td>
476           <td>
477             <!-- Set the timefields class for the first load of the page;
478                  subsequent changes will take place using javascript without a
479                  page reload. -->
480             <xsl:variable name="timeFieldsClass">
481               <xsl:choose>
482                 <xsl:when test="/bedeworkadmin/formElements/form/allDay/input/@checked='checked'">hidden</xsl:when>
483                 <xsl:otherwise>timeFields</xsl:otherwise>
484               </xsl:choose>
485             </xsl:variable>
486             <xsl:choose>
487               <xsl:when test="/bedeworkadmin/formElements/form/allDay/input/@checked='checked'">
488                 <input type="checkbox" name="eventStartDate.dateOnly" onchange="swapAllDayEvent(this)" value="on" checked="checked"/>
489               </xsl:when>
490               <xsl:otherwise>
491                 <input type="checkbox" name="eventStartDate.dateOnly" onchange="swapAllDayEvent(this)"/>
492               </xsl:otherwise>
493             </xsl:choose>
494             all day event<br/>
495             <div class="dateStartEndBox">
496               <strong>Start:</strong>
497               <div class="dateFields">
498                 <span class="startDateLabel">Date </span>
499                 <xsl:copy-of select="/bedeworkadmin/formElements/form/start/month/*"/>
500                 <xsl:copy-of select="/bedeworkadmin/formElements/form/start/day/*"/>
501                 <xsl:copy-of select="/bedeworkadmin/formElements/form/start/year/*"/>
502               </div>
503               <img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>
504               <div class="{$timeFieldsClass}" id="startTimeFields">
505                 <xsl:copy-of select="/bedeworkadmin/formElements/form/start/hour/*"/>
506                 <xsl:copy-of select="/bedeworkadmin/formElements/form/start/minute/*"/>
507                 <xsl:if test="/bedeworkadmin/formElements/form/start/ampm">
508                   <xsl:copy-of select="/bedeworkadmin/formElements/form/start/ampm/*"/>
509                 </xsl:if>
510                 <xsl:text> </xsl:text>
511                 <a href="javascript:launchClockMap('showClockMap.do?dateType=eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a>
512               </div>
513             </div>
514             <div class="dateStartEndBox">
515               <strong>End:</strong>
516               <xsl:choose>
517                 <xsl:when test="/bedeworkadmin/formElements/form/end/type='E'">
518                   <input type="radio" name="eventEndType" value="E" checked="checked" onClick="changeClass('endDateTime','shown');changeClass('endDuration','hidden');"/>
519                 </xsl:when>
520                 <xsl:otherwise>
521                   <input type="radio" name="eventEndType" value="E" onClick="changeClass('endDateTime','shown');changeClass('endDuration','hidden');"/>
522                 </xsl:otherwise>
523               </xsl:choose>
524               Date
525               <xsl:variable name="endDateTimeClass">
526                 <xsl:choose>
527                   <xsl:when test="/bedeworkadmin/formElements/form/end/type='E'">shown</xsl:when>
528                   <xsl:otherwise>hidden</xsl:otherwise>
529                 </xsl:choose>
530               </xsl:variable>
531               <div class="{$endDateTimeClass}" id="endDateTime">
532                 <div class="dateFields">
533                   <xsl:copy-of select="/bedeworkadmin/formElements/form/end/dateTime/month/*"/>
534                   <xsl:copy-of select="/bedeworkadmin/formElements/form/end/dateTime/day/*"/>
535                   <xsl:copy-of select="/bedeworkadmin/formElements/form/end/dateTime/year/*"/>
536                 </div>
537                 <img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>
538                 <div class="{$timeFieldsClass}" id="endTimeFields">
539                   <xsl:copy-of select="/bedeworkadmin/formElements/form/end/dateTime/hour/*"/>
540                   <xsl:copy-of select="/bedeworkadmin/formElements/form/end/dateTime/minute/*"/>
541                   <xsl:if test="/bedeworkadmin/formElements/form/end/dateTime/ampm">
542                     <xsl:copy-of select="/bedeworkadmin/formElements/form/end/dateTime/ampm/*"/>
543                   </xsl:if>
544                   <xsl:text> </xsl:text>
545                   <a href="javascript:launchClockMap('showClockMap.do?dateType=eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a>
546                 </div>
547               </div><br/>
548               <div class="dateFields">
549                 <xsl:choose>
550                   <xsl:when test="/bedeworkadmin/formElements/form/end/type='D'">
551                     <input type="radio" name="eventEndType" value="D" checked="checked" onClick="changeClass('endDateTime','hidden');changeClass('endDuration','shown');"/>
552                   </xsl:when>
553                   <xsl:otherwise>
554                     <input type="radio" name="eventEndType" value="D" onClick="changeClass('endDateTime','hidden');changeClass('endDuration','shown');"/>
555                   </xsl:otherwise>
556                 </xsl:choose>
557                 Duration
558                 <xsl:variable name="endDurationClass">
559                   <xsl:choose>
560                     <xsl:when test="/bedeworkadmin/formElements/form/end/type='D'">shown</xsl:when>
561                     <xsl:otherwise>hidden</xsl:otherwise>
562                   </xsl:choose>
563                 </xsl:variable>
564                 <div class="{$endDurationClass}" id="endDuration">
565                   <div class="durationBox">
566                     <input type="radio" name="eventDuration.type" value="daytime" checked="checked"/>
567                     <xsl:copy-of select="/bedeworkadmin/formElements/form/end/duration/days/*"/>days
568                     <xsl:copy-of select="/bedeworkadmin/formElements/form/end/duration/hours/*"/>hours
569                     <xsl:copy-of select="/bedeworkadmin/formElements/form/end/duration/minutes/*"/>minutes
570                   </div>
571                   <span class="durationSpacerText">or</span>
572                   <div class="durationBox">
573                     <input type="radio" name="eventDuration.type" value="weeks"/>
574                     <xsl:copy-of select="/bedeworkadmin/formElements/form/end/duration/weeks/*"/>weeks
575                   </div>
576                 </div>
577               </div><br/>
578               <xsl:variable name="noDurationClass">
579                 <xsl:choose>
580                   <xsl:when test="/bedeworkadmin/formElements/form/allDay/input/@checked='checked'">hidden</xsl:when>
581                   <xsl:otherwise>dateFields</xsl:otherwise>
582                 </xsl:choose>
583               </xsl:variable>
584               <div class="{$noDurationClass}" id="noDuration">
585                 <xsl:choose>
586                   <xsl:when test="/bedeworkadmin/formElements/form/end/type='N'">
587                     <input type="radio" name="eventEndType" value="N" checked="checked" onClick="changeClass('endDateTime','hidden');changeClass('endDuration','hidden');"/>
588                   </xsl:when>
589                   <xsl:otherwise>
590                     <input type="radio" name="eventEndType" value="N" onClick="changeClass('endDateTime','hidden');changeClass('endDuration','hidden');"/>
591                   </xsl:otherwise>
592                 </xsl:choose>
593                 This event has no duration / end date
594               </div>
595             </div>
596           </td>
597         </tr>
598
599         <!--  Category  -->
600         <!-- Hide this field for now: we will probably use it in a very different
601              way now that true calendars are implemented.
602         <tr>
603           <td class="fieldName">
604             Category**:
605           </td>
606           <td>
607             <xsl:if test="/bedeworkadmin/formElements/form/calendar/preferred/select/option">
608               <select name="prefCategoryId">
609                 <option value="-1">
610                   Select preferred:
611                 </option>
612                 <xsl:copy-of select="/bedeworkadmin/formElements/form/category/preferred/select/*"/>
613               </select>
614               Category (all):
615             </xsl:if>
616             <select name="categoryId">
617               <option value="-1">
618                 Select:
619               </option>option>
620               <xsl:copy-of select="/bedeworkadmin/formElements/form/category/all/select/*"/>
621             </select>
622           </td>
623         </tr> -->
624
625         <!--  Description  -->
626         <tr>
627           <td class="fieldName">
628             Description:
629           </td>
630           <td>
631             <xsl:copy-of select="/bedeworkadmin/formElements/form/desc/*"/>
632             <div class="fieldInfo">
633               Enter all pertinent information, including the academic titles of
634               all speakers and/or participants.
635               <span class="maxCharNotice">(<xsl:value-of select="/bedeworkadmin/formElements/form/descLength"/> characters max.)</span>
636             </div>
637           </td>
638         </tr>
639         <!-- Cost -->
640         <tr>
641           <td class="optional">
642             Price:
643           </td>
644           <td>
645             <xsl:copy-of select="/bedeworkadmin/formElements/form/cost/*"/>
646             <xsl:text> </xsl:text>
647             <span class="fieldInfo">(optional: if any, and place to purchase tickets)</span>
648           </td>
649         </tr>
650         <!-- Url -->
651         <tr>
652           <td class="optional">
653             URL:
654           </td>
655           <td>
656             <xsl:copy-of select="/bedeworkadmin/formElements/form/link/*"/>
657             <xsl:text> </xsl:text>
658             <span class="fieldInfo">(optional: for more information about the event)</span>
659           </td>
660         </tr>
661         <!-- Location -->
662         <tr>
663           <td class="fieldName">
664             Location**:
665           </td>
666           <td>
667             <xsl:if test="/bedeworkadmin/formElements/form/location/preferred/select/option">
668               <select name="prefLocationId">
669                 <option value="-1">
670                   Select preferred:
671                 </option>
672                 <xsl:copy-of select="/bedeworkadmin/formElements/form/location/preferred/select/*"/>
673               </select>
674               or Location (all):
675             </xsl:if>
676             <select name="locationId">
677               <option value="-1">
678                 Select:
679               </option>
680               <xsl:copy-of select="/bedeworkadmin/formElements/form/location/all/select/*"/>
681             </select>
682           </td>
683         </tr>
684
685        <xsl:if test="/bedeworkadmin/formElements/form/location/address">
686           <tr>
687             <td class="fieldName" colspan="2">
688               <span class="std-text"><span class="bold">or</span> add</span>
689             </td>
690           </tr>
691           <tr>
692             <td class="fieldName">
693               Address:
694             </td>
695             <td>
696               <xsl:variable name="addressFieldName" select="/bedeworkadmin/formElements/form/location/address/input/@name"/>
697               <xsl:variable name="calLocations">
698                 <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>
699               </xsl:variable>
700               <input type="text" size="30" name="{$addressFieldName}" autocomplete="off" onfocus='autoComplete(this,event,new Array({$calLocations}));'/>
701               <div class="fieldInfo">
702                 Please include room, building, and campus (if not Seattle).
703               </div>
704             </td>
705           </tr>
706           <tr>
707             <td class="optional">
708               <span class="std-text">Location URL:</span>
709             </td>
710             <td>
711               <xsl:copy-of select="/bedeworkadmin/formElements/form/location/link/*"/>
712               <xsl:text> </xsl:text>
713               <span class="fieldInfo">(optional: for information about the location)</span>
714             </td>
715           </tr>
716         </xsl:if>
717
718         <!-- Sponsor -->
719         <tr>
720           <td class="fieldName">
721             Contact**:
722           </td>
723           <td>
724             <xsl:if test="/bedeworkadmin/formElements/form/sponsor/preferred/select/option">
725               <select name="prefSponsorId">
726                 <option value="-1">
727                   Select preferred:
728                 </option>option>
729                 <xsl:copy-of select="/bedeworkadmin/formElements/form/sponsor/preferred/select/*"/>
730               </select>
731               or Contact (all):
732             </xsl:if>
733             <select name="sponsorId">
734               <option value="-1">
735                 Select:
736               </option>
737               <xsl:copy-of select="/bedeworkadmin/formElements/form/sponsor/all/select/*"/>
738             </select>
739           </td>
740         </tr>
741         <tr>
742           <td colspan="2" style="padding-top: 1em;">
743             <span class="fieldInfo">
744               **<strong>If "preferred values" are enabled</strong>
745               by your administrator, the category, location, and contact lists will
746               contain only those value you've used previously.  If you don't find the value
747               you need in one of these lists, use the "all" list adjacent to each
748               of these fields.  The event you select from the "all" list will be added
749               to your preferred list from that point on.  <strong>Note: if you don't
750               find a location or contact at all, you can add a new one from the
751               <a href="{$setup}">main menu</a>.</strong>
752               Only administrators can create categories, however.
753               To make sure you've used the
754               correct category, please see the
755               <a href="" target="_blank">Calendar Definitions</a>
756             </span>
757           </td>
758         </tr>
759
760         <xsl:if test="/bedeworkadmin/formElements/form/sponsor/name">
761           <tr>
762             <td class="fieldName" colspan="2">
763               <span class="std-text"><span class="bold">or</span> add</span>
764             </td>
765           </tr>
766           <tr>
767             <td class="fieldName">
768               Contact (name):
769             </td>
770             <td>
771               <xsl:copy-of select="/bedeworkadmin/formElements/form/sponsor/name/*"/>
772             </td>
773           </tr>
774           <tr>
775             <td class="fieldName">
776               Contact Phone Number:
777             </td>
778             <td>
779               <xsl:copy-of select="/bedeworkadmin/formElements/form/sponsor/phone/*"/>
780               <xsl:text> </xsl:text>
781               <span class="fieldInfo">(optional)</span>
782             </td>
783           </tr>
784           <tr>
785             <td class="optional">
786               Contact's URL:
787             </td>
788             <td>
789               <xsl:copy-of select="/bedeworkadmin/formElements/form/sponsor/link/*"/>
790               <xsl:text> </xsl:text>
791               <span class="fieldInfo">(optional)</span>
792             </td>
793           </tr>
794           <tr>
795             <td class="optional">
796               Contact Email Address:
797             </td>
798             <td>
799               <xsl:copy-of select="/bedeworkadmin/formElements/form/sponsor/email/*"/>
800               <xsl:text> </xsl:text>
801               <span class="fieldInfo">(optional)</span> test
802               <div id="sponsorEmailAlert">&#160;</div> <!-- space for email warning -->
803             </td>
804           </tr>
805         </xsl:if>
806       </table>
807
808       <table border="0" width="100%" id="submitTable">
809         <tr>
810           <xsl:choose>
811             <xsl:when test="/bedeworkadmin/creating='true'">
812               <td>
813                 <input type="submit" name="addEvent" value="Add Event" class="padRight"/>
814                 <input type="submit" name="cancelled" value="Cancel"/>
815                 <input type="reset" value="Clear"/>
816               </td>
817             </xsl:when>
818             <xsl:otherwise>
819               <td>
820                 <input type="submit" name="updateEvent" value="Update Event" class="padRight"/>
821                 <input type="submit" name="cancelled" value="Cancel" class="padRight"/>
822                 <input type="reset" value="Reset" class="padRight"/>
823                 <input type="submit" name="copy" value="Duplicate Event"/>
824               </td>
825               <td align="right">
826                 <input type="submit" name="delete" value="Delete Event"/>
827               </td>
828             </xsl:otherwise>
829           </xsl:choose>
830         </tr>
831       </table>
832     </form>
833   </xsl:template>
834
835   <xsl:template match="event" mode="displayEvent">
836     <h2>Event Information</h2>
837
838     <table class="eventFormTable">
839       <tr>
840         <td class="fieldName">
841           ID:
842         </td>
843         <td>
844           <xsl:value-of select="id"/>
845         </td>
846       </tr>
847
848       <tr>
849         <td class="fieldName">
850           Title:
851         </td>
852         <td>
853           <xsl:value-of select="title"/>
854         </td>
855       </tr>
856
857       <tr>
858         <td class="fieldName">
859           Calendar:
860         </td>
861         <td>
862           <xsl:value-of select="calendar"/>
863         </td>
864       </tr>
865
866       <tr>
867         <td class="fieldName">
868           Start:
869         </td>
870         <td>
871           <xsl:value-of select="start/year"/>-<xsl:value-of select="start/month"/>-<xsl:value-of select="start/day"/>
872           <xsl:text> </xsl:text>
873           <xsl:choose>
874             <xsl:when test="start/allDay='true'">
875               <strong>all day event</strong>
876             </xsl:when>
877             <xsl:otherwise>
878               <xsl:value-of select="start/hour"/>:<xsl:value-of select="start/minute"/>
879               <xsl:if test="start/ampm">
880                 <xsl:value-of select="start/ampm"/>
881               </xsl:if>
882             </xsl:otherwise>
883           </xsl:choose>
884         </td>
885       </tr>
886       <tr>
887         <td class="fieldName">
888           End:
889         </td>
890         <td>
891           <xsl:choose>
892             <xsl:when test="end/endtype = 'none'">
893               <div class="dateFields" id="noDuration">
894                 This event has no duration / end date
895               </div>
896             </xsl:when>
897             <xsl:when test="end/endtype = 'duration'">
898               <div class="dateFields">
899                 <div class="hidden" id="endDuration">
900                   <div class="durationBox">
901                     <input type="text" name="eventDuration.daysStr" size="2" value="0" onChange="window.document.peForm.durationType[0].checked = true;"/>days
902                     <input type="text" name="eventDuration.hoursStr" size="2" value="1" onChange="window.document.peForm.durationType[0].checked = true;"/>hours
903                     <input type="text" name="eventDuration.minutesStr" size="2" value="0" onChange="window.document.peForm.durationType[0].checked = true;"/>minutes
904                   </div>
905                   <span class="durationSpacerText">or</span>
906                   <div class="durationBox">
907                     <input type="text" name="eventDuration.weeksStr" size="2" value="0" onChange="window.document.peForm.durationType[1].checked = true;"/>weeks
908                   </div>
909                 </div>
910               </div>
911             </xsl:when>
912             <xsl:otherwise>
913               <xsl:value-of select="end/dateTime/year"/>-<xsl:value-of select="end/dateTime/month"/>-<xsl:value-of select="end/dateTime/day"/>
914               <xsl:text> </xsl:text>
915               <xsl:value-of select="end/dateTime/hour"/>:<xsl:value-of select="end/dateTime/minute"/>
916               <xsl:text> </xsl:text>
917               <xsl:if test="end/dateTime/ampm">
918                 <xsl:value-of select="end/dateTime/ampm"/>
919               </xsl:if>
920             </xsl:otherwise>
921           </xsl:choose>
922         </td>
923       </tr>
924
925       <!--  Category  -->
926       <tr>
927         <td class="fieldName">
928           Category:
929         </td>
930         <td>
931           <xsl:value-of select="category"/>
932         </td>
933       </tr>
934
935       <!--  Description  -->
936       <tr>
937         <td class="fieldName">
938           Description:
939         </td>
940         <td>
941           <xsl:value-of select="desc"/>
942         </td>
943       </tr>
944       <!-- Cost -->
945       <tr>
946         <td class="optional">
947           Price:
948         </td>
949         <td>
950           <xsl:value-of select="cost"/>
951         </td>
952       </tr>
953       <!-- Url -->
954       <tr>
955         <td class="optional">
956           URL:
957         </td>
958         <td>
959           <xsl:variable name="eventLink" select="link"/>
960           <a href="{$eventLink}"><xsl:value-of select="link"/></a>
961         </td>
962       </tr>
963       <!-- Location -->
964       <tr>
965         <td class="fieldName">
966           Location:
967         </td>
968         <td>
969           <xsl:value-of select="location"/>
970         </td>
971       </tr>
972
973       <!-- Sponsor -->
974       <tr>
975         <td class="fieldName">
976           Contact:
977         </td>
978         <td>
979           <xsl:value-of select="sponsor"/>
980         </td>
981       </tr>
982
983       <!-- Owner -->
984       <tr>
985         <td class="fieldName">
986           Owner:
987         </td>
988         <td>
989           <xsl:value-of select="creator"/>
990         </td>
991       </tr>
992
993     </table>
994
995
996     <xsl:if test="/bedeworkadmin/canEdit = 'true' or /bedeworkadmin/userInfo/superUser = 'true'">
997       <xsl:variable name="id" select="id"/>
998       <h3><a href="{$event-fetchForUpdate}&amp;eventId={$id}">Edit Event</a></h3>
999     </xsl:if>
1000   </xsl:template>
1001
1002   <!--+++++++++++++++ Sponsors (Contacts) ++++++++++++++++++++-->
1003   <xsl:template name="sponsorList">
1004     <p>
1005       Select the contact you would like to update:
1006     </p>
1007
1008     <table id="commonListTable">
1009       <tr>
1010         <th>Name</th>
1011         <th>Phone</th>
1012         <th>Email</th>
1013         <th>URL</th>
1014       </tr>
1015
1016       <xsl:for-each select="/bedeworkadmin/sponsors/sponsor">
1017         <tr>
1018           <td>
1019             <xsl:copy-of select="name" />
1020           </td>
1021           <td>
1022             <xsl:value-of select="phone" />
1023           </td>
1024           <td>
1025             <xsl:variable name="email" select="email"/>
1026             <a href="mailto:{$email}">
1027               <xsl:value-of select="email"/>
1028             </a>
1029           </td>
1030           <td>
1031             <xsl:variable name="link" select="link" />
1032             <a href="{$link}" target="linktest">
1033               <xsl:value-of select="link" />
1034             </a>
1035           </td>
1036         </tr>
1037       </xsl:for-each>
1038     </table>
1039   </xsl:template>
1040
1041   <xsl:template name="modSponsor">
1042     <form action="{$sponsor-update}" method="post">
1043       <h2>Contact Information</h2>
1044
1045       <table id="eventFormTable">
1046         <tr>
1047           <td class="fieldName">
1048             Contact:
1049           </td>
1050           <td>
1051             <xsl:copy-of select="/bedeworkadmin/formElements/form/name/*"/>
1052           </td>
1053         </tr>
1054         <tr>
1055           <td class="fieldName">
1056             Contact Phone Number:
1057           </td>
1058           <td>
1059             <xsl:copy-of select="/bedeworkadmin/formElements/form/phone/*"/> -
1060             <span class="fieldInfo">(optional)</span>
1061           </td>
1062         </tr>
1063         <tr>
1064           <td class="optional">
1065             Contact's URL:
1066           </td>
1067           <td>
1068             <xsl:copy-of select="/bedeworkadmin/formElements/form/link/*"/>
1069             <span class="fieldInfo">(optional)</span>
1070           </td>
1071         </tr>
1072         <tr>
1073           <td class="optional">
1074             Contact Email Address:
1075           </td>
1076           <td>
1077             <xsl:copy-of select="/bedeworkadmin/formElements/form/email/*"/>
1078             <span class="fieldInfo">(optional)</span>
1079           </td>
1080         </tr>
1081       </table>
1082
1083       <table border="0" width="100%" id="submitTable">
1084         <tr>
1085           <xsl:choose>
1086             <xsl:when test="/bedeworkadmin/creating='true'">
1087               <td>
1088                 <input type="submit" name="addSponsor" value="Add Contact" class="padRight"/>
1089                 <input type="submit" name="cancelled" value="Cancel"/>
1090                 <input type="reset" value="Clear"/>
1091               </td>
1092             </xsl:when>
1093             <xsl:otherwise>
1094               <td>
1095                 <input type="submit" name="updateSponsor" value="Update Contact" class="padRight"/>
1096                 <input type="submit" name="cancelled" value="Cancel" class="padRight"/>
1097                 <input type="reset" value="Reset" class="padRight"/>
1098               </td>
1099               <td align="right">
1100                 <input type="submit" name="delete" value="Delete Contact"/>
1101               </td>
1102             </xsl:otherwise>
1103           </xsl:choose>
1104         </tr>
1105       </table>
1106
1107     </form>
1108   </xsl:template>
1109
1110   <xsl:template name="deleteSponsorConfirm">
1111     <p>
1112       <h2>Ok to delete this contact?</h2>
1113       <xsl:copy-of select="/bedeworkadmin/formElements/*"/>
1114     </p>
1115
1116     <table id="commonListTable">
1117       <tr>
1118         <th>Name</th>
1119         <td><xsl:value-of select="/bedeworkadmin/sponsor/name" /></td>
1120       </tr>
1121       <tr>
1122         <th>Phone</th>
1123         <td><xsl:value-of select="/bedeworkadmin/sponsor/phone" /></td>
1124       </tr>
1125       <tr>
1126         <th>Email</th>
1127         <td><xsl:value-of select="/bedeworkadmin/sponsor/email" /></td>
1128       </tr>
1129       <tr>
1130         <th>URL</th>
1131         <td><xsl:value-of select="/bedeworkadmin/sponsor/link" /></td>
1132       </tr>
1133     </table>
1134   </xsl:template>
1135
1136    <!--+++++++++++++++ Locations ++++++++++++++++++++-->
1137   <xsl:template name="locationList">
1138     <p>
1139       Select the location that you would like to update:
1140       <input type="button" name="return" value="Add new location" onclick="javascript:location.replace('{$location-initAdd}')"/>
1141     </p>
1142
1143     <table id="commonListTable">
1144       <tr>
1145         <th>Address</th>
1146         <th>Subaddress</th>
1147         <th>URL</th>
1148       </tr>
1149
1150       <xsl:for-each select="/bedeworkadmin/locations/location">
1151         <tr>
1152           <td>
1153             <xsl:copy-of select="address/*"/>
1154           </td>
1155           <td>
1156             <xsl:value-of select="subaddress"/>
1157           </td>
1158           <td>
1159             <xsl:variable name="link" select="link" />
1160             <a href="{$link}" target="linktest">
1161               <xsl:value-of select="link" />
1162             </a>
1163           </td>
1164         </tr>
1165       </xsl:for-each>
1166     </table>
1167   </xsl:template>
1168
1169   <xsl:template name="modLocation">
1170     <xsl:choose>
1171       <xsl:when test="/bedeworkadmin/creating='true'">
1172         <h2>Add Location</h2>
1173       </xsl:when>
1174       <xsl:otherwise>
1175         <h2>Update Location</h2>
1176       </xsl:otherwise>
1177     </xsl:choose>
1178
1179     <form action="{$location-update}" method="post">
1180       <table id="eventFormTable">
1181         <tr>
1182           <td class="fieldName">
1183             Address:
1184           </td>
1185           <td>
1186             <xsl:copy-of select="/bedeworkadmin/formElements/form/address/*"/>
1187           </td>
1188         </tr>
1189         <tr>
1190           <td class="optional">
1191             Subaddress:
1192           </td>
1193           <td>
1194             <xsl:copy-of select="/bedeworkadmin/formElements/form/subaddress/*"/>
1195             <span class="fieldInfo">(optional)</span>
1196           </td>
1197         </tr>
1198         <tr>
1199           <td class="optional">
1200             Location's URL:
1201           </td>
1202           <td>
1203             <xsl:copy-of select="/bedeworkadmin/formElements/form/link/*"/>
1204             <span class="fieldInfo">(optional)</span>
1205           </td>
1206         </tr>
1207       </table>
1208
1209       <table border="0" width="100%" id="submitTable">
1210         <tr>
1211           <xsl:choose>
1212             <xsl:when test="/bedeworkadmin/creating='true'">
1213               <td>
1214                 <input type="submit" name="addLocation" value="Add Location" class="padRight"/>
1215                 <input type="submit" name="cancelled" value="Cancel"/>
1216                 <input type="reset" value="Clear"/>
1217               </td>
1218             </xsl:when>
1219             <xsl:otherwise>
1220               <td>
1221                 <input type="submit" name="updateLocation" value="Update Location" class="padRight"/>
1222                 <input type="submit" name="cancelled" value="Cancel" class="padRight"/>
1223                 <input type="reset" value="Reset" class="padRight"/>
1224               </td>
1225               <td align="right">
1226                 <input type="submit" name="delete" value="Delete Contact"/>
1227               </td>
1228             </xsl:otherwise>
1229           </xsl:choose>
1230         </tr>
1231       </table>
1232     </form>
1233   </xsl:template>
1234
1235   <xsl:template name="deleteLocationConfirm">
1236     <h2>Ok to delete this location?</h2>
1237     <xsl:copy-of select="/bedeworkadmin/formElements/*"/>
1238
1239     <table id="eventFormTable">
1240         <tr>
1241           <td class="fieldName">
1242             Address:
1243           </td>
1244           <td>
1245             <xsl:copy-of select="/bedeworkadmin/location/address/*"/>
1246           </td>
1247         </tr>
1248         <tr>
1249           <td class="optional">
1250             Subaddress:
1251           </td>
1252           <td>
1253             <xsl:copy-of select="/bedeworkadmin/location/subaddress/*"/>
1254             <span class="fieldInfo">(optional)</span>
1255           </td>
1256         </tr>
1257         <tr>
1258           <td class="optional">
1259             Location's URL:
1260           </td>
1261           <td>
1262             <xsl:copy-of select="/bedeworkadmin/location/link/*"/>
1263             <span class="fieldInfo">(optional)</span>
1264           </td>
1265         </tr>
1266       </table>
1267   </xsl:template>
1268
1269 <!--+++++++++++++++ Calendars ++++++++++++++++++++-->
1270   <xsl:template match="calendars">
1271     <table id="calendarTable">
1272       <tr>
1273         <td class="cals">
1274           <h3>Public calendars</h3>
1275           <ul id="calendarTree">
1276             <xsl:apply-templates select="calendar" mode="calendars"/>
1277           </ul>
1278         </td>
1279         <td class="calendarContent">
1280           <xsl:choose>
1281             <xsl:when test="/bedeworkadmin/page='calendarList' or
1282                             /bedeworkadmin/page='calendarReferenced'">
1283               <xsl:call-template name="calendarList"/>
1284             </xsl:when>
1285             <xsl:when test="/bedeworkadmin/page='deleteCalendarConfirm'">
1286               <xsl:apply-templates select="/bedeworkadmin/currentCalendar" mode="deleteCalendarConfirm"/>
1287             </xsl:when>
1288             <xsl:when test="/bedeworkadmin/creating='true'">
1289               <xsl:apply-templates select="/bedeworkadmin/currentCalendar" mode="addCalendar"/>
1290             </xsl:when>
1291             <xsl:otherwise>
1292               <xsl:apply-templates select="/bedeworkadmin/currentCalendar" mode="modCalendar"/>
1293             </xsl:otherwise>
1294           </xsl:choose>
1295         </td>
1296       </tr>
1297     </table>
1298   </xsl:template>
1299
1300   <xsl:template match="calendar" mode="calendars">
1301     <xsl:variable name="id" select="id"/>
1302     <xsl:variable name="itemClass">
1303       <xsl:choose>
1304         <xsl:when test="calendarCollection='false'">folder</xsl:when>
1305         <xsl:otherwise>calendar</xsl:otherwise>
1306       </xsl:choose>
1307     </xsl:variable>
1308     <li class="{$itemClass}">
1309       <a href="{$calendar-fetchForUpdate}&amp;calId={$id}" title="update">
1310         <xsl:value-of select="name"/>
1311       </a>
1312       <xsl:if test="calendarCollection='false'">
1313         <xsl:text> </xsl:text>
1314         <a href="{$calendar-initAdd}&amp;calId={$id}" title="add a calendar or folder">
1315           <img src="{$resourcesRoot}/resources/calAddIcon.gif" width="13" height="13" alt="add a calendar or folder" border="0"/>
1316         </a>
1317       </xsl:if>
1318       <xsl:if test="calendar">
1319         <ul>
1320           <xsl:apply-templates select="calendar" mode="calendars">
1321             <!--<xsl:sort select="title" order="ascending" case-order="upper-first"/>-->
1322           </xsl:apply-templates>
1323         </ul>
1324       </xsl:if>
1325     </li>
1326   </xsl:template>
1327
1328   <xsl:template match="currentCalendar" mode="addCalendar">
1329     <h3>Add Calendar / Folder</h3>
1330     <form name="addCalForm" action="{$calendar-update}">
1331       <table class="eventFormTable">
1332         <tr>
1333           <th>Name:</th>
1334           <td>
1335             <xsl:variable name="curCalName" select="name"/>
1336             <input name="calendar.name" value="{$curCalName}" size="40"/>
1337           </td>
1338         </tr>
1339         <tr>
1340           <th>Summary:</th>
1341           <td>
1342             <xsl:variable name="curCalSummary" select="summary"/>
1343             <input type="text" name="calendar.summary" value="{$curCalSummary}" size="40"/>
1344           </td>
1345         </tr>
1346         <tr>
1347           <th>Description:</th>
1348           <td>
1349             <textarea name="calendar.description" width="60" height="20">
1350               <xsl:value-of select="desc"/>
1351             </textarea>
1352           </td>
1353         </tr>
1354         <tr>
1355           <th>Calendar/Folder:</th>
1356           <td>
1357             <xsl:choose>
1358               <xsl:when test="calendarCollection='true'">
1359                 <input type="radio" value="true" name="calendarCollection" checked="checked"/> Calendar
1360                 <input type="radio" value="false" name="calendarCollection"/> Folder
1361               </xsl:when>
1362               <xsl:otherwise>
1363                 <input type="radio" value="true" name="calendarCollection"/> Calendar
1364                 <input type="radio" value="false" name="calendarCollection" checked="checked"/> Folder
1365               </xsl:otherwise>
1366             </xsl:choose>
1367           </td>
1368         </tr>
1369       </table>
1370
1371       <table border="0" width="100%" id="submitTable">
1372         <tr>
1373           <td>
1374             <input type="submit" name="addCalendar" value="Add Calendar/Folder" class="padRight"/>
1375             <input type="submit" name="cancelled" value="Cancel" class="padRight"/>
1376             <input type="reset" value="Clear" class="padRight"/>
1377           </td>
1378         </tr>
1379       </table>
1380     </form>
1381   </xsl:template>
1382
1383   <xsl:template match="currentCalendar" mode="modCalendar">
1384     <xsl:choose>
1385       <xsl:when test="calendarCollection='true'">
1386         <h3>Modify Calendar</h3>
1387       </xsl:when>
1388       <xsl:otherwise>
1389         <h3>Modify Folder</h3>
1390       </xsl:otherwise>
1391     </xsl:choose>
1392     <form name="modCalForm" action="{$calendar-update}">
1393       <table class="eventFormTable">
1394         <tr>
1395           <th>Path:</th>
1396           <td>
1397             <xsl:value-of select="path"/>
1398           </td>
1399         </tr>
1400         <tr>
1401           <th>Name:</th>
1402           <td>
1403             <xsl:value-of select="name"/>
1404           </td>
1405         </tr>
1406         <tr>
1407           <th>Mailing List ID:</th>
1408           <td>
1409             <xsl:value-of select="mailListId"/>
1410           </td>
1411         </tr>
1412         <tr>
1413           <th>Summary:</th>
1414           <td>
1415             <xsl:variable name="curCalSummary" select="summary"/>
1416             <input type="text" name="calendar.summary" value="{$curCalSummary}" size="40"/>
1417           </td>
1418         </tr>
1419         <tr>
1420           <th>Description:</th>
1421           <td>
1422             <textarea name="calendar.description" cols="40" rows="4">
1423               <xsl:value-of select="desc"/>
1424             </textarea>
1425           </td>
1426         </tr>
1427         <tr>
1428           <th>Calendar/Folder:</th>
1429           <td>
1430             <xsl:choose>
1431               <xsl:when test="calendarCollection='true'">
1432                 <input type="radio" value="true" name="calendarCollection" checked="checked"/> Calendar
1433                 <input type="radio" value="false" name="calendarCollection"/> Folder
1434               </xsl:when>
1435               <xsl:otherwise>
1436                 <input type="radio" value="true" name="calendarCollection"/> Calendar
1437                 <input type="radio" value="false" name="calendarCollection" checked="checked"/> Folder
1438               </xsl:otherwise>
1439             </xsl:choose>
1440           </td>
1441         </tr>
1442       </table>
1443
1444       <table border="0" width="100%" id="submitTable">
1445         <tr>
1446           <td>
1447             <xsl:choose>
1448               <xsl:when test="calendarCollection='true'">
1449                 <input type="submit" name="updateCalendar" value="Update Calendar" class="padRight"/>
1450               </xsl:when>
1451               <xsl:otherwise>
1452                 <input type="submit" name="updateCalendar" value="Update Folder" class="padRight"/>
1453               </xsl:otherwise>
1454             </xsl:choose>
1455             <input type="submit" name="cancelled" value="Cancel" class="padRight"/>
1456             <input type="reset" value="Reset" class="padRight"/>
1457           </td>
1458           <td align="right">
1459             <xsl:choose>
1460               <xsl:when test="calendarCollection='true'">
1461                 <input type="submit" name="delete" value="Delete Calendar"/>
1462               </xsl:when>
1463               <xsl:otherwise>
1464                 <input type="submit" name="delete" value="Delete Folder"/>
1465               </xsl:otherwise>
1466             </xsl:choose>
1467           </td>
1468         </tr>
1469       </table>
1470     </form>
1471   </xsl:template>
1472
1473   <xsl:template name="calendarList">
1474     <h3>Manage Calendars</h3>
1475     <ul>
1476       <li>Select an item from the calendar list on the left to modify
1477       a calendar or folder.</li>
1478       <li>Select the
1479       <img src="{$resourcesRoot}/resources/calAddIcon.gif" width="13" height="13" alt="true" border="0"/>
1480       icon to add a new calendar or folder to the tree.
1481         <ul>
1482           <li>Folders may only contain calendars and subfolders.</li>
1483           <li>Calendars may only contain events (and other calendar items).</li>
1484           <li>
1485             If a calendar is empty, it may be converted to a folder and vice
1486             versa.  If a calendar or folder are not empty, it may not be
1487             converted.
1488           </li>
1489         </ul>
1490       </li>
1491     </ul>
1492   </xsl:template>
1493
1494   <xsl:template match="currentCalendar" mode="deleteCalendarConfirm">
1495     <xsl:choose>
1496       <xsl:when test="calendarCollection='true'">
1497         <h3>Delete Calendar</h3>
1498         <p>
1499           The following calendar will be deleted.  Continue?
1500         </p>
1501       </xsl:when>
1502       <xsl:otherwise>
1503         <h3>Delete Folder</h3>
1504         <p>
1505           The following folder <em>and all its contents</em> will be deleted.
1506           Continue?
1507         </p>
1508       </xsl:otherwise>
1509     </xsl:choose>
1510
1511     <form name="delCalForm" action="{$calendar-delete}">
1512       <table class="eventFormTable">
1513         <tr>
1514           <th>Path:</th>
1515           <td>
1516             <xsl:value-of select="path"/>
1517           </td>
1518         </tr>
1519         <tr>
1520           <th>Name:</th>
1521           <td>
1522             <xsl:value-of select="name"/>
1523           </td>
1524         </tr>
1525         <tr>
1526           <th>Summary:</th>
1527           <td>
1528             <xsl:value-of select="summary"/>
1529           </td>
1530         </tr>
1531         <tr>
1532           <th>Description:</th>
1533           <td>
1534             <xsl:value-of select="desc"/>
1535           </td>
1536         </tr>
1537       </table>
1538
1539       <table border="0" width="100%" id="submitTable">
1540         <tr>
1541           <td>
1542             <input type="submit" name="cancelled" value="Cancel" class="padRight"/>
1543           </td>
1544           <td align="right">
1545             <xsl:choose>
1546               <xsl:when test="calendarCollection='true'">
1547                 <input type="submit" name="delete" value="Yes: Delete Calendar!"/>
1548               </xsl:when>
1549               <xsl:otherwise>
1550                 <input type="submit" name="delete" value="Yes: Delete Folder!"/>
1551               </xsl:otherwise>
1552             </xsl:choose>
1553           </td>
1554         </tr>
1555       </table>
1556     </form>
1557
1558   </xsl:template>
1559
1560   <!--+++++++++++++++ Subscriptions ++++++++++++++++++++-->
1561   <xsl:template match="subscriptions">
1562     <table id="subsTable">
1563       <tr>
1564         <td class="cals">
1565           <h3>Public calendars</h3>
1566           <p class="smaller">
1567             Select a calendar below to add a <em><strong>new</strong></em>
1568             internal subscription. <!-- or
1569             <a href="{$subscriptions-initAdd}&amp;calUri=please enter a calendar uri">
1570             subscribe to an external calendar</a>.-->
1571           </p>
1572           <ul id="calendarTree">
1573             <xsl:apply-templates select="/bedeworkadmin/subscriptions/subscribe/calendars/calendar" mode="subscribe"/>
1574           </ul>
1575         </td>
1576         <td class="subs">
1577           <xsl:choose>
1578             <xsl:when test="/bedeworkadmin/page='subscriptions'">
1579               <xsl:call-template name="subscriptionList"/>
1580             </xsl:when>
1581             <xsl:when test="/bedeworkadmin/creating='true'">
1582               <xsl:apply-templates select="subscription" mode="addSubscription"/>
1583             </xsl:when>
1584             <xsl:otherwise>
1585               <xsl:apply-templates select="subscription" mode="modSubscription"/>
1586             </xsl:otherwise>
1587           </xsl:choose>
1588         </td>
1589       </tr>
1590     </table>
1591   </xsl:template>
1592
1593   <xsl:template match="calendar" mode="subscribe">
1594     <xsl:variable name="id" select="id"/>
1595     <xsl:variable name="itemClass">
1596       <xsl:choose>
1597         <xsl:when test="calendarCollection='false'">folder</xsl:when>
1598         <xsl:otherwise>calendar</xsl:otherwise>
1599       </xsl:choose>
1600     </xsl:variable>
1601     <li class="{$itemClass}">
1602       <a href="{$subscriptions-initAdd}&amp;calId={$id}">
1603         <xsl:value-of select="name"/>
1604       </a>
1605       <xsl:if test="calendar">
1606         <ul>
1607           <xsl:apply-templates select="calendar" mode="subscribe">
1608             <!--<xsl:sort select="title" order="ascending" case-order="upper-first"/>-->
1609           </xsl:apply-templates>
1610         </ul>
1611       </xsl:if>
1612     </li>
1613   </xsl:template>
1614
1615   <xsl:template match="subscription" mode="addSubscription">
1616     <h2>Add new subscription</h2>
1617     <p class="note">*the subsciption name must be unique</p>
1618     <form name="subscribeForm" action="{$subscriptions-subscribe}" method="post">
1619       <table class="eventFormTable">
1620         <tr>
1621           <th>Name*:</th>
1622           <td>
1623             <xsl:variable name="subName" select="name"/>
1624             <input type="text" value="{$subName}" name="subscription.name" size="60"/>
1625           </td>
1626         </tr>
1627         <xsl:if test="internal='false'">
1628           <tr>
1629             <th>Uri:</th>
1630             <td>
1631               <xsl:variable name="subUri" select="uri"/>
1632               <input type="text" value="{$subUri}" name="subscription.uri" size="60"/>
1633             </td>
1634           </tr>
1635         </xsl:if>
1636         <tr>
1637           <th>Display:</th>
1638           <td>
1639             <input type="radio" value="true" name="subscription.display"/> yes
1640             <input type="radio" value="false" name="subscription.display" checked="checked"/> no
1641           </td>
1642         </tr>
1643         <tr>
1644           <th>Style:</th>
1645           <td>
1646             <xsl:variable name="subStyle" select="style"/>
1647             <input type="text" value="{$subStyle}" name="subscription.style" size="60"/>
1648           </td>
1649         </tr>
1650         <tr>
1651           <th>Unremoveable:</th>
1652           <td>
1653             <input type="radio" value="true" name="unremoveable" size="60"/> true
1654             <input type="radio" value="false" name="unremoveable" size="60" checked="checked"/> false
1655           </td>
1656         </tr>
1657       </table>
1658       <table border="0" width="100%" id="submitTable">
1659         <tr>
1660           <td>
1661             <input type="submit" name="addSubscription" value="Add Subscription" class="padRight"/>
1662             <input type="submit" name="cancelled" value="Cancel"/>
1663             <input type="reset" value="Clear"/>
1664           </td>
1665         </tr>
1666       </table>
1667     </form>
1668   </xsl:template>
1669
1670   <xsl:template match="subscription" mode="modSubscription">
1671     <h2>Modify subscription</h2>
1672     <form name="subscribeForm" action="{$subscriptions-subscribe}" method="post">
1673       <table class="eventFormTable">
1674         <tr>
1675           <th>Name*:</th>
1676           <td>
1677             <xsl:value-of select="name"/>
1678           </td>
1679         </tr>
1680         <xsl:choose>
1681           <xsl:when test="internal='false'">
1682             <tr>
1683               <th>Uri:</th>
1684               <td>
1685                 <xsl:variable name="subUri" select="uri"/>
1686                 <input type="text" value="{$subUri}" name="subscription.uri" size="60"/>
1687               </td>
1688             </tr>
1689           </xsl:when>
1690           <xsl:otherwise>
1691             <tr>
1692               <th>Uri:</th>
1693               <td>
1694                 <xsl:value-of select="uri"/>
1695               </td>
1696             </tr>
1697           </xsl:otherwise>
1698         </xsl:choose>
1699         <tr>
1700           <th>Display:</th>
1701           <td>
1702             <xsl:choose>
1703               <xsl:when test="display='true'">
1704                 <input type="radio" value="true" name="subscription.display" checked="checked"/> yes
1705                 <input type="radio" value="false" name="subscription.display"/> no
1706               </xsl:when>
1707               <xsl:otherwise>
1708                 <input type="radio" value="true" name="subscription.display"/> yes
1709                 <input type="radio" value="false" name="subscription.display" checked="checked"/> no
1710               </xsl:otherwise>
1711             </xsl:choose>
1712           </td>
1713         </tr>
1714         <tr>
1715           <th>Style:</th>
1716           <td>
1717             <xsl:variable name="subStyle" select="style"/>
1718             <input type="text" value="{$subStyle}" name="subscription.style" size="60"/>
1719           </td>
1720         </tr>
1721         <tr>
1722           <th>Unremoveable:</th>
1723           <td>
1724             <xsl:variable name="subUnremoveable" select="subscription.unremoveable"/>
1725             <xsl:choose>
1726               <xsl:when test="$subUnremoveable = 'true'">
1727                 <input type="radio" value="true" name="unremoveable" size="60" checked="checked"/> true
1728                 <input type="radio" value="false" name="unremoveable" size="60"/> false
1729               </xsl:when>
1730               <xsl:otherwise>
1731                 <input type="radio" value="true" name="unremoveable" size="60"/> true
1732                 <input type="radio" value="false" name="unremoveable" size="60" checked="checked"/> false
1733               </xsl:otherwise>
1734             </xsl:choose>
1735           </td>
1736         </tr>
1737       </table>
1738       <table border="0" width="100%" id="submitTable">
1739         <tr>
1740           <td>
1741             <input type="submit" name="updateSubscription" value="Update Subscription" class="padRight"/>
1742             <input type="submit" name="cancelled" value="Cancel" class="padRight"/>
1743             <input type="reset" value="Reset" class="padRight"/>
1744           </td>
1745           <td align="right">
1746             <input type="submit" name="delete" value="Delete Subscription"/>
1747           </td>
1748         </tr>
1749       </table>
1750     </form>
1751   </xsl:template>
1752
1753   <xsl:template name="subscriptionList">
1754     <h3>Current subscriptions</h3>
1755     <table id="commonListTable">
1756       <tr>
1757         <th>Name</th>
1758         <th>URI</th>
1759         <th>Style</th>
1760         <th>Display</th>
1761         <th>Unremoveable</th>
1762         <th>External</th>
1763         <th>Deleted?</th>
1764       </tr>
1765       <xsl:for-each select="subscription">
1766         <!--<xsl:sort select="name" order="ascending" case-order="upper-first"/>-->
1767         <tr>
1768           <td>
1769             <xsl:variable name="subname" select="name"/>
1770             <a href="{$subscriptions-fetchForUpdate}&amp;subname={$subname}">
1771               <xsl:value-of select="name"/>
1772             </a>
1773           </td>
1774           <td>
1775             <xsl:value-of select="uri"/>
1776           </td>
1777           <td>
1778             <xsl:value-of select="style"/>
1779           </td>
1780           <td class="center">
1781             <xsl:if test="display='true'">
1782               <img src="{$resourcesRoot}/resources/greenCheckIcon.gif" width="13" height="13" alt="true" border="0"/>
1783             </xsl:if>
1784           </td>
1785           <td class="center">
1786             <xsl:if test="unremoveable='true'">
1787               <img src="{$resourcesRoot}/resources/redCheckIcon.gif" width="13" height="13" alt="true" border="0"/>
1788             </xsl:if>
1789           </td>
1790           <td class="center">
1791             <xsl:if test="internal='false'">
1792               <img src="{$resourcesRoot}/resources/greenCheckIcon.gif" width="13" height="13" alt="true" border="0"/>
1793             </xsl:if>
1794           </td>
1795           <td class="center">
1796             <xsl:if test="calendarDeleted='true'">
1797               <img src="{$resourcesRoot}/resources/redCheckIcon.gif" width="13" height="13" alt="true" border="0"/>
1798             </xsl:if>
1799           </td>
1800         </tr>
1801       </xsl:for-each>
1802     </table>
1803     <!--<h4><a href="{$subscriptions-initAdd}&amp;calUri=please enter a calendar uri">Subscribe to a remote calendar</a> (by URI)</h4>-->
1804   </xsl:template>
1805
1806   <!--+++++++++++++++ Views ++++++++++++++++++++-->
1807   <xsl:template match="views" mode="viewList">
1808
1809     <h3>Add a new view</h3>
1810     <form name="addView" action="{$view-addView}" method="post">
1811       <input type="text" name="name" size="60"/>
1812       <input type="submit" value="add view" name="addview"/>
1813     </form>
1814
1815     <h3>Views</h3>
1816     <table id="commonListTable">
1817       <tr>
1818         <th>Name</th>
1819         <th>Included subscriptions</th>
1820       </tr>
1821
1822       <xsl:for-each select="view">
1823         <!--<xsl:sort select="name" order="ascending" case-order="upper-first"/>-->
1824         <tr>
1825           <td>
1826             <xsl:variable name="viewName" select="name"/>
1827             <a href="{$view-fetchForUpdate}&amp;name={$viewName}">
1828               <xsl:value-of select="name"/>
1829             </a>
1830           </td>
1831           <td>
1832             <xsl:for-each select="subscriptions/subscription">
1833               <xsl:value-of select="name"/>
1834               <xsl:if test="position()!=last()">, </xsl:if>
1835             </xsl:for-each>
1836           </td>
1837         </tr>
1838       </xsl:for-each>
1839     </table>
1840   </xsl:template>
1841
1842   <xsl:template name="modView">
1843     <h2>Update View</h2>
1844     <xsl:variable name="viewName" select="/bedeworkadmin/views/view/name"/>
1845     <h3 class="viewName"><xsl:value-of select="$viewName"/></h3>
1846     <table id="viewsTable">
1847       <tr>
1848         <td class="subs">
1849           <h3>Available Subscriptions:</h3>
1850
1851           <table class="subscriptionsListSubs">
1852             <xsl:for-each select="/bedeworkadmin/subscriptions/subscription">
1853               <!--<xsl:sort select="name" order="ascending" case-order="upper-first"/>-->
1854               <xsl:if test="not(/bedeworkadmin/views/view/subscriptions/subscription/name=name)">
1855                 <tr>
1856                   <td>
1857                     <xsl:value-of select="name"/>
1858                   </td>
1859                   <td class="arrows">
1860                     <xsl:variable name="subAddName" select="name"/>
1861                     <a href="{$view-update}&amp;name={$viewName}&amp;add={$subAddName}">
1862                       <img src="{$resourcesRoot}/resources/arrowRight.gif"
1863                         width="13" height="13" border="0"
1864                         alt="add subscription"/>
1865                     </a>
1866                   </td>
1867                 </tr>
1868               </xsl:if>
1869             </xsl:for-each>
1870           </table>
1871         </td>
1872         <td class="view">
1873           <h3>Active Subscriptions:</h3>
1874           <table class="subscriptionsListView">
1875             <xsl:for-each select="/bedeworkadmin/views/view/subscriptions/subscription">
1876               <!--<xsl:sort select="name" order="ascending" case-order="upper-first"/>-->
1877               <tr>
1878                 <td class="arrows">
1879                   <xsl:variable name="subRemoveName" select="name"/>
1880                   <a href="{$view-update}&amp;name={$viewName}&amp;remove={$subRemoveName}">
1881                     <img src="{$resourcesRoot}/resources/arrowLeft.gif"
1882                         width="13" height="13" border="0"
1883                         alt="add subscription"/>
1884                   </a>
1885                 </td>
1886                 <td>
1887                   <xsl:value-of select="name"/>
1888                 </td>
1889               </tr>
1890             </xsl:for-each>
1891           </table>
1892         </td>
1893       </tr>
1894     </table>
1895     <table border="0" width="100%" id="submitTable">
1896       <tr>
1897         <td>
1898           <input type="button" name="return" value="Return to Views Listing" class="padRight" onclick="javascript:location.replace('{$view-fetch}')"/>
1899         </td>
1900         <td align="right">
1901           <input type="button" name="delete" value="Delete View" onclick="javascript:location.replace('{$view-fetchForUpdate}&amp;name={$viewName}&amp;delete=yes')"/>
1902         </td>
1903       </tr>
1904     </table>
1905   </xsl:template>
1906
1907   <xsl:template name="deleteViewConfirm">
1908     <h2>Remove View?</h2>
1909
1910     <xsl:variable name="viewName" select="/bedeworkadmin/views/view/name"/>
1911     <p>The following view will be removed. Continue?</p>
1912
1913     <h3 class="viewName"><xsl:value-of select="$viewName"/></h3>
1914     <form name="removeView" action="{$view-remove}">
1915       <input type="hidden" name="name" value="{$viewName}"/>
1916       <input type="submit" name="delete" value="Yes: Remove View" class="padRight"/>
1917       <input type="submit" name="cancelled" value="No: Cancel"/>
1918     </form>
1919
1920   </xsl:template>
1921
1922   <!--+++++++++++++++ System Parameters (preferences) ++++++++++++++++++++-->
1923   <xsl:template name="modSyspars">
1924     <h2>Modify System Parameters</h2>
1925     <p>
1926       Do not change unless you know what you're doing.<br/>
1927       Changes to these parameters have wide impact on the system.
1928     </p>
1929     <form name="systemParamsForm" action="{$system-update}" method="post">
1930       <table class="eventFormTable">
1931         <tr>
1932           <th>Default user view name:</th>
1933           <td>
1934             <xsl:variable name="defaultViewName" select="/bedeworkadmin/system/defaultUserViewName"/>
1935             <input value="{$defaultViewName}" name="defaultUserViewName" size="20"/>
1936           </td>
1937           <td>
1938             Name used for default view created when a new user is added
1939           </td>
1940         </tr>
1941         <tr>
1942           <th>Http connections per user:</th>
1943           <td>
1944             <xsl:variable name="httpPerUser" select="/bedeworkadmin/system/httpConnectionsPerUser"/>
1945             <input value="{$httpPerUser}" name="httpConnectionsPerUser" size="20"/>
1946           </td>
1947           <td>
1948           </td>
1949         </tr>
1950         <tr>
1951           <th>Http connections per host:</th>
1952           <td>
1953             <xsl:variable name="httpPerHost" select="/bedeworkadmin/system/httpConnectionsPerHost"/>
1954             <input value="{$httpPerHost}" name="httpConnectionsPerHost" size="20"/>
1955           </td>
1956           <td>
1957           </td>
1958         </tr>
1959         <tr>
1960           <th>Total http connections:</th>
1961           <td>
1962             <xsl:variable name="httpTotal" select="/bedeworkadmin/system/httpConnections"/>
1963             <input value="{$httpTotal}" name="httpConnections" size="20"/>
1964           </td>
1965           <td>
1966           </td>
1967         </tr>
1968         <tr>
1969           <th>Default user quota:</th>
1970           <td>
1971             <xsl:variable name="defaultUserQuota" select="/bedeworkadmin/system/defaultUserQuota"/>
1972             <input value="{$defaultUserQuota}" name="defaultUserQuota" size="20"/>
1973           </td>
1974           <td>
1975           </td>
1976         </tr>
1977       </table>
1978       <table border="0" width="100%" id="submitTable">
1979         <tr>
1980           <td>
1981             <input type="submit" name="updateSystemParams" value="Update" class="padRight"/>
1982             <input type="submit" name="cancelled" value="Cancel"/>
1983             <input type="reset" value="Reset"/>
1984           </td>
1985         </tr>
1986       </table>
1987     </form>
1988   </xsl:template>
1989
1990   <!--+++++++++++++++ Timezones ++++++++++++++++++++-->
1991   <xsl:template name="uploadTimezones">
1992     <h2>Upload Timezones</h2>
1993     <form name="peForm" method="post" action="{$timezones-upload}" enctype="multipart/form-data">
1994       <input type="file" name="uploadFile" size="40" value=""/>
1995       <input type="submit" name="doUpload" value="Upload Timezones"/>
1996       <input type="submit" name="cancelled" value="Cancel"/>
1997     </form>
1998   </xsl:template>
1999
2000   <!--+++++++++++++++ Authuser ++++++++++++++++++++-->
2001   <xsl:template name="authUserList">
2002     <h2>Modify Administrators</h2>
2003
2004     <div id="authUserInputForms">
2005       <form name="getUserRolesForm" action="{$authuser-fetchForUpdate}" method="post">
2006         Edit admin roles by userid: <input type="text" name="editAuthUserId" size="20"/>
2007         <input type="submit" value="go" name="submit"/>
2008       </form>
2009     </div>
2010
2011     <table id="commonListTable">
2012       <tr>
2013         <th>UserId</th>
2014         <th>Roles</th>
2015         <th></th>
2016       </tr>
2017
2018       <xsl:for-each select="bedeworkadmin/authUsers/authUser">
2019         <!--<xsl:sort select="account" order="ascending" case-order="upper-first"/>-->
2020         <tr>
2021           <td>
2022             <xsl:value-of select="account"/>
2023           </td>
2024           <td>
2025             <xsl:if test="publicEventUser='true'">
2026               publicEvent; <xsl:text> </xsl:text>
2027             </xsl:if>
2028             <xsl:if test="superUser='true'">
2029               superUser; <xsl:text> </xsl:text>
2030             </xsl:if>
2031             <xsl:if test="alertUser='true'">
2032               alert; <xsl:text> </xsl:text>
2033             </xsl:if>
2034           </td>
2035           <td>
2036             <xsl:variable name="account" select="account"/>
2037             <a href="{$authuser-fetchForUpdate}&amp;editAuthUserId={$account}">
2038               edit
2039             </a>
2040           </td>
2041         </tr>
2042       </xsl:for-each>
2043     </table>
2044   </xsl:template>
2045
2046   <xsl:template name="modAuthUser">
2047     <h2>Update Administrator</h2>
2048     <xsl:variable name="modAuthUserAction" select="/bedeworkadmin/formElements/form/@action"/>
2049     <form action="{$modAuthUserAction}" method="post">
2050       <table id="eventFormTable">
2051         <tr>
2052           <td class="fieldName">
2053             Account:
2054           </td>
2055           <td>
2056             <xsl:value-of select="/bedeworkadmin/formElements/form/account"/>
2057           </td>
2058         </tr>
2059         <tr>
2060           <td class="fieldName">
2061             Alerts:
2062           </td>
2063           <td>
2064             <xsl:copy-of select="/bedeworkadmin/formElements/form/alerts/*"/>
2065           </td>
2066         </tr>
2067         <tr>
2068           <td class="fieldName">
2069             Public Events:
2070           </td>
2071           <td>
2072             <xsl:copy-of select="/bedeworkadmin/formElements/form/publicEvents/*"/>
2073           </td>
2074         </tr>
2075         <tr>
2076           <td class="fieldName">
2077             Super User:
2078           </td>
2079           <td>
2080             <xsl:copy-of select="/bedeworkadmin/formElements/form/superUser/*"/>
2081           </td>
2082         </tr>
2083         <tr>
2084           <td class="optional">
2085             Email:
2086           </td>
2087           <td>
2088             <xsl:copy-of select="/bedeworkadmin/formElements/form/email/*"/>
2089             <span class="fieldInfo"></span>
2090           </td>
2091         </tr>
2092         <tr>
2093           <td class="optional">
2094             Phone:
2095           </td>
2096           <td>
2097             <xsl:copy-of select="/bedeworkadmin/formElements/form/phone/*"/>
2098             <span class="fieldInfo"></span>
2099           </td>
2100         </tr>
2101         <tr>
2102           <td class="optional">
2103             Department:
2104           </td>
2105           <td>
2106             <xsl:copy-of select="/bedeworkadmin/formElements/form/dept/*"/>
2107             <span class="fieldInfo"></span>
2108           </td>
2109         </tr>
2110         <tr>
2111           <td class="optional">
2112             Last name:
2113           </td>
2114           <td>
2115             <xsl:copy-of select="/bedeworkadmin/formElements/form/lastName/*"/>
2116             <span class="fieldInfo"></span>
2117           </td>
2118         </tr>
2119         <tr>
2120           <td class="optional">
2121             First name:
2122           </td>
2123           <td>
2124             <xsl:copy-of select="/bedeworkadmin/formElements/form/firstName/*"/>
2125             <span class="fieldInfo"></span>
2126           </td>
2127         </tr>
2128       </table>
2129       <br />
2130
2131       <input type="submit" name="modAuthUser" value="Update" class="padRight"/>
2132       <input type="reset" value="Reset"/>
2133       <input type="submit" name="cancelled" value="Cancel"/>
2134     </form>
2135   </xsl:template>
2136
2137   <!--+++++++++++++++ User Prefs ++++++++++++++++++++-->
2138   <xsl:template name="modPrefs">
2139     <h2>Edit User Preferences</h2>
2140     <form name="userPrefsForm" method="post" action="{$prefs-update}">
2141       <table id="eventFormTable">
2142         <tr>
2143           <td class="fieldName">
2144             User:
2145           </td>
2146           <td>
2147             <xsl:value-of select="/bedeworkadmin/prefs/user"/>
2148             <xsl:variable name="user" select="/bedeworkadmin/prefs/user"/>
2149             <input type="hidden" name="user" value="{$user}"/>
2150           </td>
2151         </tr>
2152         <tr>
2153           <td class="fieldName">
2154             Preferred view:
2155           </td>
2156           <td>
2157             <xsl:variable name="preferredView" select="/bedeworkadmin/prefs/preferredView"/>
2158             <input type="text" name="preferredView" value="{$preferredView}" size="40"/>
2159           </td>
2160         </tr>
2161         <tr>
2162           <td class="fieldName">
2163             Preferred view period:
2164           </td>
2165           <td>
2166             <xsl:variable name="preferredViewPeriod" select="/bedeworkadmin/prefs/preferredViewPeriod"/>
2167             <input type="text" name="viewPeriod" value="{$preferredViewPeriod}" size="40"/>
2168           </td>
2169         </tr>
2170         <tr>
2171           <td class="fieldName">
2172             Skin name:
2173           </td>
2174           <td>
2175             <xsl:variable name="skinName" select="/bedeworkadmin/prefs/skinName"/>
2176             <input type="text" name="skin" value="{$skinName}" size="40"/>
2177           </td>
2178         </tr>
2179         <tr>
2180           <td class="fieldName">
2181             Skin style:
2182           </td>
2183           <td>
2184             <xsl:variable name="skinStyle" select="/bedeworkadmin/prefs/skinStyle"/>
2185             <input type="text" name="skinStyle" value="{$skinStyle}" size="40"/>
2186           </td>
2187         </tr>
2188       </table>
2189       <br />
2190
2191       <input type="submit" name="modPrefs" value="Update" class="padRight"/>
2192       <input type="reset" value="Reset"/>
2193       <input type="submit" name="cancelled" value="Cancel"/>
2194     </form>
2195   </xsl:template>
2196
2197   <!--+++++++++++++++ Admin Groups ++++++++++++++++++++-->
2198   <xsl:template name="listAdminGroups">
2199     <h2>Modify Groups</h2>
2200     <form name="adminGroupMembersForm" method="post" action="{$admingroup-initUpdate}">
2201       <xsl:choose>
2202         <xsl:when test="/bedeworkadmin/groups/showMembers='true'">
2203           <input type="radio" name="showAgMembers" value="false" onclick="document.adminGroupMembersForm.submit();"/>
2204           Hide members
2205           <input type="radio" name="showAgMembers" value="true" checked="checked" onclick="document.adminGroupMembersForm.submit();"/>
2206           Show members
2207         </xsl:when>
2208         <xsl:otherwise>
2209           <input type="radio" name="showAgMembers" value="false" checked="checked" onclick="document.adminGroupMembersForm.submit();"/>
2210           Hide members
2211           <input type="radio" name="showAgMembers" value="true" onclick="document.adminGroupMembersForm.submit();"/>
2212           Show members
2213         </xsl:otherwise>
2214       </xsl:choose>
2215     </form>
2216
2217     <p>Click on the group name to modify the group owner or description.<br/>
2218     Click "add/remove members" to modify group membership.</p>
2219     <p><input type="button" name="return" onclick="javascript:location.replace('{$admingroup-initAdd}')" value="Add a new group"/></p>
2220     <table id="commonListTable">
2221       <tr>
2222         <th>Name</th>
2223         <th>Description</th>
2224         <xsl:if test="/bedeworkadmin/groups/showMembers='true'">
2225           <th>Members</th>
2226         </xsl:if>
2227         <th></th>
2228       </tr>
2229       <xsl:for-each select="/bedeworkadmin/groups/group">
2230         <!--<xsl:sort select="name" order="ascending" case-order="upper-first"/>-->
2231         <xsl:variable name="groupName" select="name"/>
2232         <tr>
2233           <td>
2234             <a href="{$admingroup-fetchForUpdate}&amp;adminGroupName={$groupName}">
2235               <xsl:value-of select="name"/>
2236             </a>
2237           </td>
2238           <td>
2239             <xsl:value-of select="desc"/>
2240           </td>
2241           <xsl:if test="/bedeworkadmin/groups/showMembers='true'">
2242             <td>
2243               <xsl:for-each select="members/member/account">
2244                   <xsl:value-of select="."/>&#160;
2245               </xsl:for-each>
2246             </td>
2247           </xsl:if>
2248           <td>
2249             <a href="{$admingroup-fetchForUpdateMembers}&amp;adminGroupName={$groupName}">Add/Remove members</a>
2250           </td>
2251         </tr>
2252       </xsl:for-each>
2253     </table>
2254     <p><input type="button" name="return" onclick="javascript:location.replace('{$admingroup-initAdd}')" value="Add a new group"/></p>
2255   </xsl:template>
2256
2257   <xsl:template match="groups" mode="chooseGroup">
2258     <h2>Choose Your Administrative Group</h2>
2259
2260     <table id="commonListTable">
2261
2262       <tr>
2263         <th>Name</th>
2264         <th>Description</th>
2265       </tr>
2266
2267       <xsl:for-each select="group">
2268         <!--<xsl:sort select="name" order="ascending" case-order="upper-first"/>-->
2269         <tr>
2270           <td>
2271             <xsl:variable name="admGroupName" select="name"/>
2272             <a href="{$setup}&amp;adminGroupName={$admGroupName}">
2273               <xsl:copy-of select="name"/>
2274             </a>
2275           </td>
2276           <td>
2277             <xsl:value-of select="desc"/>
2278           </td>
2279         </tr>
2280       </xsl:for-each>
2281     </table>
2282   </xsl:template>
2283
2284   <xsl:template name="modAdminGroup">
2285     <xsl:choose>
2286       <xsl:when test="/bedeworkadmin/creating = 'true'">
2287         <h2>Add Group</h2>
2288       </xsl:when>
2289       <xsl:otherwise>
2290         <h2>Modify Group</h2>
2291       </xsl:otherwise>
2292     </xsl:choose>
2293     <form name="peForm" method="post" action="{$admingroup-update}">
2294       <table id="adminGroupFormTable">
2295         <tr>
2296           <td class="fieldName">
2297             Name:
2298           </td>
2299           <td>
2300             <xsl:choose>
2301               <xsl:when test="/bedeworkadmin/creating = 'true'">
2302                 <xsl:copy-of select="/bedeworkadmin/formElements/form/name/*"/>
2303               </xsl:when>
2304               <xsl:otherwise>
2305                 <xsl:value-of  select="/bedeworkadmin/formElements/form/name"/>
2306               </xsl:otherwise>
2307             </xsl:choose>
2308           </td>
2309         </tr>
2310         <tr>
2311           <td class="fieldName">
2312             Description:
2313           </td>
2314           <td>
2315             <xsl:copy-of select="/bedeworkadmin/formElements/form/desc/*"/>
2316           </td>
2317         </tr>
2318         <tr>
2319           <td class="fieldName">
2320             Group owner:
2321           </td>
2322           <td>
2323             <xsl:copy-of select="/bedeworkadmin/formElements/form/groupOwner/*"/>
2324           </td>
2325         </tr>
2326         <tr>
2327           <td class="fieldName">
2328             Events owner:
2329           </td>
2330           <td>
2331             <xsl:copy-of select="/bedeworkadmin/formElements/form/eventsOwner/*"/>
2332           </td>
2333         </tr>
2334       </table>
2335       <table border="0" width="100%" id="submitTable">
2336         <tr>
2337           <td>
2338             <xsl:choose>
2339               <xsl:when test="/bedeworkadmin/creating = 'true'">
2340                 <input type="submit" name="updateAdminGroup" value="Add Admin Group" class="padRight"/>
2341                 <input type="submit" name="cancelled" value="Cancel"/>
2342                 <input type="reset" value="Clear"/>
2343               </xsl:when>
2344               <xsl:otherwise>
2345                 <input type="submit" name="updateAdminGroup" value="Update Admin Group" class="padRight"/>
2346                 <input type="submit" name="cancelled" value="Cancel"/>
2347                 <input type="reset" value="Reset"/>
2348               </xsl:otherwise>
2349             </xsl:choose>
2350           </td>
2351           <td align="right">
2352             <input type="submit" name="delete" value="Delete"/>
2353           </td>
2354         </tr>
2355       </table>
2356     </form>
2357   </xsl:template>
2358
2359   <xsl:template name="modAdminGroupMembers">
2360     <h2>Update Group Membership</h2>
2361     <p>Enter a userid (for user or group) and click "add" to update group membership.
2362     Click the trash icon to remove a user from the group.</p>
2363
2364     <form name="adminGroupMembersForm" method="post" action="{$admingroup-updateMembers}">
2365       <p>Add member:
2366         <input type="text" name="updGroupMember" size="15"/>
2367         <input type="radio" value="user" name="kind" checked="checked"/>user
2368         <input type="radio" value="group" name="kind"/>group
2369         <input type="submit" name="addGroupMember" value="Add"/>
2370       </p>
2371     </form>
2372     <p><input type="button" name="return" onclick="javascript:location.replace('{$admingroup-initUpdate}')" value="Return to Admin Group listing"/></p>
2373
2374     <table id="adminGroupFormTable">
2375       <tr>
2376         <td class="fieldName">
2377           Name:
2378         </td>
2379         <td>
2380           <xsl:value-of select="/bedeworkadmin/adminGroup/name"/>
2381         </td>
2382       </tr>
2383       <tr>
2384         <td class="fieldName">
2385           Members:
2386         </td>
2387         <td>
2388           <table id="memberAccountList">
2389             <xsl:for-each select="/bedeworkadmin/adminGroup/members/member">
2390               <!--<xsl:sort select="account" order="ascending" case-order="upper-first"/>-->
2391               <tr>
2392                 <td>
2393                   <xsl:choose>
2394                     <xsl:when test="kind='0'"><img src="{$resourcesRoot}/resources/userIcon.gif" width="13" height="13" border="0" alt="user"/></xsl:when>
2395                     <xsl:when test="kind='1'"><img src="{$resourcesRoot}/resources/groupIcon.gif" width="13" height="13" border="0" alt="group"/></xsl:when>
2396                     <xsl:when test="kind='3'"></xsl:when>
2397                     <xsl:otherwise></xsl:otherwise>
2398                   </xsl:choose>
2399                 </td>
2400                 <td>
2401                   <xsl:value-of select="account"/>
2402                 </td>
2403                 <td>
2404                   <xsl:variable name="acct" select="account"/>
2405                   <a href="{$admingroup-updateMembers}&amp;removeGroupMember={$acct}" title="remove">
2406                     <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="remove"/>
2407                   </a>
2408                 </td>
2409               </tr>
2410             </xsl:for-each>
2411           </table>
2412         </td>
2413       </tr>
2414     </table>
2415     <p>
2416       <img src="{$resourcesRoot}/resources/userIcon.gif" width="13" height="13" border="0" alt="user"/> user,
2417       <img src="{$resourcesRoot}/resources/groupIcon.gif" width="13" height="13" border="0" alt="group"/> group
2418     </p>
2419   </xsl:template>
2420
2421   <xsl:template name="deleteAdminGroupConfirm">
2422     <h2>Delete Admin Group?</h2>
2423     <p>The following group will be deleted. Continue?</p>
2424     <p>
2425       <strong><xsl:value-of select="/bedeworkadmin/groups/group/name"/></strong>:
2426       <xsl:value-of select="/bedeworkadmin/groups/group/desc"/>
2427     </p>
2428     <form  name="adminGroupDelete" method="post" action="{$admingroup-delete}">
2429       <input type="submit" name="removeAdminGroupOK" value="Yes: Delete!"/>
2430       <input type="submit" name="cancelled" value="No: Cancel"/>
2431     </form>
2432   </xsl:template>
2433
2434   <!--==== HEADER TEMPLATES and NAVIGATION  ====-->
2435
2436   <xsl:template name="header">
2437     <div id="header">
2438      <!-- Uncomment this code and replace the following logo
2439           to brand your administrative interface.
2440
2441       <img id="logo"
2442           alt="logo"
2443           src="{$resourcesRoot}/resources/caladminlogo.gif"
2444           align="right"
2445           border="0"/> -->
2446
2447       <!-- set the page heading: -->
2448       <h1>
2449         <xsl:choose>
2450           <xsl:when test="/bedeworkadmin/page='modEvent' or
2451                           /bedeworkadmin/page='eventList' or
2452                           /bedeworkadmin/page='displayEvent'">
2453             Manage Events
2454           </xsl:when>
2455           <xsl:when test="/bedeworkadmin/page='sponsorList' or
2456                           /bedeworkadmin/page='modSponsor' or
2457                           /bedeworkadmin/page='deleteSponsorConfirm'">
2458             Manage Contacts
2459           </xsl:when>
2460           <xsl:when test="/bedeworkadmin/page='locationList' or
2461                           /bedeworkadmin/page='modLocation' or
2462                           /bedeworkadmin/page='deleteLocationConfirm'">
2463             Manage Locations
2464           </xsl:when>
2465           <xsl:when test="/bedeworkadmin/page='calendarList' or
2466                           /bedeworkadmin/page='modCalendar' or
2467                           /bedeworkadmin/page='calendarReferenced' or
2468                           /bedeworkadmin/page='deleteCalendarConfirm'">
2469             Manage Calendars
2470           </xsl:when>
2471           <xsl:when test="/bedeworkadmin/page='subscriptions' or
2472                           /bedeworkadmin/page='modSubscription'">
2473             Manage Subscriptions
2474           </xsl:when>
2475           <xsl:when test="/bedeworkadmin/page='views' or
2476                           /bedeworkadmin/page='modView'">
2477             Manage Views
2478           </xsl:when>
2479           <xsl:when test="/bedeworkadmin/page='modSyspars'">
2480             Manage System Preferences
2481           </xsl:when>
2482           <xsl:when test="/bedeworkadmin/page='authUserList' or
2483                           /bedeworkadmin/page='modAuthUser'">
2484             Manage Public Events Administrators
2485           </xsl:when>
2486           <xsl:when test="/bedeworkadmin/page='chooseGroup'">
2487             Choose Administrative Group
2488           </xsl:when>
2489           <xsl:when test="/bedeworkadmin/page='adminGroupList' or
2490                           /bedeworkadmin/page='modAdminGroup' or
2491                           /bedeworkadmin/page='modAdminGroup' or
2492                           /bedeworkadmin/page='modAdminGroupMembers'">
2493             Manage Administrative Groups
2494           </xsl:when>
2495           <xsl:when test="/bedeworkadmin/page='noGroup'">
2496             No Administrative Group
2497           </xsl:when>
2498           <xsl:when test="/bedeworkadmin/page='uploadTimezones'">
2499             Manage Time Zones
2500           </xsl:when>
2501           <xsl:when test="/bedeworkadmin/page='noAccess'">
2502             Access Denied
2503           </xsl:when>
2504           <xsl:when test="/bedeworkadmin/page='error'">
2505             Error
2506           </xsl:when>
2507           <xsl:otherwise>
2508             Bedework Calendar Administration
2509           </xsl:otherwise>
2510         </xsl:choose>
2511       </h1>
2512
2513       <xsl:if test="/bedeworkadmin/message">
2514         <div id="messages">
2515           <p><xsl:apply-templates select="/bedeworkadmin/message"/></p>
2516         </div>
2517       </xsl:if>
2518       <xsl:if test="/bedeworkadmin/error">
2519         <div id="errors">
2520           <p><xsl:apply-templates select="/bedeworkadmin/error"/></p>
2521         </div>
2522       </xsl:if>
2523
2524     </div>
2525     <table id="statusBarTable">
2526       <tr>
2527         <td class="leftCell">
2528           <a href="{$setup}">Main Menu</a> |
2529           <a href="{$publicCal}" target="calendar">Launch Calendar</a> |
2530           <a href="{$logout}">Log Out</a> |
2531           <!-- Enable the following two items when debugging skins only -->
2532           <a href="?refreshXslt=yes">Refresh XSL</a> |
2533           <a href="?noxslt=yes">Show XML</a> (view source)
2534         </td>
2535         <xsl:if test="/bedeworkadmin/userInfo/user">
2536           <td class="rightCell">
2537             Logged in as:
2538             <span class="status">
2539               <xsl:value-of select="/bedeworkadmin/userInfo/user"/>
2540             </span>
2541             &#160;
2542             <xsl:if test="/bedeworkadmin/userInfo/group">
2543               Group:
2544               <span class="status">
2545                 <xsl:value-of select="/bedeworkadmin/userInfo/group"/>
2546               </span>
2547             </xsl:if>
2548           </td>
2549         </xsl:if>
2550       </tr>
2551     </table>
2552     <table width="100%" border="0" cellpadding="0" cellspacing="0">
2553       <tr>
2554         <td width="50%"><img alt="" src="{$resourcesRoot}/resources/std-title-space.gif"
2555                              width="100%" height="16" border="0"/></td>
2556         <td><img src="{$resourcesRoot}/resources/std-title.gif" width="485" height="16"
2557                  border="0"
2558                  alt="Calendar of Events"/></td>
2559         <td width="50%"><img alt="" src="{$resourcesRoot}/resources/std-title-space.gif"
2560                              width="100%" height="16" border="0"/></td>
2561       </tr>
2562     </table>
2563   </xsl:template>
2564
2565   <!--==== FOOTER ====-->
2566   <xsl:template name="footer">
2567     <div id="footer">
2568       <a href="http://www.bedework.org/">Bedework website</a>
2569     </div>
2570   </xsl:template>
2571 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.