root/trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/attendees.xsl

Revision 2896 (checked in by johnsa, 3 years ago)

user client: completed refactoring for theme

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="attendees">
25     <h2>
26       <span class="formButtons"><input type="button" value="{$bwStr-Atnd-Continue}" onclick="window.location='{$gotoEditEvent}'"/></span>
27         <xsl:copy-of select="$bwStr-Atnd-SchedulMeetingOrTask"/>
28     </h2>
29
30     <div id="recipientsAndAttendees">
31       <h4><xsl:copy-of select="$bwStr-Atnd-AddAttendees"/></h4>
32       <form name="raForm" id="recipientsAndAttendeesForm" action="{$event-attendeesForEvent}" method="post">
33         <div id="raContent">
34           <div id="raFields">
35             <input type="text" name="uri" width="40" id="bwRaUri"/>
36             <input type="submit" value="{$bwStr-Atnd-Add}" />
37             <!-- Recipients are deprecated: default all to attendees -->
38             <input type="hidden" name="recipient" value="true"/>
39             <input type="hidden" name="attendee"  value="true"/>
40             <xsl:text> </xsl:text>
41             <xsl:copy-of select="$bwStr-Atnd-RoleColon"/>
42             <select name="role">
43               <option value="REQ-PARTICIPANT"><xsl:copy-of select="$bwStr-Atnd-RequiredParticipant"/></option>
44               <option value="OPT-PARTICIPANT"><xsl:copy-of select="$bwStr-Atnd-OptionalParticipant"/></option>
45               <option value="CHAIR"><xsl:copy-of select="$bwStr-Atnd-Chair"/></option>
46               <option value="NON-PARTICIPANT"><xsl:copy-of select="$bwStr-Atnd-NonParticipant"/></option>
47             </select>
48             <xsl:text> </xsl:text>
49             <xsl:copy-of select="$bwStr-Atnd-StatusColon"/>
50             <select name="partstat">
51               <option value="NEEDS-ACTION"><xsl:copy-of select="$bwStr-Atnd-NeedsAction"/></option>
52               <option value="ACCEPTED"><xsl:copy-of select="$bwStr-Atnd-Accepted"/></option>
53               <option value="DECLINED"><xsl:copy-of select="$bwStr-Atnd-Declined"/></option>
54               <option value="TENTATIVE"><xsl:copy-of select="$bwStr-Atnd-Tentative"/></option>
55               <option value="DELEGATED"><xsl:copy-of select="$bwStr-Atnd-Delegated"/></option>
56             </select>
57           </div>
58
59           <xsl:if test="/bedework/attendees/attendee">
60             <xsl:apply-templates select="/bedework/attendees"/>
61           </xsl:if>
62
63           <!-- Recipients are deprecated -->
64           <!--
65           <xsl:if test="/bedework/recipients/recipient">
66             <xsl:apply-templates select="/bedework/recipients"/>
67           </xsl:if>
68           -->
69
70           <xsl:apply-templates select="/bedework/freebusy" mode="freeBusyGrid">
71             <xsl:with-param name="aggregation">true</xsl:with-param>
72             <xsl:with-param name="type">meeting</xsl:with-param>
73           </xsl:apply-templates>
74
75           <div class="eventSubmitButtons">
76             <input type="button" value="{$bwStr-AEEF-Continue}" onclick="window.location='{$gotoEditEvent}'"/>
77           </div>
78         </div>
79       </form>
80     </div>
81   </xsl:template>
82  
83     <xsl:template match="attendees">
84     <xsl:param name="trash">yes</xsl:param>
85     <table id="attendees" class="widget" cellspacing="0">
86       <tr>
87         <th colspan="4"><xsl:copy-of select="$bwStr-Atnd-Attendees"/></th>
88       </tr>
89       <tr class="subHead">
90         <xsl:if test="$trash = 'yes'"><td></td></xsl:if>
91         <td><xsl:copy-of select="$bwStr-Atnd-Attendee"/></td>
92         <td><xsl:copy-of select="$bwStr-Atnd-Role"/></td>
93         <td><xsl:copy-of select="$bwStr-Atnd-Status"/></td>
94       </tr>
95       <xsl:for-each select="attendee">
96         <xsl:sort select="cn" order="ascending" case-order="upper-first"/>
97         <xsl:sort select="attendeeUri" order="ascending" case-order="upper-first"/>
98         <xsl:variable name="attendeeUri" select="attendeeUri"/>
99         <tr>
100           <xsl:if test="$trash = 'yes'">
101             <td class="trash">
102               <a href="{$event-attendeesForEvent}&amp;uri={$attendeeUri}&amp;attendee=true&amp;delete=true" title="{$bwStr-Atnd-Remove}">
103                 <img src="{$resourcesRoot}/images/trashIcon.gif" width="13" height="13" border="0" alt="remove"/>
104               </a>
105             </td>
106           </xsl:if>
107           <td>
108             <a href="{$attendeeUri}">
109               <xsl:choose>
110                 <xsl:when test="cn != ''">
111                   <xsl:value-of select="cn"/>
112                 </xsl:when>
113                 <xsl:otherwise>
114                   <xsl:value-of select="attendeeUri"/>
115                 </xsl:otherwise>
116               </xsl:choose>
117             </a>
118           </td>
119           <td class="role">
120             <xsl:apply-templates select="role"/>
121           </td>
122           <td class="status">
123             <xsl:apply-templates select="partstat"/>
124           </td>
125         </tr>
126       </xsl:for-each>
127     </table>
128   </xsl:template>
129
130   <xsl:template match="partstat">
131     <xsl:choose>
132       <xsl:when test=". = 'NEEDS-ACTION' or . = ''"><xsl:copy-of select="$bwStr-ptst-NeedsAction"/></xsl:when>
133       <xsl:when test=". = 'ACCEPTED'"><xsl:copy-of select="$bwStr-ptst-Accepted"/></xsl:when>
134       <xsl:when test=". = 'DECLINED'"><xsl:copy-of select="$bwStr-ptst-Declined"/></xsl:when>
135       <xsl:when test=". = 'TENTATIVE'"><xsl:copy-of select="$bwStr-ptst-Tentative"/></xsl:when>
136       <xsl:when test=". = 'DELEGATED'"><xsl:copy-of select="$bwStr-ptst-Delegated"/></xsl:when>
137       <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
138     </xsl:choose>
139   </xsl:template>
140
141   <xsl:template match="role">
142     <xsl:choose>
143       <xsl:when test=". = 'REQ-PARTICIPANT' or . = ''">required participant</xsl:when>
144       <xsl:when test=". = 'CHAIR'">chair</xsl:when>
145       <xsl:when test=". = 'OPT-PARTICIPANT'">optional participant</xsl:when>
146       <xsl:when test=". = 'NON-PARTICIPANT'">non-participant</xsl:when>
147       <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
148     </xsl:choose>
149   </xsl:template>
150
151   <!-- Recipients are deprecated -->
152   <xsl:template match="recipients">
153     <xsl:param name="trash">yes</xsl:param>
154     <table id="recipients" class="widget" cellspacing="0">
155       <tr>
156         <th colspan="2"><xsl:copy-of select="$bwStr-Rcpt-Recipients"/></th>
157       </tr>
158       <tr class="subHead">
159         <xsl:if test="$trash = 'yes'"><td></td></xsl:if>
160         <td><xsl:copy-of select="$bwStr-Rcpt-Recipient"/></td>
161       </tr>
162       <xsl:for-each select="recipient">
163         <xsl:variable name="recipientUri" select="."/>
164         <tr>
165           <xsl:if test="$trash = 'yes'">
166             <td class="trash">
167               <a href="{$event-attendeesForEvent}&amp;uri={$recipientUri}&amp;recipient=true&amp;delete=true" title="{$bwStr-Rcpt-Remove}">
168                 <img src="{$resourcesRoot}/images/trashIcon.gif" width="13" height="13" border="0" alt="remove"/>
169               </a>
170             </td>
171           </xsl:if>
172           <td>
173             <a href="{$recipientUri}">
174               <xsl:value-of select="."/>
175             </a>
176           </td>
177         </tr>
178       </xsl:for-each>
179     </table>
180   </xsl:template>
181  
182 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.