root/trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/themes/bedeworkWhite/ongoing.xsl

Revision 3444 (checked in by bleibson, 1 year ago)

o new bedeworkWhite Theme. White and easier to attach to a site's header and footer.

Line 
1 <!--
2     Licensed to Jasig under one or more contributor license
3     agreements. See the NOTICE file distributed with this work
4     for additional information regarding copyright ownership.
5     Jasig licenses this file to you under the Apache License,
6     Version 2.0 (the "License"); you may not use this file
7     except in compliance with the License. You may obtain a
8     copy of the License at:
9    
10     http://www.apache.org/licenses/LICENSE-2.0
11    
12     Unless required by applicable law or agreed to in writing,
13     software distributed under the License is distributed on
14     an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15     KIND, either express or implied. See the License for the
16     specific language governing permissions and limitations
17     under the License.
18 -->
19 <xsl:stylesheet
20   version="1.0"
21   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
22   xmlns="http://www.w3.org/1999/xhtml">
23
24   <xsl:template name="ongoingEventList">
25     <div class="secondaryColHeader">
26       <h3>
27         <xsl:copy-of select="$bwStr-Ongoing-Title"/>
28      </h3>
29     </div>
30     <ul class="eventList">
31       <xsl:choose>
32         <xsl:when test="/bedework/eventscalendar//event[categories/category[uid = $ongoingEventsCatUid]]">
33           <xsl:for-each
34             select="/bedework/eventscalendar/year/month/week/day/event[categories/category[uid = $ongoingEventsCatUid]]">
35             <xsl:sort select="start/unformatted" order="ascending" data-type="number" />
36             <xsl:sort select="guid" order="ascending" />
37             <xsl:variable name="lastId" select="guid" />
38             <xsl:if test="not(preceding::event[guid=$lastId])">
39               <xsl:call-template name="ongoingEvent" />
40             </xsl:if>
41           </xsl:for-each>
42         </xsl:when>
43         <xsl:otherwise>
44           <li>
45             <xsl:copy-of select="$bwStr-Ongoing-NoEvents"/>
46           </li>
47         </xsl:otherwise>
48       </xsl:choose>
49     </ul>
50   </xsl:template>
51
52   <xsl:template name="ongoingEvent">
53     <li>
54       <xsl:variable name="calPath" select="calendar/encodedPath" />
55       <xsl:variable name="guid" select="guid" />
56       <xsl:variable name="recurrenceId" select="recurrenceId" />
57       <xsl:variable name="statusClass">
58         <xsl:choose>
59           <xsl:when test="status='CANCELLED'">
60             bwStatusCancelled
61           </xsl:when>
62           <xsl:when test="status='TENTATIVE'">
63             bwStatusTentative
64           </xsl:when>
65           <xsl:otherwise>bwStatusConfirmed</xsl:otherwise>
66         </xsl:choose>
67       </xsl:variable>
68       <a href="{$eventView}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
69         <xsl:if test="status != 'CONFIRMED'">
70           <xsl:value-of select="status" />
71           <xsl:text>: </xsl:text>
72         </xsl:if>
73         <xsl:value-of select="summary" />
74         <xsl:if test="summary = ''">
75           <xsl:copy-of select="$bwStr-SgEv-NoTitle" />
76         </xsl:if>
77       </a>
78       , <xsl:copy-of select="$bwStr-SgEv-Ends" />
79       <xsl:text> </xsl:text>
80       <xsl:value-of select="end/shortdate" />
81       <xsl:text> </xsl:text>
82       <xsl:if test="start/allday = 'false'">
83         <xsl:value-of select="end/time" />
84       </xsl:if>
85     </li>
86   </xsl:template>
87
88 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.