Changeset 1642

Show
Ignore:
Timestamp:
11/30/07 08:03:07
Author:
kllin
Message:

breaking out views for webpublic.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/xslt-rewrite/deployment/resources/xsl/default/default/views.xsl

    r1622 r1642  
     1<?xml version="1.0" encoding="UTF-8"?> 
     2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
     3  <!--==== LIST VIEW  (for day, week, and month) ====--> 
     4  <xsl:template name="listView"> 
     5    <table id="listTable" border="0" cellpadding="0" cellspacing="0"> 
     6      <xsl:choose> 
     7        <xsl:when test="not(/bedework/eventscalendar/year/month/week/day/event)"> 
     8          <tr> 
     9            <td class="noEventsCell"> 
     10              No events to display. 
     11            </td> 
     12          </tr> 
     13        </xsl:when> 
     14        <xsl:otherwise> 
     15          <xsl:for-each select="/bedework/eventscalendar/year/month/week/day[event]"> 
     16            <xsl:if test="/bedework/periodname='Week' or /bedework/periodname='Month' or /bedework/periodname=''"> 
     17              <tr> 
     18                <td colspan="6" class="dateRow"> 
     19                   <xsl:variable name="date" select="date"/> 
     20                   <xsl:if test="/bedework/publicview = 'false'"> 
     21                     <xsl:variable name="actionIconsId">bwActionIcons-<xsl:value-of select="value"/></xsl:variable> 
     22                     <div class="listAdd"> 
     23                       <a href="javascript:toggleActionIcons('{$actionIconsId}','bwActionIcons bwActionIconsInList')" title="add..."> 
     24                         add... 
     25                       </a> 
     26                       <xsl:call-template name="actionIcons"> 
     27                         <xsl:with-param name="actionIconsId"><xsl:value-of select="$actionIconsId"/></xsl:with-param> 
     28                         <xsl:with-param name="startDate"><xsl:value-of select="$date"/></xsl:with-param> 
     29                       </xsl:call-template> 
     30                     </div> 
     31                   </xsl:if> 
     32                   <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$date}"> 
     33                     <xsl:value-of select="name"/>, <xsl:value-of select="longdate"/> 
     34                   </a> 
     35                 </td> 
     36               </tr> 
     37             </xsl:if> 
     38             <xsl:for-each select="event"> 
     39               <xsl:variable name="id" select="id"/> 
     40              <xsl:variable name="subscriptionId" select="subscription/id"/> 
     41              <xsl:variable name="calPath" select="calendar/encodedPath"/> 
     42              <xsl:variable name="guid" select="guid"/> 
     43              <xsl:variable name="recurrenceId" select="recurrenceId"/> 
     44              <tr> 
     45                <xsl:variable name="dateRangeStyle"> 
     46                  <xsl:choose> 
     47                    <xsl:when test="start/shortdate = parent::day/shortdate"> 
     48                      <xsl:choose> 
     49                        <xsl:when test="start/allday = 'true'">dateRangeCrossDay</xsl:when> 
     50                        <xsl:when test="start/hour24 &lt; 6">dateRangeEarlyMorning</xsl:when> 
     51                        <xsl:when test="start/hour24 &lt; 12">dateRangeMorning</xsl:when> 
     52                        <xsl:when test="start/hour24 &lt; 18">dateRangeAfternoon</xsl:when> 
     53                        <xsl:otherwise>dateRangeEvening</xsl:otherwise> 
     54                      </xsl:choose> 
     55                    </xsl:when> 
     56                    <xsl:otherwise>dateRangeCrossDay</xsl:otherwise> 
     57                  </xsl:choose> 
     58                </xsl:variable> 
     59                <xsl:choose> 
     60                  <xsl:when test="start/allday = 'true' and 
     61                                  start/shortdate = end/shortdate"> 
     62                    <td class="{$dateRangeStyle} center" colspan="3"> 
     63                      all day 
     64                    </td> 
     65                  </xsl:when> 
     66                  <xsl:when test="start/shortdate = end/shortdate and 
     67                                  start/time = end/time"> 
     68                    <td class="{$dateRangeStyle} center" colspan="3"> 
     69                      <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     70                        <xsl:value-of select="start/time"/> 
     71                      </a> 
     72                    </td> 
     73                  </xsl:when> 
     74                  <xsl:otherwise> 
     75                    <td class="{$dateRangeStyle} right"> 
     76                      <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     77                      <xsl:choose> 
     78                        <xsl:when test="start/allday = 'true' and 
     79                                        parent::day/shortdate = start/shortdate"> 
     80                          today 
     81                        </xsl:when> 
     82                        <xsl:when test="parent::day/shortdate != start/shortdate"> 
     83                          <span class="littleArrow">&#171;</span>&#160; 
     84                          <xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/> 
     85                        </xsl:when> 
     86                        <xsl:otherwise> 
     87                          <xsl:value-of select="start/time"/> 
     88                        </xsl:otherwise> 
     89                      </xsl:choose> 
     90                      </a> 
     91                    </td> 
     92                    <td class="{$dateRangeStyle} center"> 
     93                      <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">-</a> 
     94                    </td> 
     95                    <td class="{$dateRangeStyle} left"> 
     96                      <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     97                      <xsl:choose> 
     98                        <xsl:when test="end/allday = 'true' and 
     99                                        parent::day/shortdate = end/shortdate"> 
     100                          today 
     101                        </xsl:when> 
     102                        <xsl:when test="parent::day/shortdate != end/shortdate"> 
     103                          <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/> 
     104                          &#160;<span class="littleArrow">&#187;</span> 
     105                        </xsl:when> 
     106                        <xsl:otherwise> 
     107                          <xsl:value-of select="end/time"/> 
     108                        </xsl:otherwise> 
     109                      </xsl:choose> 
     110                      </a> 
     111                    </td> 
     112                  </xsl:otherwise> 
     113                </xsl:choose> 
     114                <xsl:variable name="descriptionClass"> 
     115                  <xsl:choose> 
     116                    <xsl:when test="status='CANCELLED'">description bwStatusCancelled</xsl:when> 
     117                    <xsl:when test="status='TENTATIVE'">description bwStatusTentative</xsl:when> 
     118                    <xsl:otherwise>description</xsl:otherwise> 
     119                  </xsl:choose> 
     120                </xsl:variable> 
     121                <xsl:variable name="subStyle" select="subscription/subStyle"/> 
     122                <td class="{$descriptionClass} {$subStyle}"> 
     123                  <xsl:if test="status='CANCELLED'"><strong>CANCELLED: </strong></xsl:if> 
     124                  <xsl:choose> 
     125                    <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
     126                      <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     127                        <xsl:choose> 
     128                          <xsl:when test="summary = ''"> 
     129                            <em>no title</em> 
     130                          </xsl:when> 
     131                          <xsl:otherwise> 
     132                            <strong> 
     133                              <xsl:value-of select="summary"/>: 
     134                            </strong> 
     135                          </xsl:otherwise> 
     136                        </xsl:choose> 
     137                        <xsl:value-of select="description"/>&#160; 
     138                        <em> 
     139                          <xsl:value-of select="location/address"/> 
     140                          <xsl:if test="location/subaddress != ''"> 
     141                            , <xsl:value-of select="location/subaddress"/> 
     142                          </xsl:if>.&#160; 
     143                          <xsl:if test="cost!=''"> 
     144                            <xsl:value-of select="cost"/>.&#160; 
     145                          </xsl:if> 
     146                          <xsl:if test="sponsor/name!='none'"> 
     147                            Contact: <xsl:value-of select="sponsor/name"/> 
     148                          </xsl:if> 
     149                        </em> 
     150                      </a> 
     151                      <xsl:if test="link != ''"> 
     152                        <xsl:variable name="link" select="link"/> 
     153                        <a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a> 
     154                      </xsl:if> 
     155                    </xsl:when> 
     156                    <xsl:otherwise> 
     157                      <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     158                        <xsl:choose> 
     159                          <xsl:when test="summary = ''"> 
     160                            <em>no title</em> 
     161                          </xsl:when> 
     162                          <xsl:otherwise> 
     163                            <xsl:value-of select="summary"/> 
     164                          </xsl:otherwise> 
     165                        </xsl:choose> 
     166                        <xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if> 
     167                      </a> 
     168                    </xsl:otherwise> 
     169                  </xsl:choose> 
     170                </td> 
     171                <td class="eventLinks"> 
     172                  <xsl:call-template name="eventLinks"/> 
     173                </td> 
     174                <td class="smallIcon"> 
     175                  <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
     176                  <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
     177                    <img src="{$resourcesRoot}/resources/std-ical_icon_small.gif" width="12" height="16" border="0" alt="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"/> 
     178                  </a> 
     179                </td> 
     180              </tr> 
     181            </xsl:for-each> 
     182          </xsl:for-each> 
     183        </xsl:otherwise> 
     184      </xsl:choose> 
     185    </table> 
     186  </xsl:template> 
     187 
     188  <xsl:template name="eventLinks"> 
     189    <xsl:variable name="subscriptionId" select="subscription/id"/> 
     190    <xsl:variable name="calPath" select="calendar/encodedPath"/> 
     191    <xsl:variable name="guid" select="guid"/> 
     192    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
     193    <xsl:if test="currentAccess/current-user-privilege-set/privilege/write-content"> 
     194      <xsl:choose> 
     195        <xsl:when test="recurring='true' or recurrenceId != ''"> 
     196          Edit: 
     197          <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit master (recurring event)">master</a>, 
     198          <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="edit instance (recurring event)">instance</a> 
     199          <br/> 
     200        </xsl:when> 
     201        <xsl:otherwise> 
     202          <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit event"> 
     203            Edit 
     204          </a> 
     205          | 
     206        </xsl:otherwise> 
     207      </xsl:choose> 
     208    </xsl:if> 
     209    <xsl:if test="not(currentAccess/current-user-privilege-set/privilege/write-content) and not(recurring='true' or recurrenceId != '')"> 
     210      <!-- temporarily hide from Recurring events --> 
     211      <xsl:choose> 
     212        <xsl:when test="recurring='true' or recurrenceId != ''"> 
     213          Link: 
     214          <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="add master event reference to a calendar">master</a>, 
     215          <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="add event reference to a calendar">instance</a> 
     216          <br/> 
     217        </xsl:when> 
     218        <xsl:otherwise> 
     219          <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="add event reference to a calendar"> 
     220            Link 
     221          </a> 
     222          | 
     223        </xsl:otherwise> 
     224      </xsl:choose> 
     225    </xsl:if> 
     226    <xsl:if test="owner != /bedework/userid and public='true'"> 
     227            <!-- provide this link for public subscriptions; subscriptions to user calendars are 
     228                 currently too confusing since the current user may be able to add events to the 
     229                 other calendar, making the ownership test a bad test --> 
     230      <xsl:variable name="subname" select="subscription/name"/> 
     231      <a href="{$subscriptions-fetchForUpdate}&amp;subname={$subname}" title="manage/view subscription"> 
     232        Subscription 
     233      </a> 
     234    </xsl:if> 
     235    <xsl:if test="subscription/unremoveable != 'true'"> 
     236      | 
     237      <xsl:choose> 
     238        <xsl:when test="recurring='true' or recurrenceId != ''"> 
     239          Delete: 
     240          <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="delete master (recurring event)">all</a>, 
     241          <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete instance (recurring event)">instance</a> 
     242        </xsl:when> 
     243        <xsl:otherwise> 
     244          <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete event"> 
     245            Delete 
     246          </a> 
     247        </xsl:otherwise> 
     248      </xsl:choose> 
     249    </xsl:if> 
     250  </xsl:template> 
     251 
     252  <!--==== WEEK CALENDAR VIEW ====--> 
     253  <xsl:template name="weekView"> 
     254    <table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0"> 
     255      <tr> 
     256        <xsl:for-each select="/bedework/daynames/val"> 
     257          <th class="dayHeading"><xsl:value-of select="."/></th> 
     258        </xsl:for-each> 
     259      </tr> 
     260      <tr> 
     261        <xsl:for-each select="/bedework/eventscalendar/year/month/week/day"> 
     262          <xsl:variable name="dayPos" select="position()"/> 
     263          <xsl:if test="filler='false'"> 
     264            <td> 
     265              <xsl:if test="/bedework/now/date = date"> 
     266                <xsl:attribute name="class">today</xsl:attribute> 
     267              </xsl:if> 
     268              <xsl:variable name="dayDate" select="date"/> 
     269              <xsl:if test="/bedework/publicview = 'false'"> 
     270                <xsl:variable name="actionIconsId">bwActionIcons-<xsl:value-of select="value"/></xsl:variable> 
     271                <div class="gridAdd"> 
     272                  <a href="javascript:toggleActionIcons('{$actionIconsId}','bwActionIcons bwActionIconsInGrid')" title="add..."> 
     273                    <img src="{$resourcesRoot}/resources/addEvent-forGrid-icon.gif" width="10" height="10" border="0" alt="add..."/> 
     274                  </a> 
     275                  <xsl:call-template name="actionIcons"> 
     276                    <xsl:with-param name="actionIconsId"><xsl:value-of select="$actionIconsId"/></xsl:with-param> 
     277                    <xsl:with-param name="startDate"><xsl:value-of select="$dayDate"/></xsl:with-param> 
     278                  </xsl:call-template> 
     279                </div> 
     280              </xsl:if> 
     281              <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}" class="dayLink" title="go to day"> 
     282                <xsl:value-of select="value"/> 
     283              </a> 
     284              <xsl:if test="event"> 
     285                <ul> 
     286                  <xsl:apply-templates select="event" mode="calendarLayout"> 
     287                    <xsl:with-param name="dayPos" select="$dayPos"/> 
     288                  </xsl:apply-templates> 
     289                </ul> 
     290              </xsl:if> 
     291            </td> 
     292          </xsl:if> 
     293        </xsl:for-each> 
     294      </tr> 
     295    </table> 
     296  </xsl:template> 
     297 
     298  <!--==== MONTH CALENDAR VIEW ====--> 
     299  <xsl:template name="monthView"> 
     300    <table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0"> 
     301      <tr> 
     302        <xsl:for-each select="/bedework/daynames/val"> 
     303          <th class="dayHeading"><xsl:value-of select="."/></th> 
     304        </xsl:for-each> 
     305      </tr> 
     306      <xsl:for-each select="/bedework/eventscalendar/year/month/week"> 
     307        <tr> 
     308          <xsl:for-each select="day"> 
     309            <xsl:variable name="dayPos" select="position()"/> 
     310            <xsl:choose> 
     311              <xsl:when test="filler='true'"> 
     312                <td class="filler">&#160;</td> 
     313              </xsl:when> 
     314              <xsl:otherwise> 
     315                <td> 
     316                  <xsl:if test="/bedework/now/date = date"> 
     317                    <xsl:attribute name="class">today</xsl:attribute> 
     318                  </xsl:if> 
     319                  <xsl:variable name="dayDate" select="date"/> 
     320                  <xsl:if test="/bedework/publicview = 'false'"> 
     321                    <xsl:variable name="actionIconsId">bwActionIcons-<xsl:value-of select="value"/></xsl:variable> 
     322                    <div class="gridAdd"> 
     323                      <a href="javascript:toggleActionIcons('{$actionIconsId}','bwActionIcons bwActionIconsInGrid')" title="add..."> 
     324                        <img src="{$resourcesRoot}/resources/addEvent-forGrid-icon.gif" width="10" height="10" border="0" alt="add..."/> 
     325                      </a> 
     326                      <xsl:call-template name="actionIcons"> 
     327                        <xsl:with-param name="actionIconsId"><xsl:value-of select="$actionIconsId"/></xsl:with-param> 
     328                        <xsl:with-param name="startDate"><xsl:value-of select="$dayDate"/></xsl:with-param> 
     329                      </xsl:call-template> 
     330                    </div> 
     331                  </xsl:if> 
     332                  <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}" class="dayLink" title="go to day"> 
     333                    <xsl:value-of select="value"/> 
     334                  </a> 
     335                  <xsl:if test="event"> 
     336                    <ul> 
     337                      <xsl:apply-templates select="event" mode="calendarLayout"> 
     338                        <xsl:with-param name="dayPos" select="$dayPos"/> 
     339                      </xsl:apply-templates> 
     340                    </ul> 
     341                  </xsl:if> 
     342                </td> 
     343              </xsl:otherwise> 
     344            </xsl:choose> 
     345          </xsl:for-each> 
     346        </tr> 
     347      </xsl:for-each> 
     348    </table> 
     349  </xsl:template> 
     350 
     351  <!--==== YEAR VIEW ====--> 
     352  <xsl:template name="yearView"> 
     353    <table id="yearCalendarTable" border="0" cellpadding="0" cellspacing="0"> 
     354      <tr> 
     355        <xsl:apply-templates select="/bedework/eventscalendar/year/month[position() &lt;= 3]"/> 
     356      </tr> 
     357      <tr> 
     358        <xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() &gt; 3) and (position() &lt;= 6)]"/> 
     359      </tr> 
     360      <tr> 
     361        <xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() &gt; 6) and (position() &lt;= 9)]"/> 
     362      </tr> 
     363      <tr> 
     364        <xsl:apply-templates select="/bedework/eventscalendar/year/month[position() &gt; 9]"/> 
     365      </tr> 
     366    </table> 
     367  </xsl:template> 
     368 
     369  <!-- year view month tables --> 
     370  <xsl:template match="month"> 
     371    <td> 
     372      <table class="yearViewMonthTable" border="0" cellpadding="0" cellspacing="0"> 
     373        <tr> 
     374          <td colspan="8" class="monthName"> 
     375            <xsl:variable name="firstDayOfMonth" select="week/day/date"/> 
     376            <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$firstDayOfMonth}"> 
     377              <xsl:value-of select="longname"/> 
     378            </a> 
     379          </td> 
     380        </tr> 
     381        <tr> 
     382          <th>&#160;</th> 
     383          <xsl:for-each select="/bedework/shortdaynames/val"> 
     384            <th><xsl:value-of select="."/></th> 
     385          </xsl:for-each> 
     386        </tr> 
     387        <xsl:for-each select="week"> 
     388          <tr> 
     389            <td class="weekCell"> 
     390              <xsl:variable name="firstDayOfWeek" select="day/date"/> 
     391              <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$firstDayOfWeek}"> 
     392                <xsl:value-of select="value"/> 
     393              </a> 
     394            </td> 
     395            <xsl:for-each select="day"> 
     396              <xsl:choose> 
     397                <xsl:when test="filler='true'"> 
     398                  <td class="filler">&#160;</td> 
     399                </xsl:when> 
     400                <xsl:otherwise> 
     401                  <td> 
     402                    <xsl:if test="/bedework/now/date = date"> 
     403                      <xsl:attribute name="class">today</xsl:attribute> 
     404                    </xsl:if> 
     405                    <xsl:variable name="dayDate" select="date"/> 
     406                    <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}"> 
     407                      <xsl:value-of select="value"/> 
     408                    </a> 
     409                  </td> 
     410                </xsl:otherwise> 
     411              </xsl:choose> 
     412            </xsl:for-each> 
     413          </tr> 
     414        </xsl:for-each> 
     415      </table> 
     416    </td> 
     417  </xsl:template> 
     418 
     419  <!--== EVENTS IN THE CALENDAR GRID ==--> 
     420  <xsl:template match="event" mode="calendarLayout"> 
     421    <xsl:param name="dayPos"/> 
     422    <xsl:variable name="subscriptionId" select="subscription/id"/> 
     423    <xsl:variable name="calPath" select="calendar/encodedPath"/> 
     424    <xsl:variable name="guid" select="guid"/> 
     425    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
     426    <xsl:variable name="eventRootClass"> 
     427      <xsl:choose> 
     428        <!-- Otherwise: Alternating colors for all standard events --> 
     429        <xsl:when test="position() = 1">event firstEvent</xsl:when> 
     430        <xsl:otherwise>event</xsl:otherwise> 
     431      </xsl:choose> 
     432    </xsl:variable> 
     433    <xsl:variable name="eventClass"> 
     434      <xsl:choose> 
     435        <!-- Special styles for the month grid --> 
     436        <xsl:when test="status='CANCELLED'">eventCancelled</xsl:when> 
     437        <xsl:when test="status='TENTATIVE'">eventTentative</xsl:when> 
     438        <!-- Otherwise: Alternating colors for all standard events --> 
     439        <xsl:when test="position() mod 2 = 1">eventLinkA</xsl:when> 
     440        <xsl:otherwise>eventLinkB</xsl:otherwise> 
     441      </xsl:choose> 
     442    </xsl:variable> 
     443    <!-- User defined subscription styles. 
     444    These are set in the add/modify subscription forms which 
     445    rely (in this stylesheet) on subColors.css; if present, these 
     446    override the background-color set by eventClass. User styles should 
     447    not be used for cancelled events (tentative is ok). --> 
     448    <xsl:variable name="subscriptionClass"> 
     449      <xsl:if test="status != 'CANCELLED' and 
     450        subscription/subStyle != '' and 
     451        subscription/subStyle != 'default'"><xsl:value-of select="subscription/subStyle"/></xsl:if> 
     452    </xsl:variable> 
     453    <li> 
     454      <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" 
     455        class="{$eventRootClass} {$eventClass} {$subscriptionClass}"> 
     456        <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> 
     457        <xsl:choose> 
     458          <xsl:when test="start/shortdate != ../shortdate"> 
     459            (cont) 
     460          </xsl:when> 
     461          <xsl:when test="start/allday = 'false'"> 
     462            <xsl:value-of select="start/time"/>: 
     463          </xsl:when> 
     464          <xsl:otherwise> 
     465            all day: 
     466          </xsl:otherwise> 
     467        </xsl:choose> 
     468        <xsl:choose> 
     469          <xsl:when test="summary = ''"> 
     470            <em>no title</em> 
     471          </xsl:when> 
     472          <xsl:otherwise> 
     473            <xsl:value-of select="summary"/> 
     474          </xsl:otherwise> 
     475        </xsl:choose> 
     476        <xsl:variable name="eventTipClass"> 
     477          <xsl:choose> 
     478            <xsl:when test="$dayPos &gt; 5">eventTipReverse</xsl:when> 
     479            <xsl:otherwise>eventTip</xsl:otherwise> 
     480          </xsl:choose> 
     481        </xsl:variable> 
     482        <span class="{$eventTipClass}"> 
     483          <xsl:if test="status='CANCELLED'"><span class="eventTipStatusCancelled">CANCELLED</span></xsl:if> 
     484          <xsl:if test="status='TENTATIVE'"><span class="eventTipStatusTentative">TENTATIVE</span></xsl:if> 
     485          <xsl:choose> 
     486            <xsl:when test="summary = ''"> 
     487              <em>no title</em> 
     488            </xsl:when> 
     489            <xsl:otherwise> 
     490              <strong><xsl:value-of select="summary"/></strong><br/> 
     491            </xsl:otherwise> 
     492          </xsl:choose> 
     493          Time: 
     494          <xsl:choose> 
     495            <xsl:when test="start/allday = 'false'"> 
     496              <xsl:value-of select="start/time"/> 
     497              <xsl:if test="start/time != end/time"> 
     498                - <xsl:value-of select="end/time"/> 
     499              </xsl:if> 
     500            </xsl:when> 
     501            <xsl:otherwise> 
     502              all day 
     503            </xsl:otherwise> 
     504          </xsl:choose><br/> 
     505          <xsl:if test="location/address"> 
     506            Location: <xsl:value-of select="location/address"/><br/> 
     507          </xsl:if> 
     508          Calendar: 
     509          <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
     510          <xsl:choose> 
     511            <xsl:when test="contains(calendar/path,$userPath)"> 
     512              <xsl:value-of select="substring-after(calendar/path,$userPath)"/> 
     513            </xsl:when> 
     514            <xsl:otherwise> 
     515              <xsl:value-of select="calendar/path"/> 
     516            </xsl:otherwise> 
     517          </xsl:choose><br/> 
     518          Type: 
     519          <xsl:variable name="entityType"> 
     520            <xsl:choose> 
     521              <xsl:when test="entityType = '2'">task</xsl:when> 
     522              <xsl:when test="scheduleMethod = '2'">meeting</xsl:when> 
     523              <xsl:otherwise>event</xsl:otherwise> 
     524            </xsl:choose> 
     525          </xsl:variable> 
     526          <xsl:if test="recurring='true' or recurrenceId != ''"> 
     527            recurring 
     528          </xsl:if> 
     529          <xsl:choose> 
     530            <xsl:when test="owner = /bedework/userid"> 
     531              personal <xsl:value-of select="$entityType"/> 
     532            </xsl:when> 
     533            <xsl:when test="public = 'true'"> 
     534              public <xsl:value-of select="$entityType"/> 
     535            </xsl:when> 
     536            <xsl:otherwise> 
     537              <xsl:value-of select="$entityType"/> (<xsl:value-of select="calendar/owner"/>) 
     538            </xsl:otherwise> 
     539          </xsl:choose> 
     540        </span> 
     541      </a> 
     542    </li> 
     543  </xsl:template> 
     544</xsl:stylesheet> 
    1545<?xml version="1.0" encoding="UTF-8"?> 
    2546<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
     
    16132157  </xsl:template> 
    16142158</xsl:stylesheet> 
    1615 <?xml version="1.0" encoding="UTF-8"?> 
    1616 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    1617   <!--==== LIST VIEW  (for day, week, and month) ====--> 
    1618   <xsl:template name="listView"> 
    1619     <table id="listTable" border="0" cellpadding="0" cellspacing="0"> 
    1620       <xsl:choose> 
    1621         <xsl:when test="not(/bedework/eventscalendar/year/month/week/day/event)"> 
    1622           <tr> 
    1623             <td class="noEventsCell"> 
    1624               No events to display. 
    1625             </td> 
    1626           </tr> 
    1627         </xsl:when> 
    1628         <xsl:otherwise> 
    1629           <xsl:for-each select="/bedework/eventscalendar/year/month/week/day[event]"> 
    1630             <xsl:if test="/bedework/periodname='Week' or /bedework/periodname='Month' or /bedework/periodname=''"> 
    1631               <tr> 
    1632                 <td colspan="6" class="dateRow"> 
    1633                    <xsl:variable name="date" select="date"/> 
    1634                    <xsl:variable name="actionIconsId">bwActionIcons-<xsl:value-of select="value"/></xsl:variable> 
    1635                    <div class="listAdd"> 
    1636                      <a href="javascript:toggleActionIcons('{$actionIconsId}','bwActionIcons bwActionIconsInList')" title="add..."> 
    1637                        add... 
    1638                      </a> 
    1639                      <xsl:call-template name="actionIcons"> 
    1640                        <xsl:with-param name="actionIconsId"><xsl:value-of select="$actionIconsId"/></xsl:with-param> 
    1641                        <xsl:with-param name="startDate"><xsl:value-of select="$date"/></xsl:with-param> 
    1642                      </xsl:call-template> 
    1643                    </div> 
    1644                    <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$date}"> 
    1645                      <xsl:value-of select="name"/>, <xsl:value-of select="longdate"/> 
    1646                    </a> 
    1647                  </td> 
    1648               </tr> 
    1649             </xsl:if> 
    1650             <xsl:for-each select="event"> 
    1651               <xsl:variable name="id" select="id"/> 
    1652               <xsl:variable name="subscriptionId" select="subscription/id"/> 
    1653               <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    1654               <xsl:variable name="guid" select="guid"/> 
    1655               <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    1656               <tr> 
    1657                 <xsl:variable name="dateRangeStyle"> 
    1658                   <xsl:choose> 
    1659                     <xsl:when test="start/shortdate = parent::day/shortdate"> 
    1660                       <xsl:choose> 
    1661                         <xsl:when test="start/allday = 'true'">dateRangeCrossDay</xsl:when> 
    1662                         <xsl:when test="start/hour24 &lt; 6">dateRangeEarlyMorning</xsl:when> 
    1663                         <xsl:when test="start/hour24 &lt; 12">dateRangeMorning</xsl:when> 
    1664                         <xsl:when test="start/hour24 &lt; 18">dateRangeAfternoon</xsl:when> 
    1665                         <xsl:otherwise>dateRangeEvening</xsl:otherwise> 
    1666                       </xsl:choose> 
    1667                     </xsl:when> 
    1668                     <xsl:otherwise>dateRangeCrossDay</xsl:otherwise> 
    1669                   </xsl:choose> 
    1670                 </xsl:variable> 
    1671                 <xsl:choose> 
    1672                   <xsl:when test="start/allday = 'true' and 
    1673                                   start/shortdate = end/shortdate"> 
    1674                     <td class="{$dateRangeStyle} center" colspan="3"> 
    1675                       all day 
    1676                     </td> 
    1677                   </xsl:when> 
    1678                   <xsl:when test="start/shortdate = end/shortdate and 
    1679                                   start/time = end/time"> 
    1680                     <td class="{$dateRangeStyle} center" colspan="3"> 
    1681                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    1682                         <xsl:value-of select="start/time"/> 
    1683                       </a> 
    1684                     </td> 
    1685                   </xsl:when> 
    1686                   <xsl:otherwise> 
    1687                     <td class="{$dateRangeStyle} right"> 
    1688                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    1689                       <xsl:choose> 
    1690                         <xsl:when test="start/allday = 'true' and 
    1691                                         parent::day/shortdate = start/shortdate"> 
    1692                           today 
    1693                         </xsl:when> 
    1694                         <xsl:when test="parent::day/shortdate != start/shortdate"> 
    1695                           <span class="littleArrow">&#171;</span>&#160; 
    1696                           <xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/> 
    1697                         </xsl:when> 
    1698                         <xsl:otherwise> 
    1699                           <xsl:value-of select="start/time"/> 
    1700                         </xsl:otherwise> 
    1701                       </xsl:choose> 
    1702                       </a> 
    1703                     </td> 
    1704                     <td class="{$dateRangeStyle} center"> 
    1705                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">-</a> 
    1706                     </td> 
    1707                     <td class="{$dateRangeStyle} left"> 
    1708                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    1709                       <xsl:choose> 
    1710                         <xsl:when test="end/allday = 'true' and 
    1711                                         parent::day/shortdate = end/shortdate"> 
    1712                           today 
    1713                         </xsl:when> 
    1714                         <xsl:when test="parent::day/shortdate != end/shortdate"> 
    1715                           <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/> 
    1716                           &#160;<span class="littleArrow">&#187;</span> 
    1717                         </xsl:when> 
    1718                         <xsl:otherwise> 
    1719                           <xsl:value-of select="end/time"/> 
    1720                         </xsl:otherwise> 
    1721                       </xsl:choose> 
    1722                       </a> 
    1723                     </td> 
    1724                   </xsl:otherwise> 
    1725                 </xsl:choose> 
    1726                 <xsl:variable name="descriptionClass"> 
    1727                   <xsl:choose> 
    1728                     <xsl:when test="status='CANCELLED'">description bwStatusCancelled</xsl:when> 
    1729                     <xsl:when test="status='TENTATIVE'">description bwStatusTentative</xsl:when> 
    1730                     <xsl:otherwise>description</xsl:otherwise> 
    1731                   </xsl:choose> 
    1732                 </xsl:variable> 
    1733                 <xsl:variable name="subStyle" select="subscription/subStyle"/> 
    1734                 <td class="{$descriptionClass} {$subStyle}"> 
    1735                   <xsl:if test="status='CANCELLED'"><strong>CANCELLED: </strong></xsl:if> 
    1736                   <xsl:choose> 
    1737                     <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
    1738                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    1739                         <xsl:choose> 
    1740                           <xsl:when test="summary = ''"> 
    1741                             <em>no title</em> 
    1742                           </xsl:when> 
    1743                           <xsl:otherwise> 
    1744                             <strong> 
    1745                               <xsl:value-of select="summary"/>: 
    1746                             </strong> 
    1747                           </xsl:otherwise> 
    1748                         </xsl:choose> 
    1749                         <xsl:value-of select="description"/>&#160; 
    1750                         <em> 
    1751                           <xsl:value-of select="location/address"/> 
    1752                           <xsl:if test="location/subaddress != ''"> 
    1753                             , <xsl:value-of select="location/subaddress"/> 
    1754                           </xsl:if>.&#160; 
    1755                           <xsl:if test="cost!=''"> 
    1756                             <xsl:value-of select="cost"/>.&#160; 
    1757                           </xsl:if> 
    1758                           <xsl:if test="sponsor/name!='none'"> 
    1759                             Contact: <xsl:value-of select="sponsor/name"/> 
    1760                           </xsl:if> 
    1761                         </em> 
    1762                       </a> 
    1763                       <xsl:if test="link != ''"> 
    1764                         <xsl:variable name="link" select="link"/> 
    1765                         <a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a> 
    1766                       </xsl:if> 
    1767                     </xsl:when> 
    1768                     <xsl:otherwise> 
    1769                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    1770                         <xsl:choose> 
    1771                           <xsl:when test="summary = ''"> 
    1772                             <em>no title</em> 
    1773                           </xsl:when> 
    1774                           <xsl:otherwise> 
    1775                             <xsl:value-of select="summary"/> 
    1776                           </xsl:otherwise> 
    1777                         </xsl:choose> 
    1778                         <xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if> 
    1779                       </a> 
    1780                     </xsl:otherwise> 
    1781                   </xsl:choose> 
    1782                 </td> 
    1783                 <td class="eventLinks"> 
    1784                   <xsl:call-template name="eventLinks"/> 
    1785                 </td> 
    1786                 <td class="smallIcon"> 
    1787                   <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    1788                   <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
    1789                     <img src="{$resourcesRoot}/resources/std-ical_icon_small.gif" width="12" height="16" border="0" alt="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"/> 
    1790                   </a> 
    1791                 </td> 
    1792               </tr> 
    1793             </xsl:for-each> 
    1794           </xsl:for-each> 
    1795         </xsl:otherwise> 
    1796       </xsl:choose> 
    1797     </table> 
    1798   </xsl:template> 
    1799  
    1800   <xsl:template name="eventLinks"> 
    1801     <xsl:variable name="subscriptionId" select="subscription/id"/> 
    1802     <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    1803     <xsl:variable name="guid" select="guid"/> 
    1804     <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    1805     <xsl:if test="currentAccess/current-user-privilege-set/privilege/write-content"> 
    1806       <xsl:choose> 
    1807         <xsl:when test="recurring='true' or recurrenceId != ''"> 
    1808           Edit: 
    1809     &n