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