root/trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/default.xsl

Revision 2464 (checked in by johnsa, 3 years ago)

public client: added raw files for new default theme for further development. These need to be cleaned and developed.

Line 
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet
3   version="1.0"
4   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5   xmlns="http://www.w3.org/1999/xhtml">
6
7 <xsl:output
8   method="xml"
9   indent="no"
10   media-type="text/html"
11   doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
12   doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
13   standalone="yes"
14   omit-xml-declaration="yes"/>
15
16 <!-- =========================================================
17
18               DEMONSTRATION CALENDAR STYLESHEET
19
20            MainCampus Calendar Suite - Duke/Yale Skin
21
22      This stylesheet is devoid of school branding.  It is a good
23      starting point for development of a customized calendar.
24
25      It is based on work by Duke University and Yale University.
26
27      For detailed instructions on how to work with the XSLT
28      stylesheets included with this distribution, please see the
29      Bedework Design Guide at
30      http://www.bedework.org/bedework/update.do?artcenterkey=24
31
32 ===============================================================  -->
33 <!-- **********************************************************************
34     Copyright 2006 Rensselaer Polytechnic Institute. All worldwide rights reserved.
35
36     Redistribution and use of this distribution in source and binary forms,
37     with or without modification, are permitted provided that:
38        The above copyright notice and this permission notice appear in all
39         copies and supporting documentation;
40
41         The name, identifiers, and trademarks of Rensselaer Polytechnic
42         Institute are not used in advertising or publicity without the
43         express prior written permission of Rensselaer Polytechnic Institute;
44
45     DISCLAIMER: The software is distributed" AS IS" without any express or
46     implied warranty, including but not limited to, any implied warranties
47     of merchantability or fitness for a particular purpose or any warrant)'
48     of non-infringement of any current or pending patent rights. The authors
49     of the software make no representations about the suitability of this
50     software for any particular purpose. The entire risk as to the quality
51     and performance of the software is with the user. Should the software
52     prove defective, the user assumes the cost of all necessary servicing,
53     repair or correction. In particular, neither Rensselaer Polytechnic
54     Institute, nor the authors of the software are liable for any indirect,
55     special, consequential, or incidental damages related to the software,
56     to the maximum extent the law permits. -->
57
58   <!-- ================================= -->
59   <!--  DEMO PUBLIC CALENDAR STYLESHEET  -->
60   <!-- ================================= -->
61
62   <!-- DEFINE INCLUDES -->
63   <xsl:include href="../../../bedework-common/default/default/errors.xsl"/>
64   <xsl:include href="../../../bedework-common/default/default/messages.xsl"/>
65   <xsl:include href="../../../bedework-common/default/default/util.xsl"/>
66   <xsl:include href="./strings.xsl"/>
67
68   <!-- acheck -->
69   <xsl:include href="../default/display-events.xsl"/>
70   <!-- <xsl:include href="featured.xsl"/> -->
71
72   <!-- DEFINE GLOBAL CONSTANTS -->
73
74   <!-- URL of html resources (images, css, other html); by default this is
75        set to the current theme directory  -->
76   <xsl:variable name="resourcesRoot"><xsl:value-of select="/bedework/approot"/>/default/default/defaultTheme</xsl:variable>
77
78   <!-- URL of the XSL template directory -->
79   <!-- The approot is an appropriate place to put
80        included stylesheets and xml fragments. These are generally
81        referenced relatively (like errors.xsl and messages.xsl above);
82        this variable is here for your convenience if you choose to
83        reference it explicitly.  It is not used in this stylesheet, however,
84        and can be safely removed if you so choose. -->
85   <xsl:variable name="appRoot" select="/bedework/approot"/>
86
87   <!-- Properly encoded prefixes to the application actions; use these to build
88        urls; allows the application to be used without cookies or within a portal.
89        These urls are rewritten in header.jsp and simply passed through for use
90        here. Every url includes a query string (either ?b=de or a real query
91        string) so that all links constructed in this stylesheet may begin the
92        query string with an ampersand. -->
93   <xsl:variable name="setup" select="/bedework/urlPrefixes/setup"/>
94   <xsl:variable name="setSelection" select="/bedework/urlPrefixes/main/setSelection"/>
95   <xsl:variable name="fetchPublicCalendars" select="/bedework/urlPrefixes/calendar/fetchPublicCalendars"/>
96   <xsl:variable name="setViewPeriod" select="/bedework/urlPrefixes/main/setViewPeriod"/>
97   <xsl:variable name="listEvents" select="/bedework/urlPrefixes/main/listEvents"/>
98   <xsl:variable name="eventView" select="/bedework/urlPrefixes/event/eventView"/>
99   <xsl:variable name="addEventRef" select="/bedework/urlPrefixes/event/addEventRef"/>
100   <xsl:variable name="export" select="/bedework/urlPrefixes/misc/export"/>
101   <xsl:variable name="search" select="/bedework/urlPrefixes/search/search"/>
102   <xsl:variable name="search-next" select="/bedework/urlPrefixes/search/next"/>
103   <xsl:variable name="calendar-fetchForExport" select="/bedework/urlPrefixes/calendar/fetchForExport"/>
104   <xsl:variable name="mailEvent" select="/bedework/urlPrefixes/mail/mailEvent"/>
105   <xsl:variable name="stats" select="/bedework/urlPrefixes/stats/stats"/>
106
107   <!-- acheck -->
108   <xsl:variable name="allGroupsAppVar">&amp;setappvar=group(all)</xsl:variable>
109
110   <!-- URL of the web application - includes web context -->
111   <xsl:variable name="urlPrefix" select="/bedework/urlprefix"/>
112
113   <!-- Other generally useful global variables -->
114   <xsl:variable name="privateCal">/ucal</xsl:variable>
115   <xsl:variable name="prevdate" select="/bedework/previousdate"/>
116   <xsl:variable name="nextdate" select="/bedework/nextdate"/>
117   <xsl:variable name="curdate" select="/bedework/currentdate/date"/>
118
119   <!-- MAIN TEMPLATE -->
120   <xsl:template match="/">
121     <html lang="en">
122       <head>
123         <xsl:choose>
124           <xsl:when test="/bedework/page='event'">
125             <title><xsl:value-of select="/bedework/event/summary"/></title>
126           </xsl:when>
127           <xsl:otherwise>
128             <title><xsl:copy-of select="$bwStr-Root-PageTitle"/></title>
129           </xsl:otherwise>
130         </xsl:choose>
131         <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
132         <!-- load css -->
133         <link rel="stylesheet" type="text/css" media="screen" href="{$resourcesRoot}/css/fixed.css"/>
134         <link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/css/print.css"/>
135
136         <!-- Dependencies -->
137         <xsl:text disable-output-escaping="yes">
138           <![CDATA[
139           <!--[if IE 6]>
140             <link rel="stylesheet" type="text/css" media="screen" href="{$resourcesRoot}/css/ie6.css"/>
141           <![endif]-->
142
143           <!--[if IE 7]>
144             <link rel="stylesheet" type="text/css" media="screen" href="{$resourcesRoot}/css/ie7.css"/>
145           <![endif]-->
146           ]]>
147         </xsl:text>
148
149         <!-- load javascript -->
150         <script type="text/javascript" src="{$resourcesRoot}/javascript/yui/yahoo-dom-event.js">&#160;</script>
151         <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">&#160;</script>
152         <script type="text/javascript" src="{$resourcesRoot}/javascript/yui/calendar-min.js">&#160;</script>
153         <script type="text/javascript" src="{$resourcesRoot}/javascript/yui/animation-min.js">&#160;</script>
154         <xsl:if test="/bedework/page='searchResult'">
155             <script type="text/javascript" src="{$resourcesRoot}/javascript/catSearch.js">&#160;</script>
156         </xsl:if>
157       <script type="text/javascript" src="{$resourcesRoot}/javascript/mainCampus.js">&#160;</script>
158
159         <!-- address bar icon -->
160         <link rel="icon" type="image/ico" href="{$resourcesRoot}/images/ecal.ico"/>
161         <script type="text/javascript">
162             <xsl:call-template name="jsonDataObject"/>
163         </script>
164         <script type="text/javascript" src="{$resourcesRoot}/javascript/ifs-calendar.js">i&#160;</script>
165       </head>
166       <body>
167         <div id="wrap">
168           <div id="header">
169             <xsl:call-template name="dateTitleBar"/>
170             <xsl:call-template name="tabs"/>
171           </div>
172           <xsl:if test="/bedework/error">
173             <div id="errors">
174               <xsl:apply-templates select="/bedework/error"/>
175             </div>
176           </xsl:if>
177           <div id="content">
178
179             <xsl:choose>
180
181               <!-- Layout for: Single Event Display-->
182               <xsl:when test="/bedework/page = 'event'">
183                     <div id="contentSection">
184                     <xsl:call-template name="display-left-column"/>
185                     <div class="double_center_column" id="center_column">
186             <div class="secondaryColHeader"> <h3>Event Information</h3> </div>
187                         <xsl:apply-templates select="/bedework/event"/>
188             <div class="right_column" id="right_column"> </div>
189                     </div>
190                  </div>
191               </xsl:when>
192
193               <!-- Layout for: Calendar List -->
194               <xsl:when test="/bedework/page='calendarList'">
195                 <div id="contentSection">
196                   <div class="secondaryColHeader">
197                     <h3>All Calendars</h3>
198                   </div>
199                   <xsl:apply-templates select="/bedework/calendars"/>
200                 </div>
201               </xsl:when>
202
203               <!-- Layout for: Search Results -->
204               <xsl:when test="/bedework/page='searchResult'">
205                 <div id="contentSection">
206                   <xsl:call-template name="display-left-column"/>
207                 </div>
208      <div class="double_center_column" id="right_column"> </div>
209                 <div class="double_center_column" id="center_column">
210                     <xsl:call-template name="searchResult"/>
211                     <xsl:call-template name="advancedSearch"/>
212                 </div>
213               </xsl:when>
214
215               <!-- Layout for: Current Day (list only) -->
216               <xsl:when test="/bedework/periodname = 'Day' and ((/bedework/now/date) = (/bedework/currentdate/date))">
217       <div id="contentSection">
218                       <xsl:call-template name="jsDateSelectionCal"/>
219                       <div id="feature">
220                            <xsl:apply-templates select="document('./data/FeaturedEvent/FeaturedEvent.xml')/system-data-structure"/>
221                       </div>
222                       <div class="clear">&#160;</div>
223                   </div>
224       <div id="contentSection">
225                       <div class="left_column">
226                             <xsl:call-template name="display-side-bar"/>
227                            <div class="extFeeds"><a href="http://buzz.duke.edu"><img src="{$resourcesRoot}/images/buzz.gif" alt="Buzz"/></a>
228                                <a id="buzzTrigger" href="#">More &gt;</a><div id="buzzResult" style="display:none">
229                                Events List</div>
230                      </div>
231                   </div>
232       <xsl:call-template name="groupsList"/>
233
234                   <xsl:call-template name="display-center-column"/>
235                   <div class="right_column" id="right_column"> <xsl:call-template name="ongoingEventList"/> </div>
236     </div>
237               </xsl:when>
238
239               <!-- Layout for: Daily (list only) -->
240               <xsl:when test="/bedework/periodname = 'Day' and /bedework/page='eventscalendar'">
241                 <div id="contentSection">
242                    <xsl:call-template name="display-left-column"/>
243                    <xsl:call-template name="display-center-column"/>
244                   <div class="right_column" id="right_column"> <xsl:call-template name="ongoingEventList"/> </div>
245                 </div>
246               </xsl:when>
247
248               <!-- Layout for: Week (list) -->
249               <xsl:when test="bedework/periodname = 'Week' and /bedework/page='eventscalendar'">
250                 <div id="contentSection">
251                    <xsl:call-template name="display-left-column"/>
252                    <xsl:call-template name="display-center-column"/>
253                    <div class="right_column" id="right_column"> <xsl:call-template name="ongoingEventList"/> </div>
254                 </div>
255               </xsl:when>
256
257               <!-- Layout for: Month (List) -->
258               <xsl:when test="bedework/periodname = 'Month' and /bedework/page='eventscalendar'">
259                   <div id="contentSection">
260                      <xsl:call-template name="display-left-column"/>
261                      <xsl:call-template name="display-center-column"/>
262                      <div class="right_column" id="right_column"> <xsl:call-template name="ongoingEventList"/> </div>
263                   </div>
264               </xsl:when>
265
266               <!-- Layout for: Year -->
267               <xsl:when test="bedework/periodname = 'Year' and /bedework/page='eventscalendar'">
268                 <div id="contentSection">
269                   <xsl:call-template name="display-left-column"/>
270                   <div class="double_center_column" id="center_column">
271                     <div class="secondaryColHeader">
272                       <xsl:call-template name="navigation"/>
273                     </div>
274                     <xsl:call-template name="yearView"/>
275                   </div>
276        <div class="right_column" id="right_column"> </div>
277                 </div>
278               </xsl:when>
279
280               <!-- Layout for: System Stats -->
281               <xsl:when test="/bedework/page='showSysStats'">
282                 <xsl:call-template name="stats"/>
283               </xsl:when>
284
285               <!-- page for calendar export (can optionally be replaced by
286                 a pop-up widget; see the calendars template) -->
287               <xsl:when test="/bedework/page='displayCalendarForExport'">
288                 <xsl:apply-templates select="/bedework/currentCalendar" mode="export"/>
289               </xsl:when>
290
291               <!-- Layout for: Catch all for errors -->
292               <xsl:otherwise>Error: <xsl:value-of select="/bedework/page"/></xsl:otherwise>
293             </xsl:choose>
294
295             <div class="clear">&#160;</div>
296           </div>
297           <!-- footer -->
298           <xsl:call-template name="footer"/>
299         </div>
300
301        <!--=====  If we're running in production, send stats to google analytics ========-->
302        <xsl:variable name="server-name"><xsl:call-template name="current-server"/></xsl:variable>
303        <xsl:if test="$server-name='http://calendar.duke.edu'">
304              <script type="text/javascript">
305                  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
306                  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
307              </script>
308              <script type="text/javascript">
309                  var pageTracker = _gat._getTracker("UA-2424370-34");
310                  pageTracker._initData();
311                  pageTracker._trackPageview();
312              </script>
313          </xsl:if>
314       </body>
315     </html>
316   </xsl:template>
317
318   <!--======= Display Left Column ===========-->
319   <xsl:template name="display-left-column">
320            <div class="left_column">
321                  <xsl:call-template name="jsDateSelectionCal"/>
322                  <div class="clear">&#160;</div>
323                  <xsl:call-template name="display-side-bar"/>
324           </div>
325           <xsl:call-template name="groupsList"/>
326  </xsl:template>
327
328   <!--======= Display Center Column ===========-->
329   <xsl:template name="display-center-column">
330            <div class="center_column" id="center_column">
331                <div class="secondaryColHeader"> <xsl:call-template name="navigation"/> </div>
332                <xsl:call-template name="list-view">
333                   <xsl:with-param name="node" select="."/>
334                   <xsl:with-param name="suite-name">Main</xsl:with-param>
335                </xsl:call-template>
336            </div>
337   </xsl:template>
338
339   <!--============= Display Side Bar ======-->
340   <xsl:template name="display-side-bar">
341          <xsl:call-template name="viewList"/>
342          <div class="sideBarContainer">
343               <h4>FILTER BY GROUP/ ORG/ DEPT:</h4>
344               <ul class="sideLinks">
345                   <li><a href="#" onClick="javascript:toggleDiv('groupListDiv'); toggleDiv('right_column'); toggleDiv('center_column');"> Group List </a> </li>
346               </ul>
347               <xsl:call-template name="display-events-calendar-info"/>
348               <xsl:call-template name="sideLinksList"/>
349          </div>
350   </xsl:template>
351
352   <!--============= Display Events Calendar Info ======-->
353   <xsl:template name="display-events-calendar-info">
354         <h4>EVENTS CALENDAR INFO: </h4>
355         <ul class="sideLinks">
356             <li><a href="/caladmin"> Manage Events </a> </li>
357             <li><a href="/eventsubmit?setappvar=confirmed(no)"> Submit an Event </a> </li>
358      <li><a href="http://calendar.duke.edu/help"> Help </a> </li>
359         </ul>
360   </xsl:template>
361
362   <!--============= System Data Structure  ======-->
363   <xsl:template match="system-data-structure">
364
365     <xsl:variable name="imageFilenameLEFT" select="left-image/image1/name"/>
366     <xsl:variable name="featureLinkLEFT" select="left-image/featureLink"/>
367     <xsl:variable name="toolTipLEFT" select="left-image/toolTip"/>
368   <xsl:variable name="imageFilenameCENTER" select="middle-image/image2/name"/>
369     <xsl:variable name="featureLinkCENTER" select="middle-image/featureLink"/>
370     <xsl:variable name="toolTipCENTER" select="middle-image/toolTip"/>
371   <xsl:variable name="imageFilenameRIGHT" select="right-image/image3/name"/>
372     <xsl:variable name="featureLinkRIGHT" select="right-image/featureLink"/>
373     <xsl:variable name="toolTipRIGHT" select="right-image/toolTip"/>
374
375     <xsl:choose>
376       <xsl:when test="$featureLinkLEFT = ''">
377         <img class="border" src="{$resourcesRoot}/data/FeaturedEvent/{$imageFilenameLEFT}" alt="{$toolTipLEFT}"/>
378       </xsl:when>
379       <xsl:otherwise>
380         <a href="{$featureLinkLEFT}">
381           <img class="border" src="{$resourcesRoot}/data/FeaturedEvent/{$imageFilenameLEFT}" alt="{$toolTipLEFT}"/>
382         </a>
383       </xsl:otherwise>
384     </xsl:choose>
385
386   <xsl:choose>
387       <xsl:when test="$featureLinkCENTER = ''">
388         <img class="border" src="{$resourcesRoot}/data/FeaturedEvent/{$imageFilenameCENTER}" alt="{$toolTipCENTER}"/>
389       </xsl:when>
390       <xsl:otherwise>
391         <a href="{$featureLinkCENTER}">
392           <img class="border" src="{$resourcesRoot}/data/FeaturedEvent/{$imageFilenameCENTER}" alt="{$toolTipCENTER}"/>
393         </a>
394       </xsl:otherwise>
395     </xsl:choose>
396
397   <xsl:choose>
398       <xsl:when test="$featureLinkRIGHT = ''">
399         <img src="{$resourcesRoot}/data/FeaturedEvent/{$imageFilenameRIGHT}" alt="{$toolTipRIGHT}"/>
400       </xsl:when>
401       <xsl:otherwise>
402         <a href="{$featureLinkRIGHT}">
403           <img src="{$resourcesRoot}/data/FeaturedEvent/{$imageFilenameRIGHT}" alt="{$toolTipRIGHT}"/>
404         </a>
405       </xsl:otherwise>
406     </xsl:choose>
407
408   </xsl:template>
409
410   <!-- JavaScript Array for Calendar (might be good to turn into JSON if more properties need to be passed in)-->
411   <xsl:template name="jsonDataObject">
412     <!-- Month to display (to be handed in to js, so it aligns with the events beeing shown) -->
413     <xsl:variable name="displayMonthYear">
414       <xsl:value-of select="substring(/bedework/currentdate/date,5,2)"/>
415       <xsl:text>/</xsl:text>
416       <xsl:value-of select="substring(/bedework/currentdate/date,0,5)"/>
417     </xsl:variable>
418
419     <xsl:variable name="rangeStartMo">
420       <xsl:value-of select="substring(/bedework/firstday/date,5,2)"/>
421     </xsl:variable>
422
423     <xsl:variable name="rangeStartDay">
424       <xsl:value-of select="substring(/bedework/firstday/date,7,2)"/>
425     </xsl:variable>
426
427     <xsl:variable name="rangeStartYear">
428       <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/>
429     </xsl:variable>
430
431     <xsl:variable name="rangeEndMo">
432       <xsl:value-of select="substring(/bedework/lastday/date,5,2)"/>
433     </xsl:variable>
434
435     <xsl:variable name="rangeEndDay">
436       <xsl:value-of select="substring(/bedework/lastday/date,7,2)"/>
437     </xsl:variable>
438
439     <xsl:variable name="rangeEndYear">
440       <xsl:value-of select="substring(/bedework/lastday/date,1,4)"/>
441     </xsl:variable>
442       navcalendar =
443           [
444           "<xsl:value-of select="$displayMonthYear"/>",
445           "<xsl:value-of select="$rangeStartMo"/>",
446           "<xsl:value-of select="$rangeStartDay"/>",
447           "<xsl:value-of select="$rangeStartYear"/>",
448           "<xsl:value-of select="$rangeEndMo"/>",
449           "<xsl:value-of select="$rangeEndDay"/>",
450           "<xsl:value-of select="$rangeEndYear"/>",
451           ];
452   </xsl:template>
453   <!--==== HEADER TEMPLATES and NAVIGATION  ====-->
454   <!-- these templates are separated out for convenience and to simplify the default template -->
455   <xsl:template name="dateTitleBar">
456     <xsl:choose>
457       <xsl:when test="/bedework/page='showSysStats' or /bedework/page='calendars'">&#160;</xsl:when>
458       <xsl:otherwise>
459         <div id="head-top">
460           <h1>Bedework Events Calendar</h1>
461           <p style="padding: 1em; background-color: #eee; border: 1px solid black;">In progress: <a href="?skinNameSticky=bwclassic">go to Bedework Classic</a></p>
462         </div>
463         <a id="currentDate" href="{$setViewPeriod}&amp;viewType=todayView&amp;date={$curdate}">
464           <xsl:value-of select="/bedework/now/longdate"/>
465         </a>
466       </xsl:otherwise>
467     </xsl:choose>
468   </xsl:template>
469   <xsl:template name="dateSelectForm">
470     <form name="calForm" method="post" action="{$setViewPeriod}">
471       <xsl:if test="/bedework/periodname!='Year'">
472         <select name="viewStartDate.month">
473           <xsl:for-each select="/bedework/monthvalues/val">
474             <xsl:variable name="temp" select="."/>
475             <xsl:variable name="pos" select="position()"/>
476             <xsl:choose>
477               <xsl:when test="/bedework/monthvalues[start=$temp]">
478                 <option value="{$temp}" selected="selected">
479                   <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/>
480                 </option>
481               </xsl:when>
482               <xsl:otherwise>
483                 <option value="{$temp}">
484                   <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/>
485                 </option>
486               </xsl:otherwise>
487             </xsl:choose>
488           </xsl:for-each>
489         </select>
490         <xsl:if test="/bedework/periodname!='Month'">
491           <select name="viewStartDate.day">
492             <xsl:for-each select="/bedework/dayvalues/val">
493               <xsl:variable name="temp" select="."/>
494               <xsl:variable name="pos" select="position()"/>
495               <xsl:choose>
496                 <xsl:when test="/bedework/dayvalues[start=$temp]">
497                   <option value="{$temp}" selected="selected">
498                     <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/>
499                   </option>
500                 </xsl:when>
501                 <xsl:otherwise>
502                   <option value="{$temp}">
503                     <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/>
504                   </option>
505                 </xsl:otherwise>
506               </xsl:choose>
507             </xsl:for-each>
508           </select>
509         </xsl:if>
510       </xsl:if>
511       <xsl:variable name="temp" select="/bedework/yearvalues/start"/>
512       <input type="text" name="viewStartDate.year" maxlength="4" size="4" value="{$temp}"/>
513       <input name="submit" type="submit" value="go"/>
514     </form>
515   </xsl:template>
516
517   <xsl:template name="tabs">
518     <div id="nav-search-wrap">
519       <!-- <xsl:if test="/bedework/page!='searchResult'"> -->
520       <form name="searchForm" id="basic_search" method="post" onsubmit="var bsearch = document.getElementById('basicsearchbox'); bsearch.value == '' ? bsearch.value += 'category:Main' : bsearch.value += ' AND category:Main'" action="{$search}">
521       <!--advance search link  -->
522         <a href="{$search-next}">Advanced Search</a>
523         <!--<label for="query">Search </label>--><input type="text" name="query" id="basicsearchbox"/>
524         <input id="searchSubmit" type="submit" name="submit" value="Search" onmouseover="this.style.backgroundColor = '#273E6D'" onmouseout="this.style.backgroundColor = '#85C13D'"/> <!--   -->
525       </form>
526       <!-- </xsl:if> -->
527       <ul id="nav-main">
528             <xsl:variable name="currentClass">current</xsl:variable>
529             <li>
530               <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$curdate}">
531                 <xsl:if test="/bedework/periodname='Day'">
532                   <xsl:attribute name="class">
533                     <xsl:value-of select="$currentClass"/>
534                   </xsl:attribute>
535                 </xsl:if>DAY</a>
536             </li>
537             <li>
538               <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$curdate}">
539                 <xsl:if test="/bedework/periodname='Week'">
540                   <xsl:attribute name="class">
541                     <xsl:value-of select="$currentClass"/>
542                   </xsl:attribute>
543                 </xsl:if>WEEK</a>
544             </li>
545             <li>
546               <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$curdate}"><xsl:if test="/bedework/periodname='Month'">
547                   <xsl:attribute name="class">
548                     <xsl:value-of select="$currentClass"/>
549                   </xsl:attribute>
550                 </xsl:if>MONTH</a>
551             </li>
552             <li>
553               <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}">
554                 <xsl:if test="/bedework/periodname='Year'">
555                   <xsl:attribute name="class">
556                     <xsl:value-of select="$currentClass"/>
557                   </xsl:attribute>
558                 </xsl:if>YEAR</a>
559             </li>
560       </ul>
561       <div class="clear">&#160;</div>
562     </div>
563   </xsl:template>
564
565   <!-- Date Selection Cal -->
566   <xsl:template name="jsDateSelectionCal">
567     <div id="cal1" class="calContainer">
568       <xsl:call-template name="dateSelectForm"/>
569       <p>To view the interactive calendar, please enable Javascript on your browser.</p>
570     </div>
571   </xsl:template>
572
573  <xsl:template name="ongoingEventList">
574     <h3 class="secondaryColHeader">Ongoing</h3>
575     <ul class="eventList">
576       <xsl:for-each select="/bedework/eventscalendar/year/month/week/day/event[(categories/category[value|word = 'Main']) and (categories/category[value|word = 'Ongoing']) and not(categories/category[value|word = 'Local'])]">
577       <xsl:sort select="start/unformatted" order="ascending" data-type="number"/>
578         <xsl:sort select="id" data-type="number"/>
579         <xsl:variable name="lastId" select="id"/>
580         <xsl:if test="not(preceding::event[id=$lastId])">
581          <xsl:choose>
582               <xsl:when test="(/bedework/appvar[key = 'group']/value = /bedework/urlPrefixes/groups/group/eventOwner) and (not(/bedework/appvar[key = 'category']/value) or (/bedework/appvar[key = 'category']/value = 'all'))">
583                 <xsl:variable name="creator" select="creator"/>
584             <xsl:variable name="envgroup" select="/bedework/appvar[key = 'group']/value"/>
585             <xsl:variable name="cosponsor" select="xproperties/X-BEDEWORK-CS/parameters/X-BEDEWORK-PARAM-DESCRIPTION"/>
586             <xsl:choose>
587                   <xsl:when test="/bedework/appvar[key = 'group']/value = $creator">
588                 <xsl:call-template name="ongoingEvent"/>
589               </xsl:when>
590               <xsl:when test="contains($cosponsor, concat($envgroup,','))">
591                 <xsl:call-template name="ongoingEvent"/>
592                 </xsl:when>
593               </xsl:choose>
594               </xsl:when>
595             <xsl:when test="not(/bedework/appvar[key = 'group']/value = /bedework/urlPrefixes/groups/group/eventOwner) and (/bedework/appvar[key = 'category']/value) and not(/bedework/appvar[key = 'category']/value = 'all')">
596                   <xsl:call-template name="split-for-ongoing">
597                     <xsl:with-param name="list"><xsl:value-of select="/bedework/appvar[key = 'category']/value"/></xsl:with-param>
598                       <xsl:with-param name="delimiter">~</xsl:with-param>
599               </xsl:call-template>
600               </xsl:when>
601             <xsl:when test="(/bedework/appvar[key = 'group']/value = /bedework/urlPrefixes/groups/group/eventOwner) and (/bedework/appvar[key = 'category']/value) and not(/bedework/appvar[key = 'category']/value = 'all')">
602                 <xsl:variable name="creator" select="creator"/>
603             <xsl:variable name="envgroup" select="/bedework/appvar[key = 'group']/value"/>
604             <xsl:variable name="cosponsor" select="xproperties/X-BEDEWORK-CS/parameters/X-BEDEWORK-PARAM-DESCRIPTION"/>
605             <xsl:choose>
606                   <xsl:when test="/bedework/appvar[key = 'group']/value = $creator">
607                 <xsl:call-template name="split-for-ongoing">
608                       <xsl:with-param name="list"><xsl:value-of select="/bedework/appvar[key = 'category']/value"/></xsl:with-param>
609                         <xsl:with-param name="delimiter">~</xsl:with-param>
610                 </xsl:call-template>
611               </xsl:when>
612               <xsl:when test="contains($cosponsor, concat($envgroup,','))">
613                 <xsl:call-template name="split-for-ongoing">
614                       <xsl:with-param name="list"><xsl:value-of select="/bedework/appvar[key = 'category']/value"/></xsl:with-param>
615                         <xsl:with-param name="delimiter">~</xsl:with-param>
616                 </xsl:call-template>
617                 </xsl:when>
618               </xsl:choose>
619               </xsl:when>
620               <xsl:otherwise>
621                   <xsl:call-template name="ongoingEvent"/>
622               </xsl:otherwise>
623           </xsl:choose>
624        </xsl:if>
625   </xsl:for-each>
626      </ul>
627   </xsl:template>
628
629
630  <xsl:template name="split-for-ongoing">
631    <xsl:param name="list"/>
632    <xsl:param name="delimiter"/>
633    <xsl:variable name="newlist">
634    <xsl:choose>
635    <xsl:when test="contains($list, $delimiter)"><xsl:value-of select="normalize-space($list)"/></xsl:when>
636               <xsl:otherwise><xsl:value-of select="concat(normalize-space($list), $delimiter)"/></xsl:otherwise>
637            </xsl:choose>
638        </xsl:variable>
639        <xsl:variable name="first" select="substring-before($newlist, $delimiter)"/>
640         <xsl:variable name="remaining" select="substring-after($newlist, $delimiter)"/>
641       <xsl:choose>
642         <xsl:when test="$first = categories/category/value">
643           <xsl:call-template name="ongoingEvent"/>
644         </xsl:when>
645       <xsl:when test="$first = categories/category/word">
646           <xsl:call-template name="ongoingEvent"/>
647         </xsl:when>
648       <xsl:otherwise>
649           <xsl:if test="$remaining">
650             <xsl:call-template name="split-for-ongoing">
651                 <xsl:with-param name="list" select="$remaining"/>
652                 <xsl:with-param name="delimiter"><xsl:value-of select="$delimiter"/></xsl:with-param>
653             </xsl:call-template>
654         </xsl:if>
655       </xsl:otherwise>
656         </xsl:choose>
657   </xsl:template>
658
659  <xsl:template name="ongoingEvent">
660       <li>
661           <xsl:variable name="subscriptionId" select="subscription/id"/>
662           <xsl:variable name="calPath" select="calendar/encodedPath"/>
663           <xsl:variable name="guid" select="guid"/>
664           <xsl:variable name="recurrenceId" select="recurrenceId"/>
665           <xsl:variable name="statusClass">
666             <xsl:choose>
667               <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when>
668               <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when>
669               <xsl:otherwise>bwStatusConfirmed</xsl:otherwise>
670             </xsl:choose>
671           </xsl:variable>
672           <xsl:if test="status != 'CONFIRMED'">
673             <xsl:value-of select="status"/>
674             <xsl:text>: </xsl:text>
675           </xsl:if>
676           <xsl:value-of select="summary"/>,
677        Ends <xsl:value-of select="end/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="end/time"/>
678           <xsl:text> |</xsl:text>
679           <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">more</a>
680           <xsl:text>|</xsl:text>
681         </li>
682 </xsl:template>
683
684   <!-- Notices List -->
685   <xsl:template name="noticesList">
686     <h3 class="secondaryColHeader">Notices</h3>
687     <ul>
688       <xsl:for-each select="/bedework/eventscalendar/year/month/week/day/event[categories/category/value = 'Reminder']">
689           <li>
690             <xsl:variable name="subscriptionId" select="subscription/id"/>
691             <xsl:variable name="calPath" select="calendar/encodedPath"/>
692             <xsl:variable name="guid" select="guid"/>
693             <xsl:variable name="recurrenceId" select="recurrenceId"/>
694             <xsl:variable name="statusClass">
695               <xsl:choose>
696                 <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when>
697                 <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when>
698                 <xsl:otherwise>bwStatusConfirmed</xsl:otherwise>
699               </xsl:choose>
700             </xsl:variable>
701             <xsl:if test="status != 'CONFIRMED'">
702               <xsl:value-of select="status"/>
703               <xsl:text>: </xsl:text>
704             </xsl:if>
705             <xsl:value-of select="summary"/>
706             <xsl:text> | </xsl:text>
707             <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">more</a>
708             <xsl:text> |</xsl:text>
709           </li>
710       </xsl:for-each>
711     </ul>
712   </xsl:template>
713
714   <!-- View List -->
715   <xsl:template name="viewList">
716     <div class="secondaryColHeader"><h3>Calendar Views</h3></div>
717     <ul class="viewList">
718       <!-- <xsl:for-each select="/bedework/views/view">
719         <xsl:variable name="viewName" select="name/text()"/>
720         <li>
721           <a href="{$setSelection}&amp;viewName={$viewName}">
722             <xsl:if test="$viewName = (/bedework/selectionState/view/name)">
723               <xsl:attribute name="class">current</xsl:attribute>
724             </xsl:if>
725             <xsl:value-of select="$viewName"/>
726           </a>
727         </li>
728       </xsl:for-each> -->
729     <li>
730           <a href="/cal/?setappvar=category(all)&amp;setappvar=categoryclass(all)">
731             <xsl:if test="((/bedework/appvar[key = 'categoryclass']/value = 'all') or not(/bedework/appvar[key = 'categoryclass']/value))">
732               <xsl:attribute name="class">current</xsl:attribute>
733             </xsl:if>
734             All
735           </a>
736         </li>
737     <li>
738           <!-- <a href="/cal/?setappvar=category(Academic Calendar Dates)&amp;setappvar=categoryclass(Academic Calendar Dates)">
739             <xsl:if test="/bedework/appvar[key = 'categoryclass']/value = 'Academic Calendar Dates'">
740               <xsl:attribute name="class">current</xsl:attribute>
741               </xsl:if> -->
742       <a href="http://www.registrar.duke.edu/registrar/studentpages/student/academicalendars.html">
743       Official Academic Calendar
744           </a>
745         </li>
746     <li>
747          <a href="/cal/?setappvar=category(Concert/Music~ Dance Performance~ Exhibit~ Masterclass~ Movie/Film~ Reading~ Theater)&amp;setappvar=categoryclass(Arts)">
748               <xsl:if test="/bedework/appvar[key = 'categoryclass']/value = 'Arts'">
749                 <xsl:attribute name="class">current</xsl:attribute>
750               </xsl:if>
751         Arts
752          </a><span id="artsClicker">+</span>
753       <ul id="artsSub" style="height:0px" class="subviewList">
754           <xsl:choose>
755         <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'Arts'">
756                 <xsl:attribute name="style">height:170px</xsl:attribute>
757               </xsl:when>
758         <xsl:otherwise>
759                 <xsl:attribute name="style">height:0px</xsl:attribute>
760               </xsl:otherwise>
761         </xsl:choose>
762           <li><a href="/cal/?setappvar=category(Concert/Music)&amp;setappvar=categoryclass(Arts)">
763         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Concert/Music'">
764         <xsl:attribute name="class">current</xsl:attribute>
765         </xsl:if>
766         Concert/Music
767             </a></li>
768         <li><a href="/cal/?setappvar=category(Dance Performance)&amp;setappvar=categoryclass(Arts)">
769         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Dance Performance'">
770         <xsl:attribute name="class">current</xsl:attribute>
771         </xsl:if>
772         Dance Performance
773             </a></li>
774         <li><a href="/cal/?setappvar=category(Exhibit)&amp;setappvar=categoryclass(Arts)">
775         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Exhibit'">
776         <xsl:attribute name="class">current</xsl:attribute>
777         </xsl:if>
778         Exhibit
779             </a></li>
780         <li><a href="/cal/?setappvar=category(Masterclass)&amp;setappvar=categoryclass(Arts)">
781         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Masterclass'">
782         <xsl:attribute name="class">current</xsl:attribute>
783         </xsl:if>
784         Masterclass
785             </a></li>
786         <li><a href="/cal/?setappvar=category(Movie/Film)&amp;setappvar=categoryclass(Arts)">
787         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Movie/Film'">
788         <xsl:attribute name="class">current</xsl:attribute>
789         </xsl:if>
790         Movie/Film
791             </a></li>
792          <li><a href="/cal/?setappvar=category(Reading)&amp;setappvar=categoryclass(Arts)">
793         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Reading'">
794         <xsl:attribute name="class">current</xsl:attribute>
795         </xsl:if>
796         Reading
797             </a></li>
798          <li><a href="/cal/?setappvar=category(Theater)&amp;setappvar=categoryclass(Arts)">
799         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Theater'">
800         <xsl:attribute name="class">current</xsl:attribute>
801         </xsl:if>
802         Theater
803             </a></li>
804     </ul>
805     </li>
806     <li>
807           <a href="/cal/?setappvar=category(Athletics/Intramurals/Recreation~ Athletics/Varsity Sports/Men~ Athletics/Varsity Sports/Women)&amp;setappvar=categoryclass(Athletics/Recreation)">
808             <xsl:if test="/bedework/appvar[key = 'categoryclass']/value = 'Athletics/Recreation'">
809               <xsl:attribute name="class">current</xsl:attribute>
810             </xsl:if>
811       Athletics/Recreation
812           </a><span id="athleticsClicker">+</span>
813       <ul id="athleticsSub" class="subviewList">
814           <xsl:choose>
815         <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'Athletics/Recreation'">
816                 <xsl:attribute name="style">height:75px</xsl:attribute>
817               </xsl:when>
818         <xsl:otherwise>
819                 <xsl:attribute name="style">height:0px</xsl:attribute>
820               </xsl:otherwise>
821         </xsl:choose>
822           <li><a href="/cal/?setappvar=category(Athletics/Varsity Sports/Men)&amp;setappvar=categoryclass(Athletics/Recreation)">
823         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Athletics/Varsity Sports/Men'">
824         <xsl:attribute name="class">current</xsl:attribute>
825         </xsl:if>
826         Athletics/Varsity Sports/Men
827             </a></li>
828         <li><a href="/cal/?setappvar=category(Athletics/Varsity Sports/Women)&amp;setappvar=categoryclass(Athletics/Recreation)">
829         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Athletics/Varsity Sports/Women'">
830         <xsl:attribute name="class">current</xsl:attribute>
831         </xsl:if>
832         Athletics/Varsity Sports/Women
833             </a></li>
834         <li><a href="/cal/?setappvar=category(Athletics/Intramurals/Recreation)&amp;setappvar=categoryclass(Athletics/Recreation)">
835         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Athletics/Intramurals/Recreation'">
836         <xsl:attribute name="class">current</xsl:attribute>
837         </xsl:if>
838         Athletics/Intramurals/Recreation
839             </a></li>
840     </ul>
841         </li>
842     <li>
843           <a href="/cal/?setappvar=category(Conference/Symposium~ Lecture/Talk~ Panel/Seminar/Colloquium)&amp;setappvar=categoryclass(Lectures/Conferences)">
844             <xsl:if test="/bedework/appvar[key = 'categoryclass']/value = 'Lectures/Conferences'">
845               <xsl:attribute name="class">current</xsl:attribute>
846             </xsl:if>
847       Lectures/Conferences
848           </a><span id="lecturesClicker">+</span>
849       <ul id="lecturesSub" class="subviewList">
850           <xsl:choose>
851         <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'Lectures/Conferences'">
852                 <xsl:attribute name="style">height:75px</xsl:attribute>
853               </xsl:when>
854         <xsl:otherwise>
855                 <xsl:attribute name="style">height:0px</xsl:attribute>
856               </xsl:otherwise>
857         </xsl:choose>
858           <li><a href="/cal/?setappvar=category(Conference/Symposium)&amp;setappvar=categoryclass(Lectures/Conferences)">
859         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Conference/Symposium'">
860         <xsl:attribute name="class">current</xsl:attribute>
861         </xsl:if>
862         Conference/Symposium
863             </a></li>
864         <li><a href="/cal/?setappvar=category(Lecture/Talk)&amp;setappvar=categoryclass(Lectures/Conferences)">
865         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Lecture/Talk'">
866         <xsl:attribute name="class">current</xsl:attribute>
867         </xsl:if>
868         Lecture/Talk
869             </a></li>
870         <li><a href="/cal/?setappvar=category(Panel/Seminar/Colloquium)&amp;setappvar=categoryclass(Lectures/Conferences)">
871         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Panel/Seminar/Colloquium'">
872         <xsl:attribute name="class">current</xsl:attribute>
873         </xsl:if>
874         Panel/Seminar/Colloquium
875             </a></li>
876     </ul>
877         </li>
878     <li>
879           <a href="/cal/?setappvar=category(Religious/Spiritual)&amp;setappvar=categoryclass(Religious/Spiritual)">
880             <xsl:if test="/bedework/appvar[key = 'categoryclass']/value = 'Religious/Spiritual'">
881               <xsl:attribute name="class">current</xsl:attribute>
882             </xsl:if>
883             Religious/Spiritual
884           </a>
885         </li>
886     <li>
887           <a href="/cal/?setappvar=category(Commencement~ Founders' Day~ Holiday~ MLK~ Parents' and Family Weekend)&amp;setappvar=categoryclass(University Events)">
888             <xsl:if test="/bedework/appvar[key = 'categoryclass']/value = 'University Events'">
889               <xsl:attribute name="class">current</xsl:attribute>
890             </xsl:if>
891       University Events
892           </a><span id="lifeClicker">+</span>
893       <ul id="lifeSub" class="subviewList">
894           <xsl:choose>
895             <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'University Events'">
896                 <xsl:attribute name="style">height:135px</xsl:attribute>
897               </xsl:when>
898         <xsl:otherwise>
899                 <xsl:attribute name="style">height:0px</xsl:attribute>
900               </xsl:otherwise>
901         </xsl:choose>
902         <li><a href="/cal/main/setViewPeriod.do?setappvar=category(Commencement)&amp;setappvar=categoryclass(University Events)&amp;date=20100501&amp;viewType=monthView">
903           <xsl:if test="/bedework/appvar[key = 'category']/value = 'Commencement'">
904             <xsl:attribute name="class">current</xsl:attribute>
905           </xsl:if>
906           Commencement
907         </a></li>
908         <li><a href="/cal/main/setViewPeriod.do?setappvar=category(Founders' Day)&amp;setappvar=categoryclass(University Events)&amp;date=20091001&amp;viewType=monthView">
909           <xsl:if test="/bedework/appvar[key = &quot;category&quot;]/value = &quot;Founders' Day&quot;">
910             <xsl:attribute name="class">current</xsl:attribute>
911           </xsl:if>
912           Founders' Day
913         </a></li>
914         <li><a href="/cal/?setappvar=category(Holiday)&amp;setappvar=categoryclass(University Events)">
915           <xsl:if test="/bedework/appvar[key = 'category']/value = 'Holiday'">
916             <xsl:attribute name="class">current</xsl:attribute>
917           </xsl:if>
918           Holiday
919         </a></li>
920         <li><a href="/cal/main/setViewPeriod.do?setappvar=category(MLK)&amp;setappvar=categoryclass(University Events)&amp;date=20100101&amp;viewType=monthView">
921           <xsl:if test="/bedework/appvar[key = 'category']/value = 'MLK'">
922             <xsl:attribute name="class">current</xsl:attribute>
923           </xsl:if>
924           MLK
925         </a></li>
926         <li><a href="/cal/main/setViewPeriod.do?setappvar=category(Parents' and Family Weekend)&amp;setappvar=categoryclass(University Events)&amp;date=20091023&amp;viewType=monthView">
927           <xsl:if test="/bedework/appvar[key = &quot;category&quot;]/value = &quot;Parents' and Family Weekend&quot;">
928             <xsl:attribute name="class">current</xsl:attribute>
929           </xsl:if>
930           Parents' and Family Weekend
931         </a></li>
932     </ul>
933         </li>
934     <li>
935           <a href="/cal/?setappvar=category(Workshop/Short Course)&amp;setappvar=categoryclass(Workshop/Short Course)">
936             <xsl:if test="/bedework/appvar[key = 'categoryclass']/value = 'Workshop/Short Course'">
937               <xsl:attribute name="class">current</xsl:attribute>
938             </xsl:if>
939             Workshop/Short Course
940           </a>
941         </li>
942     <li><div style="font: bold 1.2em/2 Arial, sans-serif; display:inline;">Other</div>
943           <span id="otherClicker">+</span>
944       <ul id="otherSub" class="subviewList">
945         <xsl:choose>
946         <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'Other'">
947                 <xsl:attribute name="style">height:330px</xsl:attribute>
948               </xsl:when>
949         <xsl:otherwise>
950                 <xsl:attribute name="style">height:0px</xsl:attribute>
951               </xsl:otherwise>
952         </xsl:choose>
953           <li><a href="/cal/?setappvar=category(Alumni/Reunion)&amp;setappvar=categoryclass(Other)">
954         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Alumni/Reunion'">
955         <xsl:attribute name="class">current</xsl:attribute>
956         </xsl:if>
957         Alumni/Reunion
958             </a></li>
959         <li><a href="/cal/?setappvar=category(Brown Bag)&amp;setappvar=categoryclass(Other)">
960         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Brown Bag'">
961         <xsl:attribute name="class">current</xsl:attribute>
962         </xsl:if>
963         Brown Bag
964             </a></li>
965         <li><a href="/cal/?setappvar=category(Ceremony)&amp;setappvar=categoryclass(Other)">
966           <xsl:if test="/bedework/appvar[key = 'category']/value = 'Ceremony'">
967             <xsl:attribute name="class">current</xsl:attribute>
968           </xsl:if>
969           Ceremony
970         </a></li>
971         <li><a href="/cal/?setappvar=category(Health/Wellness)&amp;setappvar=categoryclass(Other)">
972           <xsl:if test="/bedework/appvar[key = 'category']/value = 'Health/Wellness'">
973             <xsl:attribute name="class">current</xsl:attribute>
974           </xsl:if>
975           Health/Wellness
976         </a></li>
977         <li><a href="/cal/?setappvar=category(Meeting)&amp;setappvar=categoryclass(Other)">
978           <xsl:if test="/bedework/appvar[key = 'category']/value = 'Meeting'">
979             <xsl:attribute name="class">current</xsl:attribute>
980           </xsl:if>
981           Meeting
982         </a></li>
983        <li><a href="/cal/?setappvar=category(Orientation)&amp;setappvar=categoryclass(Other)">
984         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Orientation'">
985         <xsl:attribute name="class">current</xsl:attribute>
986         </xsl:if>
987         Orientation
988             </a></li>
989         <li><a href="/cal/?setappvar=category(Reception)&amp;setappvar=categoryclass(Other)">
990           <xsl:if test="/bedework/appvar[key = 'category']/value = 'Reception'">
991             <xsl:attribute name="class">current</xsl:attribute>
992           </xsl:if>
993           Reception
994         </a></li>
995        <li><a href="/cal/?setappvar=category(Research)&amp;setappvar=categoryclass(Other)">
996         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Research'">
997         <xsl:attribute name="class">current</xsl:attribute>
998         </xsl:if>
999         Research
1000            </a></li>
1001         <li><a href="/cal/?setappvar=category(Social)&amp;setappvar=categoryclass(Other)">
1002           <xsl:if test="/bedework/appvar[key = 'category']/value = 'Social'">
1003             <xsl:attribute name="class">current</xsl:attribute>
1004           </xsl:if>
1005           Social
1006         </a></li>
1007         <li><a href="/cal/?setappvar=category(Technology)&amp;setappvar=categoryclass(Other)">
1008         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Technology'">
1009         <xsl:attribute name="class">current</xsl:attribute>
1010         </xsl:if>
1011         Technology
1012             </a></li>
1013         <li><a href="/cal/?setappvar=category(Tour)&amp;setappvar=categoryclass(Other)">
1014         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Tour'">
1015         <xsl:attribute name="class">current</xsl:attribute>
1016         </xsl:if>
1017         Tour
1018             </a></li>
1019         <li><a href="/cal/?setappvar=category(Training)&amp;setappvar=categoryclass(Other)">
1020         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Training'">
1021         <xsl:attribute name="class">current</xsl:attribute>
1022         </xsl:if>
1023         Training
1024             </a></li>
1025          <li><a href="/cal/?setappvar=category(Volunteer/Community Service)&amp;setappvar=categoryclass(Other)">
1026         <xsl:if test="/bedework/appvar[key = 'category']/value = 'Volunteer/Community Service'">
1027         <xsl:attribute name="class">current</xsl:attribute>
1028         </xsl:if>
1029         Volunteer/Community Service
1030             </a></li>
1031     </ul>
1032         </li>
1033     </ul>
1034   </xsl:template>
1035
1036 <!-- Groups List -->
1037 <xsl:template name="groupsList">
1038   <div style="display:none;" id="groupListDiv">
1039     <div class="groupHeader">
1040       <h3>Select a Group</h3>
1041       <a href="#" onClick="javascript:toggleDiv('groupListDiv'); toggleDiv('right_column'); toggleDiv('center_column');">
1042        X - Close</a>
1043     </div>
1044     <ul class="groupList">
1045       <li><a href="/cal/?setappvar=group(all)">
1046       <xsl:if test="((/bedework/appvar[key = 'group']/value = 'all') or not(/bedework/appvar[key = 'group']/value))">
1047         <xsl:attribute name="class">current</xsl:attribute>
1048         </xsl:if>
1049     All</a></li>
1050       <xsl:for-each select="/bedework/urlPrefixes/groups/group[ memberof/name = 'campusAdminGroups' ]">
1051         <xsl:variable name="eventOwner" select="eventOwner/text()"/>
1052         <xsl:variable name="groupName" select="name/text()"/>
1053         <xsl:variable name="groupDescription" select="description/text()"/>
1054               <li><a href="/cal/?setappvar=group({$eventOwner})">
1055               <xsl:if test="$eventOwner = (/bedework/appvar[key = 'group']/value)">
1056                     <xsl:attribute name="class">current</xsl:attribute>
1057                 </xsl:if>
1058           <xsl:value-of select="$groupName"/>
1059           </a>
1060           <xsl:if test="$groupName != $groupDescription">
1061             <div class="groupDesc"><xsl:value-of select="$groupDescription"/></div>
1062           </xsl:if>
1063           </li>
1064       </xsl:for-each>
1065    </ul>
1066   </div>
1067 </xsl:template>
1068
1069   <!-- Side Links Navigation -->
1070   <xsl:template name="sideLinksList">
1071     <ul class="sideLinksExpand">
1072     <li>
1073       <h4>OTHER UNIVERSITY CALENDARS</h4><span id="additionalUnivClicker">+</span>
1074         <ul id="additionalUnivSub" style="height:0px;overflow:hidden;">
1075           <li><a href="http://dukehealth.org/events" target="_blank">DukeHealth.org Event Calendar</a></li>
1076           <li><a href="http://calendar.activedatax.com/ncstate/EventList.aspx" target="_blank">NC State Calendar</a></li>
1077           <li><a href="http://webevent.nccu.edu/CalendarNOW.aspx" target="_blank">NCCU Calendar</a></li>
1078           <li><a href="http://events.unc.edu/cal/" target="_blank">UNC Calendar</a></li>
1079       </ul>
1080   </li>
1081   <li>
1082     <h4>OTHER LINKS</h4><span id="additionalOptionsClicker">+</span>
1083        <ul id="additionalOptionsSub" style="height:0px;overflow:hidden">
1084          <li><a href="http://www.durham-nc.com" target="_blank">Durham Visitor's Bureau Calendar</a></li>
1085          <li><a href="http://map.duke.edu" target="_blank">Duke Campus Map</a></li>
1086       </ul>
1087   </li>
1088   </ul>
1089   </xsl:template>
1090
1091   <!-- Date Navigation -->
1092   <xsl:template name="navigation">
1093     <!-- View Options -->
1094     <!-- There were a few hundred lines here of all sorts of complicated tests,
1095       if you ever need to regain different options based on combinations of date range / list vs calendar, etc.,
1096       review svn or a current version bedework xsl, either way it can probably be simplified a ton -->
1097     <xsl:if test="/bedework/periodname != 'Year'">
1098       <ul id="calDisplayOptions">
1099         <li>
1100           <xsl:choose>
1101             <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'">
1102               <a href="{$setup}&amp;setappvar=summaryMode(summary)" title="toggle                   summary/detailed view"> Summary </a>
1103             </xsl:when>
1104             <xsl:otherwise>
1105               <a href="{$setup}&amp;setappvar=summaryMode(details)" title="toggle                   summary/detailed view"> Details </a>
1106             </xsl:otherwise>
1107           </xsl:choose>
1108         </li>
1109       </ul>
1110       <xsl:variable name="rssCurrDate" select="/bedework/currentdate/date"/>
1111       <xsl:variable name="rssGroups">
1112         <xsl:choose>
1113           <xsl:when test="(/bedework/appvar[key = 'group']/value) = 'all' or not(/bedework/appvar[key = 'group']/value)">
1114             <xsl:text>(all)</xsl:text>
1115           </xsl:when>
1116           <xsl:otherwise>
1117             <xsl:variable name="rssCurrGroup" select="/bedework/appvar[key = 'group']/value"/>
1118             <xsl:variable name="rssGroupTemplate">
1119               <xsl:text>(</xsl:text>
1120               <xsl:value-of select="$rssCurrGroup"/>
1121               <xsl:text>)</xsl:text>
1122             </xsl:variable>
1123             <xsl:value-of select="$rssGroupTemplate"/>
1124           </xsl:otherwise>
1125         </xsl:choose>
1126       </xsl:variable>
1127
1128       <xsl:variable name="rssCategory">
1129         <xsl:choose>
1130           <xsl:when test="(/bedework/appvar[key = 'category']/value = 'all') or not(/bedework/appvar[key = 'category']/value)">
1131             <xsl:text>all</xsl:text>
1132           </xsl:when>
1133           <xsl:otherwise>
1134             <xsl:variable name="rssCurrCategory" select="/bedework/appvar[key = 'category']/value"/>
1135             <xsl:variable name="rssCatTemplate">
1136               <xsl:text/>
1137               <xsl:value-of select="$rssCurrCategory"/>
1138               <xsl:text/>
1139             </xsl:variable>
1140             <xsl:value-of select="$rssCatTemplate"/>
1141           </xsl:otherwise>
1142         </xsl:choose>
1143       </xsl:variable>
1144
1145       <xsl:variable name="rssViewType">
1146         <xsl:if test="(/bedework/periodname) = 'Day'">
1147           <xsl:text>dayView</xsl:text>
1148         </xsl:if>
1149         <xsl:if test="(/bedework/periodname) = 'Week'">
1150           <xsl:text>weekView</xsl:text>
1151         </xsl:if>
1152         <xsl:if test="(/bedework/periodname) = 'Month'">
1153           <xsl:text>monthView</xsl:text>
1154         </xsl:if>
1155       </xsl:variable>
1156       <a id="rssRequest" class="rss" href="/feed/calendar/{$rssViewType}/rss/{$rssGroups}/details/{$rssCategory}" title="RSS feed"> <!-- &amp;date={$rssCurrDate} -->
1157         <img src="{$resourcesRoot}/images/feed-icon-14x14.png" alt="RSS Feed Icon"/>
1158       </a>
1159       <div id="rssPopUp" style="display:none;position:absolute"> <!-- RSS Popup window -->
1160         <p id="rssClose" onclick="this.parentNode.style.display = 'none'">X - Close</p>
1161         <h5 style="padding: 6px;">RSS Feed Details</h5>
1162         <!-- setappvar=summaryMode(details){$rssGroups}skinName=rss{$rssCategory}viewType={$rssViewType} -->
1163         <ul style="padding: 6px;">
1164           <li style="border-bottom: solid 1px #CCC;">Time Period: Current <xsl:value-of select="/bedework/periodname"/></li>
1165           <li style="border-bottom: solid 1px #CCC;">Group: <span id="rssDetailGroup">All</span></li>
1166           <li style="border-bottom: solid 1px #CCC;">Calendar Categories: <span id="rssDetailCategory">All</span></li>
1167         </ul>
1168         <p style="padding: 6px;">To subscribe to an RSS feed of your current calendar view, copy and paste the entire URL below into your preferred RSS reader.</p>
1169         <p style="padding: 6px;"><strong>Your RSS URL:</strong></p>
1170         <input id="rssValue" size="35" type="text" value=""/>
1171         <ul style="padding: 6px;">
1172           <li><a href="/feed/list/30">Click here for 30-day feed of events</a></li>
1173           <li><a href="/feed/list/60">Click here for 60-day feed of events</a></li>
1174           <li><a href="/feed/list/90">Click here for 90-day feed of events</a></li>
1175         </ul>
1176       </div>
1177     </xsl:if>
1178     <a id="prevViewPeriod" href="{$setViewPeriod}&amp;date={$prevdate}">«</a>
1179     <h3>
1180       <xsl:choose>
1181         <xsl:when test="/bedework/periodname='Year'">
1182           <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/>
1183         </xsl:when>
1184         <xsl:when test="/bedework/periodname='Month'">
1185           <xsl:value-of select="/bedework/firstday/monthname"/>, <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/>
1186         </xsl:when>
1187         <xsl:when test="/bedework/periodname='Week'">Week of <xsl:value-of select="substring-after(/bedework/firstday/longdate,', ')"/>
1188         </xsl:when>
1189         <xsl:otherwise>
1190           <xsl:value-of select="/bedework/firstday/longdate"/>
1191         </xsl:otherwise>
1192       </xsl:choose>
1193     </h3>
1194     <a id="nextViewPeriod" href="{$setViewPeriod}&amp;date={$nextdate}">»</a>
1195   </xsl:template>
1196   <xsl:template name="searchBar"> SEARCH BAR </xsl:template>
1197   <!--==== SINGLE EVENT ====-->
1198   <!-- I am going to modify this quite a bit. I don't think we need 300+ lines of code ot print out an event,
1199     but may want to compare this to the original if things get wonky -->
1200   <xsl:template match="event">
1201     <xsl:variable name="subscriptionId" select="subscription/id"/>
1202     <xsl:variable name="calPath" select="calendar/encodedPath"/>
1203     <xsl:variable name="guid" select="guid"/>
1204     <xsl:variable name="guidEsc" select="translate(guid, '.', '_')"/>
1205     <xsl:variable name="recurrenceId" select="recurrenceId"/>
1206     <xsl:variable name="statusClass">
1207       <xsl:choose>
1208         <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when>
1209         <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when>
1210         <xsl:otherwise>bwStatusConfirmed</xsl:otherwise>
1211       </xsl:choose>
1212     </xsl:variable>
1213
1214     <div class="singleEvent">
1215
1216       <h2 class="{$statusClass} eventTitle">
1217         <xsl:variable name="gStartdate" select="start/utcdate"/>
1218         <xsl:variable name="gLocation" select="location/address"/>
1219         <xsl:variable name="gEnddate" select="end/utcdate"/>
1220         <xsl:variable name="gText" select="summary"/>
1221         <xsl:variable name="gDetails" select="summary"/>
1222         <a class="eventIcons" href="http://www.google.com/calendar/event?action=TEMPLATE&amp;dates={$gStartdate}/{$gEnddate}&amp;text={$gText}&amp;details={$gDetails}&amp;location={$gLocation}"><img title="Add to Google Calendar" src="{$resourcesRoot}/images/gcal.gif" alt="Add to Google Calendar"/></a>
1223         <xsl:choose>
1224           <xsl:when test="string-length($recurrenceId)">
1225             <a class="eventIcons" href="http://www.facebook.com/share.php?u=http://calendar.duke.edu/feed/event/cal/html/{$subscriptionId}/Public/{$recurrenceId}/{$guidEsc}"><img title="Add to Facebook" src="{$resourcesRoot}/images/Facebook_Badge.gif" alt="Add to Facebook"/></a>
1226           </xsl:when>
1227           <xsl:otherwise>
1228             <a class="eventIcons" href="http://www.facebook.com/share.php?u=http://calendar.duke.edu/feed/event/cal/html/{$subscriptionId}/Public/0/{$guidEsc}"><img title="Add to Facebook" src="{$resourcesRoot}/images/Facebook_Badge.gif" alt="Add to Facebook"/></a>
1229           </xsl:otherwise>
1230         </xsl:choose>
1231         <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/>
1232         <a class="eventIcons" href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="Download .ics file for import to other calendars">
1233           <img src="{$resourcesRoot}/images/std-ical_icon.gif" alt="Download this event"/>
1234         </a>
1235         <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if>
1236         <xsl:if test="summary != ''">
1237           <xsl:variable name="summary" select="summary"/>
1238           <xsl:value-of select="$summary"/>
1239         </xsl:if>
1240       </h2>
1241
1242       <span class="eventWhen">
1243         <br/>
1244         <span class="infoTitle">When: </span>
1245         <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/>
1246         <xsl:text> </xsl:text>
1247         <xsl:if test="start/allday = 'false'">
1248           <span class="time">
1249             <xsl:value-of select="start/time"/>
1250           </span>
1251         </xsl:if>
1252         <xsl:if test="(end/longdate != start/longdate) or ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if>
1253         <xsl:if test="end/longdate != start/longdate">
1254           <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text>
1255         </xsl:if>
1256           <xsl:choose>
1257             <xsl:when test="start/allday = 'true'">
1258               <span class="time">
1259                 <em>(All day)</em>
1260               </span>
1261             </xsl:when>
1262             <xsl:when test="end/longdate != start/longdate">
1263               <span class="time">
1264                 <xsl:value-of select="end/time"/>
1265               </span>
1266             </xsl:when>
1267             <xsl:when test="end/time != start/time">
1268               <span class="time">
1269                 <xsl:value-of select="end/time"/>
1270               </span>
1271             </xsl:when>
1272           </xsl:choose>
1273         </span>
1274
1275         <span class="eventWhere">
1276           <span class="infoTitle">Where: </span>
1277           <xsl:choose>
1278             <xsl:when test="location/link=''">
1279               <xsl:value-of select="location/address"/>
1280               <xsl:text> </xsl:text>
1281               <xsl:if test="location/subaddress!=''">
1282                 <xsl:text> </xsl:text>
1283                 <xsl:value-of select="location/subaddress"/>
1284               </xsl:if>
1285             </xsl:when>
1286             <xsl:otherwise>
1287               <xsl:variable name="locationLink" select="location/link"/>
1288               <a href="{$locationLink}">
1289                 <xsl:value-of select="location/address"/>
1290                 <xsl:if test="location/subaddress!=''">
1291                   <xsl:text> </xsl:text>
1292                   <xsl:value-of select="location/subaddress"/>
1293                 </xsl:if>
1294               </a>
1295             </xsl:otherwise>
1296           </xsl:choose>
1297         </span>
1298
1299       <xsl:if test="cost!=''">
1300         <span class="eventCost">
1301           <span class="infoTitle">Cost: </span><xsl:value-of select="cost"/>
1302         </span>
1303       </xsl:if>
1304
1305       <span class="eventLink">
1306         <xsl:if test="link != ''">
1307           <xsl:variable name="link" select="link"/>
1308           <span class="infoTitle"><a href="{$link}">More Info</a></span>
1309         </xsl:if>
1310       </span>
1311
1312     <br/>
1313       <xsl:if test="xproperties/node()[name()='X-BEDEWORK-IMAGE']">
1314         <xsl:variable name="bwImage"><xsl:value-of select="xproperties/node()[name()='X-BEDEWORK-IMAGE']/values/text"/></xsl:variable>
1315         <img src="{$bwImage}" class="bwEventImage"/>
1316       </xsl:if>
1317         <span class="eventDescription">
1318           <span class="infoTitle">Description: </span>
1319           <xsl:call-template name="replace">
1320             <xsl:with-param name="string" select="description"/>
1321             <xsl:with-param name="pattern" select="'&#xA;'"/>
1322             <xsl:with-param name="replacement">
1323             </xsl:with-param>
1324           </xsl:call-template>
1325         </span>
1326     <br/>
1327
1328    <!--   <span class="eventListingCal">
1329         <xsl:if test="calendar/path!=''">
1330           Calendar:
1331           <xsl:variable name="calUrl" select="calendar/encodedPath"/>
1332           <a href="{$setSelection}&amp;calUrl={$calUrl}">
1333             <xsl:value-of select="calendar/name"/>
1334           </a>
1335         </xsl:if>
1336       </span>-->
1337
1338       <xsl:if test="status !='' and status != 'CONFIRMED'">
1339         <span class="eventStatus">
1340         <span class="infoTitle">Status: </span><xsl:value-of select="status"/>
1341         </span>
1342       </xsl:if>
1343     <xsl:choose>
1344       <xsl:when test="xproperties/X-BEDEWORK-CS/values/text != ''">
1345        <span class="eventContact"><span class="infoTitle">Co-sponsors: </span>
1346         <xsl:if test="creator != ''">
1347           <xsl:variable name="creator" select="creator"/>
1348          <xsl:value-of select="/bedework/urlPrefixes/groups/group[eventOwner = $creator]/name"/>
1349         </xsl:if>
1350        <xsl:value-of disable-output-escaping="yes" select="xproperties/X-BEDEWORK-CS/values/text"/></span>
1351       </xsl:when>
1352       <xsl:otherwise>
1353        <span class="eventContact"><span class="infoTitle">Sponsor: </span>
1354         <xsl:if test="creator != ''">
1355           <xsl:variable name="creator" select="creator"/>
1356          <xsl:value-of select="/bedework/urlPrefixes/groups/group[eventOwner = $creator]/name"/>
1357         </xsl:if>
1358        <xsl:value-of disable-output-escaping="yes" select="xproperties/X-BEDEWORK-CS/values/text"/></span>
1359       </xsl:otherwise>
1360     </xsl:choose>
1361       <xsl:if test="contact/name!='None'">
1362         <span class="eventContact">
1363            <span class="infoTitle">Contact Information: </span>
1364             <xsl:choose>
1365               <xsl:when test="contact/link=''">
1366                 <xsl:value-of select="contact/name"/>
1367               </xsl:when>
1368               <xsl:otherwise>
1369                 <xsl:variable name="sponsorLink" select="contact/link"/>
1370                 <a href="{$sponsorLink}">
1371                   <xsl:value-of select="contact/name"/>
1372                 </a>
1373               </xsl:otherwise>
1374             </xsl:choose>
1375             <xsl:if test="contact/phone!=''">
1376               <xsl:text> </xsl:text>
1377               <xsl:value-of select="contact/phone"/>
1378             </xsl:if>
1379             <xsl:if test="contact/link!=''">
1380               <xsl:text> </xsl:text>
1381               <xsl:variable name="contactLink" select="contact/link"/>
1382               <a href="{$contactLink}"><xsl:value-of select="$contactLink"/></a>
1383             </xsl:if>
1384         </span>
1385       </xsl:if>
1386      <xsl:if test="xproperties/node()[name()='X-BEDEWORK-STUDENT-CONTACT']/values/text != ''">
1387         <span class="eventContact">
1388            <span class="infoTitle">Contact Information: </span>
1389             <xsl:value-of select="xproperties/node()[name()='X-BEDEWORK-STUDENT-CONTACT']/values/text"/>
1390        <xsl:if test="xproperties/node()[name()='X-BEDEWORK-STUDENT-CONTACT']/parameters/X-BEDEWORK-PARAM-EMAIL != ''">
1391               <xsl:variable name="emailAddress" select="xproperties/node()[name()='X-BEDEWORK-STUDENT-CONTACT']/parameters/X-BEDEWORK-PARAM-EMAIL"/>
1392         <a href="mailto:{$emailAddress}">
1393                   E-mail
1394                 </a>
1395            </xsl:if>
1396         </span>
1397       </xsl:if>
1398      <xsl:if test="categories[1]/category">
1399         <span class="eventCategories">
1400           <span class="infoTitle">Categories: </span>
1401           <xsl:for-each select="categories[1]/category[(word != 'Local') and (word != 'Main') and (word != 'Student') and (word != 'calCrossPublish')]">
1402             <xsl:value-of select="word"/>
1403             <xsl:if test="position() != last()">, </xsl:if>
1404           </xsl:for-each>
1405         </span>
1406       </xsl:if>
1407
1408       <xsl:if test="comments/comment">
1409         <span class="eventComments">
1410           <span class="infoTitle">Comments: </span>
1411             <xsl:for-each select="comments/comment">
1412               <p>
1413                 <xsl:value-of select="value"/>
1414               </p>
1415             </xsl:for-each>
1416         </span>
1417       </xsl:if>
1418     </div>
1419
1420   </xsl:template>
1421
1422   <!--==== WEEK CALENDAR VIEW ====-->
1423   <xsl:template name="weekViewCal">
1424     <table id="monthCalendarTable">
1425       <tr>
1426         <xsl:for-each select="/bedework/daynames/val">
1427           <th class="dayHeading">
1428             <xsl:value-of select="."/>
1429           </th>
1430         </xsl:for-each>
1431       </tr>
1432       <tr>
1433         <xsl:for-each select="/bedework/eventscalendar/year/month/week/day">
1434           <xsl:if test="filler='false'">
1435                   <xsl:call-template name="display-month-calendar"/>
1436           </xsl:if>
1437         </xsl:for-each>
1438       </tr>
1439     </table>
1440   </xsl:template>
1441
1442
1443   <!--==== MONTH CALENDAR VIEW ====-->
1444   <xsl:template name="monthView">
1445     <table id="monthCalendarTable">
1446       <tr>
1447         <xsl:for-each select="/bedework/daynames/val">
1448           <th class="dayHeading">
1449             <xsl:value-of select="."/>
1450           </th>
1451         </xsl:for-each>
1452       </tr>
1453       <xsl:for-each select="/bedework/eventscalendar/year/month/week">
1454         <tr>
1455           <xsl:for-each select="day">
1456             <xsl:choose>
1457               <xsl:when test="filler='true'">
1458                   <td class="filler">&#160;</td>
1459               </xsl:when>
1460               <xsl:otherwise>
1461                   <xsl:call-template name="display-month-calendar"/>
1462               </xsl:otherwise>
1463             </xsl:choose>
1464           </xsl:for-each>
1465         </tr>
1466       </xsl:for-each>
1467     </table>
1468   </xsl:template>
1469
1470   <!--== EVENTS IN THE CALENDAR GRID ==-->
1471   <xsl:template match="event" mode="calendarLayout">
1472     <xsl:param name="dayPos"/>
1473     <xsl:variable name="subscriptionId" select="subscription/id"/>
1474     <xsl:variable name="calPath" select="calendar/encodedPath"/>
1475     <xsl:variable name="guid" select="guid"/>
1476     <xsl:variable name="recurrenceId" select="recurrenceId"/>
1477     <xsl:variable name="eventClass">
1478       <xsl:choose>
1479         <!-- Special styles for the month grid -->
1480         <xsl:when test="status='CANCELLED'">eventCancelled</xsl:when>
1481         <xsl:when test="status='TENTATIVE'">eventTentative</xsl:when>
1482         <!-- Default alternating colors for all standard events -->
1483         <xsl:when test="position() mod 2 = 1">eventLinkA</xsl:when>
1484         <xsl:otherwise>eventLinkB</xsl:otherwise>
1485       </xsl:choose>
1486     </xsl:variable>
1487     <!-- Subscription styles.
1488          These are set in the add/modify subscription forms in the admin client;
1489          if present, these override the background-color set by eventClass. The
1490          subscription styles should not be used for cancelled events (tentative is ok). -->
1491     <xsl:variable name="subscriptionClass">
1492       <xsl:if test="status != 'CANCELLED' and                     subscription/subStyle != '' and         subscription/subStyle != 'default'">
1493         <xsl:value-of select="subscription/subStyle"/>
1494       </xsl:if>
1495     </xsl:variable>
1496     <li>
1497       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" class="{$eventClass} {$subscriptionClass}">
1498         <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if>
1499         <xsl:choose>
1500           <xsl:when test="start/shortdate != ../shortdate"> (cont) </xsl:when>
1501           <xsl:when test="start/allday = 'false'">
1502             <xsl:value-of select="start/time"/>: </xsl:when>
1503           <xsl:otherwise> All day: </xsl:otherwise>
1504         </xsl:choose>
1505         <xsl:value-of select="summary"/>
1506         <xsl:variable name="eventTipClass">
1507           <xsl:choose>
1508             <xsl:when test="$dayPos &gt; 5">eventTipReverse</xsl:when>
1509             <xsl:otherwise>eventTip</xsl:otherwise>
1510           </xsl:choose>
1511         </xsl:variable>
1512         <span class="{$eventTipClass}">
1513           <xsl:if test="status='CANCELLED'">
1514             <span class="eventTipStatusCancelled">CANCELLED</span>
1515           </xsl:if>
1516           <xsl:if test="status='TENTATIVE'">
1517             <span class="eventTipStatusTentative">TENTATIVE</span>
1518           </xsl:if>
1519           <strong>
1520             <xsl:value-of select="summary"/>
1521           </strong><br/> Time: <xsl:choose>
1522             <xsl:when test="start/allday = 'true'"> All day </xsl:when>
1523             <xsl:otherwise>
1524               <xsl:if test="start/shortdate != ../shortdate">
1525                 <xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/>
1526                 <xsl:text> </xsl:text>
1527               </xsl:if>
1528               <xsl:value-of select="start/time"/>
1529               <xsl:if test="(start/time != end/time) or (start/shortdate != end/shortdate)"> -
1530                   <xsl:if test="end/shortdate != ../shortdate">
1531                   <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/>
1532                   <xsl:text> </xsl:text>
1533                 </xsl:if>
1534                 <xsl:value-of select="end/time"/>
1535               </xsl:if>
1536             </xsl:otherwise>
1537           </xsl:choose><br/>
1538           <xsl:if test="location/address"> Location: <xsl:value-of select="location/address"/><br/>
1539           </xsl:if> Calendar: <xsl:value-of select="calendar/name"/>
1540         </span>
1541       </a>
1542     </li>
1543   </xsl:template>
1544
1545
1546   <!--==== YEAR VIEW ====-->
1547   <xsl:template name="yearView">
1548     <div class="yearMonthRow">
1549       <xsl:apply-templates select="/bedework/eventscalendar/year/month[position() &lt;= 4]"/>
1550     </div>
1551     <div class="yearMonthRow">
1552       <xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() &gt; 4) and (position() &lt;= 8)]"/>
1553     </div>
1554     <div class="yearMonthRow">
1555       <xsl:apply-templates select="/bedework/eventscalendar/year/month[position() &gt; 8]"/>
1556     </div>
1557   </xsl:template>
1558   <!-- year view month tables -->
1559   <xsl:template match="month">
1560     <table class="yearViewMonthTable" cellspacing="0" cellpadding="0">
1561       <tr>
1562         <td colspan="7" class="monthName">
1563           <xsl:variable name="firstDayOfMonth" select="week/day/date"/>
1564           <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$firstDayOfMonth}">
1565             <xsl:value-of select="longname"/>
1566           </a>
1567         </td>
1568       </tr>
1569       <tr>
1570         <!-- Uhh... skipping the week numbers
1571           <th>&#160;</th>
1572           -->
1573         <xsl:for-each select="/bedework/shortdaynames/val">
1574           <th>
1575             <xsl:value-of select="."/>
1576           </th>
1577         </xsl:for-each>
1578       </tr>
1579       <xsl:for-each select="week">
1580         <tr>
1581           <!-- Uhh... skipping the week numbers
1582             <td class="weekCell">
1583               <xsl:variable name="firstDayOfWeek" select="day/date"/>
1584
1585               <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$firstDayOfWeek}">
1586                 me<xsl:value-of select="value"/>
1587               </a>
1588
1589               </td>-->
1590           <xsl:for-each select="day">
1591             <xsl:choose>
1592               <xsl:when test="filler='true'">
1593                 <td class="filler">&#160;</td>
1594               </xsl:when>
1595               <xsl:otherwise>
1596                 <td>
1597                   <xsl:if test="/bedework/now/date = date">
1598                     <xsl:attribute name="class">today</xsl:attribute>
1599                   </xsl:if>
1600                   <xsl:variable name="dayDate" select="date"/>
1601                   <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}">
1602                     <xsl:attribute name="class">today</xsl:attribute>
1603                     <xsl:value-of select="value"/>
1604                   </a>
1605                 </td>
1606               </xsl:otherwise>
1607             </xsl:choose>
1608           </xsl:for-each>
1609         </tr>
1610       </xsl:for-each>
1611     </table>
1612   </xsl:template>
1613
1614   <!--==== CALENDARS ====-->
1615   <!-- list of available calendars -->
1616   <xsl:template match="calendars">
1617     <xsl:variable name="topLevelCalCount" select="count(calendar/calendar)"/>
1618     <ul class="calendarTree">
1619       <li><a class="breadcrumb" href="/cal/">« Return to Main Calendar</a></li>
1620       <xsl:apply-templates select="calendar/calendar" mode="calTree"/>
1621     </ul>
1622   </xsl:template>
1623
1624   <xsl:template match="calendar" mode="calTree">
1625     <xsl:variable name="itemClass">
1626       <xsl:choose>
1627         <xsl:when test="calendarCollection='false'">folder</xsl:when>
1628         <xsl:otherwise>calendar</xsl:otherwise>
1629       </xsl:choose>
1630     </xsl:variable>
1631     <xsl:variable name="url" select="encodedPath"/>
1632     <li class="{$itemClass}">
1633       <a href="{$setSelection}&amp;calUrl={$url}" title="view calendar">
1634         <xsl:value-of select="name"/>
1635       </a>
1636       <xsl:if test="calendarCollection='true'">
1637         <xsl:variable name="calPath" select="path"/>
1638         <span class="exportCalLink">
1639           <a href="{$calendar-fetchForExport}&amp;calPath={$calPath}" title="export calendar as iCal">
1640             <img src="{$resourcesRoot}/images/calIconExport-sm.gif" alt="export calendar"/>
1641           </a>
1642         </span>
1643       </xsl:if>
1644       <xsl:if test="calendar">
1645         <ul>
1646           <xsl:apply-templates select="calendar" mode="calTree"/>
1647         </ul>
1648       </xsl:if>
1649     </li>
1650   </xsl:template>
1651   <!-- calendar export page -->
1652   <xsl:template match="currentCalendar" mode="export">
1653     <h2 class="bwStatusConfirmed">Export Calendar</h2>
1654     <div id="export">
1655       <p>
1656         <strong>Calendar to export:</strong>
1657       </p>
1658       <div class="indent"> Name: <strong>
1659           <em>
1660             <xsl:value-of select="name"/>
1661           </em>
1662         </strong><br/> Path: <xsl:value-of select="path"/>
1663       </div>
1664       <p>
1665         <strong>Event date limits:</strong>
1666       </p>
1667       <form name="exportCalendarForm" id="exportCalendarForm" action="{$export}" method="post">
1668         <input type="hidden" name="calPath">
1669           <xsl:attribute name="value">
1670             <xsl:value-of select="path"/>
1671           </xsl:attribute>
1672         </input>
1673         <!-- fill these on submit -->
1674         <input type="hidden" name="eventStartDate.year" value=""/>
1675         <input type="hidden" name="eventStartDate.month" value=""/>
1676         <input type="hidden" name="eventStartDate.day" value=""/>
1677         <input type="hidden" name="eventEndDate.year" value=""/>
1678         <input type="hidden" name="eventEndDate.month" value=""/>
1679         <input type="hidden" name="eventEndDate.day" value=""/>
1680         <!-- static fields -->
1681         <input type="hidden" name="nocache" value="no"/>
1682         <input type="hidden" name="skinName" value="ical"/>
1683         <input type="hidden" name="contentType" value="text/calendar"/>
1684         <input type="hidden" name="contentName">
1685           <xsl:attribute name="value"><xsl:value-of select="name"/>.ics</xsl:attribute>
1686         </input>
1687         <!-- visible fields -->
1688         <input type="radio" name="dateLimits" value="active" checked="checked" onclick="changeClass('exportDateRange','invisible')"/> today forward <input type="radio" name="dateLimits" value="none" onclick="changeClass('exportDateRange','invisible')"/> all
1689         dates <input type="radio" name="dateLimits" value="limited" onclick="changeClass('exportDateRange','visible')"/> date range <div id="exportDateRange" class="invisible"> Start: <div dojoType="dropdowndatepicker" formatLength="medium" saveFormat="yyyyMMdd" id="bwExportCalendarWidgetStartDate">
1690             <xsl:text> </xsl:text>
1691           </div> Ends <div dojoType="dropdowndatepicker" formatLength="medium" saveFormat="yyyyMMdd" id="bwExportCalendarWidgetEndDate">
1692             <xsl:text> </xsl:text>
1693           </div>
1694         </div>
1695         <p>
1696           <input type="submit" value="export" class="bwWidgetSubmit" onclick="fillExportFields(this.form)"/>
1697         </p>
1698       </form>
1699     </div>
1700   </xsl:template>
1701
1702   <!--==== SEARCH RESULT ====-->
1703   <xsl:template name="searchResult">
1704     <div class="secondaryColHeader">
1705       <h3>Search Results</h3>
1706   </div>
1707
1708         <!-- <xsl:if test="/bedework/searchResults/numPages &gt; 1">
1709           <span class="resultPages">
1710           <xsl:variable name="curPage" select="/bedework/searchResults/curPage"/>
1711           <xsl:if test="/bedework/searchResults/curPage != 1">
1712             <xsl:variable name="prevPage" select="number($curPage) - 1"/>
1713             <a href="{$search-next}&amp;pageNum={$prevPage}">&#171;</a>
1714           </xsl:if>
1715           <xsl:text> </xsl:text>
1716           <xsl:call-template name="searchResultPageNav">
1717             <xsl:with-param name="page">
1718               <xsl:choose>
1719                 <xsl:when test="number($curPage) - 10 &lt; 1">1</xsl:when>
1720                 <xsl:otherwise>
1721                   <xsl:value-of select="number($curPage) - 6"/>
1722                 </xsl:otherwise>
1723               </xsl:choose>
1724             </xsl:with-param>
1725           </xsl:call-template>
1726           <xsl:text> </xsl:text>
1727           <xsl:choose>
1728             <xsl:when test="$curPage != /bedework/searchResults/numPages">
1729               <xsl:variable name="nextPage" select="number($curPage) + 1"/>
1730               <a href="{$search-next}&amp;pageNum={$nextPage}">&#187;</a></xsl:when>
1731             <xsl:otherwise>
1732               <span class="hidden">&#171;</span>
1733             </xsl:otherwise>
1734           </xsl:choose>
1735         </span>
1736         </xsl:if> -->
1737
1738     <xsl:if test="/bedework/searchResults/curPage &lt; 2">
1739      <span class="numReturnedResults">
1740         <xsl:value-of select="/bedework/searchResults/resultSize"/><xsl:text> result</xsl:text>
1741         <xsl:if test="/bedework/searchResults/resultSize != 1">s</xsl:if><xsl:text> returned for: </xsl:text>
1742         <em><xsl:value-of select="/bedework/searchResults/query"/></em>
1743      </span>
1744     </xsl:if>
1745      <xsl:if test="/bedework/searchResults/searchResult">
1746         <table id="searchTable" cellpadding="0" cellspacing="0" width="100%">
1747           <tr>
1748             <th class="search_relevance">Rank</th>
1749             <th class="search_date">Date</th>
1750             <th class="search_summary">Summary</th>
1751             <th class="search_location">Location</th>
1752           </tr>
1753         <xsl:for-each select="/bedework/searchResults/searchResult[not(event/categories/category/value = 'Local')]">
1754           <xsl:if test="event/summary">
1755         <xsl:variable name="subscriptionId" select="event/subscription/id"/>
1756             <xsl:variable name="calPath" select="event/calendar/encodedPath"/>
1757             <xsl:variable name="guid" select="event/guid"/>
1758             <xsl:variable name="recurrenceId" select="event/recurrenceId"/>
1759             <tr>
1760               <td class="search_relevance">
1761                  <xsl:choose>
1762                 <xsl:when test="contains(score,'E')">1%</xsl:when>
1763                 <xsl:otherwise>
1764                     <xsl:value-of select="ceiling(number(score)*100)"/>%
1765             </xsl:otherwise>
1766             </xsl:choose>
1767               </td>
1768               <td class="search_date">
1769                 <xsl:value-of select="event/start/shortdate"/>
1770                 <xsl:text> </xsl:text>
1771               </td>
1772               <td class="search_summary">
1773                 <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
1774                   <xsl:value-of select="event/summary"/>
1775                 </a>
1776               </td>
1777               <td class="search_location">
1778                 <xsl:value-of select="event/location/address"/>
1779               </td>
1780             </tr>
1781       </xsl:if>
1782         </xsl:for-each>
1783       </table>
1784   </xsl:if>
1785     <xsl:if test="/bedework/searchResults/numPages &gt; 1">
1786       <span class="resultPages" id="resultsBottom">Page(s):
1787         <xsl:variable name="curPage" select="/bedework/searchResults/curPage"/>
1788         <xsl:if test="/bedework/searchResults/curPage != 1">
1789           <xsl:variable name="prevPage" select="number($curPage) - 1"/>
1790           <a href="{$search-next}&amp;pageNum={$prevPage}">«</a>
1791         </xsl:if>
1792         <xsl:text> </xsl:text>
1793         <xsl:call-template name="searchResultPageNav">
1794           <xsl:with-param name="page">
1795             <xsl:choose>
1796               <xsl:when test="number($curPage) - 10 &lt; 1">1</xsl:when>
1797               <xsl:otherwise>
1798                 <xsl:value-of select="number($curPage) - 6"/>
1799               </xsl:otherwise>
1800             </xsl:choose>
1801           </xsl:with-param>
1802         </xsl:call-template>
1803         <xsl:text> </xsl:text>
1804         <xsl:choose>
1805           <xsl:when test="$curPage != /bedework/searchResults/numPages">
1806             <xsl:variable name="nextPage" select="number($curPage) + 1"/>
1807             <a href="{$search-next}&amp;pageNum={$nextPage}">»</a></xsl:when>
1808           <xsl:otherwise>
1809             <span class="hidden">«</span>
1810             <!-- occupy the space to keep the navigation from moving around -->
1811           </xsl:otherwise>
1812         </xsl:choose>
1813       </span>
1814     </xsl:if>
1815   </xsl:template>
1816
1817   <xsl:template name="advancedSearch">
1818       <div id="advSearch">
1819         <h3>Advanced Search</h3>
1820         <form id="advSearchForm" name="searchForm" onsubmit="return initCat()" method="post" action="{$search}">
1821           Search: <input type="text" name="query" size="40" value=""/>
1822 <!--          <xsl:attribute name="value">
1823             <xsl:value-of select="/bedework/searchResults/query"/>
1824           </xsl:attribute>
1825           </input>-->
1826           <br/>
1827           <label>Limit by:</label><br/>
1828          <xsl:choose>
1829             <xsl:when test="/bedework/searchResults/searchLimits = 'beforeToday'">
1830               <input type="radio" name="searchLimits" value="fromToday"/>Today forward
1831               <br/>
1832               <input type="radio" name="searchLimits" value="beforeToday" checked="checked"/>Past dates
1833               <br/>
1834               <input type="radio" name="searchLimits" value="none"/>All dates<br/>
1835             </xsl:when>
1836             <xsl:when test="/bedework/searchResults/searchLimits = 'none'">
1837               <input type="radio" name="searchLimits" value="fromToday"/>Today forward<br/>
1838               <input type="radio" name="searchLimits" value="beforeToday"/>Past dates<br/>
1839               <input type="radio" name="searchLimits" value="none" checked="checked"/>All dates<br/>
1840             </xsl:when>
1841             <xsl:otherwise>
1842               <input type="radio" name="searchLimits" value="fromToday" checked="checked"/>Today forward<br/>
1843               <input type="radio" name="searchLimits" value="beforeToday"/>Past dates<br/>
1844               <input type="radio" name="searchLimits" value="none"/>All dates<br/>
1845             </xsl:otherwise>
1846          </xsl:choose>
1847
1848           <input type="submit" name="submit" value="Search"/>
1849
1850      <div id="searchCats">
1851             <h4>Select Categories to Search (Optional)</h4>
1852             <p>A search term is not required if at least one category is selected.</p>
1853             <xsl:variable name="catCount" select="count(/bedework/categories/category)"/>
1854       <table><tr>
1855         <td>
1856           <ul>
1857             <xsl:for-each select="/bedework/categories/category[(position() &lt;= ceiling($catCount div 2)) and (keyword != 'Local') and (creator != 'agrp_public-user') and (keyword != 'Main') and (keyword != 'Student') and (keyword != 'calCrossPublish')]">
1858                   <xsl:variable name="currId" select="keyword"/>
1859                   <li>
1860                     <p><input type="checkbox" name="categoryKey" value="{$currId}"/>
1861                     <xsl:value-of select="keyword"/></p>
1862                   </li>
1863                 </xsl:for-each>
1864           </ul>
1865         </td>
1866         <td>
1867           <ul>
1868             <xsl:for-each select="/bedework/categories/category[(position() &gt; ceiling($catCount div 2)) and (keyword != 'Local') and (creator != 'agrp_public-user') and (keyword != 'Main') and (keyword != 'Student') and (keyword != 'calCrossPublish')]">
1869                   <xsl:variable name="currId2" select="keyword"/>
1870                   <li>
1871                     <p><input type="checkbox" name="categoryKey" value="{$currId2}"/>
1872                     <xsl:value-of select="keyword"/></p>
1873                   </li>
1874                 </xsl:for-each>
1875               </ul>
1876         </td>
1877         </tr>
1878         </table>
1879           </div>
1880        <input type="submit" name="submit" value="Search"/>
1881         </form>
1882     </div>
1883   </xsl:template>
1884
1885   <xsl:template name="searchResultPageNav">
1886     <xsl:param name="page">1</xsl:param>
1887     <xsl:variable name="curPage" select="/bedework/searchResults/curPage"/>
1888     <xsl:variable name="numPages" select="/bedework/searchResults/numPages"/>
1889     <xsl:variable name="endPage">
1890       <xsl:choose>
1891         <xsl:when test="number($curPage) + 6 &gt; number($numPages)">
1892           <xsl:value-of select="$numPages"/>
1893         </xsl:when>
1894         <xsl:otherwise>
1895           <xsl:value-of select="number($curPage) + 6"/>
1896         </xsl:otherwise>
1897       </xsl:choose>
1898     </xsl:variable>
1899     <xsl:choose>
1900       <xsl:when test="$page = $curPage">
1901         <span class="current"><xsl:value-of select="$page"/></span>
1902       </xsl:when>
1903       <xsl:otherwise>
1904         <a href="{$search-next}&amp;pageNum={$page}">
1905           <xsl:value-of select="$page"/>
1906         </a>
1907       </xsl:otherwise>
1908     </xsl:choose>
1909     <xsl:text> </xsl:text>
1910     <xsl:if test="$page &lt; $endPage">
1911       <xsl:call-template name="searchResultPageNav">
1912         <xsl:with-param name="page" select="number($page)+1"/>
1913       </xsl:call-template>
1914     </xsl:if>
1915   </xsl:template>
1916
1917   <!--==== Display Month Calendar  ====-->
1918   <xsl:template name="display-month-calendar">
1919                 <xsl:variable name="dayPos" select="position()"/>
1920                 <td>
1921                   <xsl:if test="/bedework/now/date = date">
1922                     <xsl:attribute name="class">today</xsl:attribute>
1923                   </xsl:if>
1924                   <xsl:variable name="dayDate" select="date"/>
1925                   <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}" class="dayLink">
1926                     <xsl:value-of select="value"/>
1927                   </a>
1928                   <xsl:if test="event">
1929                     <ul>
1930                       <xsl:apply-templates select="event" mode="calendarLayout">
1931                         <xsl:with-param name="dayPos" select="$dayPos"/>
1932                       </xsl:apply-templates>
1933                     </ul>
1934                   </xsl:if>
1935                 </td>
1936   </xsl:template>
1937
1938
1939   <!--+++++++++++++++ System Stats ++++++++++++++++++++-->
1940   <xsl:template name="stats">
1941     <div id="stats">
1942       <h2>System Statistics</h2>
1943       <p> Stats collection: </p>
1944       <ul>
1945         <li>
1946           <a href="{$stats}&amp;enable=yes">enable</a> | <a href="{$stats}&amp;disable=yes">disable</a>
1947         </li>
1948         <li>
1949           <a href="{$stats}&amp;fetch=yes">fetch statistics</a>
1950         </li>
1951         <li>
1952           <a href="{$stats}&amp;dump=yes">dump stats to log</a>
1953         </li>
1954       </ul>
1955       <table id="statsTable" cellpadding="0">
1956         <xsl:for-each select="/bedework/sysStats/*">
1957           <xsl:choose>
1958             <xsl:when test="name(.) = 'header'">
1959               <tr>
1960                 <th colspan="2">
1961                   <xsl:value-of select="."/>
1962                 </th>
1963               </tr>
1964             </xsl:when>
1965             <xsl:otherwise>
1966               <tr>
1967                 <td class="label">
1968                   <xsl:value-of select="label"/>
1969                 </td>
1970                 <td class="value">
1971                   <xsl:value-of select="value"/>
1972                 </td>
1973               </tr>
1974             </xsl:otherwise>
1975           </xsl:choose>
1976         </xsl:for-each>
1977       </table>
1978     </div>
1979   </xsl:template>
1980
1981   <!--==== FOOTER ====-->
1982
1983   <xsl:template name="footer">
1984     <div id="footer">
1985       <xsl:copy-of select="$bwStr-Foot-BasedOnThe"/><xsl:text> </xsl:text><a href="http://www.bedework.org/"><xsl:copy-of select="$bwStr-Foot-BedeworkCalendarSystem"/></a>
1986     </div>
1987     <table id="skinSelectorTable" border="0" cellpadding="0" cellspacing="0">
1988       <tr>
1989         <td class="leftCell">
1990           <a href="http://www.bedework.org/"><xsl:copy-of select="$bwStr-Foot-BedeworkWebsite"/></a> |
1991           <a href="http://www.bedework.org/bedework/update.do?artcenterkey=35"><xsl:copy-of select="$bwStr-Foot-ProductionExamples"/></a> |
1992           <a href="?noxslt=yes"><xsl:copy-of select="$bwStr-Foot-ShowXML"/></a> |
1993           <a href="?refreshXslt=yes"><xsl:copy-of select="$bwStr-Foot-RefreshXSLT"/></a>
1994         </td>
1995         <td class="rightCell">
1996           <form name="styleSelectForm" method="get" action="{$setup}">
1997             <select name="setappvar" onchange="submit()">
1998               <option value=""><xsl:copy-of select="$bwStr-Foot-ExampleStyles"/>:</option>
1999               <option value="style(green)"><xsl:copy-of select="$bwStr-Foot-Green"/></option>
2000               <option value="style(red)"><xsl:copy-of select="$bwStr-Foot-Red"/></option>
2001               <option value="style(blue)"><xsl:copy-of select="$bwStr-Foot-Blue"/></option>
2002             </select>
2003           </form>
2004           <form name="skinSelectForm" method="post" action="{$setup}">
2005             <input type="hidden" name="setappvar" value="summaryMode(details)"/>
2006             <select name="skinPicker" onchange="window.location = this.value">
2007               <option value="{$setup}&amp;skinNameSticky=default"><xsl:copy-of select="$bwStr-Foot-ExampleSkins"/>:</option>
2008               <option value="{$listEvents}&amp;setappvar=summaryMode(details)&amp;skinName=rss-list&amp;days=3">
2009         <xsl:copy-of select="$bwStr-Foot-RSSNext3Days"/></option>
2010               <option value="{$listEvents}&amp;setappvar=summaryMode(details)&amp;skinName=js-list&amp;days=3&amp;contentType=text/javascript&amp;contentName=bedework.js">
2011         <xsl:copy-of select="$bwStr-Foot-JavascriptNext3Days"/></option>
2012               <option value="{$setViewPeriod}&amp;viewType=todayView&amp;skinName=jsToday&amp;contentType=text/javascript&amp;contentName=bedeworkToday.js">
2013         <xsl:copy-of select="$bwStr-Foot-JavascriptTodaysEvents"/></option>
2014               <option value="{$setup}&amp;browserTypeSticky=PDA">
2015         <xsl:copy-of select="$bwStr-Foot-ForMobileBrowsers"/></option>
2016               <option value="{$setViewPeriod}&amp;viewType=todayView&amp;skinName=videocal">
2017         <xsl:copy-of select="$bwStr-Foot-VideoFeed"/></option>
2018               <option value="{$setup}&amp;skinNameSticky=default">
2019         <xsl:copy-of select="$bwStr-Foot-ResetToCalendarDefault"/></option>
2020             </select>
2021           </form>
2022         </td>
2023       </tr>
2024     </table>
2025   </xsl:template>
2026 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.