Changeset 2448

Show
Ignore:
Timestamp:
12/11/09 14:36:10
Author:
johnsa
Message:

public client: full restructuring in preparation for new default skin

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/bwclassic.xsl

    r2443 r2448  
    6767 
    6868  <!-- URL of html resources (images, css, other html); by default this is 
    69        set to the application root --> 
    70   <xsl:variable name="resourcesRoot" select="/bedework/approot"/
     69       set to the current theme directory --> 
     70  <xsl:variable name="resourcesRoot"><xsl:value-of select="/bedework/approot"/>/default/default/bwclassicTheme</xsl:variable
    7171 
    7272  <!-- URL of the XSL template directory --> 
     
    124124        <xsl:choose> 
    125125          <xsl:when test="/bedework/appvar[key='style']/value='red'"> 
    126             <link rel="stylesheet" href="{$resourcesRoot}/default/default/red.css"/> 
     126            <link rel="stylesheet" href="{$resourcesRoot}/css/red.css"/> 
    127127          </xsl:when> 
    128128          <xsl:when test="/bedework/appvar[key='style']/value='green'"> 
    129             <link rel="stylesheet" href="{$resourcesRoot}/default/default/green.css"/> 
     129            <link rel="stylesheet" href="{$resourcesRoot}/css/green.css"/> 
    130130          </xsl:when> 
    131131          <xsl:otherwise> 
    132             <link rel="stylesheet" href="{$resourcesRoot}/default/default/blue.css"/> 
     132            <link rel="stylesheet" href="{$resourcesRoot}/css/blue.css"/> 
    133133          </xsl:otherwise> 
    134134        </xsl:choose> 
    135135        <link rel="stylesheet" href="../../../bedework-common/default/default/subColors.css"/> 
    136         <link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/default/default/print.css" /> 
     136        <link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/css/print.css" /> 
    137137        <!-- load javascript --> 
    138138        <xsl:if test="/bedework/page='event' or /bedework/page='displayCalendarForExport'"> 
     
    141141          <link rel="stylesheet" href="/bedework-common/javascript/jquery/css/custom-theme/jquery-ui-1.7.1.custom.css"/> 
    142142          <link rel="stylesheet" href="/bedework-common/javascript/jquery/css/custom-theme/bedeworkJquery.css"/> 
    143           <script type="text/javascript" src="{$resourcesRoot}/resources/javascript/bedework.js">&#160;</script> 
     143          <script type="text/javascript" src="{$resourcesRoot}/javascript/bedework.js">&#160;</script> 
    144144          <xsl:if test="/bedework/page='displayCalendarForExport'"> 
    145145            <script type="text/javascript"> 
     
    267267            <xsl:when test="/bedework/appvar[key='sidebar']/value='closed'"> 
    268268              <a href="?setappvar=sidebar(opened)"> 
    269                 <img alt="open sidebar" src="{$resourcesRoot}/resources/sideBarArrowOpen.gif" width="21" height="16" border="0" align="left"/> 
     269                <img alt="open sidebar" src="{$resourcesRoot}/images/sideBarArrowOpen.gif" width="21" height="16" border="0" align="left"/> 
    270270              </a> 
    271271            </xsl:when> 
    272272            <xsl:otherwise> 
    273273              <a href="?setappvar=sidebar(closed)"> 
    274                 <img alt="close sidebar" src="{$resourcesRoot}/resources/sideBarArrowClose.gif" width="21" height="16" border="0" align="left"/> 
     274                <img alt="close sidebar" src="{$resourcesRoot}/images/sideBarArrowClose.gif" width="21" height="16" border="0" align="left"/> 
    275275              </a> 
    276276            </xsl:otherwise> 
     
    15631563        <div id="exportDateRange" class="invisible"> 
    15641564          <xsl:copy-of select="$bwStr-Cals-Start"/><xsl:text> </xsl:text><input type="text" name="bwExportCalendarWidgetStartDate" id="bwExportCalendarWidgetStartDate" size="10"/> 
    1565           <span id="bwExportEndField">E<xsl:copy-of select="$bwStr-Cals-End"/><xsl:text> </xsl:text><input type="text" name="bwExportCalendarWidgetEndDate" id="bwExportCalendarWidgetEndDate" size="10"/></span> 
     1565          <span id="bwExportEndField"><xsl:copy-of select="$bwStr-Cals-End"/><xsl:text> </xsl:text><input type="text" name="bwExportCalendarWidgetEndDate" id="bwExportCalendarWidgetEndDate" size="10"/></span> 
    15661566        </div> 
    15671567        <p><input type="submit" value="{$bwStr-Cals-Export}" class="bwWidgetSubmit" onclick="fillExportFields(this.form)"/></p> 
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/default.xsl

    r2436 r2448  
    1818              DEMONSTRATION CALENDAR STYLESHEET 
    1919 
    20                   MainCampus Calendar Suite 
     20           MainCampus Calendar Suite - Duke/Yale Skin 
    2121 
    2222     This stylesheet is devoid of school branding.  It is a good 
    2323     starting point for development of a customized calendar. 
     24 
     25     It is based on work by Duke University and Yale University. 
    2426 
    2527     For detailed instructions on how to work with the XSLT 
     
    6365  <xsl:include href="../../../bedework-common/default/default/util.xsl"/> 
    6466  <xsl:include href="./strings.xsl"/> 
     67 
     68  <!-- acheck --> 
     69  <xsl:include href="../default/display-events.xsl"/> 
     70  <!-- <xsl:include href="featured.xsl"/> --> 
    6571 
    6672  <!-- DEFINE GLOBAL CONSTANTS --> 
     
    99105  <xsl:variable name="stats" select="/bedework/urlPrefixes/stats/stats"/> 
    100106 
     107  <!-- acheck --> 
     108  <xsl:variable name="allGroupsAppVar">&amp;setappvar=group(all)</xsl:variable> 
     109 
    101110  <!-- URL of the web application - includes web context --> 
    102111  <xsl:variable name="urlPrefix" select="/bedework/urlprefix"/> 
     
    122131        <meta content="text/html;charset=utf-8" http-equiv="Content-Type" /> 
    123132        <!-- load css --> 
     133        <link rel="stylesheet" type="text/css" media="screen" href="{$resourcesRoot}/default/default/fixed.css"/> 
     134        <link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/default/default/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="/calrsrc.MainCampus/default/default/ie6.css"/> 
     141          <![endif]--> 
     142 
     143          <!--[if IE 7]> 
     144            <link rel="stylesheet" type="text/css" media="screen" href="/calrsrc.MainCampus/default/default/ie7.css"/> 
     145          <![endif]--> 
     146          ]]> 
     147        </xsl:text> 
     148 
     149        <!-- load javascript --> 
     150        <script type="text/javascript" src="{$resourcesRoot}/resources/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}/resources/javascript/yui/container_core-min.js">&#160;</script>--> 
     153        <script type="text/javascript" src="{$resourcesRoot}/resources/javascript/yui/calendar-min.js">&#160;</script> 
     154        <script type="text/javascript" src="{$resourcesRoot}/resources/javascript/yui/animation-min.js">&#160;</script> 
     155  <!--<script type="text/javascript" src="{$resourcesRoot}/resources/javascript/yui/menu-min.js">&#160;</script>--> 
     156   <xsl:if test="/bedework/page='searchResult'"> 
     157            <script type="text/javascript" src="{$resourcesRoot}/resources/javascript/catSearch.js">&#160;</script> 
     158        </xsl:if> 
     159  <xsl:if test="/bedework/page='calendarList' or /bedework/page='displayCalendarForExport'"> 
     160          <!-- <script type="text/javascript" src="{$resourceCommons}/javascript/dojo/dojo.js">&#160;</script> --> 
     161          <!-- <script type="text/javascript" src="{$resourcesRoot}/resources/javascript/bedework.js"/> --> 
     162        </xsl:if> 
     163  <script type="text/javascript" src="{$resourcesRoot}/resources/javascript/mainCampus.js">&#160;</script> 
     164 
     165        <!-- address bar icon --> 
     166        <link rel="icon" type="image/ico" href="{$resourcesRoot}/images/ecal.ico"/> 
     167        <script type="text/javascript"> 
     168            <xsl:call-template name="jsonDataObject"/> 
     169        </script> 
     170        <script type="text/javascript" src="{$resourcesRoot}/resources/javascript/ifs-calendar.js">i&#160;</script> 
     171      </head> 
     172      <body> 
     173        <div id="wrap"> 
     174          <div id="header"> 
     175            <xsl:call-template name="dateTitleBar"/> 
     176            <xsl:call-template name="tabs"/> 
     177          </div> 
     178          <xsl:if test="/bedework/error"> 
     179            <div id="errors"> 
     180              <xsl:apply-templates select="/bedework/error"/> 
     181            </div> 
     182          </xsl:if> 
     183          <div id="content"> 
     184 
     185            <xsl:choose> 
     186 
     187              <!-- Layout for: Single Event Display--> 
     188              <xsl:when test="/bedework/page = 'event'"> 
     189                    <div id="contentSection"> 
     190                    <xsl:call-template name="display-left-column"/> 
     191                    <div class="double_center_column" id="center_column"> 
     192            <div class="secondaryColHeader"> <h3>Event Information</h3> </div> 
     193                        <xsl:apply-templates select="/bedework/event"/> 
     194            <div class="right_column" id="right_column"> </div> 
     195                    </div> 
     196                 </div> 
     197              </xsl:when> 
     198 
     199              <!-- Layout for: Calendar List --> 
     200              <xsl:when test="/bedework/page='calendarList'"> 
     201                <div id="contentSection"> 
     202                  <div class="secondaryColHeader"> 
     203                    <h3>All Calendars</h3> 
     204                  </div> 
     205                  <xsl:apply-templates select="/bedework/calendars"/> 
     206                </div> 
     207              </xsl:when> 
     208 
     209              <!-- Layout for: Search Results --> 
     210              <xsl:when test="/bedework/page='searchResult'"> 
     211                <div id="contentSection"> 
     212                  <xsl:call-template name="display-left-column"/> 
     213                </div> 
     214     <div class="double_center_column" id="right_column"> </div> 
     215                <div class="double_center_column" id="center_column"> 
     216                    <xsl:call-template name="searchResult"/> 
     217                    <xsl:call-template name="advancedSearch"/> 
     218                </div> 
     219              </xsl:when> 
     220 
     221              <!-- Layout for: Current Day (list only) --> 
     222              <xsl:when test="/bedework/periodname = 'Day' and ((/bedework/now/date) = (/bedework/currentdate/date))"> 
     223      <div id="contentSection"> 
     224                      <xsl:call-template name="jsDateSelectionCal"/> 
     225                      <div id="feature"> 
     226                           <xsl:apply-templates select="document('./data/FeaturedEvent/FeaturedEvent.xml')/system-data-structure"/> 
     227                      </div> 
     228                      <div class="clear">&#160;</div> 
     229                  </div> 
     230      <div id="contentSection"> 
     231                      <div class="left_column"> 
     232                            <xsl:call-template name="display-side-bar"/> 
     233                           <div class="extFeeds"><a href="http://buzz.duke.edu"><img src="{$resourcesRoot}/default/default/images/buzz.gif" alt="Buzz"/></a> 
     234                               <a id="buzzTrigger" href="#">More &gt;</a><div id="buzzResult" style="display:none"> 
     235                               Events List</div> 
     236                     </div> 
     237                  </div> 
     238      <xsl:call-template name="groupsList"/> 
     239 
     240                  <xsl:call-template name="display-center-column"/> 
     241                  <div class="right_column" id="right_column"> <xsl:call-template name="ongoingEventList"/> </div> 
     242    </div> 
     243              </xsl:when> 
     244 
     245              <!-- Layout for: Daily (list only) --> 
     246              <xsl:when test="/bedework/periodname = 'Day' and /bedework/page='eventscalendar'"> 
     247                <div id="contentSection"> 
     248                   <xsl:call-template name="display-left-column"/> 
     249                   <xsl:call-template name="display-center-column"/> 
     250                  <div class="right_column" id="right_column"> <xsl:call-template name="ongoingEventList"/> </div> 
     251                </div> 
     252              </xsl:when> 
     253 
     254              <!-- Layout for: Week (list) --> 
     255              <xsl:when test="bedework/periodname = 'Week' and /bedework/page='eventscalendar'"> 
     256                <div id="contentSection"> 
     257                   <xsl:call-template name="display-left-column"/> 
     258                   <xsl:call-template name="display-center-column"/> 
     259                   <div class="right_column" id="right_column"> <xsl:call-template name="ongoingEventList"/> </div> 
     260                </div> 
     261              </xsl:when> 
     262 
     263              <!-- Layout for: Month (List) --> 
     264              <xsl:when test="bedework/periodname = 'Month' and /bedework/page='eventscalendar'"> 
     265                  <div id="contentSection"> 
     266                     <xsl:call-template name="display-left-column"/> 
     267                     <xsl:call-template name="display-center-column"/> 
     268                     <div class="right_column" id="right_column"> <xsl:call-template name="ongoingEventList"/> </div> 
     269                  </div> 
     270              </xsl:when> 
     271 
     272              <!-- Layout for: Year --> 
     273              <xsl:when test="bedework/periodname = 'Year' and /bedework/page='eventscalendar'"> 
     274                <div id="contentSection"> 
     275                  <xsl:call-template name="display-left-column"/> 
     276                  <div class="double_center_column" id="center_column"> 
     277                    <div class="secondaryColHeader"> 
     278                      <xsl:call-template name="navigation"/> 
     279                    </div> 
     280                    <xsl:call-template name="yearView"/> 
     281                  </div> 
     282       <div class="right_column" id="right_column"> </div> 
     283                </div> 
     284              </xsl:when> 
     285 
     286              <!-- Layout for: System Stats --> 
     287              <xsl:when test="/bedework/page='showSysStats'"> 
     288                <xsl:call-template name="stats"/> 
     289              </xsl:when> 
     290 
     291              <!-- page for calendar export (can optionally be replaced by 
     292                a pop-up widget; see the calendars template) --> 
     293              <xsl:when test="/bedework/page='displayCalendarForExport'"> 
     294                <xsl:apply-templates select="/bedework/currentCalendar" mode="export"/> 
     295              </xsl:when> 
     296 
     297              <!-- Layout for: Catch all for errors --> 
     298              <xsl:otherwise>Error: <xsl:value-of select="/bedework/page"/></xsl:otherwise> 
     299            </xsl:choose> 
     300 
     301            <div class="clear">&#160;</div> 
     302          </div> 
     303          <!-- footer --> 
     304          <xsl:call-template name="footer"/> 
     305        </div> 
     306 
     307       <!--=====  If we're running in production, send stats to google analytics ========--> 
     308       <xsl:variable name="server-name"><xsl:call-template name="current-server"/></xsl:variable> 
     309       <xsl:if test="$server-name='http://calendar.duke.edu'"> 
     310             <script type="text/javascript"> 
     311                 var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); 
     312                 document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); 
     313             </script> 
     314             <script type="text/javascript"> 
     315                 var pageTracker = _gat._getTracker("UA-2424370-34"); 
     316                 pageTracker._initData(); 
     317                 pageTracker._trackPageview(); 
     318             </script> 
     319         </xsl:if> 
     320      </body> 
     321    </html> 
     322  </xsl:template> 
     323 
     324  <!--======= Display Left Column ===========--> 
     325  <xsl:template name="display-left-column"> 
     326           <div class="left_column"> 
     327                 <xsl:call-template name="jsDateSelectionCal"/> 
     328                 <div class="clear">&#160;</div> 
     329                 <xsl:call-template name="display-side-bar"/> 
     330          </div> 
     331          <xsl:call-template name="groupsList"/> 
     332 </xsl:template> 
     333 
     334  <!--======= Display Center Column ===========--> 
     335  <xsl:template name="display-center-column"> 
     336           <div class="center_column" id="center_column"> 
     337               <div class="secondaryColHeader"> <xsl:call-template name="navigation"/> </div> 
     338               <xsl:call-template name="list-view"> 
     339                  <xsl:with-param name="node" select="."/> 
     340                  <xsl:with-param name="suite-name">Main</xsl:with-param> 
     341               </xsl:call-template> 
     342           </div> 
     343  </xsl:template> 
     344 
     345  <!--============= Display Side Bar ======--> 
     346  <xsl:template name="display-side-bar"> 
     347         <xsl:call-template name="viewList"/> 
     348         <div class="sideBarContainer"> 
     349              <h4>FILTER BY GROUP/ ORG/ DEPT:</h4> 
     350              <ul class="sideLinks"> 
     351                  <li><a href="#" onClick="javascript:toggleDiv('groupListDiv'); toggleDiv('right_column'); toggleDiv('center_column');"> Group List </a> </li> 
     352              </ul> 
     353              <xsl:call-template name="display-events-calendar-info"/> 
     354              <xsl:call-template name="sideLinksList"/> 
     355         </div> 
     356  </xsl:template> 
     357 
     358  <!--============= Display Events Calendar Info ======--> 
     359  <xsl:template name="display-events-calendar-info"> 
     360        <h4>EVENTS CALENDAR INFO: </h4> 
     361        <ul class="sideLinks"> 
     362            <li><a href="/caladmin"> Manage Events </a> </li> 
     363            <li><a href="/eventsubmit?setappvar=confirmed(no)"> Submit an Event </a> </li> 
     364     <li><a href="http://calendar.duke.edu/help"> Help </a> </li> 
     365        </ul> 
     366  </xsl:template> 
     367 
     368  <!--============= System Data Structure  ======--> 
     369  <xsl:template match="system-data-structure"> 
     370 
     371    <xsl:variable name="imageFilenameLEFT" select="left-image/image1/name"/> 
     372    <xsl:variable name="featureLinkLEFT" select="left-image/featureLink"/> 
     373    <xsl:variable name="toolTipLEFT" select="left-image/toolTip"/> 
     374  <xsl:variable name="imageFilenameCENTER" select="middle-image/image2/name"/> 
     375    <xsl:variable name="featureLinkCENTER" select="middle-image/featureLink"/> 
     376    <xsl:variable name="toolTipCENTER" select="middle-image/toolTip"/> 
     377  <xsl:variable name="imageFilenameRIGHT" select="right-image/image3/name"/> 
     378    <xsl:variable name="featureLinkRIGHT" select="right-image/featureLink"/> 
     379    <xsl:variable name="toolTipRIGHT" select="right-image/toolTip"/> 
     380 
     381    <xsl:choose> 
     382      <xsl:when test="$featureLinkLEFT = ''"> 
     383        <img class="border" src="{$resourcesRoot}/default/default/data/FeaturedEvent/{$imageFilenameLEFT}" alt="{$toolTipLEFT}"/> 
     384      </xsl:when> 
     385      <xsl:otherwise> 
     386        <a href="{$featureLinkLEFT}"> 
     387          <img class="border" src="{$resourcesRoot}/default/default/data/FeaturedEvent/{$imageFilenameLEFT}" alt="{$toolTipLEFT}"/> 
     388        </a> 
     389      </xsl:otherwise> 
     390    </xsl:choose> 
     391 
     392  <xsl:choose> 
     393      <xsl:when test="$featureLinkCENTER = ''"> 
     394        <img class="border" src="{$resourcesRoot}/default/default/data/FeaturedEvent/{$imageFilenameCENTER}" alt="{$toolTipCENTER}"/> 
     395      </xsl:when> 
     396      <xsl:otherwise> 
     397        <a href="{$featureLinkCENTER}"> 
     398          <img class="border" src="{$resourcesRoot}/default/default/data/FeaturedEvent/{$imageFilenameCENTER}" alt="{$toolTipCENTER}"/> 
     399        </a> 
     400      </xsl:otherwise> 
     401    </xsl:choose> 
     402 
     403  <xsl:choose> 
     404      <xsl:when test="$featureLinkRIGHT = ''"> 
     405        <img src="{$resourcesRoot}/default/default/data/FeaturedEvent/{$imageFilenameRIGHT}" alt="{$toolTipRIGHT}"/> 
     406      </xsl:when> 
     407      <xsl:otherwise> 
     408        <a href="{$featureLinkRIGHT}"> 
     409          <img src="{$resourcesRoot}/default/default/data/FeaturedEvent/{$imageFilenameRIGHT}" alt="{$toolTipRIGHT}"/> 
     410        </a> 
     411      </xsl:otherwise> 
     412    </xsl:choose> 
     413 
     414  </xsl:template> 
     415 
     416  <!-- JavaScript Array for Calendar (might be good to turn into JSON if more properties need to be passed in)--> 
     417  <xsl:template name="jsonDataObject"> 
     418    <!-- Month to display (to be handed in to js, so it aligns with the events beeing shown) --> 
     419    <xsl:variable name="displayMonthYear"> 
     420      <xsl:value-of select="substring(/bedework/currentdate/date,5,2)"/> 
     421      <xsl:text>/</xsl:text> 
     422      <xsl:value-of select="substring(/bedework/currentdate/date,0,5)"/> 
     423    </xsl:variable> 
     424 
     425    <xsl:variable name="rangeStartMo"> 
     426      <xsl:value-of select="substring(/bedework/firstday/date,5,2)"/> 
     427    </xsl:variable> 
     428 
     429    <xsl:variable name="rangeStartDay"> 
     430      <xsl:value-of select="substring(/bedework/firstday/date,7,2)"/> 
     431    </xsl:variable> 
     432 
     433    <xsl:variable name="rangeStartYear"> 
     434      <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/> 
     435    </xsl:variable> 
     436 
     437    <xsl:variable name="rangeEndMo"> 
     438      <xsl:value-of select="substring(/bedework/lastday/date,5,2)"/> 
     439    </xsl:variable> 
     440 
     441    <xsl:variable name="rangeEndDay"> 
     442      <xsl:value-of select="substring(/bedework/lastday/date,7,2)"/> 
     443    </xsl:variable> 
     444 
     445    <xsl:variable name="rangeEndYear"> 
     446      <xsl:value-of select="substring(/bedework/lastday/date,1,4)"/> 
     447    </xsl:variable> 
     448      navcalendar = 
     449          [ 
     450          "<xsl:value-of select="$displayMonthYear"/>", 
     451          "<xsl:value-of select="$rangeStartMo"/>", 
     452          "<xsl:value-of select="$rangeStartDay"/>", 
     453          "<xsl:value-of select="$rangeStartYear"/>", 
     454          "<xsl:value-of select="$rangeEndMo"/>", 
     455          "<xsl:value-of select="$rangeEndDay"/>", 
     456          "<xsl:value-of select="$rangeEndYear"/>", 
     457          ]; 
     458  </xsl:template> 
     459  <!--==== HEADER TEMPLATES and NAVIGATION  ====--> 
     460  <!-- these templates are separated out for convenience and to simplify the default template --> 
     461  <xsl:template name="dateTitleBar"> 
     462    <xsl:choose> 
     463      <xsl:when test="/bedework/page='showSysStats' or /bedework/page='calendars'">&#160;</xsl:when> 
     464      <xsl:otherwise> 
     465        <div id="head-top"> 
     466          <h1>Bedework Events Calendar</h1> 
     467          <p style="padding: 1em; background-color: #eee; border: 1px solid black;">In progress: <a href="?skinNameSticky=bwclassic">go to Bedework Classic</a></p> 
     468        </div> 
     469        <a id="currentDate" href="{$setViewPeriod}&amp;viewType=todayView&amp;date={$curdate}"> 
     470          <xsl:value-of select="/bedework/now/longdate"/> 
     471        </a> 
     472      </xsl:otherwise> 
     473    </xsl:choose> 
     474  </xsl:template> 
     475  <xsl:template name="dateSelectForm"> 
     476    <form name="calForm" method="post" action="{$setViewPeriod}"> 
     477      <xsl:if test="/bedework/periodname!='Year'"> 
     478        <select name="viewStartDate.month"> 
     479          <xsl:for-each select="/bedework/monthvalues/val"> 
     480            <xsl:variable name="temp" select="."/> 
     481            <xsl:variable name="pos" select="position()"/> 
     482            <xsl:choose> 
     483              <xsl:when test="/bedework/monthvalues[start=$temp]"> 
     484                <option value="{$temp}" selected="selected"> 
     485                  <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> 
     486                </option> 
     487              </xsl:when> 
     488              <xsl:otherwise> 
     489                <option value="{$temp}"> 
     490                  <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> 
     491                </option> 
     492              </xsl:otherwise> 
     493            </xsl:choose> 
     494          </xsl:for-each> 
     495        </select> 
     496        <xsl:if test="/bedework/periodname!='Month'"> 
     497          <select name="viewStartDate.day"> 
     498            <xsl:for-each select="/bedework/dayvalues/val"> 
     499              <xsl:variable name="temp" select="."/> 
     500              <xsl:variable name="pos" select="position()"/> 
     501              <xsl:choose> 
     502                <xsl:when test="/bedework/dayvalues[start=$temp]"> 
     503                  <option value="{$temp}" selected="selected"> 
     504                    <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> 
     505                  </option> 
     506                </xsl:when> 
     507                <xsl:otherwise> 
     508                  <option value="{$temp}"> 
     509                    <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> 
     510                  </option> 
     511                </xsl:otherwise> 
     512              </xsl:choose> 
     513            </xsl:for-each> 
     514          </select> 
     515        </xsl:if> 
     516      </xsl:if> 
     517      <xsl:variable name="temp" select="/bedework/yearvalues/start"/> 
     518      <input type="text" name="viewStartDate.year" maxlength="4" size="4" value="{$temp}"/> 
     519      <input name="submit" type="submit" value="go"/> 
     520    </form> 
     521  </xsl:template> 
     522 
     523  <xsl:template name="tabs"> 
     524    <div id="nav-search-wrap"> 
     525      <!-- <xsl:if test="/bedework/page!='searchResult'"> --> 
     526      <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}"> 
     527      <!--advance search link  --> 
     528        <a href="{$search-next}">Advanced Search</a> 
     529        <!--<label for="query">Search </label>--><input type="text" name="query" id="basicsearchbox"/> 
     530        <input id="searchSubmit" type="submit" name="submit" value="Search" onmouseover="this.style.backgroundColor = '#273E6D'" onmouseout="this.style.backgroundColor = '#85C13D'"/> <!--   --> 
     531      </form> 
     532      <!-- </xsl:if> --> 
     533      <ul id="nav-main"> 
     534            <xsl:variable name="currentClass">current</xsl:variable> 
     535            <li> 
     536              <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$curdate}"> 
     537                <xsl:if test="/bedework/periodname='Day'"> 
     538                  <xsl:attribute name="class"> 
     539                    <xsl:value-of select="$currentClass"/> 
     540                  </xsl:attribute> 
     541                </xsl:if>DAY</a> 
     542            </li> 
     543            <li> 
     544              <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$curdate}"> 
     545                <xsl:if test="/bedework/periodname='Week'"> 
     546                  <xsl:attribute name="class"> 
     547                    <xsl:value-of select="$currentClass"/> 
     548                  </xsl:attribute> 
     549                </xsl:if>WEEK</a> 
     550            </li> 
     551            <li> 
     552              <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$curdate}"><xsl:if test="/bedework/periodname='Month'"> 
     553                  <xsl:attribute name="class"> 
     554                    <xsl:value-of select="$currentClass"/> 
     555                  </xsl:attribute> 
     556                </xsl:if>MONTH</a> 
     557            </li> 
     558            <li> 
     559              <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"> 
     560                <xsl:if test="/bedework/periodname='Year'"> 
     561                  <xsl:attribute name="class"> 
     562                    <xsl:value-of select="$currentClass"/> 
     563                  </xsl:attribute> 
     564                </xsl:if>YEAR</a> 
     565            </li> 
     566      </ul> 
     567      <div class="clear">&#160;</div> 
     568    </div> 
     569  </xsl:template> 
     570 
     571  <!-- Date Selection Cal --> 
     572  <xsl:template name="jsDateSelectionCal"> 
     573    <div id="cal1" class="calContainer"> 
     574      <xsl:call-template name="dateSelectForm"/> 
     575      <p>To view the interactive calendar, please enable Javascript on your browser.</p> 
     576    </div> 
     577  </xsl:template> 
     578 
     579 <xsl:template name="ongoingEventList"> 
     580    <h3 class="secondaryColHeader">Ongoing</h3> 
     581    <ul class="eventList"> 
     582      <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'])]"> 
     583      <xsl:sort select="start/unformatted" order="ascending" data-type="number"/> 
     584        <xsl:sort select="id" data-type="number"/> 
     585        <xsl:variable name="lastId" select="id"/> 
     586        <xsl:if test="not(preceding::event[id=$lastId])"> 
     587         <xsl:choose> 
     588              <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'))"> 
     589                <xsl:variable name="creator" select="creator"/> 
     590            <xsl:variable name="envgroup" select="/bedework/appvar[key = 'group']/value"/> 
     591            <xsl:variable name="cosponsor" select="xproperties/X-BEDEWORK-CS/parameters/X-BEDEWORK-PARAM-DESCRIPTION"/> 
     592            <xsl:choose> 
     593                  <xsl:when test="/bedework/appvar[key = 'group']/value = $creator"> 
     594                <xsl:call-template name="ongoingEvent"/> 
     595              </xsl:when> 
     596              <xsl:when test="contains($cosponsor, concat($envgroup,','))"> 
     597                <xsl:call-template name="ongoingEvent"/> 
     598                </xsl:when> 
     599              </xsl:choose> 
     600              </xsl:when> 
     601            <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')"> 
     602                  <xsl:call-template name="split-for-ongoing"> 
     603                    <xsl:with-param name="list"><xsl:value-of select="/bedework/appvar[key = 'category']/value"/></xsl:with-param> 
     604                      <xsl:with-param name="delimiter">~</xsl:with-param> 
     605              </xsl:call-template> 
     606              </xsl:when> 
     607            <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')"> 
     608                <xsl:variable name="creator" select="creator"/> 
     609            <xsl:variable name="envgroup" select="/bedework/appvar[key = 'group']/value"/> 
     610            <xsl:variable name="cosponsor" select="xproperties/X-BEDEWORK-CS/parameters/X-BEDEWORK-PARAM-DESCRIPTION"/> 
     611            <xsl:choose> 
     612                  <xsl:when test="/bedework/appvar[key = 'group']/value = $creator"> 
     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:when test="contains($cosponsor, concat($envgroup,','))"> 
     619                <xsl:call-template name="split-for-ongoing"> 
     620                      <xsl:with-param name="list"><xsl:value-of select="/bedework/appvar[key = 'category']/value"/></xsl:with-param> 
     621                        <xsl:with-param name="delimiter">~</xsl:with-param> 
     622                </xsl:call-template> 
     623                </xsl:when> 
     624              </xsl:choose> 
     625              </xsl:when> 
     626              <xsl:otherwise> 
     627                  <xsl:call-template name="ongoingEvent"/> 
     628              </xsl:otherwise> 
     629          </xsl:choose> 
     630       </xsl:if> 
     631  </xsl:for-each> 
     632     </ul> 
     633  </xsl:template> 
     634 
     635 
     636 <xsl:template name="split-for-ongoing"> 
     637   <xsl:param name="list"/> 
     638   <xsl:param name="delimiter"/> 
     639   <xsl:variable name="newlist"> 
     640   <xsl:choose> 
     641   <xsl:when test="contains($list, $delimiter)"><xsl:value-of select="normalize-space($list)"/></xsl:when> 
     642              <xsl:otherwise><xsl:value-of select="concat(normalize-space($list), $delimiter)"/></xsl:otherwise> 
     643           </xsl:choose> 
     644       </xsl:variable> 
     645       <xsl:variable name="first" select="substring-before($newlist, $delimiter)"/> 
     646        <xsl:variable name="remaining" select="substring-after($newlist, $delimiter)"/> 
     647      <xsl:choose> 
     648        <xsl:when test="$first = categories/category/value"> 
     649          <xsl:call-template name="ongoingEvent"/> 
     650        </xsl:when> 
     651      <xsl:when test="$first = categories/category/word"> 
     652          <xsl:call-template name="ongoingEvent"/> 
     653        </xsl:when> 
     654      <xsl:otherwise> 
     655          <xsl:if test="$remaining"> 
     656            <xsl:call-template name="split-for-ongoing"> 
     657                <xsl:with-param name="list" select="$remaining"/> 
     658                <xsl:with-param name="delimiter"><xsl:value-of select="$delimiter"/></xsl:with-param> 
     659            </xsl:call-template> 
     660        </xsl:if> 
     661      </xsl:otherwise> 
     662        </xsl:choose> 
     663  </xsl:template> 
     664 
     665 <xsl:template name="ongoingEvent"> 
     666      <li> 
     667          <xsl:variable name="subscriptionId" select="subscription/id"/> 
     668          <xsl:variable name="calPath" select="calendar/encodedPath"/> 
     669          <xsl:variable name="guid" select="guid"/> 
     670          <xsl:variable name="recurrenceId" select="recurrenceId"/> 
     671          <xsl:variable name="statusClass"> 
     672            <xsl:choose> 
     673              <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> 
     674              <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> 
     675              <xsl:otherwise>bwStatusConfirmed</xsl:otherwise> 
     676            </xsl:choose> 
     677          </xsl:variable> 
     678          <xsl:if test="status != 'CONFIRMED'"> 
     679            <xsl:value-of select="status"/> 
     680            <xsl:text>: </xsl:text> 
     681          </xsl:if> 
     682          <xsl:value-of select="summary"/>, 
     683       Ends <xsl:value-of select="end/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="end/time"/> 
     684          <xsl:text> |</xsl:text> 
     685          <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">more</a> 
     686          <xsl:text>|</xsl:text> 
     687        </li> 
     688</xsl:template> 
     689 
     690  <!-- Notices List --> 
     691  <xsl:template name="noticesList"> 
     692    <h3 class="secondaryColHeader">Notices</h3> 
     693    <ul> 
     694      <xsl:for-each select="/bedework/eventscalendar/year/month/week/day/event[categories/category/value = 'Reminder']"> 
     695          <li> 
     696            <xsl:variable name="subscriptionId" select="subscription/id"/> 
     697            <xsl:variable name="calPath" select="calendar/encodedPath"/> 
     698            <xsl:variable name="guid" select="guid"/> 
     699            <xsl:variable name="recurrenceId" select="recurrenceId"/> 
     700            <xsl:variable name="statusClass"> 
     701              <xsl:choose> 
     702                <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> 
     703                <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> 
     704                <xsl:otherwise>bwStatusConfirmed</xsl:otherwise> 
     705              </xsl:choose> 
     706            </xsl:variable> 
     707            <xsl:if test="status != 'CONFIRMED'"> 
     708              <xsl:value-of select="status"/> 
     709              <xsl:text>: </xsl:text> 
     710            </xsl:if> 
     711            <xsl:value-of select="summary"/> 
     712            <xsl:text> | </xsl:text> 
     713            <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">more</a> 
     714            <xsl:text> |</xsl:text> 
     715          </li> 
     716      </xsl:for-each> 
     717    </ul> 
     718  </xsl:template> 
     719 
     720  <!-- View List --> 
     721  <xsl:template name="viewList"> 
     722    <div class="secondaryColHeader"><h3>Calendar Views</h3></div> 
     723    <ul class="viewList"> 
     724      <!-- <xsl:for-each select="/bedework/views/view"> 
     725        <xsl:variable name="viewName" select="name/text()"/> 
     726        <li> 
     727          <a href="{$setSelection}&amp;viewName={$viewName}"> 
     728            <xsl:if test="$viewName = (/bedework/selectionState/view/name)"> 
     729              <xsl:attribute name="class">current</xsl:attribute> 
     730            </xsl:if> 
     731            <xsl:value-of select="$viewName"/> 
     732          </a> 
     733        </li> 
     734      </xsl:for-each> --> 
     735    <li> 
     736          <a href="/cal/?setappvar=category(all)&amp;setappvar=categoryclass(all)"> 
     737            <xsl:if test="((/bedework/appvar[key = 'categoryclass']/value = 'all') or not(/bedework/appvar[key = 'categoryclass']/value))"> 
     738              <xsl:attribute name="class">current</xsl:attribute> 
     739            </xsl:if> 
     740            All 
     741          </a> 
     742        </li> 
     743    <li> 
     744          <!-- <a href="/cal/?setappvar=category(Academic Calendar Dates)&amp;setappvar=categoryclass(Academic Calendar Dates)"> 
     745            <xsl:if test="/bedework/appvar[key = 'categoryclass']/value = 'Academic Calendar Dates'"> 
     746              <xsl:attribute name="class">current</xsl:attribute> 
     747              </xsl:if> --> 
     748      <a href="http://www.registrar.duke.edu/registrar/studentpages/student/academicalendars.html"> 
     749      Official Academic Calendar 
     750          </a> 
     751        </li> 
     752    <li> 
     753         <a href="/cal/?setappvar=category(Concert/Music~ Dance Performance~ Exhibit~ Masterclass~ Movie/Film~ Reading~ Theater)&amp;setappvar=categoryclass(Arts)"> 
     754              <xsl:if test="/bedework/appvar[key = 'categoryclass']/value = 'Arts'"> 
     755                <xsl:attribute name="class">current</xsl:attribute> 
     756              </xsl:if> 
     757        Arts 
     758         </a><span id="artsClicker">+</span> 
     759      <ul id="artsSub" style="height:0px" class="subviewList"> 
     760          <xsl:choose> 
     761        <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'Arts'"> 
     762                <xsl:attribute name="style">height:170px</xsl:attribute> 
     763              </xsl:when> 
     764        <xsl:otherwise> 
     765                <xsl:attribute name="style">height:0px</xsl:attribute> 
     766              </xsl:otherwise> 
     767        </xsl:choose> 
     768          <li><a href="/cal/?setappvar=category(Concert/Music)&amp;setappvar=categoryclass(Arts)"> 
     769        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Concert/Music'"> 
     770        <xsl:attribute name="class">current</xsl:attribute> 
     771        </xsl:if> 
     772        Concert/Music 
     773            </a></li> 
     774        <li><a href="/cal/?setappvar=category(Dance Performance)&amp;setappvar=categoryclass(Arts)"> 
     775        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Dance Performance'"> 
     776        <xsl:attribute name="class">current</xsl:attribute> 
     777        </xsl:if> 
     778        Dance Performance 
     779            </a></li> 
     780        <li><a href="/cal/?setappvar=category(Exhibit)&amp;setappvar=categoryclass(Arts)"> 
     781        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Exhibit'"> 
     782        <xsl:attribute name="class">current</xsl:attribute> 
     783        </xsl:if> 
     784        Exhibit 
     785            </a></li> 
     786        <li><a href="/cal/?setappvar=category(Masterclass)&amp;setappvar=categoryclass(Arts)"> 
     787        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Masterclass'"> 
     788        <xsl:attribute name="class">current</xsl:attribute> 
     789        </xsl:if> 
     790        Masterclass 
     791            </a></li> 
     792        <li><a href="/cal/?setappvar=category(Movie/Film)&amp;setappvar=categoryclass(Arts)"> 
     793        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Movie/Film'"> 
     794        <xsl:attribute name="class">current</xsl:attribute> 
     795        </xsl:if> 
     796        Movie/Film 
     797            </a></li> 
     798         <li><a href="/cal/?setappvar=category(Reading)&amp;setappvar=categoryclass(Arts)"> 
     799        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Reading'"> 
     800        <xsl:attribute name="class">current</xsl:attribute> 
     801        </xsl:if> 
     802        Reading 
     803            </a></li> 
     804         <li><a href="/cal/?setappvar=category(Theater)&amp;setappvar=categoryclass(Arts)"> 
     805        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Theater'"> 
     806        <xsl:attribute name="class">current</xsl:attribute> 
     807        </xsl:if> 
     808        Theater 
     809            </a></li> 
     810    </ul> 
     811    </li> 
     812    <li> 
     813          <a href="/cal/?setappvar=category(Athletics/Intramurals/Recreation~ Athletics/Varsity Sports/Men~ Athletics/Varsity Sports/Women)&amp;setappvar=categoryclass(Athletics/Recreation)"> 
     814            <xsl:if test="/bedework/appvar[key = 'categoryclass']/value = 'Athletics/Recreation'"> 
     815              <xsl:attribute name="class">current</xsl:attribute> 
     816            </xsl:if> 
     817      Athletics/Recreation 
     818          </a><span id="athleticsClicker">+</span> 
     819      <ul id="athleticsSub" class="subviewList"> 
     820          <xsl:choose> 
     821        <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'Athletics/Recreation'"> 
     822                <xsl:attribute name="style">height:75px</xsl:attribute> 
     823              </xsl:when> 
     824        <xsl:otherwise> 
     825                <xsl:attribute name="style">height:0px</xsl:attribute> 
     826              </xsl:otherwise> 
     827        </xsl:choose> 
     828          <li><a href="/cal/?setappvar=category(Athletics/Varsity Sports/Men)&amp;setappvar=categoryclass(Athletics/Recreation)"> 
     829        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Athletics/Varsity Sports/Men'"> 
     830        <xsl:attribute name="class">current</xsl:attribute> 
     831        </xsl:if> 
     832        Athletics/Varsity Sports/Men 
     833            </a></li> 
     834        <li><a href="/cal/?setappvar=category(Athletics/Varsity Sports/Women)&amp;setappvar=categoryclass(Athletics/Recreation)"> 
     835        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Athletics/Varsity Sports/Women'"> 
     836        <xsl:attribute name="class">current</xsl:attribute> 
     837        </xsl:if> 
     838        Athletics/Varsity Sports/Women 
     839            </a></li> 
     840        <li><a href="/cal/?setappvar=category(Athletics/Intramurals/Recreation)&amp;setappvar=categoryclass(Athletics/Recreation)"> 
     841        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Athletics/Intramurals/Recreation'"> 
     842        <xsl:attribute name="class">current</xsl:attribute> 
     843        </xsl:if> 
     844        Athletics/Intramurals/Recreation 
     845            </a></li> 
     846    </ul> 
     847        </li> 
     848    <li> 
     849          <a href="/cal/?setappvar=category(Conference/Symposium~ Lecture/Talk~ Panel/Seminar/Colloquium)&amp;setappvar=categoryclass(Lectures/Conferences)"> 
     850            <xsl:if test="/bedework/appvar[key = 'categoryclass']/value = 'Lectures/Conferences'"> 
     851              <xsl:attribute name="class">current</xsl:attribute> 
     852            </xsl:if> 
     853      Lectures/Conferences 
     854          </a><span id="lecturesClicker">+</span> 
     855      <ul id="lecturesSub" class="subviewList"> 
     856          <xsl:choose> 
     857        <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'Lectures/Conferences'"> 
     858                <xsl:attribute name="style">height:75px</xsl:attribute> 
     859              </xsl:when> 
     860        <xsl:otherwise> 
     861                <xsl:attribute name="style">height:0px</xsl:attribute> 
     862              </xsl:otherwise> 
     863        </xsl:choose> 
     864          <li><a href="/cal/?setappvar=category(Conference/Symposium)&amp;setappvar=categoryclass(Lectures/Conferences)"> 
     865        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Conference/Symposium'"> 
     866        <xsl:attribute name="class">current</xsl:attribute> 
     867        </xsl:if> 
     868        Conference/Symposium 
     869            </a></li> 
     870        <li><a href="/cal/?setappvar=category(Lecture/Talk)&amp;setappvar=categoryclass(Lectures/Conferences)"> 
     871        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Lecture/Talk'"> 
     872        <xsl:attribute name="class">current</xsl:attribute> 
     873        </xsl:if> 
     874        Lecture/Talk 
     875            </a></li> 
     876        <li><a href="/cal/?setappvar=category(Panel/Seminar/Colloquium)&amp;setappvar=categoryclass(Lectures/Conferences)"> 
     877        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Panel/Seminar/Colloquium'"> 
     878        <xsl:attribute name="class">current</xsl:attribute> 
     879        </xsl:if> 
     880        Panel/Seminar/Colloquium 
     881            </a></li> 
     882    </ul> 
     883        </li> 
     884    <li> 
     885          <a href="/cal/?setappvar=category(Religious/Spiritual)&amp;setappvar=categoryclass(Religious/Spiritual)"> 
     886            <xsl:if test="/bedework/appvar[key = 'categoryclass']/value = 'Religious/Spiritual'"> 
     887              <xsl:attribute name="class">current</xsl:attribute> 
     888            </xsl:if> 
     889            Religious/Spiritual 
     890          </a> 
     891        </li> 
     892    <li> 
     893          <a href="/cal/?setappvar=category(Commencement~ Founders' Day~ Holiday~ MLK~ Parents' and Family Weekend)&amp;setappvar=categoryclass(University Events)"> 
     894            <xsl:if test="/bedework/appvar[key = 'categoryclass']/value = 'University Events'"> 
     895              <xsl:attribute name="class">current</xsl:attribute> 
     896            </xsl:if> 
     897      University Events 
     898          </a><span id="lifeClicker">+</span> 
     899      <ul id="lifeSub" class="subviewList"> 
     900          <xsl:choose> 
     901            <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'University Events'"> 
     902                <xsl:attribute name="style">height:135px</xsl:attribute> 
     903              </xsl:when> 
     904        <xsl:otherwise> 
     905                <xsl:attribute name="style">height:0px</xsl:attribute> 
     906              </xsl:otherwise> 
     907        </xsl:choose> 
     908        <li><a href="/cal/main/setViewPeriod.do?setappvar=category(Commencement)&amp;setappvar=categoryclass(University Events)&amp;date=20100501&amp;viewType=monthView"> 
     909          <xsl:if test="/bedework/appvar[key = 'category']/value = 'Commencement'"> 
     910            <xsl:attribute name="class">current</xsl:attribute> 
     911          </xsl:if> 
     912          Commencement 
     913        </a></li> 
     914        <li><a href="/cal/main/setViewPeriod.do?setappvar=category(Founders' Day)&amp;setappvar=categoryclass(University Events)&amp;date=20091001&amp;viewType=monthView"> 
     915          <xsl:if test="/bedework/appvar[key = &quot;category&quot;]/value = &quot;Founders' Day&quot;"> 
     916            <xsl:attribute name="class">current</xsl:attribute> 
     917          </xsl:if> 
     918          Founders' Day 
     919        </a></li> 
     920        <li><a href="/cal/?setappvar=category(Holiday)&amp;setappvar=categoryclass(University Events)"> 
     921          <xsl:if test="/bedework/appvar[key = 'category']/value = 'Holiday'"> 
     922            <xsl:attribute name="class">current</xsl:attribute> 
     923          </xsl:if> 
     924          Holiday 
     925        </a></li> 
     926        <li><a href="/cal/main/setViewPeriod.do?setappvar=category(MLK)&amp;setappvar=categoryclass(University Events)&amp;date=20100101&amp;viewType=monthView"> 
     927          <xsl:if test="/bedework/appvar[key = 'category']/value = 'MLK'"> 
     928            <xsl:attribute name="class">current</xsl:attribute> 
     929          </xsl:if> 
     930          MLK 
     931        </a></li> 
     932        <li><a href="/cal/main/setViewPeriod.do?setappvar=category(Parents' and Family Weekend)&amp;setappvar=categoryclass(University Events)&amp;date=20091023&amp;viewType=monthView"> 
     933          <xsl:if test="/bedework/appvar[key = &quot;category&quot;]/value = &quot;Parents' and Family Weekend&quot;"> 
     934            <xsl:attribute name="class">current</xsl:attribute> 
     935          </xsl:if> 
     936          Parents' and Family Weekend 
     937        </a></li> 
     938    </ul> 
     939        </li> 
     940    <li> 
     941          <a href="/cal/?setappvar=category(Workshop/Short Course)&amp;setappvar=categoryclass(Workshop/Short Course)"> 
     942            <xsl:if test="/bedework/appvar[key = 'categoryclass']/value = 'Workshop/Short Course'"> 
     943              <xsl:attribute name="class">current</xsl:attribute> 
     944            </xsl:if> 
     945            Workshop/Short Course 
     946          </a> 
     947        </li> 
     948    <li><div style="font: bold 1.2em/2 Arial, sans-serif; display:inline;">Other</div> 
     949          <span id="otherClicker">+</span> 
     950      <ul id="otherSub" class="subviewList"> 
    124951        <xsl:choose> 
    125           <xsl:when test="/bedework/appvar[key='style']/value='red'"> 
    126             <link rel="stylesheet" href="{$resourcesRoot}/default/default/red.css"/> 
    127           </xsl:when> 
    128           <xsl:when test="/bedework/appvar[key='style']/value='green'"> 
    129             <link rel="stylesheet" href="{$resourcesRoot}/default/default/green.css"/> 
     952        <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'Other'"> 
     953                <xsl:attribute name="style">height:330px</xsl:attribute> 
     954              </xsl:when> 
     955        <xsl:otherwise> 
     956                <xsl:attribute name="style">height:0px</xsl:attribute> 
     957              </xsl:otherwise> 
     958        </xsl:choose> 
     959          <li><a href="/cal/?setappvar=category(Alumni/Reunion)&amp;setappvar=categoryclass(Other)"> 
     960        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Alumni/Reunion'"> 
     961        <xsl:attribute name="class">current</xsl:attribute> 
     962        </xsl:if> 
     963        Alumni/Reunion 
     964            </a></li> 
     965        <li><a href="/cal/?setappvar=category(Brown Bag)&amp;setappvar=categoryclass(Other)"> 
     966        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Brown Bag'"> 
     967        <xsl:attribute name="class">current</xsl:attribute> 
     968        </xsl:if> 
     969        Brown Bag 
     970            </a></li> 
     971        <li><a href="/cal/?setappvar=category(Ceremony)&amp;setappvar=categoryclass(Other)"> 
     972          <xsl:if test="/bedework/appvar[key = 'category']/value = 'Ceremony'"> 
     973            <xsl:attribute name="class">current</xsl:attribute> 
     974          </xsl:if> 
     975          Ceremony 
     976        </a></li> 
     977        <li><a href="/cal/?setappvar=category(Health/Wellness)&amp;setappvar=categoryclass(Other)"> 
     978          <xsl:if test="/bedework/appvar[key = 'category']/value = 'Health/Wellness'"> 
     979            <xsl:attribute name="class">current</xsl:attribute> 
     980          </xsl:if> 
     981          Health/Wellness 
     982        </a></li> 
     983        <li><a href="/cal/?setappvar=category(Meeting)&amp;setappvar=categoryclass(Other)"> 
     984          <xsl:if test="/bedework/appvar[key = 'category']/value = 'Meeting'"> 
     985            <xsl:attribute name="class">current</xsl:attribute> 
     986          </xsl:if> 
     987          Meeting 
     988        </a></li> 
     989       <li><a href="/cal/?setappvar=category(Orientation)&amp;setappvar=categoryclass(Other)"> 
     990        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Orientation'"> 
     991        <xsl:attribute name="class">current</xsl:attribute> 
     992        </xsl:if> 
     993        Orientation 
     994            </a></li> 
     995        <li><a href="/cal/?setappvar=category(Reception)&amp;setappvar=categoryclass(Other)"> 
     996          <xsl:if test="/bedework/appvar[key = 'category']/value = 'Reception'"> 
     997            <xsl:attribute name="class">current</xsl:attribute> 
     998          </xsl:if> 
     999          Reception 
     1000        </a></li> 
     1001       <li><a href="/cal/?setappvar=category(Research)&amp;setappvar=categoryclass(Other)"> 
     1002        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Research'"> 
     1003        <xsl:attribute name="class">current</xsl:attribute> 
     1004        </xsl:if> 
     1005        Research 
     1006           </a></li> 
     1007        <li><a href="/cal/?setappvar=category(Social)&amp;setappvar=categoryclass(Other)"> 
     1008          <xsl:if test="/bedework/appvar[key = 'category']/value = 'Social'"> 
     1009            <xsl:attribute name="class">current</xsl:attribute> 
     1010          </xsl:if> 
     1011          Social 
     1012        </a></li> 
     1013        <li><a href="/cal/?setappvar=category(Technology)&amp;setappvar=categoryclass(Other)"> 
     1014        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Technology'"> 
     1015        <xsl:attribute name="class">current</xsl:attribute> 
     1016        </xsl:if> 
     1017        Technology 
     1018            </a></li> 
     1019        <li><a href="/cal/?setappvar=category(Tour)&amp;setappvar=categoryclass(Other)"> 
     1020        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Tour'"> 
     1021        <xsl:attribute name="class">current</xsl:attribute> 
     1022        </xsl:if> 
     1023        Tour 
     1024            </a></li> 
     1025        <li><a href="/cal/?setappvar=category(Training)&amp;setappvar=categoryclass(Other)"> 
     1026        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Training'"> 
     1027        <xsl:attribute name="class">current</xsl:attribute> 
     1028        </xsl:if> 
     1029        Training 
     1030            </a></li> 
     1031         <li><a href="/cal/?setappvar=category(Volunteer/Community Service)&amp;setappvar=categoryclass(Other)"> 
     1032        <xsl:if test="/bedework/appvar[key = 'category']/value = 'Volunteer/Community Service'"> 
     1033        <xsl:attribute name="class">current</xsl:attribute> 
     1034        </xsl:if> 
     1035        Volunteer/Community Service 
     1036            </a></li> 
     1037    </ul> 
     1038        </li> 
     1039    </ul> 
     1040  </xsl:template> 
     1041 
     1042<!-- Groups List --> 
     1043<xsl:template name="groupsList"> 
     1044  <div style="display:none;" id="groupListDiv"> 
     1045    <div class="groupHeader"> 
     1046      <h3>Select a Group</h3> 
     1047      <a href="#" onClick="javascript:toggleDiv('groupListDiv'); toggleDiv('right_column'); toggleDiv('center_column');"> 
     1048       X - Close</a> 
     1049    </div> 
     1050    <ul class="groupList"> 
     1051      <li><a href="/cal/?setappvar=group(all)"> 
     1052      <xsl:if test="((/bedework/appvar[key = 'group']/value = 'all') or not(/bedework/appvar[key = 'group']/value))"> 
     1053        <xsl:attribute name="class">current</xsl:attribute> 
     1054        </xsl:if> 
     1055    All</a></li> 
     1056      <xsl:for-each select="/bedework/urlPrefixes/groups/group[ memberof/name = 'campusAdminGroups' ]"> 
     1057        <xsl:variable name="eventOwner" select="eventOwner/text()"/> 
     1058        <xsl:variable name="groupName" select="name/text()"/> 
     1059        <xsl:variable name="groupDescription" select="description/text()"/> 
     1060              <li><a href="/cal/?setappvar=group({$eventOwner})"> 
     1061              <xsl:if test="$eventOwner = (/bedework/appvar[key = 'group']/value)"> 
     1062                    <xsl:attribute name="class">current</xsl:attribute> 
     1063                </xsl:if> 
     1064          <xsl:value-of select="$groupName"/> 
     1065          </a> 
     1066          <xsl:if test="$groupName != $groupDescription"> 
     1067            <div class="groupDesc"><xsl:value-of select="$groupDescription"/></div> 
     1068          </xsl:if> 
     1069          </li> 
     1070      </xsl:for-each> 
     1071   </ul> 
     1072  </div> 
     1073</xsl:template> 
     1074 
     1075  <!-- Side Links Navigation --> 
     1076  <xsl:template name="sideLinksList"> 
     1077    <ul class="sideLinksExpand"> 
     1078    <li> 
     1079      <h4>OTHER UNIVERSITY CALENDARS</h4><span id="additionalUnivClicker">+</span> 
     1080        <ul id="additionalUnivSub" style="height:0px;overflow:hidden;"> 
     1081          <li><a href="http://dukehealth.org/events" target="_blank">DukeHealth.org Event Calendar</a></li> 
     1082          <li><a href="http://calendar.activedatax.com/ncstate/EventList.aspx" target="_blank">NC State Calendar</a></li> 
     1083          <li><a href="http://webevent.nccu.edu/CalendarNOW.aspx" target="_blank">NCCU Calendar</a></li> 
     1084          <li><a href="http://events.unc.edu/cal/" target="_blank">UNC Calendar</a></li> 
     1085      </ul> 
     1086  </li> 
     1087  <li> 
     1088    <h4>OTHER LINKS</h4><span id="additionalOptionsClicker">+</span> 
     1089       <ul id="additionalOptionsSub" style="height:0px;overflow:hidden"> 
     1090         <li><a href="http://www.durham-nc.com" target="_blank">Durham Visitor's Bureau Calendar</a></li> 
     1091         <li><a href="http://map.duke.edu" target="_blank">Duke Campus Map</a></li> 
     1092      </ul> 
     1093  </li> 
     1094  </ul> 
     1095  </xsl:template> 
     1096 
     1097  <!-- Date Navigation --> 
     1098  <xsl:template name="navigation"> 
     1099    <!-- View Options --> 
     1100    <!-- There were a few hundred lines here of all sorts of complicated tests, 
     1101      if you ever need to regain different options based on combinations of date range / list vs calendar, etc., 
     1102      review svn or a current version bedework xsl, either way it can probably be simplified a ton --> 
     1103    <xsl:if test="/bedework/periodname != 'Year'"> 
     1104      <ul id="calDisplayOptions"> 
     1105        <li> 
     1106          <xsl:choose> 
     1107            <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
     1108              <a href="{$setup}&amp;setappvar=summaryMode(summary)" title="toggle                   summary/detailed view"> Summary </a> 
     1109            </xsl:when> 
     1110            <xsl:otherwise> 
     1111              <a href="{$setup}&amp;setappvar=summaryMode(details)" title="toggle                   summary/detailed view"> Details </a> 
     1112            </xsl:otherwise> 
     1113          </xsl:choose> 
     1114        </li> 
     1115      </ul> 
     1116      <xsl:variable name="rssCurrDate" select="/bedework/currentdate/date"/> 
     1117      <xsl:variable name="rssGroups"> 
     1118        <xsl:choose> 
     1119          <xsl:when test="(/bedework/appvar[key = 'group']/value) = 'all' or not(/bedework/appvar[key = 'group']/value)"> 
     1120            <xsl:text>(all)</xsl:text> 
    1301121          </xsl:when> 
    1311122          <xsl:otherwise> 
    132             <link rel="stylesheet" href="{$resourcesRoot}/default/default/blue.css"/> 
     1123            <xsl:variable name="rssCurrGroup" select="/bedework/appvar[key = 'group']/value"/> 
     1124            <xsl:variable name="rssGroupTemplate"> 
     1125              <xsl:text>(</xsl:text> 
     1126              <xsl:value-of select="$rssCurrGroup"/> 
     1127              <xsl:text>)</xsl:text> 
     1128            </xsl:variable> 
     1129            <xsl:value-of select="$rssGroupTemplate"/> 
    1331130          </xsl:otherwise> 
    1341131        </xsl:choose> 
    135         <link rel="stylesheet" href="../../../bedework-common/default/default/subColors.css"/> 
    136         <link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/default/default/print.css" /> 
    137         <!-- load javascript --> 
    138         <xsl:if test="/bedework/page='event' or /bedework/page='displayCalendarForExport'"> 
    139           <script type="text/javascript" src="/bedework-common/javascript/jquery/jquery-1.3.2.min.js">&#160;</script> 
    140           <script type="text/javascript" src="/bedework-common/javascript/jquery/jquery-ui-1.7.1.custom.min.js">&#160;</script> 
    141           <link rel="stylesheet" href="/bedework-common/javascript/jquery/css/custom-theme/jquery-ui-1.7.1.custom.css"/> 
    142           <link rel="stylesheet" href="/bedework-common/javascript/jquery/css/custom-theme/bedeworkJquery.css"/> 
    143           <script type="text/javascript" src="{$resourcesRoot}/resources/javascript/bedework.js">&#160;</script> 
    144           <xsl:if test="/bedework/page='displayCalendarForExport'"> 
    145             <script type="text/javascript"> 
    146               <xsl:comment> 
    147               $.datepicker.setDefaults({ 
    148                 constrainInput: true, 
    149                 dateFormat: "yy-mm-dd", 
    150                 showOn: "both", 
    151                 buttonImage: "<xsl:value-of select='$resourcesRoot'/>/images/calIcon.gif", 
    152                 buttonImageOnly: true, 
    153                 gotoCurrent: true, 
    154                 duration: "" 
    155               }); 
    156               $(document).ready(function() { 
    157                 $("#bwExportCalendarWidgetStartDate").datepicker({ 
    158                 }).attr("readonly", "readonly"); 
    159                 $("#bwExportCalendarWidgetEndDate").datepicker({ 
    160                 }).attr("readonly", "readonly"); 
    161               }); 
    162               </xsl:comment> 
    163             </script> 
    164           </xsl:if> 
    165         </xsl:if> 
    166         <!-- address bar icon --> 
    167         <link rel="icon" type="image/ico" href="{$resourcesRoot}/images/bedework.ico" /> 
    168       </head> 
    169       <body> 
    170         <xsl:call-template name="headBar"/> 
    171         <xsl:if test="/bedework/error"> 
    172           <div id="errors"> 
    173             <xsl:apply-templates select="/bedework/error"/> 
    174           </div> 
    175         </xsl:if> 
    176         <xsl:call-template name="tabs"/> 
    177         <xsl:call-template name="navigation"/> 
    178         <xsl:call-template name="searchBar"/> 
     1132      </xsl:variable> 
     1133 
     1134      <xsl:variable name="rssCategory"> 
    1791135        <xsl:choose> 
    180           <xsl:when test="/bedework/page='event'"> 
    181             <!-- show an event --> 
    182             <xsl:apply-templates select="/bedework/event"/> 
    183           </xsl:when> 
    184           <xsl:when test="/bedework/page='eventList'"> 
    185             <!-- show a list of discrete events in a time period --> 
    186             <xsl:apply-templates select="/bedework/events" mode="eventList"/> 
    187           </xsl:when> 
    188           <xsl:when test="/bedework/page='showSysStats'"> 
    189             <!-- show system stats --> 
    190             <xsl:call-template name="stats"/> 
    191           </xsl:when> 
    192           <xsl:when test="/bedework/page='calendarList'"> 
    193             <!-- show a list of all calendars --> 
    194             <xsl:apply-templates select="/bedework/calendars"/> 
    195           </xsl:when> 
    196           <xsl:when test="/bedework/page='displayCalendarForExport'"> 
    197             <!-- page for calendar export (can optionally be replaced by 
    198                  a pop-up widget; see the calendars template) --> 
    199             <xsl:apply-templates select="/bedework/currentCalendar" mode="export"/> 
    200           </xsl:when> 
    201           <xsl:when test="/bedework/page='searchResult'"> 
    202             <!-- display search results --> 
    203             <xsl:call-template name="searchResult"/> 
     1136          <xsl:when test="(/bedework/appvar[key = 'category']/value = 'all') or not(/bedework/appvar[key = 'category']/value)"> 
     1137            <xsl:text>all</xsl:text> 
    2041138          </xsl:when> 
    2051139          <xsl:otherwise> 
    206             <!-- otherwise, show the eventsCalendar --> 
    207             <!-- main eventCalendar content --> 
    208             <xsl:choose> 
    209               <xsl:when test="/bedework/periodname='Day'"> 
    210                 <xsl:call-template name="listView"/> 
    211               </xsl:when> 
    212               <xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> 
    213                 <xsl:choose> 
    214                   <xsl:when test="/bedework/appvar[key='weekViewMode']/value='list'"> 
    215                     <xsl:call-template name="listView"/> 
    216                   </xsl:when> 
    217                   <xsl:otherwise> 
    218                     <xsl:call-template name="weekView"/> 
    219                   </xsl:otherwise> 
    220                 </xsl:choose> 
    221               </xsl:when> 
    222               <xsl:when test="/bedework/periodname='Month'"> 
    223                 <xsl:choose> 
    224                   <xsl:when test="/bedework/appvar[key='monthViewMode']/value='list'"> 
    225                     <xsl:call-template name="listView"/> 
    226                   </xsl:when> 
    227                   <xsl:otherwise> 
    228                     <xsl:call-template name="monthView"/> 
    229                   </xsl:otherwise> 
    230                 </xsl:choose> 
    231               </xsl:when> 
    232               <xsl:otherwise> 
    233                 <xsl:call-template name="yearView"/> 
    234               </xsl:otherwise> 
    235             </xsl:choose> 
     1140            <xsl:variable name="rssCurrCategory" select="/bedework/appvar[key = 'category']/value"/> 
     1141            <xsl:variable name="rssCatTemplate"> 
     1142              <xsl:text/> 
     1143              <xsl:value-of select="$rssCurrCategory"/> 
     1144              <xsl:text/> 
     1145            </xsl:variable> 
     1146            <xsl:value-of select="$rssCatTemplate"/> 
    2361147          </xsl:otherwise> 
    2371148        </xsl:choose> 
    238         <!-- footer --> 
    239         <xsl:call-template name="footer"/> 
    240       </body> 
    241     </html> 
    242   </xsl:template> 
    243  
    244   <!--==== HEADER TEMPLATES and NAVIGATION  ====--> 
    245   <!-- these templates are separated out for convenience and to simplify the default template --> 
    246  
    247   <xsl:template name="headBar"> 
    248     <table width="100%" border="0" cellpadding="0" cellspacing="0" id="logoTable"> 
    249       <tr> 
    250         <td colspan="3" id="logoCell"><a href="/bedework/"><img src="{$resourcesRoot}/images/bedeworkLogo.gif" width="292" height="75" border="0" alt="Bedework"/></a></td> 
    251         <td colspan="2" id="schoolLinksCell"> 
    252           <h2><xsl:copy-of select="$bwStr-HdBr-PublicCalendar"/></h2> 
    253           <a href="{$privateCal}"><xsl:copy-of select="$bwStr-HdBr-PersonalCalendar"/></a> | 
    254           <a href="http://www.youruniversityhere.edu"><xsl:copy-of select="$bwStr-HdBr-UniversityHome"/></a> | 
    255           <a href="http://www.bedework.org/"><xsl:copy-of select="$bwStr-HdBr-OtherLink"/></a> 
    256         </td> 
    257       </tr> 
    258     </table> 
    259     <table id="curDateRangeTable"  cellspacing="0"> 
    260       <tr> 
    261         <td class="sideBarOpenCloseIcon"> 
    262           &#160; 
    263           <!-- 
    264           we may choose to implement calendar selection in the public calendar 
    265           using a sidebar; leave this comment here for now. 
    266           <xsl:choose> 
    267             <xsl:when test="/bedework/appvar[key='sidebar']/value='closed'"> 
    268               <a href="?setappvar=sidebar(opened)"> 
    269                 <img alt="open sidebar" src="{$resourcesRoot}/resources/sideBarArrowOpen.gif" width="21" height="16" border="0" align="left"/> 
    270               </a> 
    271             </xsl:when> 
    272             <xsl:otherwise> 
    273               <a href="?setappvar=sidebar(closed)"> 
    274                 <img alt="close sidebar" src="{$resourcesRoot}/resources/sideBarArrowClose.gif" width="21" height="16" border="0" align="left"/> 
    275               </a> 
    276             </xsl:otherwise> 
    277           </xsl:choose>--> 
    278         </td> 
    279         <td class="date"> 
    280           <xsl:choose> 
    281             <xsl:when test="/bedework/page='event'"> 
    282               <xsl:copy-of select="$bwStr-HdBr-EventInformation"/> 
    283             </xsl:when> 
    284             <xsl:when test="/bedework/page='showSysStats' or 
    285                             /bedework/page='calendars'"> 
    286               &#160; 
    287             </xsl:when> 
    288             <xsl:otherwise> 
    289               <xsl:value-of select="/bedework/firstday/longdate"/> 
    290               <xsl:if test="/bedework/periodname!='Day'"> 
    291                 - 
    292                 <xsl:value-of select="/bedework/lastday/longdate"/> 
    293               </xsl:if> 
    294             </xsl:otherwise> 
    295           </xsl:choose> 
    296         </td> 
    297         <td class="rssPrint"> 
    298           <a href="javascript:window.print()" title="{$bwStr-HdBr-PrintThisView}"> 
    299             <img alt="print this view" src="{$resourcesRoot}/images/std-print-icon.gif" width="20" height="14" border="0"/><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-HdBr-Print"/> 
    300           </a> 
    301           <a class="rss" href="{$listEvents}&amp;setappvar=summaryMode(details)&amp;skinName=rss-list&amp;days=3" title="{$bwStr-HdBr-RSSFeed}"><xsl:copy-of select="$bwStr-HdBr-RSS"/></a> 
    302         </td> 
    303       </tr> 
    304     </table> 
    305   </xsl:template> 
    306  
    307   <xsl:template name="tabs"> 
    308     <div id="bwTabs"> 
    309       <ul> 
    310         <li> 
    311           <xsl:if test="/bedework/page='eventscalendar' and /bedework/periodname='Day'"> 
    312             <xsl:attribute name="class">selected</xsl:attribute> 
    313           </xsl:if> 
    314           <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$curdate}"><xsl:copy-of select="$bwStr-Tabs-Day"/></a> 
    315         </li> 
    316         <li> 
    317           <xsl:if test="/bedework/page='eventscalendar' and /bedework/periodname='Week' or /bedework/periodname=''"> 
    318             <xsl:attribute name="class">selected</xsl:attribute> 
    319           </xsl:if> 
    320           <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$curdate}"><xsl:copy-of select="$bwStr-Tabs-Week"/></a> 
    321         </li> 
    322         <li> 
    323           <xsl:if test="/bedework/page='eventscalendar' and /bedework/periodname='Month'"> 
    324             <xsl:attribute name="class">selected</xsl:attribute> 
    325           </xsl:if><a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$curdate}"><xsl:copy-of select="$bwStr-Tabs-Month"/></a> 
    326         </li> 
    327         <li> 
    328           <xsl:if test="/bedework/page='eventscalendar' and /bedework/periodname='Year'"> 
    329             <xsl:attribute name="class">selected</xsl:attribute> 
    330           </xsl:if><a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><xsl:copy-of select="$bwStr-Tabs-Year"/></a> 
    331         </li> 
    332         <li> 
    333           <xsl:if test="/bedework/page='eventList'"> 
    334             <xsl:attribute name="class">selected</xsl:attribute> 
    335           </xsl:if><a href="{$listEvents}"><xsl:copy-of select="$bwStr-Tabs-List"/></a> 
    336         </li> 
    337       </ul> 
    338     </div> 
    339   </xsl:template> 
    340  
    341   <xsl:template name="navigation"> 
    342     <table border="0" cellpadding="0" cellspacing="0" id="navigationBarTable"> 
    343       <tr> 
    344         <td class="leftCell"> 
    345           <a id="prevViewPeriod" href="{$setViewPeriod}&amp;date={$prevdate}"><img src="{$resourcesRoot}/images/std-arrow-left.gif" alt="previous" width="13" height="16" class="prevImg" border="0"/></a> 
    346           <a id="nextViewPeriod" href="{$setViewPeriod}&amp;date={$nextdate}"><img src="{$resourcesRoot}/images/std-arrow-right.gif" alt="next" width="13" height="16" class="nextImg" border="0"/></a> 
    347           <xsl:choose> 
    348             <xsl:when test="/bedework/periodname='Year'"> 
    349               <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/> 
    350             </xsl:when> 
    351             <xsl:when test="/bedework/periodname='Month'"> 
    352               <xsl:value-of select="/bedework/firstday/monthname"/>, <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/> 
    353             </xsl:when> 
    354             <xsl:when test="/bedework/periodname='Week'"> 
    355               <xsl:copy-of select="$bwStr-Navi-WeekOf"/><xsl:text> </xsl:text><xsl:value-of select="substring-after(/bedework/firstday/longdate,', ')"/> 
    356             </xsl:when> 
    357             <xsl:otherwise> 
    358               <xsl:value-of select="/bedework/firstday/longdate"/> 
    359             </xsl:otherwise> 
    360           </xsl:choose> 
    361         </td> 
    362         <td class="todayButton"> 
    363           <a href="{$setViewPeriod}&amp;viewType=todayView&amp;date={$curdate}"> 
    364             <img src="{$resourcesRoot}/images/std-button-today-off.gif" width="54" height="22" border="0" alt="Go to Today" align="left"/> 
    365           </a> 
    366         </td> 
    367         <td align="right" class="gotoForm"> 
    368           <form name="calForm" method="post" action="{$setViewPeriod}"> 
    369              <table border="0" cellpadding="0" cellspacing="0"> 
    370               <tr> 
    371                 <xsl:if test="/bedework/periodname!='Year'"> 
    372                   <td> 
    373                     <select name="viewStartDate.month"> 
    374                       <xsl:for-each select="/bedework/monthvalues/val"> 
    375                         <xsl:variable name="temp" select="."/> 
    376                         <xsl:variable name="pos" select="position()"/> 
    377                         <xsl:choose> 
    378                           <xsl:when test="/bedework/monthvalues[start=$temp]"> 
    379                             <option value="{$temp}" selected="selected"> 
    380                               <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> 
    381                             </option> 
    382                           </xsl:when> 
    383                           <xsl:otherwise> 
    384                             <option value="{$temp}"> 
    385                               <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> 
    386                             </option> 
    387                           </xsl:otherwise> 
    388                         </xsl:choose> 
    389                       </xsl:for-each> 
    390                     </select> 
    391                   </td> 
    392                   <xsl:if test="/bedework/periodname!='Month'"> 
    393                     <td> 
    394                       <select name="viewStartDate.day"> 
    395                         <xsl:for-each select="/bedework/dayvalues/val"> 
    396                           <xsl:variable name="temp" select="."/> 
    397                           <xsl:variable name="pos" select="position()"/> 
    398                           <xsl:choose> 
    399                             <xsl:when test="/bedework/dayvalues[start=$temp]"> 
    400                               <option value="{$temp}" selected="selected"> 
    401                                 <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> 
    402                               </option> 
    403                             </xsl:when> 
    404                             <xsl:otherwise> 
    405                               <option value="{$temp}"> 
    406                                 <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> 
    407                               </option> 
    408                             </xsl:otherwise> 
    409                           </xsl:choose> 
    410                         </xsl:for-each> 
    411                       </select> 
    412                     </td> 
    413                   </xsl:if> 
    414                 </xsl:if> 
    415                 <td> 
    416                   <xsl:variable name="temp" select="/bedework/yearvalues/start"/> 
    417                   <input type="text" name="viewStartDate.year" maxlength="4" size="4" value="{$temp}"/> 
    418                 </td> 
    419                 <td> 
    420                   <input name="submit" type="submit" value="{$bwStr-Navi-Go}"/> 
    421                 </td> 
    422               </tr> 
    423             </table> 
    424           </form> 
    425         </td> 
    426         <td class="rightCell"> 
    427         </td> 
    428       </tr> 
    429     </table> 
    430   </xsl:template> 
    431  
    432   <xsl:template name="searchBar"> 
    433     <table width="100%" border="0" cellpadding="0" cellspacing="0" id="searchBarTable"> 
    434        <tr> 
    435          <td class="leftCell"> 
    436            <xsl:choose> 
    437              <xsl:when test="/bedework/selectionState/selectionType = 'collections'"> 
    438                <xsl:copy-of select="$bwStr-SrcB-TopicalArea"/> 
    439                <strong> 
    440                  <xsl:call-template name="substring-afterLastInstanceOf"> 
    441                    <xsl:with-param name="string" select="/bedework/appvar[key='curCollection']/value"/> 
    442                    <xsl:with-param name="char">/</xsl:with-param> 
    443                  </xsl:call-template> 
    444                </strong> 
    445              </xsl:when> 
    446              <xsl:when test="/bedework/selectionState/selectionType = 'search'"> 
    447                <xsl:copy-of select="$bwStr-SrcB-CurrentSearch"/><xsl:text> </xsl:text><xsl:value-of select="/bedework/search"/> 
    448              </xsl:when> 
    449              <xsl:otherwise><!-- view --> 
    450                <xsl:copy-of select="$bwStr-SrcB-View"/> 
    451                <form name="selectViewForm" method="post" action="{$setSelection}"> 
    452                 <select name="viewName" onchange="submit()" > 
    453                   <xsl:if test="/bedework/page = 'eventList'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if> 
    454                   <xsl:for-each select="/bedework/views/view"> 
    455                     <xsl:variable name="name" select="name"/> 
    456                     <xsl:choose> 
    457                       <xsl:when test="name=/bedework/selectionState/view/name"> 
    458                         <option value="{$name}" selected="selected"><xsl:value-of select="name"/></option> 
    459                       </xsl:when> 
    460                       <xsl:otherwise> 
    461                         <option value="{$name}"><xsl:value-of select="name"/></option> 
    462                       </xsl:otherwise> 
    463                     </xsl:choose> 
    464                   </xsl:for-each> 
    465                 </select> 
    466               </form> 
    467              </xsl:otherwise> 
    468            </xsl:choose> 
    469            <span class="link"><a href="{$setSelection}"><xsl:copy-of select="$bwStr-SrcB-DefaultView"/></a> | <a href="{$fetchPublicCalendars}"><xsl:copy-of select="$bwStr-SrcB-AllTopicalAreas"/></a></span> 
    470          </td> 
    471          <td class="rightCell"> 
    472             <xsl:if test="/bedework/page!='searchResult'"> 
    473               <form name="searchForm" id="searchForm" method="post" action="{$search}"> 
    474                 <xsl:copy-of select="$bwStr-SrcB-Search"/> 
    475                 <input type="text" name="query" size="15"> 
    476                   <xsl:attribute name="value"><xsl:value-of select="/bedework/searchResults/query"/></xsl:attribute> 
    477                 </input> 
    478                 <input type="submit" name="submit" value="{$bwStr-SrcB-Go}"/> 
    479               </form> 
    480               <xsl:text> </xsl:text> 
    481             </xsl:if> 
    482             <xsl:choose> 
    483               <xsl:when test="/bedework/periodname='Day' or /bedework/page='eventList'"> 
    484                 <img src="{$resourcesRoot}/images/std-button-listview-off.gif" width="46" height="21" border="0" alt="{$bwStr-SrcB-ToggleListCalView}"/> 
    485               </xsl:when> 
    486               <xsl:when test="/bedework/periodname='Year'"> 
    487                 <img src="{$resourcesRoot}/images/std-button-calview-off.gif" width="46" height="21" border="0" alt="{$bwStr-SrcB-ToggleListCalView}"/> 
    488               </xsl:when> 
    489               <xsl:when test="/bedework/periodname='Month'"> 
    490                 <xsl:choose> 
    491                   <xsl:when test="/bedework/appvar[key='monthViewMode']/value='list'"> 
    492                     <a href="{$setup}&amp;setappvar=monthViewMode(cal)" title="{$bwStr-SrcB-ToggleListCalView}"> 
    493                       <img src="{$resourcesRoot}/images/std-button-calview.gif" width="46" height="21" border="0" alt="{$bwStr-SrcB-ToggleListCalView}"/> 
    494                     </a> 
    495                   </xsl:when> 
    496                   <xsl:otherwise> 
    497                     <a href="{$setup}&amp;setappvar=monthViewMode(list)" title="{$bwStr-SrcB-ToggleListCalView}"> 
    498                       <img src="{$resourcesRoot}/images/std-button-listview.gif" width="46" height="21" border="0" alt="{$bwStr-SrcB-ToggleListCalView}"/> 
    499                     </a> 
    500                   </xsl:otherwise> 
    501                 </xsl:choose> 
    502               </xsl:when> 
    503               <xsl:otherwise> 
    504                 <xsl:choose> 
    505                   <xsl:when test="/bedework/appvar[key='weekViewMode']/value='list'"> 
    506                     <a href="{$setup}&amp;setappvar=weekViewMode(cal)" title="{$bwStr-SrcB-ToggleListCalView}"> 
    507                       <img src="{$resourcesRoot}/images/std-button-calview.gif" width="46" height="21" border="0"  alt="{$bwStr-SrcB-ToggleListCalView}"/> 
    508                     </a> 
    509                   </xsl:when> 
    510                   <xsl:otherwise> 
    511                     <a href="{$setup}&amp;setappvar=weekViewMode(list)" title="{$bwStr-SrcB-ToggleListCalView}"> 
    512                       <img src="{$resourcesRoot}/images/std-button-listview.gif" width="46" height="21" border="0"  alt="{$bwStr-SrcB-ToggleListCalView}"/> 
    513                     </a> 
    514                   </xsl:otherwise> 
    515                 </xsl:choose> 
    516               </xsl:otherwise> 
    517             </xsl:choose> 
    518             <xsl:choose> 
    519               <xsl:when test="/bedework/page = 'eventList'"> 
    520                 <xsl:choose> 
    521                   <xsl:when test="/bedework/appvar[key='listEventsSummaryMode']/value='details'"> 
    522                     <a href="{$listEvents}&amp;setappvar=listEventsSummaryMode(summary)" title="{$bwStr-SrcB-ToggleSummDetView}"> 
    523                       <img src="{$resourcesRoot}/images/std-button-summary.gif" width="62" height="21" border="0" alt="{$bwStr-SrcB-ToggleSummDetView}"/> 
    524                     </a> 
    525                   </xsl:when> 
    526                   <xsl:otherwise> 
    527                     <a href="{$listEvents}&amp;setappvar=listEventsSummaryMode(details)" title="{$bwStr-SrcB-ToggleSummDetView}"> 
    528                       <img src="{$resourcesRoot}/images/std-button-details.gif" width="62" height="21" border="0" alt="{$bwStr-SrcB-ToggleSummDetView}"/> 
    529                     </a> 
    530                   </xsl:otherwise> 
    531                 </xsl:choose> 
    532               </xsl:when> 
    533               <xsl:when test="/bedework/periodname='Year' or 
    534                               (/bedework/periodname='Month' and 
    535                               (/bedework/appvar[key='monthViewMode']/value='cal' or 
    536                                not(/bedework/appvar[key='monthViewMode']))) or 
    537                               (/bedework/periodname='Week' and 
    538                               (/bedework/appvar[key='weekViewMode']/value='cal' or 
    539                                not(/bedework/appvar[key='weekViewMode'])))"> 
    540                 <xsl:choose> 
    541                   <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
    542                     <img src="{$resourcesRoot}/images/std-button-summary-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/> 
    543                   </xsl:when> 
    544                   <xsl:otherwise> 
    545                     <img src="{$resourcesRoot}/images/std-button-details-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/> 
    546                   </xsl:otherwise> 
    547                 </xsl:choose> 
    548               </xsl:when> 
    549               <xsl:otherwise> 
    550                 <xsl:choose> 
    551                   <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
    552                     <a href="{$setup}&amp;setappvar=summaryMode(summary)" title="{$bwStr-SrcB-ToggleSummDetView}"> 
    553                       <img src="{$resourcesRoot}/images/std-button-summary.gif" width="62" height="21" border="0" alt="{$bwStr-SrcB-ToggleSummDetView}"/> 
    554                     </a> 
    555                   </xsl:when> 
    556                   <xsl:otherwise> 
    557                     <a href="{$setup}&amp;setappvar=summaryMode(details)" title="{$bwStr-SrcB-ToggleSummDetView}"> 
    558                       <img src="{$resourcesRoot}/images/std-button-details.gif" width="62" height="21" border="0" alt="{$bwStr-SrcB-ToggleSummDetView}"/> 
    559                     </a> 
    560                   </xsl:otherwise> 
    561                 </xsl:choose> 
    562               </xsl:otherwise> 
    563             </xsl:choose> 
    564             <a href="{$setup}"> 
    565               <xsl:if test="/bedework/page='eventList'"> 
    566                 <xsl:attribute name="href"><xsl:value-of select="$listEvents"/></xsl:attribute> 
    567               </xsl:if> 
    568               <img src="{$resourcesRoot}/images/std-button-refresh.gif" width="70" height="21" border="0" alt="refresh view"/> 
    569             </a> 
    570           </td> 
    571        </tr> 
    572     </table> 
    573   </xsl:template> 
    574  
     1149      </xsl:variable> 
     1150 
     1151      <xsl:variable name="rssViewType"> 
     1152        <xsl:if test="(/bedework/periodname) = 'Day'"> 
     1153          <xsl:text>dayView</xsl:text> 
     1154        </xsl:if> 
     1155        <xsl:if test="(/bedework/periodname) = 'Week'"> 
     1156          <xsl:text>weekView</xsl:text> 
     1157        </xsl:if> 
     1158        <xsl:if test="(/bedework/periodname) = 'Month'"> 
     1159          <xsl:text>monthView</xsl:text> 
     1160        </xsl:if> 
     1161      </xsl:variable> 
     1162      <a id="rssRequest" class="rss" href="/feed/calendar/{$rssViewType}/rss/{$rssGroups}/details/{$rssCategory}" title="RSS feed"> <!-- &amp;date={$rssCurrDate} --> 
     1163        <img src="{$resourcesRoot}/default/default/images/feed-icon-14x14.png" alt="RSS Feed Icon"/> 
     1164      </a> 
     1165      <div id="rssPopUp" style="display:none;position:absolute"> <!-- RSS Popup window --> 
     1166        <p id="rssClose" onclick="this.parentNode.style.display = 'none'">X - Close</p> 
     1167        <h5 style="padding: 6px;">RSS Feed Details</h5> 
     1168        <!-- setappvar=summaryMode(details){$rssGroups}skinName=rss{$rssCategory}viewType={$rssViewType} --> 
     1169        <ul style="padding: 6px;"> 
     1170          <li style="border-bottom: solid 1px #CCC;">Time Period: Current <xsl:value-of select="/bedework/periodname"/></li> 
     1171          <li style="border-bottom: solid 1px #CCC;">Group: <span id="rssDetailGroup">All</span></li> 
     1172          <li style="border-bottom: solid 1px #CCC;">Calendar Categories: <span id="rssDetailCategory">All</span></li> 
     1173        </ul> 
     1174        <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> 
     1175        <p style="padding: 6px;"><strong>Your RSS URL:</strong></p> 
     1176        <input id="rssValue" size="35" type="text" value=""/> 
     1177        <ul style="padding: 6px;"> 
     1178          <li><a href="/feed/list/30">Click here for 30-day feed of events</a></li> 
     1179          <li><a href="/feed/list/60">Click here for 60-day feed of events</a></li> 
     1180          <li><a href="/feed/list/90">Click here for 90-day feed of events</a></li> 
     1181        </ul> 
     1182      </div> 
     1183    </xsl:if> 
     1184    <a id="prevViewPeriod" href="{$setViewPeriod}&amp;date={$prevdate}">«</a> 
     1185    <h3> 
     1186      <xsl:choose> 
     1187        <xsl:when test="/bedework/periodname='Year'"> 
     1188          <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/> 
     1189        </xsl:when> 
     1190        <xsl:when test="/bedework/periodname='Month'"> 
     1191          <xsl:value-of select="/bedework/firstday/monthname"/>, <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/> 
     1192        </xsl:when> 
     1193        <xsl:when test="/bedework/periodname='Week'">Week of <xsl:value-of select="substring-after(/bedework/firstday/longdate,', ')"/> 
     1194        </xsl:when> 
     1195        <xsl:otherwise> 
     1196          <xsl:value-of select="/bedework/firstday/longdate"/> 
     1197        </xsl:otherwise> 
     1198      </xsl:choose> 
     1199    </h3> 
     1200    <a id="nextViewPeriod" href="{$setViewPeriod}&amp;date={$nextdate}">»</a> 
     1201  </xsl:template> 
     1202  <xsl:template name="searchBar"> SEARCH BAR </xsl:template> 
    5751203  <!--==== SINGLE EVENT ====--> 
     1204  <!-- I am going to modify this quite a bit. I don't think we need 300+ lines of code ot print out an event, 
     1205    but may want to compare this to the original if things get wonky --> 
    5761206  <xsl:template match="event"> 
     1207    <xsl:variable name="subscriptionId" select="subscription/id"/> 
    5771208    <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    5781209    <xsl:variable name="guid" select="guid"/> 
     1210    <xsl:variable name="guidEsc" select="translate(guid, '.', '_')"/> 
    5791211    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    5801212    <xsl:variable name="statusClass"> 
     
    5851217      </xsl:choose> 
    5861218    </xsl:variable> 
    587     <h2 class="{$statusClass}"> 
    588       <a id="linkToEvent" href="javascript:showLink('{$urlPrefix}/event/eventView.do?calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}')" title="{$bwStr-SgEv-GenerateLinkToThisEvent}"> 
    589        <xsl:copy-of select="$bwStr-SgEv-LinkToThisEvent"/> 
    590      </a> 
    591       <xsl:if test="status='CANCELLED'"><xsl:copy-of select="$bwStr-SgEv-Canceled"/><xsl:text> </xsl:text></xsl:if> 
    592       <xsl:choose> 
    593         <xsl:when test="link != ''"> 
    594           <xsl:variable name="link" select="link"/> 
    595           <a href="{$link}"> 
    596             <xsl:value-of select="summary"/> 
    597           </a> 
    598         </xsl:when> 
    599         <xsl:otherwise> 
    600           <xsl:value-of select="summary"/> 
    601         </xsl:otherwise> 
    602       </xsl:choose> 
    603     </h2> 
    604     <table id="eventTable" cellpadding="0" cellspacing="0"> 
    605       <tr> 
    606         <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-When"/></td> 
    607         <td class="fieldval"> 
    608           <!-- always display local time --> 
    609           <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> 
    610           <xsl:if test="start/allday = 'false'"> 
    611             <span class="time"><xsl:value-of select="start/time"/></span> 
    612           </xsl:if> 
    613           <xsl:if test="(end/longdate != start/longdate) or 
    614                         ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> 
    615           <xsl:if test="end/longdate != start/longdate"> 
    616             <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> 
    617           </xsl:if> 
     1219 
     1220    <div class="singleEvent"> 
     1221 
     1222      <h2 class="{$statusClass} eventTitle"> 
     1223        <xsl:variable name="gStartdate" select="start/utcdate"/> 
     1224        <xsl:variable name="gLocation" select="location/address"/> 
     1225        <xsl:variable name="gEnddate" select="end/utcdate"/> 
     1226        <xsl:variable name="gText" select="summary"/> 
     1227        <xsl:variable name="gDetails" select="summary"/> 
     1228        <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> 
     1229        <xsl:choose> 
     1230          <xsl:when test="string-length($recurrenceId)"> 
     1231            <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> 
     1232          </xsl:when> 
     1233          <xsl:otherwise> 
     1234            <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> 
     1235          </xsl:otherwise> 
     1236        </xsl:choose> 
     1237        <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
     1238        <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"> 
     1239          <img src="{$resourcesRoot}/images/std-ical_icon.gif" alt="Download this event"/> 
     1240        </a> 
     1241        <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> 
     1242        <xsl:if test="summary != ''"> 
     1243          <xsl:variable name="summary" select="summary"/> 
     1244          <xsl:value-of select="$summary"/> 
     1245        </xsl:if> 
     1246      </h2> 
     1247 
     1248      <span class="eventWhen"> 
     1249        <br/> 
     1250        <span class="infoTitle">When: </span> 
     1251        <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/> 
     1252        <xsl:text> </xsl:text> 
     1253        <xsl:if test="start/allday = 'false'"> 
     1254          <span class="time"> 
     1255            <xsl:value-of select="start/time"/> 
     1256          </span> 
     1257        </xsl:if> 
     1258        <xsl:if test="(end/longdate != start/longdate) or ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> 
     1259        <xsl:if test="end/longdate != start/longdate"> 
     1260          <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> 
     1261        </xsl:if> 
    6181262          <xsl:choose> 
    6191263            <xsl:when test="start/allday = 'true'"> 
    620               <span class="time"><em><xsl:copy-of select="$bwStr-SgEv-AllDay"/></em></span> 
     1264              <span class="time"> 
     1265                <em>(All day)</em> 
     1266              </span> 
    6211267            </xsl:when> 
    6221268            <xsl:when test="end/longdate != start/longdate"> 
    623               <span class="time"><xsl:value-of select="end/time"/></span> 
     1269              <span class="time"> 
     1270                <xsl:value-of select="end/time"/> 
     1271              </span> 
    6241272            </xsl:when> 
    6251273            <xsl:when test="end/time != start/time"> 
    626               <span class="time"><xsl:value-of select="end/time"/></span> 
     1274              <span class="time"> 
     1275                <xsl:value-of select="end/time"/> 
     1276              </span> 
    6271277            </xsl:when> 
    6281278          </xsl:choose> 
    629           <!-- if timezones are not local, or if floating add labels: --> 
    630           <xsl:if test="start/timezone/islocal = 'false' or end/timezone/islocal = 'false'"> 
    631             <xsl:text> </xsl:text> 
    632             -- 
    633             <strong> 
    634               <xsl:choose> 
    635                 <xsl:when test="start/floating = 'true'"> 
    636                   <xsl:copy-of select="$bwStr-SgEv-FloatingTime"/> 
    637                 </xsl:when> 
    638                 <xsl:otherwise> 
    639                   <xsl:copy-of select="$bwStr-SgEv-LocalTime"/> 
    640                 </xsl:otherwise> 
    641               </xsl:choose> 
    642             </strong> 
    643             <br/> 
    644           </xsl:if> 
    645           <!-- display in timezone if not local or floating time) --> 
    646           <xsl:if test="(start/timezone/islocal = 'false' or end/timezone/islocal = 'false') and start/floating = 'false'"> 
    647             <xsl:choose> 
    648               <xsl:when test="start/timezone/id != end/timezone/id"> 
    649                 <!-- need to display both timezones if they differ from start to end --> 
    650                 <table border="0" cellspacing="0" id="tztable"> 
    651                   <tr> 
    652                     <td> 
    653                       <strong><xsl:copy-of select="$bwStr-SgEv-Start"/></strong> 
    654                     </td> 
    655                     <td> 
    656                       <xsl:choose> 
    657                         <xsl:when test="start/timezone/islocal='true'"> 
    658                           <xsl:value-of select="start/dayname"/>, 
    659                           <xsl:value-of select="start/longdate"/> 
    660                           <xsl:text> </xsl:text> 
    661                           <span class="time"><xsl:value-of select="start/time"/></span> 
    662                         </xsl:when> 
    663                         <xsl:otherwise> 
    664                           <xsl:value-of select="start/timezone/dayname"/>, 
    665                           <xsl:value-of select="start/timezone/longdate"/> 
    666                           <xsl:text> </xsl:text> 
    667                           <span class="time"><xsl:value-of select="start/timezone/time"/></span> 
    668                         </xsl:otherwise> 
    669                       </xsl:choose> 
    670                     </td> 
    671                     <td> 
    672                       -- 
    673                       <strong><xsl:value-of select="start/timezone/id"/></strong> 
    674                     </td> 
    675                   </tr> 
    676                   <tr> 
    677                     <td> 
    678                       <strong><xsl:copy-of select="$bwStr-SgEv-End"/></strong> 
    679                     </td> 
    680                     <td> 
    681                       <xsl:choose> 
    682                         <xsl:when test="end/timezone/islocal='true'"> 
    683                           <xsl:value-of select="end/dayname"/>, 
    684                           <xsl:value-of select="end/longdate"/> 
    685                           <xsl:text> </xsl:text> 
    686                           <span class="time"><xsl:value-of select="end/time"/></span> 
    687                         </xsl:when> 
    688                         <xsl:otherwise> 
    689                           <xsl:value-of select="end/timezone/dayname"/>, 
    690                           <xsl:value-of select="end/timezone/longdate"/> 
    691                           <xsl:text> </xsl:text> 
    692                           <span class="time"><xsl:value-of select="end/timezone/time"/></span> 
    693                         </xsl:otherwise> 
    694                       </xsl:choose> 
    695                     </td> 
    696                     <td> 
    697                       -- 
    698                       <strong><xsl:value-of select="end/timezone/id"/></strong> 
    699                     </td> 
    700                   </tr> 
    701                 </table> 
    702               </xsl:when> 
    703               <xsl:otherwise> 
    704                 <!-- otherwise, timezones are the same: display as a single line  --> 
    705                 <xsl:value-of select="start/timezone/dayname"/>, <xsl:value-of select="start/timezone/longdate"/><xsl:text> </xsl:text> 
    706                 <xsl:if test="start/allday = 'false'"> 
    707                   <span class="time"><xsl:value-of select="start/timezone/time"/></span> 
    708                 </xsl:if> 
    709                 <xsl:if test="(end/timezone/longdate != start/timezone/longdate) or 
    710                               ((end/timezone/longdate = start/timezone/longdate) and (end/timezone/time != start/timezone/time))"> - </xsl:if> 
    711                 <xsl:if test="end/timezone/longdate != start/timezone/longdate"> 
    712                   <xsl:value-of select="substring(end/timezone/dayname,1,3)"/>, <xsl:value-of select="end/timezone/longdate"/><xsl:text> </xsl:text> 
    713                 </xsl:if> 
    714                 <xsl:choose> 
    715                   <xsl:when test="start/allday = 'true'"> 
    716                     <span class="time"><em> <xsl:copy-of select="$bwStr-SgEv-AllDay"/></em></span> 
    717                   </xsl:when> 
    718                   <xsl:when test="end/timezone/longdate != start/timezone/longdate"> 
    719                     <span class="time"><xsl:value-of select="end/timezone/time"/></span> 
    720                   </xsl:when> 
    721                   <xsl:when test="end/timezone/time != start/timezone/time"> 
    722                     <span class="time"><xsl:value-of select="end/timezone/time"/></span> 
    723                   </xsl:when> 
    724                 </xsl:choose> 
    725                 <xsl:text> </xsl:text> 
    726                 -- 
    727                 <strong><xsl:value-of select="start/timezone/id"/></strong> 
    728               </xsl:otherwise> 
    729             </xsl:choose> 
    730           </xsl:if> 
    731         </td> 
    732         <th class="icalIcon" rowspan="2"> 
    733           <div id="eventIcons"> 
    734             <a href="{$privateCal}/event/addEventRef.do?calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="{$bwStr-SgEv-AddEventToMyCalendar}" target="myCalendar"> 
    735               <img class="addref" src="{$resourcesRoot}/images/add2mycal-icon.gif" width="20" height="26" border="0" alt="Add event to MyCalendar"/> 
    736               <xsl:copy-of select="$bwStr-SgEv-AddToMyCalendar"/> 
    737             </a> 
    738             <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    739             <a href="{$export}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="{$bwStr-SgEv-DownloadEvent}"> 
    740               <img src="{$resourcesRoot}/images/std-ical_icon.gif" width="20" height="26" border="0" alt="Download this event"/> 
    741              <xsl:copy-of select="$bwStr-SgEv-Download"/></a> 
    742           </div> 
    743         </th> 
    744       </tr> 
    745       <tr> 
    746         <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Where"/></td> 
    747         <td class="fieldval"> 
     1279        </span> 
     1280 
     1281        <span class="eventWhere"> 
     1282          <span class="infoTitle">Where: </span> 
    7481283          <xsl:choose> 
    7491284            <xsl:when test="location/link=''"> 
    7501285              <xsl:value-of select="location/address"/> 
     1286              <xsl:text> </xsl:text> 
     1287              <xsl:if test="location/subaddress!=''"> 
     1288                <xsl:text> </xsl:text> 
     1289                <xsl:value-of select="location/subaddress"/> 
     1290              </xsl:if> 
    7511291            </xsl:when> 
    7521292            <xsl:otherwise> 
     
    7541294              <a href="{$locationLink}"> 
    7551295                <xsl:value-of select="location/address"/> 
     1296                <xsl:if test="location/subaddress!=''"> 
     1297                  <xsl:text> </xsl:text> 
     1298                  <xsl:value-of select="location/subaddress"/> 
     1299                </xsl:if> 
    7561300              </a> 
    7571301            </xsl:otherwise> 
    7581302          </xsl:choose> 
    759           <xsl:if test="location/subaddress!=''"> 
    760             <br/><xsl:value-of select="location/subaddress"/> 
    761           </xsl:if> 
    762         </td> 
    763       </tr> 
    764       <tr> 
    765         <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Description"/></td> 
    766         <td colspan="2" class="fieldval description"> 
    767           <xsl:if test="xproperties/node()[name()='X-BEDEWORK-IMAGE']"> 
    768             <xsl:variable name="bwImage"><xsl:value-of select="xproperties/node()[name()='X-BEDEWORK-IMAGE']/values/text"/></xsl:variable> 
    769             <img src="{$bwImage}" class="bwEventImage"/> 
    770           </xsl:if> 
     1303        </span> 
     1304 
     1305      <xsl:if test="cost!=''"> 
     1306        <span class="eventCost"> 
     1307          <span class="infoTitle">Cost: </span><xsl:value-of select="cost"/> 
     1308        </span> 
     1309      </xsl:if> 
     1310 
     1311      <span class="eventLink"> 
     1312        <xsl:if test="link != ''"> 
     1313          <xsl:variable name="link" select="link"/> 
     1314          <span class="infoTitle"><a href="{$link}">More Info</a></span> 
     1315        </xsl:if> 
     1316      </span> 
     1317 
     1318    <br/> 
     1319      <xsl:if test="xproperties/node()[name()='X-BEDEWORK-IMAGE']"> 
     1320        <xsl:variable name="bwImage"><xsl:value-of select="xproperties/node()[name()='X-BEDEWORK-IMAGE']/values/text"/></xsl:variable> 
     1321        <img src="{$bwImage}" class="bwEventImage"/> 
     1322      </xsl:if> 
     1323        <span class="eventDescription"> 
     1324          <span class="infoTitle">Description: </span> 
    7711325          <xsl:call-template name="replace"> 
    7721326            <xsl:with-param name="string" select="description"/> 
    7731327            <xsl:with-param name="pattern" select="'&#xA;'"/> 
    774             <xsl:with-param name="replacement"><br/></xsl:with-param> 
     1328            <xsl:with-param name="replacement"> 
     1329            </xsl:with-param> 
    7751330          </xsl:call-template> 
    776         </td> 
    777       </tr> 
     1331        </span> 
     1332    <br/> 
     1333 
     1334   <!--   <span class="eventListingCal"> 
     1335        <xsl:if test="calendar/path!=''"> 
     1336          Calendar: 
     1337          <xsl:variable name="calUrl" select="calendar/encodedPath"/> 
     1338          <a href="{$setSelection}&amp;calUrl={$calUrl}"> 
     1339            <xsl:value-of select="calendar/name"/> 
     1340          </a> 
     1341        </xsl:if> 
     1342      </span>--> 
     1343 
    7781344      <xsl:if test="status !='' and status != 'CONFIRMED'"> 
    779         <tr> 
    780           <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-STATUS"/></td> 
    781           <td class="fieldval"> 
    782             <xsl:value-of select="status"/> 
    783           </td> 
    784         </tr> 
     1345        <span class="eventStatus"> 
     1346        <span class="infoTitle">Status: </span><xsl:value-of select="status"/> 
     1347        </span> 
    7851348      </xsl:if> 
    786       <xsl:if test="cost!=''"> 
    787         <tr> 
    788           <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Cost"/></td> 
    789           <td colspan="2" class="fieldval"><xsl:value-of select="cost"/></td> 
    790         </tr> 
    791       </xsl:if> 
    792       <xsl:if test="link != ''"> 
    793         <tr> 
    794           <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-See"/></td> 
    795           <td colspan="2" class="fieldval"> 
    796             <xsl:variable name="link" select="link"/> 
    797             <a href="{$link}"><xsl:value-of select="link"/></a> 
    798           </td> 
    799         </tr> 
    800       </xsl:if> 
    801       <xsl:if test="contact/name!='none'"> 
    802         <tr> 
    803           <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Contact"/></td> 
    804           <td colspan="2" class="fieldval"> 
     1349    <xsl:choose> 
     1350      <xsl:when test="xproperties/X-BEDEWORK-CS/values/text != ''"> 
     1351       <span class="eventContact"><span class="infoTitle">Co-sponsors: </span> 
     1352        <xsl:if test="creator != ''"> 
     1353          <xsl:variable name="creator" select="creator"/> 
     1354         <xsl:value-of select="/bedework/urlPrefixes/groups/group[eventOwner = $creator]/name"/> 
     1355        </xsl:if> 
     1356       <xsl:value-of disable-output-escaping="yes" select="xproperties/X-BEDEWORK-CS/values/text"/></span> 
     1357      </xsl:when> 
     1358      <xsl:otherwise> 
     1359       <span class="eventContact"><span class="infoTitle">Sponsor: </span> 
     1360        <xsl:if test="creator != ''"> 
     1361          <xsl:variable name="creator" select="creator"/> 
     1362         <xsl:value-of select="/bedework/urlPrefixes/groups/group[eventOwner = $creator]/name"/> 
     1363        </xsl:if> 
     1364       <xsl:value-of disable-output-escaping="yes" select="xproperties/X-BEDEWORK-CS/values/text"/></span> 
     1365      </xsl:otherwise> 
     1366    </xsl:choose> 
     1367      <xsl:if test="contact/name!='None'"> 
     1368        <span class="eventContact"> 
     1369           <span class="infoTitle">Contact Information: </span> 
    8051370            <xsl:choose> 
    8061371              <xsl:when test="contact/link=''"> 
     
    8151380            </xsl:choose> 
    8161381            <xsl:if test="contact/phone!=''"> 
    817               <br /><xsl:value-of select="contact/phone"/> 
     1382              <xsl:text> </xsl:text> 
     1383              <xsl:value-of select="contact/phone"/> 
    8181384            </xsl:if> 
    819             <!-- If you want to display email addresses, uncomment the 
    820                  following 8 lines. --> 
    821             <!-- <xsl:if test="contact/email!=''"> 
    822               <br /> 
    823               <xsl:variable name="email" select="contact/email"/> 
    824               <xsl:variable name="subject" select="summary"/> 
    825               <a href="mailto:{$email}&amp;subject={$subject}"> 
    826                 <xsl:value-of select="contact/email"/> 
    827               </a> 
    828             </xsl:if> --> 
    829           </td> 
    830         </tr> 
     1385            <xsl:if test="contact/link!=''"> 
     1386              <xsl:text> </xsl:text> 
     1387              <xsl:variable name="contactLink" select="contact/link"/> 
     1388              <a href="{$contactLink}"><xsl:value-of select="$contactLink"/></a> 
     1389            </xsl:if> 
     1390        </span> 
    8311391      </xsl:if> 
     1392     <xsl:if test="xproperties/node()[name()='X-BEDEWORK-STUDENT-CONTACT']/values/text != ''"> 
     1393        <span class="eventContact"> 
     1394           <span class="infoTitle">Contact Information: </span> 
     1395            <xsl:value-of select="xproperties/node()[name()='X-BEDEWORK-STUDENT-CONTACT']/values/text"/> 
     1396       <xsl:if test="xproperties/node()[name()='X-BEDEWORK-STUDENT-CONTACT']/parameters/X-BEDEWORK-PARAM-EMAIL != ''"> 
     1397              <xsl:variable name="emailAddress" select="xproperties/node()[name()='X-BEDEWORK-STUDENT-CONTACT']/parameters/X-BEDEWORK-PARAM-EMAIL"/> 
     1398        <a href="mailto:{$emailAddress}"> 
     1399                  E-mail 
     1400                </a> 
     1401           </xsl:if> 
     1402        </span> 
     1403      </xsl:if> 
     1404     <xsl:if test="categories[1]/category"> 
     1405        <span class="eventCategories"> 
     1406          <span class="infoTitle">Categories: </span> 
     1407          <xsl:for-each select="categories[1]/category[(word != 'Local') and (word != 'Main') and (word != 'Student') and (word != 'calCrossPublish')]"> 
     1408            <xsl:value-of select="word"/> 
     1409            <xsl:if test="position() != last()">, </xsl:if> 
     1410          </xsl:for-each> 
     1411        </span> 
     1412      </xsl:if> 
     1413 
    8321414      <xsl:if test="comments/comment"> 
    833         <tr> 
    834           <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Comments"/></td> 
    835           <td class="fieldval comments"> 
     1415        <span class="eventComments"> 
     1416          <span class="infoTitle">Comments: </span> 
    8361417            <xsl:for-each select="comments/comment"> 
    837               <p><xsl:value-of select="value"/></p> 
     1418              <p> 
     1419                <xsl:value-of select="value"/> 
     1420              </p> 
    8381421            </xsl:for-each> 
    839           </td> 
    840         </tr> 
     1422        </span> 
    8411423      </xsl:if> 
    842       <xsl:if test="xproperties/X-BEDEWORK-ALIAS"> 
    843         <tr> 
    844           <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-TopicalArea"/></td> 
    845           <td class="fieldval"> 
    846             <xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> 
    847               <xsl:variable name="calUrl" select="values/text"/> 
    848               <a href="{$setSelection}&amp;virtualPath={$calUrl}&amp;setappvar=curCollection({$calUrl})"> 
    849                 <xsl:call-template name="substring-afterLastInstanceOf"> 
    850                   <xsl:with-param name="string" select="values/text"/> 
    851                   <xsl:with-param name="char">/</xsl:with-param> 
    852                 </xsl:call-template> 
    853               </a><xsl:if test="position()!=last()">, </xsl:if> 
    854             </xsl:for-each> 
    855           </td> 
    856         </tr> 
    857       </xsl:if> 
    858       <xsl:if test="categories/category"> 
    859         <tr> 
    860           <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Categories"/></td> 
    861           <td class="fieldval"> 
    862             <xsl:for-each select="categories/category"> 
    863               <xsl:value-of select="word"/><xsl:if test="position() != last()">, </xsl:if> 
    864             </xsl:for-each> 
    865           </td> 
    866         </tr> 
    867       </xsl:if> 
    868       <!--  xsl:if test="calendar/path!=''"> 
    869         <tr> 
    870           <td class="fieldname">Calendar:</td> 
    871           <td class="fieldval"> 
    872             <xsl:variable name="calUrl" select="calendar/encodedPath"/> 
    873             <a href="{$setSelection}&amp;calUrl={$calUrl}"> 
    874               <xsl:value-of select="calendar/name"/> 
    875             </a> 
    876           </td> 
    877         </tr> 
    878       </xsl:if--> 
    879     </table> 
    880   </xsl:template> 
    881  
    882   <!--==== LIST VIEW  (for day, week, and month) ====--> 
    883   <xsl:template name="listView"> 
    884     <table id="listTable" border="0" cellpadding="0" cellspacing="0"> 
    885       <xsl:choose> 
    886         <xsl:when test="not(/bedework/eventscalendar/year/month/week/day/event)"> 
    887           <tr> 
    888             <td class="noEventsCell"> 
    889               <xsl:copy-of select="$bwStr-LsVw-NoEventsToDisplay"/> 
    890             </td> 
    891           </tr> 
    892         </xsl:when> 
    893         <xsl:otherwise> 
    894           <xsl:for-each select="/bedework/eventscalendar/year/month/week/day[event]"> 
    895             <xsl:if test="/bedework/periodname='Week' or /bedework/periodname='Month' or /bedework/periodname=''"> 
    896               <tr> 
    897                 <td colspan="5" class="dateRow"> 
    898                    <xsl:variable name="date" select="date"/> 
    899                    <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$date}"> 
    900                      <xsl:value-of select="name"/>, <xsl:value-of select="longdate"/> 
    901                    </a> 
    902                 </td> 
    903               </tr> 
    904             </xsl:if> 
    905             <xsl:for-each select="event"> 
    906               <xsl:variable name="id" select="id"/> 
    907               <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    908               <xsl:variable name="guid" select="guid"/> 
    909               <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    910               <tr> 
    911                 <xsl:variable name="dateRangeStyle"> 
    912                   <xsl:choose> 
    913                     <xsl:when test="start/shortdate = parent::day/shortdate"> 
    914                       <xsl:choose> 
    915                         <xsl:when test="start/allday = 'true'">dateRangeCrossDay</xsl:when> 
    916                         <xsl:when test="start/hour24 &lt; 6">dateRangeEarlyMorning</xsl:when> 
    917                         <xsl:when test="start/hour24 &lt; 12">dateRangeMorning</xsl:when> 
    918                         <xsl:when test="start/hour24 &lt; 18">dateRangeAfternoon</xsl:when> 
    919                         <xsl:otherwise>dateRangeEvening</xsl:otherwise> 
    920                       </xsl:choose> 
    921                     </xsl:when> 
    922                     <xsl:otherwise>dateRangeCrossDay</xsl:otherwise> 
    923                   </xsl:choose> 
    924                 </xsl:variable> 
    925                 <xsl:choose> 
    926                   <xsl:when test="start/allday = 'true' and 
    927                                   start/shortdate = end/shortdate"> 
    928                     <td class="{$dateRangeStyle} center" colspan="3"> 
    929                       <xsl:copy-of select="$bwStr-LsVw-AllDay"/> 
    930                     </td> 
    931                   </xsl:when> 
    932                   <xsl:when test="start/shortdate = end/shortdate and 
    933                                   start/time = end/time"> 
    934                     <td class="{$dateRangeStyle} center" colspan="3"> 
    935                       <a href="{$eventView}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    936                         <xsl:value-of select="start/time"/> 
    937                       </a> 
    938                     </td> 
    939                   </xsl:when> 
    940                   <xsl:otherwise> 
    941                     <td class="{$dateRangeStyle} right"> 
    942                       <a href="{$eventView}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    943                       <xsl:choose> 
    944                         <xsl:when test="start/allday = 'true' and 
    945                                         parent::day/shortdate = start/shortdate"> 
    946                           <xsl:copy-of select="$bwStr-LsVw-Today"/> 
    947                         </xsl:when> 
    948                         <xsl:when test="parent::day/shortdate != start/shortdate"> 
    949                           <span class="littleArrow">&#171;</span>&#160; 
    950                           <xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/> 
    951                         </xsl:when> 
    952                         <xsl:otherwise> 
    953                           <xsl:value-of select="start/time"/> 
    954                         </xsl:otherwise> 
    955                       </xsl:choose> 
    956                       </a> 
    957                     </td> 
    958                     <td class="{$dateRangeStyle} center"> 
    959                       <a href="{$eventView}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">-</a> 
    960                     </td> 
    961                     <td class="{$dateRangeStyle} left"> 
    962                       <a href="{$eventView}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    963                       <xsl:choose> 
    964                         <xsl:when test="end/allday = 'true' and 
    965                                         parent::day/shortdate = end/shortdate"> 
    966                           <xsl:copy-of select="$bwStr-LsVw-Today"/> 
    967                         </xsl:when> 
    968                         <xsl:when test="parent::day/shortdate != end/shortdate"> 
    969                           <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/> 
    970                           &#160;<span class="littleArrow">&#187;</span> 
    971                         </xsl:when> 
    972                         <xsl:otherwise> 
    973                           <xsl:value-of select="end/time"/> 
    974                         </xsl:otherwise> 
    975                       </xsl:choose> 
    976                       </a> 
    977                     </td> 
    978                   </xsl:otherwise> 
    979                 </xsl:choose> 
    980                 <xsl:variable name="descriptionClass"> 
    981                   <xsl:choose> 
    982                     <xsl:when test="status='CANCELLED'">description bwStatusCancelled</xsl:when> 
    983                     <xsl:when test="status='TENTATIVE'">description bwStatusTentative</xsl:when> 
    984                     <xsl:otherwise><xsl:copy-of select="$bwStr-LsVw-Description"/></xsl:otherwise> 
    985                   </xsl:choose> 
    986                 </xsl:variable> 
    987                 <!-- Subscription styles. 
    988                      These are set in the add/modify subscription forms in the admin client; 
    989                      if present, these override the background-color set by eventClass. The 
    990                      subscription styles should not be used for canceled events (tentative is ok). --> 
    991                 <xsl:variable name="subscriptionClass"> 
    992                   <xsl:if test="status != 'CANCELLED'"> 
    993                     <xsl:apply-templates select="categories" mode="customEventColor"/> 
    994                   </xsl:if> 
    995                 </xsl:variable> 
    996                 <td class="{$descriptionClass} {$subscriptionClass}"> 
    997                   <xsl:if test="status='CANCELLED'"><strong><xsl:copy-of select="$bwStr-LsVw-Canceled"/><xsl:text> </xsl:text></strong></xsl:if> 
    998                   <xsl:choose> 
    999                     <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
    1000                       <a href="{$eventView}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    1001                         <strong> 
    1002                           <xsl:value-of select="summary"/>: 
    1003                         </strong> 
    1004                         <xsl:value-of select="description"/>&#160; 
    1005                         <em> 
    1006                           <xsl:value-of select="location/address"/> 
    1007                           <xsl:if test="location/subaddress != ''"> 
    1008                             , <xsl:value-of select="location/subaddress"/> 
    1009                           </xsl:if>.&#160; 
    1010                           <xsl:if test="cost!=''"> 
    1011                             <xsl:value-of select="cost"/>.&#160; 
    1012                           </xsl:if> 
    1013                           <xsl:if test="contact/name!='none'"> 
    1014                             <xsl:copy-of select="$bwStr-LsVw-Contact"/><xsl:text> </xsl:text><xsl:value-of select="contact/name"/> 
    1015                           </xsl:if> 
    1016                         </em> 
    1017                         - 
    1018                         <span class="eventSubscription"> 
    1019                           <xsl:if test="xproperties/X-BEDEWORK-ALIAS"> 
    1020                             <xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> 
    1021                               <xsl:call-template name="substring-afterLastInstanceOf"> 
    1022                                 <xsl:with-param name="string" select="values/text"/> 
    1023                                 <xsl:with-param name="char">/</xsl:with-param> 
    1024                               </xsl:call-template> 
    1025                               <xsl:if test="position()!=last()">, </xsl:if> 
    1026                             </xsl:for-each> 
    1027                           </xsl:if> 
    1028                         </span> 
    1029                       </a> 
    1030                       <xsl:if test="link != ''"> 
    1031                         <xsl:variable name="link" select="link"/> 
    1032                         <a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a> 
    1033                       </xsl:if> 
    1034                     </xsl:when> 
    1035                     <xsl:otherwise> 
    1036                       <a href="{$eventView}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    1037                         <xsl:value-of select="summary"/> 
    1038                         <xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if> 
    1039                          - 
    1040                         <span class="eventSubscription"> 
    1041                           <xsl:if test="xproperties/X-BEDEWORK-ALIAS"> 
    1042                             <xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> 
    1043                               <xsl:call-template name="substring-afterLastInstanceOf"> 
    1044                                 <xsl:with-param name="string" select="values/text"/> 
    1045                                 <xsl:with-param name="char">/</xsl:with-param> 
    1046                               </xsl:call-template> 
    1047                               <xsl:if test="position()!=last()">, </xsl:if> 
    1048                             </xsl:for-each> 
    1049                           </xsl:if> 
    1050                         </span> 
    1051                       </a> 
    1052                     </xsl:otherwise> 
    1053                   </xsl:choose> 
    1054                 </td> 
    1055                 <td class="icons"> 
    1056                   <a href="{$privateCal}/event/addEventRef.do?calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="{$bwStr-LsVw-AddEventToMyCalendar}" target="myCalendar"> 
    1057                     <img class="addref" src="{$resourcesRoot}/images/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="{$bwStr-LsVw-AddEventToMyCalendar}"/> 
    1058                   </a> 
    1059                   <xsl:variable name="eventIcalName" select="concat($id,'.ics')"/> 
    1060                   <a href="{$export}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="{$bwStr-LsVw-DownloadEvent}"> 
    1061                     <img src="{$resourcesRoot}/images/std-ical_icon_small.gif" width="12" height="16" border="0" alt="{$bwStr-LsVw-DownloadEvent}"/> 
    1062                   </a> 
    1063                 </td> 
    1064               </tr> 
    1065             </xsl:for-each> 
    1066           </xsl:for-each> 
    1067         </xsl:otherwise> 
    1068       </xsl:choose> 
    1069     </table> 
    1070   </xsl:template> 
    1071  
    1072   <!--==== LIST EVENTS - for listing discrete events ====--> 
    1073   <xsl:template match="events" mode="eventList"> 
    1074     <h2 class="bwStatusConfirmed"> 
    1075       <!-- <form name="bwListEventsForm" action="{$listEvents}" method="post"> 
    1076         <input type="hidden" name="setappvar"/>--> 
    1077         <xsl:copy-of select="$bwStr-LsEv-Next7Days"/> 
    1078         <!-- 
    1079         <span id="bwListEventsFormControls"> 
    1080           <select name="catuid" onchange="this.form.submit();"> 
    1081             <option value="">filter by category...</option> 
    1082             <xsl:for-each select="/bedework/categories/category"> 
    1083               <option> 
    1084                 <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 
    1085                 <xsl:value-of select="keyword"/> 
    1086               </option> 
    1087             </xsl:for-each> 
    1088           </select> 
    1089           <select name="days" onchange="this.form.submit();"> 
    1090             <xsl:call-template name="buildListEventsDaysOptions"> 
    1091               <xsl:with-param name="i">1</xsl:with-param> 
    1092               <xsl:with-param name="total">31</xsl:with-param> 
    1093             </xsl:call-template> 
    1094           </select> 
    1095         </span> 
    1096       </form>--> 
    1097     </h2> 
    1098  
    1099     <div id="listEvents"> 
    1100       <ul> 
    1101         <xsl:choose> 
    1102           <xsl:when test="not(event)"> 
    1103             <li><xsl:copy-of select="$bwStr-LsEv-NoEventsToDisplay"/></li> 
    1104           </xsl:when> 
    1105           <xsl:otherwise> 
    1106             <xsl:for-each select="event"> 
    1107               <xsl:variable name="id" select="id"/> 
    1108               <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    1109               <xsl:variable name="guid" select="guid"/> 
    1110               <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    1111               <li> 
    1112                 <xsl:attribute name="class"> 
    1113                   <xsl:choose> 
    1114                     <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> 
    1115                     <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> 
    1116                   </xsl:choose> 
    1117                 </xsl:attribute> 
    1118  
    1119                 <xsl:if test="status='CANCELLED'"><strong><xsl:copy-of select="$bwStr-LsEv-Canceled"/><xsl:text> </xsl:text></strong></xsl:if> 
    1120                 <xsl:if test="status='TENTATIVE'"><em><xsl:copy-of select="$bwStr-LsEv-Tentative"/><xsl:text> </xsl:text></em></xsl:if> 
    1121  
    1122                 <a class="title" href="{$eventView}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    1123                   <xsl:value-of select="summary"/> 
    1124                 </a><xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if> 
    1125                 <xsl:if test="/bedework/appvar[key='listEventsSummaryMode']/value='details'"> 
    1126                   <xsl:if test="location/subaddress != ''"> 
    1127                     , <xsl:value-of select="location/subaddress"/> 
    1128                   </xsl:if> 
    1129                 </xsl:if> 
    1130  
    1131                 <xsl:text> </xsl:text> 
    1132                 <a href="{$privateCal}/event/addEventRef.do?calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="{$bwStr-LsVw-AddEventToMyCalendar}" target="myCalendar"> 
    1133                   <img class="addref" src="{$resourcesRoot}/images/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="{$bwStr-LsVw-AddEventToMyCalendar}"/> 
    1134                 </a> 
    1135                 <xsl:text> </xsl:text> 
    1136                 <xsl:variable name="eventIcalName" select="concat($id,'.ics')"/> 
    1137                 <a href="{$export}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="{$bwStr-LsEv-DownloadEvent}"> 
    1138                   <img src="{$resourcesRoot}/images/std-ical_icon_small.gif" width="12" height="16" border="0" alt="{$bwStr-LsEv-DownloadEvent}"/> 
    1139                 </a> 
    1140  
    1141                 <br/> 
    1142  
    1143                 <xsl:value-of select="substring(start/dayname,1,3)"/>, 
    1144                 <xsl:value-of select="start/longdate"/> 
    1145                 <xsl:text> </xsl:text> 
    1146                 <xsl:if test="start/allday != 'true'"> 
    1147                   <xsl:value-of select="start/time"/> 
    1148                 </xsl:if> 
    1149                 <xsl:choose> 
    1150                   <xsl:when test="start/shortdate != end/shortdate"> 
    1151                     - 
    1152                     <xsl:value-of select="substring(end/dayname,1,3)"/>, 
    1153                     <xsl:value-of select="end/longdate"/> 
    1154                     <xsl:text> </xsl:text> 
    1155                     <xsl:if test="start/allday != 'true'"> 
    1156                       <xsl:value-of select="end/time"/> 
    1157                     </xsl:if> 
    1158                   </xsl:when> 
    1159                   <xsl:otherwise> 
    1160                     <xsl:if test="start/time != end/time"> 
    1161                       - 
    1162                       <xsl:value-of select="end/time"/> 
    1163                     </xsl:if> 
    1164                   </xsl:otherwise> 
    1165                 </xsl:choose> 
    1166  
    1167                 <xsl:if test="/bedework/appvar[key='listEventsSummaryMode']/value='details'"> 
    1168                   <br/> 
    1169                   <xsl:value-of select="description"/> 
    1170                   <xsl:if test="link != ''"> 
    1171                     <br/> 
    1172                     <xsl:variable name="link" select="link"/> 
    1173                     <a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a> 
    1174                   </xsl:if> 
    1175                   <xsl:if test="categories/category"> 
    1176                     <br/> 
    1177                     <xsl:copy-of select="$bwStr-LsEv-Categories"/> 
    1178                     <xsl:for-each select="categories/category"> 
    1179                       <xsl:value-of select="word"/><xsl:if test="position() != last()">, </xsl:if> 
    1180                     </xsl:for-each> 
    1181                   </xsl:if> 
    1182                   <br/> 
    1183                   <em> 
    1184                     <xsl:if test="cost!=''"> 
    1185                       <xsl:value-of select="cost"/>.&#160; 
    1186                     </xsl:if> 
    1187                     <xsl:if test="contact/name!='none'"> 
    1188                       <xsl:copy-of select="$bwStr-LsEv-Contact"/><xsl:text> </xsl:text><xsl:value-of select="contact/name"/> 
    1189                     </xsl:if> 
    1190                   </em> 
    1191                 </xsl:if> 
    1192  
    1193               </li> 
    1194             </xsl:for-each> 
    1195           </xsl:otherwise> 
    1196         </xsl:choose> 
    1197       </ul> 
    11981424    </div> 
    1199   </xsl:template> 
    1200  
    1201   <xsl:template name="buildListEventsDaysOptions"> 
    1202     <xsl:param name="i">1</xsl:param> 
    1203     <xsl:param name="total">31</xsl:param> 
    1204     <xsl:param name="default">7</xsl:param> 
    1205     <xsl:variable name="selected"><xsl:value-of select="/bedework/appvar[key='listEventsDays']/value"/></xsl:variable> 
    1206  
    1207     <option onclick="this.form.setappvar.value='listEventsDay({$i})'"> 
    1208       <xsl:attribute name="value"><xsl:value-of select="$i"/></xsl:attribute> 
    1209       <xsl:if test="($selected != '' and $i = $selected) or ($selected = '' and $i = $default)"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    1210       <xsl:value-of select="$i"/> 
    1211     </option> 
    1212  
    1213     <xsl:if test="$i &lt; $total"> 
    1214       <xsl:call-template name="buildListEventsDaysOptions"> 
    1215         <xsl:with-param name="i"><xsl:value-of select="$i + 1"/></xsl:with-param> 
    1216         <xsl:with-param name="total"><xsl:value-of select="$total"/></xsl:with-param> 
    1217         <xsl:with-param name="default"><xsl:value-of select="$default"/></xsl:with-param> 
    1218       </xsl:call-template> 
    1219     </xsl:if> 
    12201425 
    12211426  </xsl:template> 
    12221427 
    12231428  <!--==== WEEK CALENDAR VIEW ====--> 
    1224   <xsl:template name="weekView"> 
    1225     <table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0"
     1429  <xsl:template name="weekViewCal"> 
     1430    <table id="monthCalendarTable"
    12261431      <tr> 
    12271432        <xsl:for-each select="/bedework/daynames/val"> 
    1228           <th class="dayHeading"><xsl:value-of select="."/></th> 
     1433          <th class="dayHeading"> 
     1434            <xsl:value-of select="."/> 
     1435          </th> 
    12291436        </xsl:for-each> 
    12301437      </tr> 
    12311438      <tr> 
    12321439        <xsl:for-each select="/bedework/eventscalendar/year/month/week/day"> 
    1233           <xsl:variable name="dayPos" select="position()"/> 
    12341440          <xsl:if test="filler='false'"> 
    1235             <td> 
    1236               <xsl:if test="/bedework/now/date = date"> 
    1237                 <xsl:attribute name="class">today</xsl:attribute> 
    1238               </xsl:if> 
    1239               <xsl:variable name="dayDate" select="date"/> 
    1240               <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}" class="dayLink"> 
    1241                 <xsl:value-of select="value"/> 
    1242               </a> 
    1243               <xsl:if test="event"> 
    1244                 <ul> 
    1245                   <xsl:apply-templates select="event" mode="calendarLayout"> 
    1246                     <xsl:with-param name="dayPos" select="$dayPos"/> 
    1247                   </xsl:apply-templates> 
    1248                 </ul> 
    1249               </xsl:if> 
    1250             </td> 
     1441                  <xsl:call-template name="display-month-calendar"/> 
    12511442          </xsl:if> 
    12521443        </xsl:for-each> 
     
    12551446  </xsl:template> 
    12561447 
     1448 
    12571449  <!--==== MONTH CALENDAR VIEW ====--> 
    12581450  <xsl:template name="monthView"> 
    1259     <table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0"
     1451    <table id="monthCalendarTable"
    12601452      <tr> 
    12611453        <xsl:for-each select="/bedework/daynames/val"> 
    1262           <th class="dayHeading"><xsl:value-of select="."/></th> 
     1454          <th class="dayHeading"> 
     1455            <xsl:value-of select="."/> 
     1456          </th> 
    12631457        </xsl:for-each> 
    12641458      </tr> 
     
    12661460        <tr> 
    12671461          <xsl:for-each select="day"> 
    1268             <xsl:variable name="dayPos" select="position()"/> 
     1462            <xsl:choose> 
     1463              <xsl:when test="filler='true'"> 
     1464                  <td class="filler">&#160;</td> 
     1465              </xsl:when> 
     1466              <xsl:otherwise> 
     1467                  <xsl:call-template name="display-month-calendar"/> 
     1468              </xsl:otherwise> 
     1469            </xsl:choose> 
     1470          </xsl:for-each> 
     1471        </tr> 
     1472      </xsl:for-each> 
     1473    </table> 
     1474  </xsl:template> 
     1475 
     1476  <!--== EVENTS IN THE CALENDAR GRID ==--> 
     1477  <xsl:template match="event" mode="calendarLayout"> 
     1478    <xsl:param name="dayPos"/> 
     1479    <xsl:variable name="subscriptionId" select="subscription/id"/> 
     1480    <xsl:variable name="calPath" select="calendar/encodedPath"/> 
     1481    <xsl:variable name="guid" select="guid"/> 
     1482    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
     1483    <xsl:variable name="eventClass"> 
     1484      <xsl:choose> 
     1485        <!-- Special styles for the month grid --> 
     1486        <xsl:when test="status='CANCELLED'">eventCancelled</xsl:when> 
     1487        <xsl:when test="status='TENTATIVE'">eventTentative</xsl:when> 
     1488        <!-- Default alternating colors for all standard events --> 
     1489        <xsl:when test="position() mod 2 = 1">eventLinkA</xsl:when> 
     1490        <xsl:otherwise>eventLinkB</xsl:otherwise> 
     1491      </xsl:choose> 
     1492    </xsl:variable> 
     1493    <!-- Subscription styles. 
     1494         These are set in the add/modify subscription forms in the admin client; 
     1495         if present, these override the background-color set by eventClass. The 
     1496         subscription styles should not be used for cancelled events (tentative is ok). --> 
     1497    <xsl:variable name="subscriptionClass"> 
     1498      <xsl:if test="status != 'CANCELLED' and                     subscription/subStyle != '' and         subscription/subStyle != 'default'"> 
     1499        <xsl:value-of select="subscription/subStyle"/> 
     1500      </xsl:if> 
     1501    </xsl:variable> 
     1502    <li> 
     1503      <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" class="{$eventClass} {$subscriptionClass}"> 
     1504        <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> 
     1505        <xsl:choose> 
     1506          <xsl:when test="start/shortdate != ../shortdate"> (cont) </xsl:when> 
     1507          <xsl:when test="start/allday = 'false'"> 
     1508            <xsl:value-of select="start/time"/>: </xsl:when> 
     1509          <xsl:otherwise> All day: </xsl:otherwise> 
     1510        </xsl:choose> 
     1511        <xsl:value-of select="summary"/> 
     1512        <xsl:variable name="eventTipClass"> 
     1513          <xsl:choose> 
     1514            <xsl:when test="$dayPos &gt; 5">eventTipReverse</xsl:when> 
     1515            <xsl:otherwise>eventTip</xsl:otherwise> 
     1516          </xsl:choose> 
     1517        </xsl:variable> 
     1518        <span class="{$eventTipClass}"> 
     1519          <xsl:if test="status='CANCELLED'"> 
     1520            <span class="eventTipStatusCancelled">CANCELLED</span> 
     1521          </xsl:if> 
     1522          <xsl:if test="status='TENTATIVE'"> 
     1523            <span class="eventTipStatusTentative">TENTATIVE</span> 
     1524          </xsl:if> 
     1525          <strong> 
     1526            <xsl:value-of select="summary"/> 
     1527          </strong><br/> Time: <xsl:choose> 
     1528            <xsl:when test="start/allday = 'true'"> All day </xsl:when> 
     1529            <xsl:otherwise> 
     1530              <xsl:if test="start/shortdate != ../shortdate"> 
     1531                <xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/> 
     1532                <xsl:text> </xsl:text> 
     1533              </xsl:if> 
     1534              <xsl:value-of select="start/time"/> 
     1535              <xsl:if test="(start/time != end/time) or (start/shortdate != end/shortdate)"> - 
     1536                  <xsl:if test="end/shortdate != ../shortdate"> 
     1537                  <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/> 
     1538                  <xsl:text> </xsl:text> 
     1539                </xsl:if> 
     1540                <xsl:value-of select="end/time"/> 
     1541              </xsl:if> 
     1542            </xsl:otherwise> 
     1543          </xsl:choose><br/> 
     1544          <xsl:if test="location/address"> Location: <xsl:value-of select="location/address"/><br/> 
     1545          </xsl:if> Calendar: <xsl:value-of select="calendar/name"/> 
     1546        </span> 
     1547      </a> 
     1548    </li> 
     1549  </xsl:template> 
     1550 
     1551 
     1552  <!--==== YEAR VIEW ====--> 
     1553  <xsl:template name="yearView"> 
     1554    <div class="yearMonthRow"> 
     1555      <xsl:apply-templates select="/bedework/eventscalendar/year/month[position() &lt;= 4]"/> 
     1556    </div> 
     1557    <div class="yearMonthRow"> 
     1558      <xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() &gt; 4) and (position() &lt;= 8)]"/> 
     1559    </div> 
     1560    <div class="yearMonthRow"> 
     1561      <xsl:apply-templates select="/bedework/eventscalendar/year/month[position() &gt; 8]"/> 
     1562    </div> 
     1563  </xsl:template> 
     1564  <!-- year view month tables --> 
     1565  <xsl:template match="month"> 
     1566    <table class="yearViewMonthTable" cellspacing="0" cellpadding="0"> 
     1567      <tr> 
     1568        <td colspan="7" class="monthName"> 
     1569          <xsl:variable name="firstDayOfMonth" select="week/day/date"/> 
     1570          <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$firstDayOfMonth}"> 
     1571            <xsl:value-of select="longname"/> 
     1572          </a> 
     1573        </td> 
     1574      </tr> 
     1575      <tr> 
     1576        <!-- Uhh... skipping the week numbers 
     1577          <th>&#160;</th> 
     1578          --> 
     1579        <xsl:for-each select="/bedework/shortdaynames/val"> 
     1580          <th> 
     1581            <xsl:value-of select="."/> 
     1582          </th> 
     1583        </xsl:for-each> 
     1584      </tr> 
     1585      <xsl:for-each select="week"> 
     1586        <tr> 
     1587          <!-- Uhh... skipping the week numbers 
     1588            <td class="weekCell"> 
     1589              <xsl:variable name="firstDayOfWeek" select="day/date"/> 
     1590 
     1591              <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$firstDayOfWeek}"> 
     1592                me<xsl:value-of select="value"/> 
     1593              </a> 
     1594 
     1595              </td>--> 
     1596          <xsl:for-each select="day"> 
    12691597            <xsl:choose> 
    12701598              <xsl:when test="filler='true'"> 
     
    12721600              </xsl:when> 
    12731601              <xsl:otherwise> 
     1602                <td> 
     1603                  <xsl:if test="/bedework/now/date = date"> 
     1604                    <xsl:attribute name="class">today</xsl:attribute> 
     1605                  </xsl:if> 
     1606                  <xsl:variable name="dayDate" select="date"/> 
     1607                  <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}"> 
     1608                    <xsl:attribute name="class">today</xsl:attribute> 
     1609                    <xsl:value-of select="value"/> 
     1610                  </a> 
     1611                </td> 
     1612              </xsl:otherwise> 
     1613            </xsl:choose> 
     1614          </xsl:for-each> 
     1615        </tr> 
     1616      </xsl:for-each> 
     1617    </table> 
     1618  </xsl:template> 
     1619 
     1620  <!--==== CALENDARS ====--> 
     1621  <!-- list of available calendars --> 
     1622  <xsl:template match="calendars"> 
     1623    <xsl:variable name="topLevelCalCount" select="count(calendar/calendar)"/> 
     1624    <ul class="calendarTree"> 
     1625      <li><a class="breadcrumb" href="/cal/">« Return to Main Calendar</a></li> 
     1626      <xsl:apply-templates select="calendar/calendar" mode="calTree"/> 
     1627    </ul> 
     1628  </xsl:template> 
     1629 
     1630  <xsl:template match="calendar" mode="calTree"> 
     1631    <xsl:variable name="itemClass"> 
     1632      <xsl:choose> 
     1633        <xsl:when test="calendarCollection='false'">folder</xsl:when> 
     1634        <xsl:otherwise>calendar</xsl:otherwise> 
     1635      </xsl:choose> 
     1636    </xsl:variable> 
     1637    <xsl:variable name="url" select="encodedPath"/> 
     1638    <li class="{$itemClass}"> 
     1639      <a href="{$setSelection}&amp;calUrl={$url}" title="view calendar"> 
     1640        <xsl:value-of select="name"/> 
     1641      </a> 
     1642      <xsl:if test="calendarCollection='true'"> 
     1643        <xsl:variable name="calPath" select="path"/> 
     1644        <span class="exportCalLink"> 
     1645          <a href="{$calendar-fetchForExport}&amp;calPath={$calPath}" title="export calendar as iCal"> 
     1646            <img src="{$resourcesRoot}/images/calIconExport-sm.gif" alt="export calendar"/> 
     1647          </a> 
     1648        </span> 
     1649      </xsl:if> 
     1650      <xsl:if test="calendar"> 
     1651        <ul> 
     1652          <xsl:apply-templates select="calendar" mode="calTree"/> 
     1653        </ul> 
     1654      </xsl:if> 
     1655    </li> 
     1656  </xsl:template> 
     1657  <!-- calendar export page --> 
     1658  <xsl:template match="currentCalendar" mode="export"> 
     1659    <h2 class="bwStatusConfirmed">Export Calendar</h2> 
     1660    <div id="export"> 
     1661      <p> 
     1662        <strong>Calendar to export:</strong> 
     1663      </p> 
     1664      <div class="indent"> Name: <strong> 
     1665          <em> 
     1666            <xsl:value-of select="name"/> 
     1667          </em> 
     1668        </strong><br/> Path: <xsl:value-of select="path"/> 
     1669      </div> 
     1670      <p> 
     1671        <strong>Event date limits:</strong> 
     1672      </p> 
     1673      <form name="exportCalendarForm" id="exportCalendarForm" action="{$export}" method="post"> 
     1674        <input type="hidden" name="calPath"> 
     1675          <xsl:attribute name="value"> 
     1676            <xsl:value-of select="path"/> 
     1677          </xsl:attribute> 
     1678        </input> 
     1679        <!-- fill these on submit --> 
     1680        <input type="hidden" name="eventStartDate.year" value=""/> 
     1681        <input type="hidden" name="eventStartDate.month" value=""/> 
     1682        <input type="hidden" name="eventStartDate.day" value=""/> 
     1683        <input type="hidden" name="eventEndDate.year" value=""/> 
     1684        <input type="hidden" name="eventEndDate.month" value=""/> 
     1685        <input type="hidden" name="eventEndDate.day" value=""/> 
     1686        <!-- static fields --> 
     1687        <input type="hidden" name="nocache" value="no"/> 
     1688        <input type="hidden" name="skinName" value="ical"/> 
     1689        <input type="hidden" name="contentType" value="text/calendar"/> 
     1690        <input type="hidden" name="contentName"> 
     1691          <xsl:attribute name="value"><xsl:value-of select="name"/>.ics</xsl:attribute> 
     1692        </input> 
     1693        <!-- visible fields --> 
     1694        <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 
     1695        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"> 
     1696            <xsl:text> </xsl:text> 
     1697          </div> Ends <div dojoType="dropdowndatepicker" formatLength="medium" saveFormat="yyyyMMdd" id="bwExportCalendarWidgetEndDate"> 
     1698            <xsl:text> </xsl:text> 
     1699          </div> 
     1700        </div> 
     1701        <p> 
     1702          <input type="submit" value="export" class="bwWidgetSubmit" onclick="fillExportFields(this.form)"/> 
     1703        </p> 
     1704      </form> 
     1705    </div> 
     1706  </xsl:template> 
     1707 
     1708  <!--==== SEARCH RESULT ====--> 
     1709  <xsl:template name="searchResult"> 
     1710    <div class="secondaryColHeader"> 
     1711      <h3>Search Results</h3> 
     1712  </div> 
     1713 
     1714        <!-- <xsl:if test="/bedework/searchResults/numPages &gt; 1"> 
     1715          <span class="resultPages"> 
     1716          <xsl:variable name="curPage" select="/bedework/searchResults/curPage"/> 
     1717          <xsl:if test="/bedework/searchResults/curPage != 1"> 
     1718            <xsl:variable name="prevPage" select="number($curPage) - 1"/> 
     1719            <a href="{$search-next}&amp;pageNum={$prevPage}">&#171;</a> 
     1720          </xsl:if> 
     1721          <xsl:text> </xsl:text> 
     1722          <xsl:call-template name="searchResultPageNav"> 
     1723            <xsl:with-param name="page"> 
     1724              <xsl:choose> 
     1725                <xsl:when test="number($curPage) - 10 &lt; 1">1</xsl:when> 
     1726                <xsl:otherwise> 
     1727                  <xsl:value-of select="number($curPage) - 6"/> 
     1728                </xsl:otherwise> 
     1729              </xsl:choose> 
     1730            </xsl:with-param> 
     1731          </xsl:call-template> 
     1732          <xsl:text> </xsl:text> 
     1733          <xsl:choose> 
     1734            <xsl:when test="$curPage != /bedework/searchResults/numPages"> 
     1735              <xsl:variable name="nextPage" select="number($curPage) + 1"/> 
     1736              <a href="{$search-next}&amp;pageNum={$nextPage}">&#187;</a></xsl:when> 
     1737            <xsl:otherwise> 
     1738              <span class="hidden">&#171;</span> 
     1739            </xsl:otherwise> 
     1740          </xsl:choose> 
     1741        </span> 
     1742        </xsl:if> --> 
     1743 
     1744    <xsl:if test="/bedework/searchResults/curPage &lt; 2"> 
     1745     <span class="numReturnedResults"> 
     1746        <xsl:value-of select="/bedework/searchResults/resultSize"/><xsl:text> result</xsl:text> 
     1747        <xsl:if test="/bedework/searchResults/resultSize != 1">s</xsl:if><xsl:text> returned for: </xsl:text> 
     1748        <em><xsl:value-of select="/bedework/searchResults/query"/></em> 
     1749     </span> 
     1750    </xsl:if> 
     1751     <xsl:if test="/bedework/searchResults/searchResult"> 
     1752        <table id="searchTable" cellpadding="0" cellspacing="0" width="100%"> 
     1753          <tr> 
     1754            <th class="search_relevance">Rank</th> 
     1755            <th class="search_date">Date</th> 
     1756            <th class="search_summary">Summary</th> 
     1757            <th class="search_location">Location</th> 
     1758          </tr> 
     1759        <xsl:for-each select="/bedework/searchResults/searchResult[not(event/categories/category/value = 'Local')]"> 
     1760          <xsl:if test="event/summary"> 
     1761        <xsl:variable name="subscriptionId" select="event/subscription/id"/> 
     1762            <xsl:variable name="calPath" select="event/calendar/encodedPath"/> 
     1763            <xsl:variable name="guid" select="event/guid"/> 
     1764            <xsl:variable name="recurrenceId" select="event/recurrenceId"/> 
     1765            <tr> 
     1766              <td class="search_relevance"> 
     1767                 <xsl:choose> 
     1768                <xsl:when test="contains(score,'E')">1%</xsl:when> 
     1769                <xsl:otherwise> 
     1770                    <xsl:value-of select="ceiling(number(score)*100)"/>% 
     1771            </xsl:otherwise> 
     1772            </xsl:choose> 
     1773              </td> 
     1774              <td class="search_date"> 
     1775                <xsl:value-of select="event/start/shortdate"/> 
     1776                <xsl:text> </xsl:text> 
     1777              </td> 
     1778              <td class="search_summary"> 
     1779                <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     1780                  <xsl:value-of select="event/summary"/> 
     1781                </a> 
     1782              </td> 
     1783              <td class="search_location"> 
     1784                <xsl:value-of select="event/location/address"/> 
     1785              </td> 
     1786            </tr> 
     1787      </xsl:if> 
     1788        </xsl:for-each> 
     1789      </table> 
     1790  </xsl:if> 
     1791    <xsl:if test="/bedework/searchResults/numPages &gt; 1"> 
     1792      <span class="resultPages" id="resultsBottom">Page(s): 
     1793        <xsl:variable name="curPage" select="/bedework/searchResults/curPage"/> 
     1794        <xsl:if test="/bedework/searchResults/curPage != 1"> 
     1795          <xsl:variable name="prevPage" select="number($curPage) - 1"/> 
     1796          <a href="{$search-next}&amp;pageNum={$prevPage}">«</a> 
     1797        </xsl:if> 
     1798        <xsl:text> </xsl:text> 
     1799        <xsl:call-template name="searchResultPageNav"> 
     1800          <xsl:with-param name="page"> 
     1801            <xsl:choose> 
     1802              <xsl:when test="number($curPage) - 10 &lt; 1">1</xsl:when> 
     1803              <xsl:otherwise> 
     1804                <xsl:value-of select="number($curPage) - 6"/> 
     1805              </xsl:otherwise> 
     1806            </xsl:choose> 
     1807          </xsl:with-param> 
     1808        </xsl:call-template> 
     1809        <xsl:text> </xsl:text> 
     1810        <xsl:choose> 
     1811          <xsl:when test="$curPage != /bedework/searchResults/numPages"> 
     1812            <xsl:variable name="nextPage" select="number($curPage) + 1"/> 
     1813            <a href="{$search-next}&amp;pageNum={$nextPage}">»</a></xsl:when> 
     1814          <xsl:otherwise> 
     1815            <span class="hidden">«</span> 
     1816            <!-- occupy the space to keep the navigation from moving around --> 
     1817          </xsl:otherwise> 
     1818        </xsl:choose> 
     1819      </span> 
     1820    </xsl:if> 
     1821  </xsl:template> 
     1822 
     1823  <xsl:template name="advancedSearch"> 
     1824      <div id="advSearch"> 
     1825        <h3>Advanced Search</h3> 
     1826        <form id="advSearchForm" name="searchForm" onsubmit="return initCat()" method="post" action="{$search}"> 
     1827          Search: <input type="text" name="query" size="40" value=""/> 
     1828<!--          <xsl:attribute name="value"> 
     1829            <xsl:value-of select="/bedework/searchResults/query"/> 
     1830          </xsl:attribute> 
     1831          </input>--> 
     1832          <br/> 
     1833          <label>Limit by:</label><br/> 
     1834         <xsl:choose> 
     1835            <xsl:when test="/bedework/searchResults/searchLimits = 'beforeToday'"> 
     1836              <input type="radio" name="searchLimits" value="fromToday"/>Today forward 
     1837              <br/> 
     1838              <input type="radio" name="searchLimits" value="beforeToday" checked="checked"/>Past dates 
     1839              <br/> 
     1840              <input type="radio" name="searchLimits" value="none"/>All dates<br/> 
     1841            </xsl:when> 
     1842            <xsl:when test="/bedework/searchResults/searchLimits = 'none'"> 
     1843              <input type="radio" name="searchLimits" value="fromToday"/>Today forward<br/> 
     1844              <input type="radio" name="searchLimits" value="beforeToday"/>Past dates<br/> 
     1845              <input type="radio" name="searchLimits" value="none" checked="checked"/>All dates<br/> 
     1846            </xsl:when> 
     1847            <xsl:otherwise> 
     1848              <input type="radio" name="searchLimits" value="fromToday" checked="checked"/>Today forward<br/> 
     1849              <input type="radio" name="searchLimits" value="beforeToday"/>Past dates<br/> 
     1850              <input type="radio" name="searchLimits" value="none"/>All dates<br/> 
     1851            </xsl:otherwise> 
     1852         </xsl:choose> 
     1853 
     1854          <input type="submit" name="submit" value="Search"/> 
     1855 
     1856     <div id="searchCats"> 
     1857            <h4>Select Categories to Search (Optional)</h4> 
     1858            <p>A search term is not required if at least one category is selected.</p> 
     1859            <xsl:variable name="catCount" select="count(/bedework/categories/category)"/> 
     1860      <table><tr> 
     1861        <td> 
     1862          <ul> 
     1863            <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')]"> 
     1864                  <xsl:variable name="currId" select="keyword"/> 
     1865                  <li> 
     1866                    <p><input type="checkbox" name="categoryKey" value="{$currId}"/> 
     1867                    <xsl:value-of select="keyword"/></p> 
     1868                  </li> 
     1869                </xsl:for-each> 
     1870          </ul> 
     1871        </td> 
     1872        <td> 
     1873          <ul> 
     1874            <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')]"> 
     1875                  <xsl:variable name="currId2" select="keyword"/> 
     1876                  <li> 
     1877                    <p><input type="checkbox" name="categoryKey" value="{$currId2}"/> 
     1878                    <xsl:value-of select="keyword"/></p> 
     1879                  </li> 
     1880                </xsl:for-each> 
     1881              </ul> 
     1882        </td> 
     1883        </tr> 
     1884        </table> 
     1885          </div> 
     1886       <input type="submit" name="submit" value="Search"/> 
     1887        </form> 
     1888    </div> 
     1889  </xsl:template> 
     1890 
     1891  <xsl:template name="searchResultPageNav"> 
     1892    <xsl:param name="page">1</xsl:param> 
     1893    <xsl:variable name="curPage" select="/bedework/searchResults/curPage"/> 
     1894    <xsl:variable name="numPages" select="/bedework/searchResults/numPages"/> 
     1895    <xsl:variable name="endPage"> 
     1896      <xsl:choose> 
     1897        <xsl:when test="number($curPage) + 6 &gt; number($numPages)"> 
     1898          <xsl:value-of select="$numPages"/> 
     1899        </xsl:when> 
     1900        <xsl:otherwise> 
     1901          <xsl:value-of select="number($curPage) + 6"/> 
     1902        </xsl:otherwise> 
     1903      </xsl:choose> 
     1904    </xsl:variable> 
     1905    <xsl:choose> 
     1906      <xsl:when test="$page = $curPage"> 
     1907        <span class="current"><xsl:value-of select="$page"/></span> 
     1908      </xsl:when> 
     1909      <xsl:otherwise> 
     1910        <a href="{$search-next}&amp;pageNum={$page}"> 
     1911          <xsl:value-of select="$page"/> 
     1912        </a> 
     1913      </xsl:otherwise> 
     1914    </xsl:choose> 
     1915    <xsl:text> </xsl:text> 
     1916    <xsl:if test="$page &lt; $endPage"> 
     1917      <xsl:call-template name="searchResultPageNav"> 
     1918        <xsl:with-param name="page" select="number($page)+1"/> 
     1919      </xsl:call-template> 
     1920    </xsl:if> 
     1921  </xsl:template> 
     1922 
     1923  <!--==== Display Month Calendar  ====--> 
     1924  <xsl:template name="display-month-calendar"> 
     1925                <xsl:variable name="dayPos" select="position()"/> 
    12741926                <td> 
    12751927                  <xsl:if test="/bedework/now/date = date"> 
     
    12881940                  </xsl:if> 
    12891941                </td> 
    1290               </xsl:otherwise> 
    1291             </xsl:choose> 
    1292           </xsl:for-each> 
    1293         </tr> 
    1294       </xsl:for-each> 
    1295     </table> 
    1296   </xsl:template> 
    1297  
    1298   <!--== EVENTS IN THE CALENDAR GRID ==--> 
    1299   <xsl:template match="event" mode="calendarLayout"> 
    1300     <xsl:param name="dayPos"/> 
    1301     <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    1302     <xsl:variable name="guid" select="guid"/> 
    1303     <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    1304     <xsl:variable name="eventClass"> 
    1305       <xsl:choose> 
    1306         <!-- Special styles for the month grid --> 
    1307         <xsl:when test="status='CANCELLED'">eventCancelled</xsl:when> 
    1308         <xsl:when test="status='TENTATIVE'">eventTentative</xsl:when> 
    1309         <!-- Default alternating colors for all standard events --> 
    1310         <xsl:when test="position() mod 2 = 1">eventLinkA</xsl:when> 
    1311         <xsl:otherwise>eventLinkB</xsl:otherwise> 
    1312       </xsl:choose> 
    1313     </xsl:variable> 
    1314     <!-- Subscription styles. 
    1315          These are set in the add/modify subscription forms in the admin client; 
    1316          if present, these override the background-color set by eventClass. The 
    1317          subscription styles should not be used for canceled events (tentative is ok). --> 
    1318     <xsl:variable name="subscriptionClass"> 
    1319       <xsl:if test="status != 'CANCELLED'"> 
    1320         <xsl:apply-templates select="categories" mode="customEventColor"/> 
    1321       </xsl:if> 
    1322     </xsl:variable> 
    1323     <li> 
    1324       <a href="{$eventView}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" class="{$eventClass} {$subscriptionClass}"> 
    1325         <xsl:if test="status='CANCELLED'"><xsl:copy-of select="$bwStr-EvCG-CanceledColon"/><xsl:text> </xsl:text></xsl:if> 
    1326         <xsl:choose> 
    1327           <xsl:when test="start/shortdate != ../shortdate"> 
    1328             <xsl:copy-of select="$bwStr-EvCG-Cont"/> 
    1329           </xsl:when> 
    1330           <xsl:when test="start/allday = 'false'"> 
    1331             <xsl:value-of select="start/time"/>: 
    1332           </xsl:when> 
    1333           <xsl:otherwise> 
    1334             <xsl:copy-of select="$bwStr-EvCG-AllDayColon"/> 
    1335           </xsl:otherwise> 
    1336         </xsl:choose> 
    1337         <xsl:value-of select="summary"/> 
    1338         <xsl:variable name="eventTipClass"> 
    1339           <xsl:choose> 
    1340             <xsl:when test="$dayPos &gt; 5">eventTipReverse</xsl:when> 
    1341             <xsl:otherwise>eventTip</xsl:otherwise> 
    1342           </xsl:choose> 
    1343         </xsl:variable> 
    1344         <span class="{$eventTipClass}"> 
    1345           <xsl:if test="status='CANCELLED'"><span class="eventTipStatusCancelled"><xsl:copy-of select="$bwStr-EvCG-CanceledColon"/></span></xsl:if> 
    1346           <xsl:if test="status='TENTATIVE'"><span class="eventTipStatusTentative"><xsl:copy-of select="$bwStr-EvCG-Tentative"/></span></xsl:if> 
    1347           <strong><xsl:value-of select="summary"/></strong><br/> 
    1348           <xsl:copy-of select="$bwStr-EvCG-Time"/> 
    1349           <xsl:choose> 
    1350             <xsl:when test="start/allday = 'true'"> 
    1351               <xsl:copy-of select="$bwStr-EvCG-AllDay"/> 
    1352             </xsl:when> 
    1353             <xsl:otherwise> 
    1354               <xsl:if test="start/shortdate != ../shortdate"> 
    1355                 <xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/> 
    1356                 <xsl:text> </xsl:text> 
    1357               </xsl:if> 
    1358               <xsl:value-of select="start/time"/> 
    1359               <xsl:if test="(start/time != end/time) or (start/shortdate != end/shortdate)"> 
    1360                 - 
    1361                 <xsl:if test="end/shortdate != ../shortdate"> 
    1362                   <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/> 
    1363                   <xsl:text> </xsl:text> 
    1364                 </xsl:if> 
    1365                 <xsl:value-of select="end/time"/> 
    1366               </xsl:if> 
    1367             </xsl:otherwise> 
    1368           </xsl:choose><br/> 
    1369           <xsl:if test="location/address"> 
    1370             <xsl:copy-of select="$bwStr-EvCG-Location"/><xsl:text> </xsl:text><xsl:value-of select="location/address"/><br/> 
    1371           </xsl:if> 
    1372           <xsl:if test="xproperties/X-BEDEWORK-ALIAS"> 
    1373             <xsl:copy-of select="$bwStr-EvCG-TopicalArea"/> 
    1374               <xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> 
    1375                 <xsl:call-template name="substring-afterLastInstanceOf"> 
    1376                   <xsl:with-param name="string" select="values/text"/> 
    1377                   <xsl:with-param name="char">/</xsl:with-param> 
    1378                 </xsl:call-template> 
    1379                 <xsl:if test="position()!=last()">, </xsl:if> 
    1380               </xsl:for-each> 
    1381           </xsl:if> 
    1382         </span> 
    1383       </a> 
    1384     </li> 
    1385   </xsl:template> 
    1386  
    1387   <xsl:template match="categories" mode="customEventColor"> 
    1388     <!-- Set custom color schemes here. 
    1389          This template looks at the categories found in the event and 
    1390          returns a color class for use with the "subscriptionClass" variable. 
    1391          The classes suggested below come from bwColors.css found in the bedework-common directory. --> 
    1392     <xsl:choose> 
    1393        <!-- 
    1394        <xsl:when test="category/value = 'Athletics'">bwltpurple</xsl:when> 
    1395        <xsl:when test="category/value = 'Arts'">bwltsalmon</xsl:when> 
    1396        --> 
    1397        <xsl:otherwise></xsl:otherwise> <!-- do nothing --> 
    1398     </xsl:choose> 
    1399   </xsl:template> 
    1400  
    1401   <!--==== YEAR VIEW ====--> 
    1402   <xsl:template name="yearView"> 
    1403     <table id="yearCalendarTable" border="0" cellpadding="0" cellspacing="0"> 
    1404       <tr> 
    1405         <xsl:apply-templates select="/bedework/eventscalendar/year/month[position() &lt;= 3]"/> 
    1406       </tr> 
    1407       <tr> 
    1408         <xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() &gt; 3) and (position() &lt;= 6)]"/> 
    1409       </tr> 
    1410       <tr> 
    1411         <xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() &gt; 6) and (position() &lt;= 9)]"/> 
    1412       </tr> 
    1413       <tr> 
    1414         <xsl:apply-templates select="/bedework/eventscalendar/year/month[position() &gt; 9]"/> 
    1415       </tr> 
    1416     </table> 
    1417   </xsl:template> 
    1418  
    1419   <!-- year view month tables --> 
    1420   <xsl:template match="month"> 
    1421     <td> 
    1422       <table class="yearViewMonthTable" border="0" cellpadding="0" cellspacing="0"> 
    1423         <tr> 
    1424           <td colspan="8" class="monthName"> 
    1425             <xsl:variable name="firstDayOfMonth" select="week/day/date"/> 
    1426             <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$firstDayOfMonth}"> 
    1427               <xsl:value-of select="longname"/> 
    1428             </a> 
    1429           </td> 
    1430         </tr> 
    1431         <tr> 
    1432           <th>&#160;</th> 
    1433           <xsl:for-each select="/bedework/shortdaynames/val"> 
    1434             <th><xsl:value-of select="."/></th> 
    1435           </xsl:for-each> 
    1436         </tr> 
    1437         <xsl:for-each select="week"> 
    1438           <tr> 
    1439             <td class="weekCell"> 
    1440               <xsl:variable name="firstDayOfWeek" select="day/date"/> 
    1441               <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$firstDayOfWeek}"> 
    1442                 <xsl:value-of select="value"/> 
    1443               </a> 
    1444             </td> 
    1445             <xsl:for-each select="day"> 
    1446               <xsl:choose> 
    1447                 <xsl:when test="filler='true'"> 
    1448                   <td class="filler">&#160;</td> 
    1449                 </xsl:when> 
    1450                 <xsl:otherwise> 
    1451                   <td> 
    1452                     <xsl:if test="/bedework/now/date = date"> 
    1453                       <xsl:attribute name="class">today</xsl:attribute> 
    1454                     </xsl:if> 
    1455                     <xsl:variable name="dayDate" select="date"/> 
    1456                     <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}"> 
    1457                       <xsl:attribute name="class">today</xsl:attribute> 
    1458                       <xsl:value-of select="value"/> 
    1459                     </a> 
    1460                   </td> 
    1461                 </xsl:otherwise> 
    1462               </xsl:choose> 
    1463             </xsl:for-each> 
    1464           </tr> 
    1465         </xsl:for-each> 
    1466       </table> 
    1467     </td> 
    1468   </xsl:template> 
    1469  
    1470   <!--==== CALENDARS ====--> 
    1471  
    1472   <!-- list of available calendars --> 
    1473   <xsl:template match="calendars"> 
    1474     <xsl:variable name="topLevelCalCount" select="count(calendar/calendar[calType != 5 and calType != 6 and name != 'calendar'])"/> 
    1475     <table id="calPageTable" border="0" cellpadding="0" cellspacing="0"> 
    1476       <tr> 
    1477         <th colspan="2"> 
    1478           <xsl:copy-of select="$bwStr-Cals-AllTopicalAreas"/> 
    1479         </th> 
    1480       </tr> 
    1481       <tr> 
    1482         <td colspan="2" class="infoCell"> 
    1483           <p class="info"> 
    1484             <xsl:copy-of select="$bwStr-Cals-SelectTopicalArea"/> 
    1485           </p> 
    1486         </td> 
    1487       </tr> 
    1488       <tr> 
    1489         <td class="leftCell"> 
    1490           <!-- adjust the following calculations to get a balanced layout between the cells --> 
    1491           <ul class="calendarTree"> 
    1492             <xsl:apply-templates select="calendar/calendar[(calType != 5 and calType != 6 and name != 'calendar') and (position() &lt;= ceiling($topLevelCalCount div 2)+2)]" mode="calTree"/> 
    1493           </ul> 
    1494         </td> 
    1495         <td> 
    1496           <ul class="calendarTree"> 
    1497             <xsl:apply-templates select="calendar/calendar[(calType != 5 and calType != 6 and name != 'calendar') and (position() &gt; ceiling($topLevelCalCount div 2)+2)]" mode="calTree"/> 
    1498           </ul> 
    1499         </td> 
    1500       </tr> 
    1501     </table> 
    1502   </xsl:template> 
    1503  
    1504   <xsl:template match="calendar" mode="calTree"> 
    1505     <xsl:variable name="itemClass"> 
    1506       <xsl:choose> 
    1507         <xsl:when test="calType = '0'"><xsl:copy-of select="$bwStr-Calr-Folder"/></xsl:when> 
    1508         <xsl:otherwise><xsl:copy-of select="$bwStr-Calr-Calendar"/></xsl:otherwise> 
    1509       </xsl:choose> 
    1510     </xsl:variable> 
    1511     <xsl:variable name="virtualPath"><xsl:call-template name="url-encode"><xsl:with-param name="str">/user<xsl:for-each select="ancestor-or-self::calendar/name">/<xsl:value-of select="."/></xsl:for-each></xsl:with-param></xsl:call-template></xsl:variable> 
    1512     <li class="{$itemClass}"> 
    1513       <xsl:variable name="calPath" select="path"/> 
    1514       <a href="{$setSelection}&amp;virtualPath={$virtualPath}&amp;setappvar=curCollection({$calPath})" title="view calendar"><xsl:value-of select="name"/></a> 
    1515       <xsl:variable name="calPath" select="path"/> 
    1516       <span class="exportCalLink"> 
    1517         <a href="{$calendar-fetchForExport}&amp;calPath={$calPath}&amp;virtualPath={$virtualPath}" title="export calendar as iCal"> 
    1518           <img src="{$resourcesRoot}/images/calIconExport-sm.gif" width="13" height="13" alt="export calendar" border="0"/> 
    1519         </a> 
    1520       </span> 
    1521       <xsl:if test="calendar"> 
    1522         <ul> 
    1523           <xsl:apply-templates select="calendar" mode="calTree"/> 
    1524         </ul> 
    1525       </xsl:if> 
    1526     </li> 
    1527   </xsl:template> 
    1528  
    1529   <!-- calendar export page --> 
    1530   <xsl:template match="currentCalendar" mode="export"> 
    1531     <h2 class="bwStatusConfirmed"><xsl:copy-of select="$bwStr-Cals-ExportCals"/></h2> 
    1532     <div id="export"> 
    1533       <p> 
    1534         <strong><xsl:copy-of select="$bwStr-Cals-CalendarToExport"/></strong> 
    1535       </p> 
    1536       <div class="indent"> 
    1537         <xsl:copy-of select="$bwStr-Cals-Name"/><xsl:text> </xsl:text><strong><em><xsl:value-of select="name"/></em></strong><br/> 
    1538         <xsl:copy-of select="$bwStr-Cals-Path"/><xsl:text> </xsl:text><xsl:value-of select="path"/> 
    1539       </div> 
    1540       <p> 
    1541         <strong><xsl:copy-of select="$bwStr-Cals-EventDateLimits"/></strong> 
    1542       </p> 
    1543       <form name="exportCalendarForm" id="exportCalendarForm" action="{$export}" method="post"> 
    1544         <input type="hidden" name="calPath"> 
    1545           <xsl:attribute name="value"><xsl:value-of select="path"/></xsl:attribute> 
    1546         </input> 
    1547         <!-- fill these on submit --> 
    1548         <input type="hidden" name="eventStartDate.year" value=""/> 
    1549         <input type="hidden" name="eventStartDate.month" value=""/> 
    1550         <input type="hidden" name="eventStartDate.day" value=""/> 
    1551         <input type="hidden" name="eventEndDate.year" value=""/> 
    1552         <input type="hidden" name="eventEndDate.month" value=""/> 
    1553         <input type="hidden" name="eventEndDate.day" value=""/> 
    1554         <!-- static fields --> 
    1555         <input type="hidden" name="nocache" value="no"/> 
    1556         <input type="hidden" name="contentName"> 
    1557           <xsl:attribute name="value"><xsl:value-of select="name"/>.ics</xsl:attribute> 
    1558         </input> 
    1559         <!-- visible fields --> 
    1560         <input type="radio" name="dateLimits" value="active" checked="checked" onclick="changeClass('exportDateRange','invisible')"/><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-Cals-TodayForward"/> 
    1561         <input type="radio" name="dateLimits" value="none" onclick="changeClass('exportDateRange','invisible')"/><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-Cals-AllDates"/> 
    1562         <input type="radio" name="dateLimits" value="limited" onclick="changeClass('exportDateRange','visible')"/><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-Cals-DateRange"/> 
    1563         <div id="exportDateRange" class="invisible"> 
    1564           <xsl:copy-of select="$bwStr-Cals-Start"/><xsl:text> </xsl:text><input type="text" name="bwExportCalendarWidgetStartDate" id="bwExportCalendarWidgetStartDate" size="10"/> 
    1565           <span id="bwExportEndField">E<xsl:copy-of select="$bwStr-Cals-End"/><xsl:text> </xsl:text><input type="text" name="bwExportCalendarWidgetEndDate" id="bwExportCalendarWidgetEndDate" size="10"/></span> 
    1566         </div> 
    1567         <p><input type="submit" value="{$bwStr-Cals-Export}" class="bwWidgetSubmit" onclick="fillExportFields(this.form)"/></p> 
    1568       </form> 
    1569     </div> 
    1570   </xsl:template> 
    1571  
    1572   <!--==== SEARCH RESULT ====--> 
    1573   <xsl:template name="searchResult"> 
    1574     <h2 class="bwStatusConfirmed"> 
    1575       <div id="searchFilter"> 
    1576         <form name="searchForm" method="post" action="{$search}"> 
    1577           <xsl:copy-of select="$bwStr-Srch-Search"/> 
    1578           <input type="text" name="query" size="15"> 
    1579             <xsl:attribute name="value"><xsl:value-of select="/bedework/searchResults/query"/></xsl:attribute> 
    1580           </input> 
    1581           <input type="submit" name="submit" value="{$bwStr-Srch-Go}"/> 
    1582           <xsl:copy-of select="$bwStr-Srch-Limit"/> 
    1583           <xsl:choose> 
    1584             <xsl:when test="/bedework/searchResults/searchLimits = 'beforeToday'"> 
    1585               <input type="radio" name="searchLimits" value="fromToday"/><xsl:copy-of select="$bwStr-Srch-TodayForward"/> 
    1586               <input type="radio" name="searchLimits" value="beforeToday" checked="checked"/><xsl:copy-of select="$bwStr-Srch-PastDates"/> 
    1587               <input type="radio" name="searchLimits" value="none"/><xsl:copy-of select="$bwStr-Srch-AllDates"/> 
    1588             </xsl:when> 
    1589             <xsl:when test="/bedework/searchResults/searchLimits = 'none'"> 
    1590               <input type="radio" name="searchLimits" value="fromToday"/><xsl:copy-of select="$bwStr-Srch-TodayForward"/> 
    1591               <input type="radio" name="searchLimits" value="beforeToday"/><xsl:copy-of select="$bwStr-Srch-PastDates"/> 
    1592               <input type="radio" name="searchLimits" value="none" checked="checked"/><xsl:copy-of select="$bwStr-Srch-AllDates"/> 
    1593             </xsl:when> 
    1594             <xsl:otherwise> 
    1595               <input type="radio" name="searchLimits" value="fromToday" checked="checked"/><xsl:copy-of select="$bwStr-Srch-TodayForward"/> 
    1596               <input type="radio" name="searchLimits" value="beforeToday"/><xsl:copy-of select="$bwStr-Srch-PastDates"/> 
    1597               <input type="radio" name="searchLimits" value="none"/><xsl:copy-of select="$bwStr-Srch-AllDates"/> 
    1598             </xsl:otherwise> 
    1599           </xsl:choose> 
    1600         </form> 
    1601       </div> 
    1602       <xsl:copy-of select="$bwStr-Srch-SearchResult"/> 
    1603     </h2> 
    1604     <table id="searchTable" cellpadding="0" cellspacing="0"> 
    1605       <tr> 
    1606         <th colspan="5"> 
    1607           <xsl:if test="/bedework/searchResults/numPages &gt; 1"> 
    1608             <xsl:variable name="curPage" select="/bedework/searchResults/curPage"/> 
    1609             <div id="searchPageForm"> 
    1610               <xsl:copy-of select="$bwStr-Srch-Page"/> 
    1611               <xsl:if test="/bedework/searchResults/curPage != 1"> 
    1612                 <xsl:variable name="prevPage" select="number($curPage) - 1"/> 
    1613                 &lt;<a href="{$search-next}&amp;pageNum={$prevPage}"><xsl:copy-of select="$bwStr-Srch-Prev"/></a> 
    1614               </xsl:if> 
    1615               <xsl:text> </xsl:text> 
    1616  
    1617               <xsl:call-template name="searchResultPageNav"> 
    1618                 <xsl:with-param name="page"> 
    1619                   <xsl:choose> 
    1620                     <xsl:when test="number($curPage) - 10 &lt; 1">1</xsl:when> 
    1621                     <xsl:otherwise><xsl:value-of select="number($curPage) - 6"/></xsl:otherwise> 
    1622                   </xsl:choose> 
    1623                 </xsl:with-param> 
    1624               </xsl:call-template> 
    1625  
    1626               <xsl:text> </xsl:text> 
    1627               <xsl:choose> 
    1628                 <xsl:when test="$curPage != /bedework/searchResults/numPages"> 
    1629                   <xsl:variable name="nextPage" select="number($curPage) + 1"/> 
    1630                   <a href="{$search-next}&amp;pageNum={$nextPage}"><xsl:copy-of select="$bwStr-Srch-Next"/></a>&gt; 
    1631                 </xsl:when> 
    1632                 <xsl:otherwise> 
    1633                   <span class="hidden"><xsl:copy-of select="$bwStr-Srch-Next"/>&gt;</span><!-- occupy the space to keep the navigation from moving around --> 
    1634                 </xsl:otherwise> 
    1635               </xsl:choose> 
    1636             </div> 
    1637           </xsl:if> 
    1638           <xsl:value-of select="/bedework/searchResults/resultSize"/> 
    1639           <xsl:text> </xsl:text><xsl:copy-of select="$bwStr-Srch-ResultReturnedFor"/><xsl:text> </xsl:text><em><xsl:value-of select="/bedework/searchResults/query"/></em> 
    1640         </th> 
    1641       </tr> 
    1642       <xsl:if test="/bedework/searchResults/searchResult"> 
    1643         <tr class="fieldNames"> 
    1644           <td> 
    1645             <xsl:copy-of select="$bwStr-Srch-Relevance"/> 
    1646           </td> 
    1647           <td> 
    1648             <xsl:copy-of select="$bwStr-Srch-Summary"/> 
    1649           </td> 
    1650           <td> 
    1651             <xsl:copy-of select="$bwStr-Srch-DateAndTime"/> 
    1652           </td> 
    1653           <td> 
    1654             <xsl:copy-of select="$bwStr-Srch-Calendar"/> 
    1655           </td> 
    1656           <td> 
    1657             <xsl:copy-of select="$bwStr-Srch-Location"/> 
    1658           </td> 
    1659         </tr> 
    1660       </xsl:if> 
    1661       <xsl:for-each select="/bedework/searchResults/searchResult"> 
    1662         <xsl:variable name="calPath" select="event/calendar/encodedPath"/> 
    1663         <xsl:variable name="guid" select="event/guid"/> 
    1664         <xsl:variable name="recurrenceId" select="event/recurrenceId"/> 
    1665         <tr> 
    1666           <td class="relevance"> 
    1667             <xsl:value-of select="ceiling(number(score)*100)"/>% 
    1668             <img src="{$resourcesRoot}/images/spacer.gif" height="4" class="searchRelevance"> 
    1669               <xsl:attribute name="width"><xsl:value-of select="ceiling((number(score)*100) div 1.5)"/></xsl:attribute> 
    1670             </img> 
    1671           </td> 
    1672           <td> 
    1673             <a href="{$eventView}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    1674               <xsl:value-of select="event/summary"/> 
    1675             </a> 
    1676           </td> 
    1677           <td> 
    1678             <xsl:value-of select="event/start/longdate"/> 
    1679             <xsl:text> </xsl:text> 
    1680             <xsl:value-of select="event/start/time"/> 
    1681             <xsl:choose> 
    1682               <xsl:when test="event/start/longdate != event/end/longdate"> 
    1683                 - <xsl:value-of select="event/end/longdate"/> 
    1684                 <xsl:text> </xsl:text> 
    1685                 <xsl:value-of select="event/end/time"/> 
    1686               </xsl:when> 
    1687               <xsl:when test="event/start/time != event/end/time"> 
    1688                 - <xsl:value-of select="event/end/time"/> 
    1689               </xsl:when> 
    1690             </xsl:choose> 
    1691           </td> 
    1692           <td> 
    1693             <xsl:variable name="calUrl" select="event/calendar/encodedPath"/> 
    1694             <a href="{$setSelection}&amp;calUrl={$calUrl}"> 
    1695               <xsl:value-of select="event/calendar/name"/> 
    1696             </a> 
    1697           </td> 
    1698           <td> 
    1699             <xsl:value-of select="event/location/address"/> 
    1700           </td> 
    1701         </tr> 
    1702       </xsl:for-each> 
    1703     </table> 
    1704   </xsl:template> 
    1705  
    1706   <xsl:template name="searchResultPageNav"> 
    1707     <xsl:param name="page">1</xsl:param> 
    1708     <xsl:variable name="curPage" select="/bedework/searchResults/curPage"/> 
    1709     <xsl:variable name="numPages" select="/bedework/searchResults/numPages"/> 
    1710     <xsl:variable name="endPage"> 
    1711       <xsl:choose> 
    1712         <xsl:when test="number($curPage) + 6 &gt; number($numPages)"><xsl:value-of select="$numPages"/></xsl:when> 
    1713         <xsl:otherwise><xsl:value-of select="number($curPage) + 6"/></xsl:otherwise> 
    1714       </xsl:choose> 
    1715     </xsl:variable> 
    1716     <xsl:choose> 
    1717       <xsl:when test="$page = $curPage"> 
    1718         <xsl:value-of select="$page"/> 
    1719       </xsl:when> 
    1720       <xsl:otherwise> 
    1721         <a href="{$search-next}&amp;pageNum={$page}"> 
    1722           <xsl:value-of select="$page"/> 
    1723         </a> 
    1724       </xsl:otherwise> 
    1725     </xsl:choose> 
    1726     <xsl:text> </xsl:text> 
    1727     <xsl:if test="$page &lt; $endPage"> 
    1728        <xsl:call-template name="searchResultPageNav"> 
    1729          <xsl:with-param name="page" select="number($page)+1"/> 
    1730       </xsl:call-template> 
    1731     </xsl:if> 
    1732   </xsl:template> 
     1942  </xsl:template> 
     1943 
    17331944 
    17341945  <!--+++++++++++++++ System Stats ++++++++++++++++++++--> 
    17351946  <xsl:template name="stats"> 
    17361947    <div id="stats"> 
    1737       <h2><xsl:copy-of select="$bwStr-Stat-SysStats"/></h2> 
    1738  
    1739       <p> 
    1740         <xsl:copy-of select="$bwStr-Stat-StatsCollection"/> 
    1741       </p> 
     1948      <h2>System Statistics</h2> 
     1949      <p> Stats collection: </p> 
    17421950      <ul> 
    17431951        <li> 
    1744           <a href="{$stats}&amp;enable=yes"><xsl:copy-of select="$bwStr-Stat-Enable"/></a> | 
    1745           <a href="{$stats}&amp;disable=yes"><xsl:copy-of select="$bwStr-Stat-Disable"/></a> 
     1952          <a href="{$stats}&amp;enable=yes">enable</a> | <a href="{$stats}&amp;disable=yes">disable</a> 
    17461953        </li> 
    1747         <li><a href="{$stats}&amp;fetch=yes"><xsl:copy-of select="$bwStr-Stat-FetchStats"/></a></li> 
    1748         <li><a href="{$stats}&amp;dump=yes"><xsl:copy-of select="$bwStr-Stat-DumpStats"/></a></li> 
     1954        <li> 
     1955          <a href="{$stats}&amp;fetch=yes">fetch statistics</a> 
     1956        </li> 
     1957        <li> 
     1958          <a href="{$stats}&amp;dump=yes">dump stats to log</a> 
     1959        </li> 
    17491960      </ul> 
    17501961      <table id="statsTable" cellpadding="0"> 
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/videocal.xsl

    r2072 r2448  
    4242  <xsl:variable name="curDate" select="/bedework/currentdate/date"/> 
    4343 
     44  <!-- URL of html resources (images, css, other html); by default this is 
     45       set to the current theme directory  --> 
     46  <xsl:variable name="resourcesRoot"><xsl:value-of select="/bedework/approot"/>/default/default/videocalTheme</xsl:variable> 
     47 
    4448  <!-- Duration of each slide in seconds; set this to your preference --> 
    4549  <xsl:variable name="slideDuration">10</xsl:variable> 
     
    9599      <head> 
    96100        <title>Event Calendar Video Feed</title> 
    97         <link rel="stylesheet" href="{$appRoot}/default/default/videocal.css"/> 
     101        <link rel="stylesheet" href="{$resourcesRoot}/videocal.css"/> 
    98102        <meta name="robots" content="noindex,nofollow"/> 
    99103        <script language="JavaScript"> 
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/videocalTheme/videocal.css

    r2439 r2448  
    11/* Font sizes are set in pixels because the screen resolution is 800x600 
    2    Two overscan modes were viewed when creating the styles: this sheet  
     2   Two overscan modes were viewed when creating the styles: this sheet 
    33   accomodates a larger overscan mode.  videocal.css is for a 
    44   smaller overscan mode.*/ 
     
    99  font-family: Arial, Helvetica, sans-serif; 
    1010  color: #eee; 
    11   background : #116 url(../../images/videocal/calBackground1.jpg) no-repeat; 
     11  background : #116 url("calBackground1.jpg") no-repeat; 
    1212} 
    1313h1 { 
  • trunk/deployment/webpublic/webapp/resources/demoskins/SoEDepartmental/default/default/default.xsl

    r2445 r2448  
    7777 
    7878  <!-- URL of html resources (images, css, other html); by default this is 
    79        set to the application root --> 
    80   <xsl:variable name="resourcesRoot" select="/bedework/approot"/
     79       set to the current theme directory --> 
     80  <xsl:variable name="resourcesRoot"><xsl:value-of select="/bedework/approot"/>/default/default/defaultTheme</xsl:variable
    8181 
    8282  <!-- URL of the XSL template directory --> 
     
    107107  <xsl:variable name="calendar-fetchForExport" select="/bedework/urlPrefixes/calendar/fetchForExport"/> 
    108108  <xsl:variable name="mailEvent" select="/bedework/urlPrefixes/mail/mailEvent"/> 
    109   <!-- Unused 
    110   <xsl:variable name="showPage" select="/bedework/urlPrefixes/main/showPage"/> 
    111    --> 
    112  <xsl:variable name="stats" select="/bedework/urlPrefixes/stats/stats"/> 
     109  <xsl:variable name="stats" select="/bedework/urlPrefixes/stats/stats"/> 
    113110 
    114111  <!-- URL of the web application - includes web context --> 
     
    129126        <meta content="text/html;charset=utf-8" http-equiv="Content-Type" /> 
    130127        <!-- load css --> 
    131         <link rel="stylesheet" href="{$resourcesRoot}/default/default/defaultTheme/css/soe.css"/> 
     128        <link rel="stylesheet" href="{$resourcesRoot}/css/soe.css"/> 
    132129        <link rel="stylesheet" href="../../../bedework-common/default/default/subColors.css"/> 
    133         <!-- load javascript --> 
    134130        <!-- load javascript --> 
    135131        <xsl:if test="/bedework/page='event' or /bedework/page='displayCalendarForExport'"> 
     
    138134          <link rel="stylesheet" href="/bedework-common/javascript/jquery/css/custom-theme/jquery-ui-1.7.1.custom.css"/> 
    139135          <link rel="stylesheet" href="/bedework-common/javascript/jquery/css/custom-theme/bedeworkJquery.css"/> 
    140           <script type="text/javascript" src="{$resourcesRoot}/default/default/defaultTheme/javascript/bedework.js">&#160;</script> 
     136          <script type="text/javascript" src="{$resourcesRoot}/javascript/bedework.js">&#160;</script> 
    141137          <xsl:if test="/bedework/page='displayCalendarForExport'"> 
    142138            <script type="text/javascript"> 
     
    162158        </xsl:if> 
    163159        <!-- address bar icon --> 
    164         <link rel="icon" type="image/ico" href="{$resourcesRoot}/default/default/defaultTheme/images/bedework.ico" /> 
     160        <link rel="icon" type="image/ico" href="{$resourcesRoot}/images/bedework.ico" /> 
    165161      </head> 
    166162      <body> 
     
    245241    <table width="100%" border="0" cellpadding="0" cellspacing="0" id="logoTable"> 
    246242      <tr> 
    247         <td colspan="3" id="logoCell"><a href="/bedework/"><img src="{$resourcesRoot}/default/default/defaultTheme/images/bedeworkLogoGreen.gif" width="292" height="75" border="0" alt="Bedework"/></a></td> 
     243        <td colspan="3" id="logoCell"><a href="/bedework/"><img src="{$resourcesRoot}/images/bedeworkLogoGreen.gif" width="292" height="75" border="0" alt="Bedework"/></a></td> 
    248244        <td colspan="2" id="schoolLinksCell"> 
    249245          <h2><xsl:copy-of select="$bwStr-HdBr-SchoolOfEngineering"/></h2> 
     
    294290        <td class="rssPrint"> 
    295291          <a href="javascript:window.print()" title="{$bwStr-HdBr-PrintThisView}"> 
    296             <img alt="print this view" src="{$resourcesRoot}/default/default/defaultTheme/images/std-print-icon.gif" width="20" height="14" border="0"/><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-HdBr-Print"/> 
     292            <img alt="print this view" src="{$resourcesRoot}/images/std-print-icon.gif" width="20" height="14" border="0"/><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-HdBr-Print"/> 
    297293          </a> 
    298294          <a class="rss" href="{$listEvents}&amp;setappvar=summaryMode(details)&amp;skinName=rss-list&amp;days=3" title="{$bwStr-HdBr-RSSFeed}"><xsl:copy-of select="$bwStr-HdBr-RSS"/></a> 
     
    340336      <tr> 
    341337        <td class="leftCell"> 
    342           <a id="prevViewPeriod" href="{$setViewPeriod}&amp;date={$prevdate}"><img src="{$resourcesRoot}/default/default/defaultTheme/images/std-arrow-left.gif" alt="previous" width="13" height="16" class="prevImg" border="0"/></a> 
    343           <a id="nextViewPeriod" href="{$setViewPeriod}&amp;date={$nextdate}"><img src="{$resourcesRoot}/default/default/defaultTheme/images/std-arrow-right.gif" alt="next" width="13" height="16" class="nextImg" border="0"/></a> 
     338          <a id="prevViewPeriod" href="{$setViewPeriod}&amp;date={$prevdate}"><img src="{$resourcesRoot}/images/std-arrow-left.gif" alt="previous" width="13" height="16" class="prevImg" border="0"/></a> 
     339          <a id="nextViewPeriod" href="{$setViewPeriod}&amp;date={$nextdate}"><img src="{$resourcesRoot}/images/std-arrow-right.gif" alt="next" width="13" height="16" class="nextImg" border="0"/></a> 
    344340          <xsl:choose> 
    345341            <xsl:when test="/bedework/periodname='Year'"> 
     
    359355        <td class="todayButton"> 
    360356          <a href="{$setViewPeriod}&amp;viewType=todayView&amp;date={$curdate}"> 
    361             <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-button-today-off.gif" width="54" height="22" border="0" alt="Go to Today" align="left"/> 
     357            <img src="{$resourcesRoot}/images/std-button-today-off.gif" width="54" height="22" border="0" alt="Go to Today" align="left"/> 
    362358          </a> 
    363359        </td> 
     
    478474            <xsl:choose> 
    479475              <xsl:when test="/bedework/periodname='Day' or /bedework/page='eventList'"> 
    480                 <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-button-listview-off.gif" width="46" height="21" border="0" alt="{$bwStr-SrcB-ToggleListCalView}"/> 
     476                <img src="{$resourcesRoot}/images/std-button-listview-off.gif" width="46" height="21" border="0" alt="{$bwStr-SrcB-ToggleListCalView}"/> 
    481477              </xsl:when> 
    482478              <xsl:when test="/bedework/periodname='Year'"> 
    483                 <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-button-calview-off.gif" width="46" height="21" border="0" alt="{$bwStr-SrcB-ToggleListCalView}"/> 
     479                <img src="{$resourcesRoot}/images/std-button-calview-off.gif" width="46" height="21" border="0" alt="{$bwStr-SrcB-ToggleListCalView}"/> 
    484480              </xsl:when> 
    485481              <xsl:when test="/bedework/periodname='Month'"> 
     
    487483                  <xsl:when test="/bedework/appvar[key='monthViewMode']/value='list'"> 
    488484                    <a href="{$setup}&amp;setappvar=monthViewMode(cal)" title="{$bwStr-SrcB-ToggleListCalView}"> 
    489                       <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-button-calview.gif" width="46" height="21" border="0" alt="{$bwStr-SrcB-ToggleListCalView}"/> 
     485                      <img src="{$resourcesRoot}/images/std-button-calview.gif" width="46" height="21" border="0" alt="{$bwStr-SrcB-ToggleListCalView}"/> 
    490486                    </a> 
    491487                  </xsl:when> 
    492488                  <xsl:otherwise> 
    493489                    <a href="{$setup}&amp;setappvar=monthViewMode(list)" title="{$bwStr-SrcB-ToggleListCalView}"> 
    494                       <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-button-listview.gif" width="46" height="21" border="0" alt="{$bwStr-SrcB-ToggleListCalView}"/> 
     490                      <img src="{$resourcesRoot}/images/std-button-listview.gif" width="46" height="21" border="0" alt="{$bwStr-SrcB-ToggleListCalView}"/> 
    495491                    </a> 
    496492                  </xsl:otherwise> 
     
    501497                  <xsl:when test="/bedework/appvar[key='weekViewMode']/value='list'"> 
    502498                    <a href="{$setup}&amp;setappvar=weekViewMode(cal)" title="{$bwStr-SrcB-ToggleListCalView}"> 
    503                       <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-button-calview.gif" width="46" height="21" border="0" alt="{$bwStr-SrcB-ToggleListCalView}"/> 
     499                      <img src="{$resourcesRoot}/images/std-button-calview.gif" width="46" height="21" border="0" alt="{$bwStr-SrcB-ToggleListCalView}"/> 
    504500                    </a> 
    505501                  </xsl:when> 
    506502                  <xsl:otherwise> 
    507503                    <a href="{$setup}&amp;setappvar=weekViewMode(list)" title="{$bwStr-SrcB-ToggleListCalView}"> 
    508                       <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-button-listview.gif" width="46" height="21" border="0" alt="{$bwStr-SrcB-ToggleListCalView}"/> 
     504                      <img src="{$resourcesRoot}/images/std-button-listview.gif" width="46" height="21" border="0" alt="{$bwStr-SrcB-ToggleListCalView}"/> 
    509505                    </a> 
    510506                  </xsl:otherwise> 
     
    517513                  <xsl:when test="/bedework/appvar[key='listEventsSummaryMode']/value='details'"> 
    518514                    <a href="{$listEvents}&amp;setappvar=listEventsSummaryMode(summary)" title="{$bwStr-SrcB-ToggleSummDetView}"> 
    519                       <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-button-summary.gif" width="62" height="21" border="0" alt="{$bwStr-SrcB-ToggleSummDetView}"/> 
     515                      <img src="{$resourcesRoot}/images/std-button-summary.gif" width="62" height="21" border="0" alt="{$bwStr-SrcB-ToggleSummDetView}"/> 
    520516                    </a> 
    521517                  </xsl:when> 
    522518                  <xsl:otherwise> 
    523519                    <a href="{$listEvents}&amp;setappvar=listEventsSummaryMode(details)" title="{$bwStr-SrcB-ToggleSummDetView}"> 
    524                       <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-button-details.gif" width="62" height="21" border="0" alt="{$bwStr-SrcB-ToggleSummDetView}"/> 
     520                      <img src="{$resourcesRoot}/images/std-button-details.gif" width="62" height="21" border="0" alt="{$bwStr-SrcB-ToggleSummDetView}"/> 
    525521                    </a> 
    526522                  </xsl:otherwise> 
     
    536532                <xsl:choose> 
    537533                  <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
    538                     <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-button-summary-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/> 
     534                    <img src="{$resourcesRoot}/images/std-button-summary-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/> 
    539535                  </xsl:when> 
    540536                  <xsl:otherwise> 
    541                     <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-button-details-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/> 
     537                    <img src="{$resourcesRoot}/images/std-button-details-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/> 
    542538                  </xsl:otherwise> 
    543539                </xsl:choose> 
     
    547543                  <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
    548544                    <a href="{$setup}&amp;setappvar=summaryMode(summary)" title="{$bwStr-SrcB-ToggleSummDetView}"> 
    549                       <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-button-summary.gif" width="62" height="21" border="0" alt="{$bwStr-SrcB-ToggleSummDetView}"/> 
     545                      <img src="{$resourcesRoot}/images/std-button-summary.gif" width="62" height="21" border="0" alt="{$bwStr-SrcB-ToggleSummDetView}"/> 
    550546                    </a> 
    551547                  </xsl:when> 
    552548                  <xsl:otherwise> 
    553549                    <a href="{$setup}&amp;setappvar=summaryMode(details)" title="{$bwStr-SrcB-ToggleSummDetView}"> 
    554                       <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-button-details.gif" width="62" height="21" border="0" alt="{$bwStr-SrcB-ToggleSummDetView}"/> 
     550                      <img src="{$resourcesRoot}/images/std-button-details.gif" width="62" height="21" border="0" alt="{$bwStr-SrcB-ToggleSummDetView}"/> 
    555551                    </a> 
    556552                  </xsl:otherwise> 
     
    562558                <xsl:attribute name="href"><xsl:value-of select="$listEvents"/></xsl:attribute> 
    563559              </xsl:if> 
    564               <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-button-refresh.gif" width="70" height="21" border="0" alt="refresh view"/> 
     560              <img src="{$resourcesRoot}/images/std-button-refresh.gif" width="70" height="21" border="0" alt="refresh view"/> 
    565561            </a> 
    566562          </td> 
     
    729725          <div id="eventIcons"> 
    730726            <a href="{$privateCal}/event/addEventRef.do?calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="{$bwStr-SgEv-AddEventToMyCalendar}" target="myCalendar"> 
    731               <img class="addref" src="{$resourcesRoot}/default/default/defaultTheme/images/add2mycal-icon.gif" width="20" height="26" border="0" alt="Add event to MyCalendar"/> 
     727              <img class="addref" src="{$resourcesRoot}/images/add2mycal-icon.gif" width="20" height="26" border="0" alt="Add event to MyCalendar"/> 
    732728              <xsl:copy-of select="$bwStr-SgEv-AddToMyCalendar"/> 
    733729            </a> 
    734730            <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    735731            <a href="{$export}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="{$bwStr-SgEv-DownloadEvent}"> 
    736               <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-ical_icon.gif" width="20" height="26" border="0" alt="Download this event"/> 
     732              <img src="{$resourcesRoot}/images/std-ical_icon.gif" width="20" height="26" border="0" alt="Download this event"/> 
    737733             <xsl:copy-of select="$bwStr-SgEv-Download"/></a> 
    738734          </div> 
     
    10511047                <td class="icons"> 
    10521048                  <a href="{$privateCal}/event/addEventRef.do?calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="Add event to MyCalendar" target="myCalendar"> 
    1053                     <img class="addref" src="{$resourcesRoot}/default/default/defaultTheme/images/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="Add event to MyCalendar"/> 
     1049                    <img class="addref" src="{$resourcesRoot}/images/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="Add event to MyCalendar"/> 
    10541050                  </a> 
    10551051                  <xsl:variable name="eventIcalName" select="concat($id,'.ics')"/> 
    10561052                  <a href="{$export}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="{$bwStr-LsVw-DownloadEvent}"> 
    1057                     <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-ical_icon_small.gif" width="12" height="16" border="0" alt="{$bwStr-LsVw-DownloadEvent}"/> 
     1053                    <img src="{$resourcesRoot}/images/std-ical_icon_small.gif" width="12" height="16" border="0" alt="{$bwStr-LsVw-DownloadEvent}"/> 
    10581054                  </a> 
    10591055                </td> 
     
    11101106                <xsl:text> </xsl:text> 
    11111107                <a href="{$privateCal}/event/addEventRef.do?calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="Add event to MyCalendar" target="myCalendar"> 
    1112                   <img class="addref" src="{$resourcesRoot}/default/default/defaultTheme/images/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="Add event to MyCalendar"/> 
     1108                  <img class="addref" src="{$resourcesRoot}/images/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="Add event to MyCalendar"/> 
    11131109                </a> 
    11141110                <xsl:text> </xsl:text> 
    11151111                <xsl:variable name="eventIcalName" select="concat($id,'.ics')"/> 
    11161112                <a href="{$export}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="{$bwStr-LsEv-DownloadEvent}"> 
    1117                   <img src="{$resourcesRoot}/default/default/defaultTheme/images/std-ical_icon_small.gif" width="12" height="16" border="0" alt="{$bwStr-LsEv-DownloadEvent}"/> 
     1113                  <img src="{$resourcesRoot}/images/std-ical_icon_small.gif" width="12" height="16" border="0" alt="{$bwStr-LsEv-DownloadEvent}"/> 
    11181114                </a> 
    11191115 
     
    14591455      <span class="exportCalLink"> 
    14601456        <a href="{$calendar-fetchForExport}&amp;calPath={$calPath}&amp;virtualPath={$virtualPath}" title="export calendar as iCal"> 
    1461           <img src="{$resourcesRoot}/default/default/defaultTheme/images/calIconExport-sm.gif" width="13" height="13" alt="export calendar" border="0"/> 
     1457          <img src="{$resourcesRoot}/images/calIconExport-sm.gif" width="13" height="13" alt="export calendar" border="0"/> 
    14621458        </a> 
    14631459      </span> 
     
    16091605          <td class="relevance"> 
    16101606            <xsl:value-of select="ceiling(number(score)*100)"/>% 
    1611             <img src="{$resourcesRoot}/default/default/defaultTheme/images/spacer.gif" height="4" class="searchRelevance"> 
     1607            <img src="{$resourcesRoot}/images/spacer.gif" height="4" class="searchRelevance"> 
    16121608              <xsl:attribute name="width"><xsl:value-of select="ceiling((number(score)*100) div 1.5)"/></xsl:attribute> 
    16131609            </img>