| | 1042 | <!--==== LIST EVENTS - for listing discrete events ====--> |
|---|
| | 1043 | <xsl:template match="events" mode="eventList"> |
|---|
| | 1044 | <h2 class=""> |
|---|
| | 1045 | Event List: |
|---|
| | 1046 | <xsl:choose> |
|---|
| | 1047 | <xsl:when test="/bedework/now/longdate = /bedework/events/event[position()=last()]/start/longdate"><xsl:value-of select="/bedework/now/longdate"/></xsl:when> |
|---|
| | 1048 | <xsl:otherwise><xsl:value-of select="/bedework/now/longdate"/> - <xsl:value-of select="/bedework/events/event[position()=last()]/start/longdate"/></xsl:otherwise> |
|---|
| | 1049 | </xsl:choose> |
|---|
| | 1050 | </h2> |
|---|
| | 1051 | |
|---|
| | 1052 | <table id="listTable" cellspacing="0"> |
|---|
| | 1053 | <xsl:choose> |
|---|
| | 1054 | <xsl:when test="not(event)"> |
|---|
| | 1055 | <tr> |
|---|
| | 1056 | <td class="noEventsCell"> |
|---|
| | 1057 | No events to display. |
|---|
| | 1058 | </td> |
|---|
| | 1059 | </tr> |
|---|
| | 1060 | </xsl:when> |
|---|
| | 1061 | <xsl:otherwise> |
|---|
| | 1062 | <xsl:for-each select="event"> |
|---|
| | 1063 | <xsl:variable name="id" select="id"/> |
|---|
| | 1064 | <xsl:variable name="subscriptionId" select="subscription/id"/> |
|---|
| | 1065 | <xsl:variable name="calPath" select="calendar/encodedPath"/> |
|---|
| | 1066 | <xsl:variable name="guid" select="guid"/> |
|---|
| | 1067 | <xsl:variable name="recurrenceId" select="recurrenceId"/> |
|---|
| | 1068 | <tr> |
|---|
| | 1069 | <xsl:variable name="descriptionClass"> |
|---|
| | 1070 | <xsl:choose> |
|---|
| | 1071 | <xsl:when test="status='CANCELLED'">description bwStatusCancelled</xsl:when> |
|---|
| | 1072 | <xsl:when test="status='TENTATIVE'">description bwStatusTentative</xsl:when> |
|---|
| | 1073 | <xsl:otherwise>description</xsl:otherwise> |
|---|
| | 1074 | </xsl:choose> |
|---|
| | 1075 | </xsl:variable> |
|---|
| | 1076 | <!-- Subscription styles. |
|---|
| | 1077 | These are set in the add/modify subscription forms in the admin client; |
|---|
| | 1078 | if present, these override the background-color set by eventClass. The |
|---|
| | 1079 | subscription styles should not be used for cancelled events (tentative is ok). --> |
|---|
| | 1080 | <xsl:variable name="subscriptionClass"> |
|---|
| | 1081 | <xsl:if test="status != 'CANCELLED' and |
|---|
| | 1082 | subscription/subStyle != '' and |
|---|
| | 1083 | subscription/subStyle != 'default'"><xsl:value-of select="subscription/subStyle"/></xsl:if> |
|---|
| | 1084 | </xsl:variable> |
|---|
| | 1085 | <td class="{$descriptionClass} {$subscriptionClass}"> |
|---|
| | 1086 | <xsl:if test="status='CANCELLED'"><strong>CANCELLED: </strong></xsl:if> |
|---|
| | 1087 | <xsl:choose> |
|---|
| | 1088 | <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> |
|---|
| | 1089 | <a href="{$eventView}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| | 1090 | <strong> |
|---|
| | 1091 | <xsl:value-of select="summary"/>: |
|---|
| | 1092 | </strong> |
|---|
| | 1093 | <xsl:value-of select="description"/>  |
|---|
| | 1094 | <em> |
|---|
| | 1095 | <xsl:value-of select="location/address"/> |
|---|
| | 1096 | <xsl:if test="location/subaddress != ''"> |
|---|
| | 1097 | , <xsl:value-of select="location/subaddress"/> |
|---|
| | 1098 | </xsl:if>.  |
|---|
| | 1099 | <xsl:if test="cost!=''"> |
|---|
| | 1100 | <xsl:value-of select="cost"/>.  |
|---|
| | 1101 | </xsl:if> |
|---|
| | 1102 | <xsl:if test="contact/name!='none'"> |
|---|
| | 1103 | Contact: <xsl:value-of select="contact/name"/> |
|---|
| | 1104 | </xsl:if> |
|---|
| | 1105 | </em> |
|---|
| | 1106 | - <xsl:value-of select="calendar/name"/> |
|---|
| | 1107 | </a> |
|---|
| | 1108 | <xsl:if test="link != ''"> |
|---|
| | 1109 | <xsl:variable name="link" select="link"/> |
|---|
| | 1110 | <a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a> |
|---|
| | 1111 | </xsl:if> |
|---|
| | 1112 | </xsl:when> |
|---|
| | 1113 | <xsl:otherwise> |
|---|
| | 1114 | <a href="{$eventView}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| | 1115 | <xsl:value-of select="summary"/> |
|---|
| | 1116 | <xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if> |
|---|
| | 1117 | - <em><xsl:value-of select="calendar/name"/></em> |
|---|
| | 1118 | </a> |
|---|
| | 1119 | </xsl:otherwise> |
|---|
| | 1120 | </xsl:choose> |
|---|
| | 1121 | </td> |
|---|
| | 1122 | <xsl:choose> |
|---|
| | 1123 | <xsl:when test="start/shortdate = end/shortdate and |
|---|
| | 1124 | start/time = end/time"> |
|---|
| | 1125 | <td class="eventListDateTime" colspan="3"> |
|---|
| | 1126 | <a href="{$eventView}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| | 1127 | <xsl:value-of select="start/dayname"/>, |
|---|
| | 1128 | <xsl:value-of select="start/longdate"/> |
|---|
| | 1129 | <xsl:text> </xsl:text> |
|---|
| | 1130 | <xsl:value-of select="start/time"/> |
|---|
| | 1131 | </a> |
|---|
| | 1132 | </td> |
|---|
| | 1133 | </xsl:when> |
|---|
| | 1134 | <xsl:otherwise> |
|---|
| | 1135 | <td class="right eventListDateTime"> |
|---|
| | 1136 | <a href="{$eventView}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| | 1137 | <xsl:value-of select="start/dayname"/>, |
|---|
| | 1138 | <xsl:value-of select="start/longdate"/> |
|---|
| | 1139 | <xsl:text> </xsl:text> |
|---|
| | 1140 | <xsl:value-of select="start/time"/> |
|---|
| | 1141 | </a> |
|---|
| | 1142 | </td> |
|---|
| | 1143 | <td class="center eventListDateTime"> |
|---|
| | 1144 | <a href="{$eventView}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}">-</a> |
|---|
| | 1145 | </td> |
|---|
| | 1146 | <td class="left eventListDateTime"> |
|---|
| | 1147 | <a href="{$eventView}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| | 1148 | <xsl:value-of select="end/dayname"/>, |
|---|
| | 1149 | <xsl:value-of select="end/longdate"/> |
|---|
| | 1150 | <xsl:text> </xsl:text> |
|---|
| | 1151 | <xsl:value-of select="end/time"/> |
|---|
| | 1152 | </a> |
|---|
| | 1153 | </td> |
|---|
| | 1154 | </xsl:otherwise> |
|---|
| | 1155 | </xsl:choose> |
|---|
| | 1156 | <td class="icons"> |
|---|
| | 1157 | <xsl:if test="recurrenceId = ''"> |
|---|
| | 1158 | <!-- hide this for a 3.3.1 bug: can't add a reference to a recurring event at this time --> |
|---|
| | 1159 | <a href="{$privateCal}/event/addEventRef.do?subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}" title="Add event to MyCalendar" target="myCalendar"> |
|---|
| | 1160 | <img class="addref" src="{$resourcesRoot}/images/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="Add event to MyCalendar"/> |
|---|
| | 1161 | </a> |
|---|
| | 1162 | </xsl:if> |
|---|
| | 1163 | <xsl:variable name="eventIcalName" select="concat($id,'.ics')"/> |
|---|
| | 1164 | <a href="{$export}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}&nocache=no&contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> |
|---|
| | 1165 | <img src="{$resourcesRoot}/images/std-ical_icon_small.gif" width="12" height="16" border="0" alt="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"/> |
|---|
| | 1166 | </a> |
|---|
| | 1167 | </td> |
|---|
| | 1168 | </tr> |
|---|
| | 1169 | </xsl:for-each> |
|---|
| | 1170 | </xsl:otherwise> |
|---|
| | 1171 | </xsl:choose> |
|---|
| | 1172 | </table> |
|---|
| | 1173 | </xsl:template> |
|---|
| | 1174 | |
|---|