| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
|---|
| 2 |
<!-- |
|---|
| 3 |
Licensed to Jasig under one or more contributor license |
|---|
| 4 |
agreements. See the NOTICE file distributed with this work |
|---|
| 5 |
for additional information regarding copyright ownership. |
|---|
| 6 |
Jasig licenses this file to you under the Apache License, |
|---|
| 7 |
Version 2.0 (the "License"); you may not use this file |
|---|
| 8 |
except in compliance with the License. You may obtain a |
|---|
| 9 |
copy of the License at: |
|---|
| 10 |
|
|---|
| 11 |
http://www.apache.org/licenses/LICENSE-2.0 |
|---|
| 12 |
|
|---|
| 13 |
Unless required by applicable law or agreed to in writing, |
|---|
| 14 |
software distributed under the License is distributed on |
|---|
| 15 |
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|---|
| 16 |
KIND, either express or implied. See the License for the |
|---|
| 17 |
specific language governing permissions and limitations |
|---|
| 18 |
under the License. |
|---|
| 19 |
--> |
|---|
| 20 |
<xsl:stylesheet |
|---|
| 21 |
version="1.0" |
|---|
| 22 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|---|
| 23 |
xmlns="http://www.w3.org/1999/xhtml"> |
|---|
| 24 |
|
|---|
| 25 |
<!--==== LIST EVENTS - for listing discrete events ====--> |
|---|
| 26 |
|
|---|
| 27 |
<!-- The listEvents.do action is used for generating data feeds of events and |
|---|
| 28 |
should be used with the /feeder application. The feeder application provides |
|---|
| 29 |
a common place to pull events regardless of calendar suite. |
|---|
| 30 |
|
|---|
| 31 |
The listing presented here allows developers to call listEvent |
|---|
| 32 |
requests against the system and see the results. It is not currently |
|---|
| 33 |
linked to the bedeworkTheme web pages directly. --> |
|---|
| 34 |
|
|---|
| 35 |
<xsl:template match="events" mode="eventListDiscrete"> |
|---|
| 36 |
<div class="secondaryColHeader"> |
|---|
| 37 |
<h3> |
|---|
| 38 |
<xsl:copy-of select="$bwStr-LsEv-Upcoming"/> |
|---|
| 39 |
<xsl:choose> |
|---|
| 40 |
<xsl:when test="/bedework/selectionState/selectionType = 'view'"> |
|---|
| 41 |
<xsl:text> - </xsl:text> |
|---|
| 42 |
<xsl:value-of select="/bedework/selectionState/view/name"/> |
|---|
| 43 |
</xsl:when> |
|---|
| 44 |
<xsl:when test="/bedework/selectionState/selectionType = 'collections'"> |
|---|
| 45 |
<xsl:text> - </xsl:text> |
|---|
| 46 |
<xsl:value-of select="/bedework/appvar[key='curCollection']/value"/> |
|---|
| 47 |
</xsl:when> |
|---|
| 48 |
</xsl:choose> |
|---|
| 49 |
</h3> |
|---|
| 50 |
</div> |
|---|
| 51 |
<div id="listEvents"> |
|---|
| 52 |
<!--h1><xsl:copy-of select="$bwStr-LsEv-Upcoming"/></h1--> |
|---|
| 53 |
<ul> |
|---|
| 54 |
<xsl:choose> |
|---|
| 55 |
<xsl:when test="not(event)"> |
|---|
| 56 |
<li><xsl:copy-of select="$bwStr-LsEv-NoEventsToDisplay"/></li> |
|---|
| 57 |
</xsl:when> |
|---|
| 58 |
<xsl:otherwise> |
|---|
| 59 |
<xsl:for-each select="event"> |
|---|
| 60 |
<xsl:variable name="id" select="id"/> |
|---|
| 61 |
<xsl:variable name="calPath" select="calendar/encodedPath"/> |
|---|
| 62 |
<xsl:variable name="guid" select="guid"/> |
|---|
| 63 |
<xsl:variable name="guidEsc" select="translate(guid, '.', '_')"/> |
|---|
| 64 |
<xsl:variable name="recurrenceId" select="recurrenceId"/> |
|---|
| 65 |
<li> |
|---|
| 66 |
<xsl:attribute name="class"> |
|---|
| 67 |
<xsl:choose> |
|---|
| 68 |
<xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> |
|---|
| 69 |
<xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> |
|---|
| 70 |
<xsl:when test="position() mod 2 = 0">even</xsl:when> |
|---|
| 71 |
<xsl:otherwise>odd</xsl:otherwise> |
|---|
| 72 |
</xsl:choose> |
|---|
| 73 |
</xsl:attribute> |
|---|
| 74 |
|
|---|
| 75 |
<!-- event icons --> |
|---|
| 76 |
<span class="icons"> |
|---|
| 77 |
<xsl:variable name="gStartdate" select="start/utcdate"/> |
|---|
| 78 |
<xsl:variable name="gLocation" select="location/address"/> |
|---|
| 79 |
<xsl:variable name="gEnddate" select="end/utcdate"/> |
|---|
| 80 |
<xsl:variable name="gText" select="summary"/> |
|---|
| 81 |
<xsl:variable name="gDetails" select="summary"/> |
|---|
| 82 |
|
|---|
| 83 |
<xsl:if test="$eventIconDownloadIcs = 'true'"> |
|---|
| 84 |
<xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> |
|---|
| 85 |
<a href="{$export}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}&nocache=no&contentName={$eventIcalName}" title="{$bwStr-SgEv-Download}"> |
|---|
| 86 |
<img src="{$resourcesRoot}/images/std-ical_icon_small.gif" alt="{$bwStr-SgEv-Download}"/> |
|---|
| 87 |
</a> |
|---|
| 88 |
</xsl:if> |
|---|
| 89 |
<xsl:if test="$eventIconAddToMyCal = 'true'"> |
|---|
| 90 |
<a href="{$privateCal}/event/addEventRef.do?calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}" title="{$bwStr-LsVw-AddEventToMyCalendar}" target="myCalendar"> |
|---|
| 91 |
<img class="addref" src="{$resourcesRoot}/images/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="{$bwStr-LsVw-AddEventToMyCalendar}"/> |
|---|
| 92 |
</a> |
|---|
| 93 |
</xsl:if> |
|---|
| 94 |
<xsl:if test="$eventIconFacebook = 'true'"> |
|---|
| 95 |
<xsl:choose> |
|---|
| 96 |
<xsl:when test="string-length($recurrenceId)"> |
|---|
| 97 |
<a href="http://www.facebook.com/share.php?u={$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}&t={$gText}" title="{$bwStr-SgEv-AddToFacebook}"> |
|---|
| 98 |
<img title="{$bwStr-SgEv-AddToFacebook}" src="{$resourcesRoot}/images/Facebook_Badge_small.gif" alt="{$bwStr-SgEv-AddToFacebook}"/> |
|---|
| 99 |
</a> |
|---|
| 100 |
</xsl:when> |
|---|
| 101 |
<xsl:otherwise> |
|---|
| 102 |
<a href="http://www.facebook.com/share.php?u={$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}&t={$gText}" title="{$bwStr-SgEv-AddToFacebook}"> |
|---|
| 103 |
<img title="{$bwStr-SgEv-AddToFacebook}" src="{$resourcesRoot}/images/Facebook_Badge_small.gif" alt="{$bwStr-SgEv-AddToFacebook}"/> |
|---|
| 104 |
</a> |
|---|
| 105 |
</xsl:otherwise> |
|---|
| 106 |
</xsl:choose> |
|---|
| 107 |
</xsl:if> |
|---|
| 108 |
<xsl:if test="$eventIconGoogleCal = 'true'"> |
|---|
| 109 |
<a href="http://www.google.com/calendar/event?action=TEMPLATE&dates={$gStartdate}/{$gEnddate}&text={$gText}&details={$gDetails}&location={$gLocation}"> |
|---|
| 110 |
<img title="{$bwStr-SgEv-AddToGoogleCalendar}" src="{$resourcesRoot}/images/gcal_small.gif" alt="{$bwStr-SgEv-AddToGoogleCalendar}"/> |
|---|
| 111 |
</a> |
|---|
| 112 |
</xsl:if> |
|---|
| 113 |
<xsl:if test="$eventIconShareThis = 'true'"> |
|---|
| 114 |
<a href="https://wiki.jasig.org/pages/viewpage.action?pageId=50860497"> |
|---|
| 115 |
<img title="{$bwStr-SgEv-ShareThis}" src="{$resourcesRoot}/images/share-icon-16x16.png" alt="{$bwStr-SgEv-ShareThis}"/> |
|---|
| 116 |
</a> |
|---|
| 117 |
</xsl:if> |
|---|
| 118 |
</span> |
|---|
| 119 |
|
|---|
| 120 |
<!-- event thumbnail --> |
|---|
| 121 |
<xsl:if test="xproperties/X-BEDEWORK-IMAGE or $usePlaceholderThumb = 'true'"> |
|---|
| 122 |
<xsl:variable name="imgPrefix"> |
|---|
| 123 |
<xsl:choose> |
|---|
| 124 |
<xsl:when test="starts-with(xproperties/X-BEDEWORK-IMAGE/values/text,'http')"></xsl:when> |
|---|
| 125 |
<xsl:otherwise><xsl:value-of select="$bwEventImagePrefix"/></xsl:otherwise> |
|---|
| 126 |
</xsl:choose> |
|---|
| 127 |
</xsl:variable> |
|---|
| 128 |
<xsl:variable name="imgThumbPrefix"> |
|---|
| 129 |
<xsl:choose> |
|---|
| 130 |
<xsl:when test="starts-with(xproperties/X-BEDEWORK-THUMB-IMAGE/values/text,'http')"></xsl:when> |
|---|
| 131 |
<xsl:otherwise><xsl:value-of select="$bwEventImagePrefix"/></xsl:otherwise> |
|---|
| 132 |
</xsl:choose> |
|---|
| 133 |
</xsl:variable> |
|---|
| 134 |
<a href="{$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| 135 |
<img class="eventThumb"> |
|---|
| 136 |
<xsl:attribute name="width"><xsl:value-of select="$thumbWidth"/></xsl:attribute> |
|---|
| 137 |
<xsl:attribute name="src"> |
|---|
| 138 |
<xsl:choose> |
|---|
| 139 |
<xsl:when test="xproperties/X-BEDEWORK-THUMB-IMAGE"><xsl:value-of select="$imgThumbPrefix"/><xsl:value-of select="xproperties/X-BEDEWORK-THUMB-IMAGE/values/text"/></xsl:when> |
|---|
| 140 |
<xsl:when test="xproperties/X-BEDEWORK-IMAGE and $useFullImageThumbs = 'true'"><xsl:value-of select="$imgPrefix"/><xsl:value-of select="xproperties/X-BEDEWORK-IMAGE/values/text"/></xsl:when> |
|---|
| 141 |
<xsl:otherwise><xsl:value-of select="$resourcesRoot"/>/images/placeholder.png</xsl:otherwise> |
|---|
| 142 |
</xsl:choose> |
|---|
| 143 |
</xsl:attribute> |
|---|
| 144 |
<xsl:attribute name="alt"><xsl:value-of select="summary"/></xsl:attribute> |
|---|
| 145 |
</img> |
|---|
| 146 |
</a> |
|---|
| 147 |
</xsl:if> |
|---|
| 148 |
|
|---|
| 149 |
<div class="eventListContent"> |
|---|
| 150 |
<xsl:if test="xproperties/X-BEDEWORK-IMAGE or $usePlaceholderThumb = 'true'"> |
|---|
| 151 |
<xsl:attribute name="class">eventListContent withImage</xsl:attribute> |
|---|
| 152 |
</xsl:if> |
|---|
| 153 |
<!-- event title --> |
|---|
| 154 |
<xsl:if test="status='CANCELLED'"><strong><xsl:copy-of select="$bwStr-LsVw-Canceled"/><xsl:text> </xsl:text></strong></xsl:if> |
|---|
| 155 |
<xsl:if test="status='TENTATIVE'"><strong><xsl:copy-of select="$bwStr-LsEv-Tentative"/><xsl:text> </xsl:text></strong></xsl:if> |
|---|
| 156 |
<h4> |
|---|
| 157 |
<a href="{$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| 158 |
<xsl:value-of select="summary"/> |
|---|
| 159 |
<xsl:if test="summary = ''"> |
|---|
| 160 |
<xsl:copy-of select="$bwStr-SgEv-NoTitle" /> |
|---|
| 161 |
</xsl:if> |
|---|
| 162 |
</a> |
|---|
| 163 |
</h4> |
|---|
| 164 |
|
|---|
| 165 |
<xsl:value-of select="substring(start/dayname,1,3)"/>, |
|---|
| 166 |
<xsl:value-of select="start/longdate"/> |
|---|
| 167 |
<xsl:text> </xsl:text> |
|---|
| 168 |
<xsl:if test="start/allday != 'true'"> |
|---|
| 169 |
<xsl:value-of select="start/time"/> |
|---|
| 170 |
</xsl:if> |
|---|
| 171 |
<xsl:choose> |
|---|
| 172 |
<xsl:when test="start/shortdate != end/shortdate"> |
|---|
| 173 |
- |
|---|
| 174 |
<xsl:value-of select="substring(end/dayname,1,3)"/>, |
|---|
| 175 |
<xsl:value-of select="end/longdate"/> |
|---|
| 176 |
<xsl:text> </xsl:text> |
|---|
| 177 |
<xsl:if test="start/allday != 'true'"> |
|---|
| 178 |
<xsl:value-of select="end/time"/> |
|---|
| 179 |
</xsl:if> |
|---|
| 180 |
</xsl:when> |
|---|
| 181 |
<xsl:otherwise> |
|---|
| 182 |
<xsl:if test="start/time != end/time"> |
|---|
| 183 |
- |
|---|
| 184 |
<xsl:value-of select="end/time"/> |
|---|
| 185 |
</xsl:if> |
|---|
| 186 |
</xsl:otherwise> |
|---|
| 187 |
</xsl:choose> |
|---|
| 188 |
|
|---|
| 189 |
<br/> |
|---|
| 190 |
<xsl:copy-of select="$bwStr-LsVw-Location"/><xsl:text> </xsl:text> |
|---|
| 191 |
<xsl:value-of select="location/address"/> |
|---|
| 192 |
<xsl:if test="location/subaddress != ''"> |
|---|
| 193 |
, <xsl:value-of select="location/subaddress"/> |
|---|
| 194 |
</xsl:if> |
|---|
| 195 |
|
|---|
| 196 |
<xsl:if test="/bedework/appvar[key='listEventsSummaryMode']/value='details'"> |
|---|
| 197 |
<br/> |
|---|
| 198 |
<xsl:value-of select="description"/> |
|---|
| 199 |
<xsl:if test="link != ''"> |
|---|
| 200 |
<br/> |
|---|
| 201 |
<xsl:variable name="link" select="link"/> |
|---|
| 202 |
<a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a> |
|---|
| 203 |
</xsl:if> |
|---|
| 204 |
<xsl:if test="categories/category"> |
|---|
| 205 |
<br/> |
|---|
| 206 |
<xsl:copy-of select="$bwStr-LsEv-Categories"/> |
|---|
| 207 |
<xsl:for-each select="categories/category"> |
|---|
| 208 |
<xsl:value-of select="value"/><xsl:if test="position() != last()">, </xsl:if> |
|---|
| 209 |
</xsl:for-each> |
|---|
| 210 |
</xsl:if> |
|---|
| 211 |
<br/> |
|---|
| 212 |
<em> |
|---|
| 213 |
<xsl:if test="cost!=''"> |
|---|
| 214 |
<xsl:value-of select="cost"/>.  |
|---|
| 215 |
</xsl:if> |
|---|
| 216 |
<xsl:if test="contact/name!='none'"> |
|---|
| 217 |
<xsl:copy-of select="$bwStr-LsEv-Contact"/><xsl:text> </xsl:text><xsl:value-of select="contact/name"/> |
|---|
| 218 |
</xsl:if> |
|---|
| 219 |
</em> |
|---|
| 220 |
</xsl:if> |
|---|
| 221 |
|
|---|
| 222 |
<xsl:if test="xproperties/X-BEDEWORK-ALIAS"> |
|---|
| 223 |
<br/> |
|---|
| 224 |
<xsl:copy-of select="$bwStr-LsVw-TopicalArea"/><xsl:text> </xsl:text> |
|---|
| 225 |
<span class="eventSubscription"> |
|---|
| 226 |
<xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> |
|---|
| 227 |
<xsl:choose> |
|---|
| 228 |
<xsl:when test="parameters/X-BEDEWORK-PARAM-DISPLAYNAME"> |
|---|
| 229 |
<xsl:value-of select="parameters/X-BEDEWORK-PARAM-DISPLAYNAME"/> |
|---|
| 230 |
</xsl:when> |
|---|
| 231 |
<xsl:otherwise> |
|---|
| 232 |
<xsl:call-template name="substring-afterLastInstanceOf"> |
|---|
| 233 |
<xsl:with-param name="string" select="values/text"/> |
|---|
| 234 |
<xsl:with-param name="char">/</xsl:with-param> |
|---|
| 235 |
</xsl:call-template> |
|---|
| 236 |
</xsl:otherwise> |
|---|
| 237 |
</xsl:choose> |
|---|
| 238 |
<xsl:if test="position()!=last()">, </xsl:if> |
|---|
| 239 |
</xsl:for-each> |
|---|
| 240 |
</span> |
|---|
| 241 |
</xsl:if> |
|---|
| 242 |
</div> |
|---|
| 243 |
<br class="clear"/> |
|---|
| 244 |
|
|---|
| 245 |
</li> |
|---|
| 246 |
</xsl:for-each> |
|---|
| 247 |
</xsl:otherwise> |
|---|
| 248 |
</xsl:choose> |
|---|
| 249 |
</ul> |
|---|
| 250 |
</div> |
|---|
| 251 |
</xsl:template> |
|---|
| 252 |
|
|---|
| 253 |
</xsl:stylesheet> |
|---|