Changeset 1644
- Timestamp:
- 11/30/07 08:03:49
- Files:
-
- branches/xslt-rewrite/deployment/resources/xsl/default/default/event.xsl (modified) (1 diff)
- branches/xslt-rewrite/deployment/resources/xsl/default/default/misc.xsl (modified) (1 diff)
- branches/xslt-rewrite/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/default.xsl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/xslt-rewrite/deployment/resources/xsl/default/default/event.xsl
r1632 r1644 826 826 </xsl:choose> 827 827 </xsl:template> 828 829 <xsl:template match="event" mode="publicSingle"> 830 <xsl:variable name="subscriptionId" select="subscription/id"/> 831 <xsl:variable name="calPath" select="calendar/encodedPath"/> 832 <xsl:variable name="guid" select="guid"/> 833 <xsl:variable name="recurrenceId" select="recurrenceId"/> 834 <xsl:variable name="statusClass"> 835 <xsl:choose> 836 <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> 837 <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> 838 <xsl:otherwise>bwStatusConfirmed</xsl:otherwise> 839 </xsl:choose> 840 </xsl:variable> 841 <h2 class="{$statusClass}"> 842 <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> 843 <xsl:choose> 844 <xsl:when test="link != ''"> 845 <xsl:variable name="link" select="link"/> 846 <a href="{$link}"> 847 <xsl:value-of select="summary"/> 848 </a> 849 </xsl:when> 850 <xsl:otherwise> 851 <xsl:value-of select="summary"/> 852 </xsl:otherwise> 853 </xsl:choose> 854 </h2> 855 <table id="eventTable" cellpadding="0" cellspacing="0"> 856 <tr> 857 <td class="fieldname">When:</td> 858 <td class="fieldval"> 859 <!-- always display local time --> 860 <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> 861 <xsl:if test="start/allday = 'false'"> 862 <span class="time"><xsl:value-of select="start/time"/></span> 863 </xsl:if> 864 <xsl:if test="(end/longdate != start/longdate) or 865 ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> 866 <xsl:if test="end/longdate != start/longdate"> 867 <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> 868 </xsl:if> 869 <xsl:choose> 870 <xsl:when test="start/allday = 'true'"> 871 <span class="time"><em>(all day)</em></span> 872 </xsl:when> 873 <xsl:when test="end/longdate != start/longdate"> 874 <span class="time"><xsl:value-of select="end/time"/></span> 875 </xsl:when> 876 <xsl:when test="end/time != start/time"> 877 <span class="time"><xsl:value-of select="end/time"/></span> 878 </xsl:when> 879 </xsl:choose> 880 <!-- if timezones are not local, or if floating add labels: --> 881 <xsl:if test="start/timezone/islocal = 'false' or end/timezone/islocal = 'false'"> 882 <xsl:text> </xsl:text> 883 -- 884 <strong> 885 <xsl:choose> 886 <xsl:when test="start/floating = 'true'"> 887 Floating time 888 </xsl:when> 889 <xsl:otherwise> 890 Local time 891 </xsl:otherwise> 892 </xsl:choose> 893 </strong> 894 <br/> 895 </xsl:if> 896 <!-- display in timezone if not local or floating time) --> 897 <xsl:if test="(start/timezone/islocal = 'false' or end/timezone/islocal = 'false') and start/floating = 'false'"> 898 <xsl:choose> 899 <xsl:when test="start/timezone/id != end/timezone/id"> 900 <!-- need to display both timezones if they differ from start to end --> 901 <table border="0" cellspacing="0" id="tztable"> 902 <tr> 903 <td> 904 <strong>Start:</strong> 905 </td> 906 <td> 907 <xsl:choose> 908 <xsl:when test="start/timezone/islocal='true'"> 909 <xsl:value-of select="start/dayname"/>, 910 <xsl:value-of select="start/longdate"/> 911 <xsl:text> </xsl:text> 912 <span class="time"><xsl:value-of select="start/time"/></span> 913 </xsl:when> 914 <xsl:otherwise> 915 <xsl:value-of select="start/timezone/dayname"/>, 916 <xsl:value-of select="start/timezone/longdate"/> 917 <xsl:text> </xsl:text> 918 <span class="time"><xsl:value-of select="start/timezone/time"/></span> 919 </xsl:otherwise> 920 </xsl:choose> 921 </td> 922 <td> 923 -- 924 <strong><xsl:value-of select="start/timezone/id"/></strong> 925 </td> 926 </tr> 927 <tr> 928 <td> 929 <strong>End:</strong> 930 </td> 931 <td> 932 <xsl:choose> 933 <xsl:when test="end/timezone/islocal='true'"> 934 <xsl:value-of select="end/dayname"/>, 935 <xsl:value-of select="end/longdate"/> 936 <xsl:text> </xsl:text> 937 <span class="time"><xsl:value-of select="end/time"/></span> 938 </xsl:when> 939 <xsl:otherwise> 940 <xsl:value-of select="end/timezone/dayname"/>, 941 <xsl:value-of select="end/timezone/longdate"/> 942 <xsl:text> </xsl:text> 943 <span class="time"><xsl:value-of select="end/timezone/time"/></span> 944 </xsl:otherwise> 945 </xsl:choose> 946 </td> 947 <td> 948 -- 949 <strong><xsl:value-of select="end/timezone/id"/></strong> 950 </td> 951 </tr> 952 </table> 953 </xsl:when> 954 <xsl:otherwise> 955 <!-- otherwise, timezones are the same: display as a single line --> 956 <xsl:value-of select="start/timezone/dayname"/>, <xsl:value-of select="start/timezone/longdate"/><xsl:text> </xsl:text> 957 <xsl:if test="start/allday = 'false'"> 958 <span class="time"><xsl:value-of select="start/timezone/time"/></span> 959 </xsl:if> 960 <xsl:if test="(end/timezone/longdate != start/timezone/longdate) or 961 ((end/timezone/longdate = start/timezone/longdate) and (end/timezone/time != start/timezone/time))"> - </xsl:if> 962 <xsl:if test="end/timezone/longdate != start/timezone/longdate"> 963 <xsl:value-of select="substring(end/timezone/dayname,1,3)"/>, <xsl:value-of select="end/timezone/longdate"/><xsl:text> </xsl:text> 964 </xsl:if> 965 <xsl:choose> 966 <xsl:when test="start/allday = 'true'"> 967 <span class="time"><em>(all day)</em></span> 968 </xsl:when> 969 <xsl:when test="end/timezone/longdate != start/timezone/longdate"> 970 <span class="time"><xsl:value-of select="end/timezone/time"/></span> 971 </xsl:when> 972 <xsl:when test="end/timezone/time != start/timezone/time"> 973 <span class="time"><xsl:value-of select="end/timezone/time"/></span> 974 </xsl:when> 975 </xsl:choose> 976 <xsl:text> </xsl:text> 977 -- 978 <strong><xsl:value-of select="start/timezone/id"/></strong> 979 </xsl:otherwise> 980 </xsl:choose> 981 </xsl:if> 982 </td> 983 <th class="icalIcon" rowspan="2"> 984 <div id="eventIcons"> 985 <xsl:if test="recurrenceId = ''"> 986 <!-- hide this for a 3.3.1 bug: can't add a reference to a recurring event at this time --> 987 <a href="{$privateCal}/event/addEventRef.do?subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}" title="Add event to MyCalendar" target="myCalendar"> 988 <img class="addref" src="{$resourcesRoot}/resources/add2mycal-icon.gif" width="20" height="26" border="0" alt="Add event to MyCalendar"/> 989 add to my calendar</a> 990 </xsl:if> 991 <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 992 <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"> 993 <img src="{$resourcesRoot}/resources/std-ical_icon.gif" width="20" height="26" border="0" alt="Download this event"/> 994 download</a> 995 </div> 996 </th> 997 </tr> 998 <tr> 999 <td class="fieldname">Where:</td> 1000 <td class="fieldval"> 1001 <xsl:choose> 1002 <xsl:when test="location/link=''"> 1003 <xsl:value-of select="location/address"/> 1004 </xsl:when> 1005 <xsl:otherwise> 1006 <xsl:variable name="locationLink" select="location/link"/> 1007 <a href="{$locationLink}"> 1008 <xsl:value-of select="location/address"/> 1009 </a> 1010 </xsl:otherwise> 1011 </xsl:choose> 1012 <xsl:if test="location/subaddress!=''"> 1013 <br/><xsl:value-of select="location/subaddress"/> 1014 </xsl:if> 1015 </td> 1016 </tr> 1017 <tr> 1018 <td class="fieldname">Description:</td> 1019 <td colspan="2" class="fieldval description"> 1020 <xsl:call-template name="replace"> 1021 <xsl:with-param name="string" select="description"/> 1022 <xsl:with-param name="pattern" select="'
'"/> 1023 <xsl:with-param name="replacement"><br/></xsl:with-param> 1024 </xsl:call-template> 1025 </td> 1026 </tr> 1027 <xsl:if test="status !='' and status != 'CONFIRMED'"> 1028 <tr> 1029 <td class="fieldname">Status:</td> 1030 <td class="fieldval"> 1031 <xsl:value-of select="status"/> 1032 </td> 1033 </tr> 1034 </xsl:if> 1035 <xsl:if test="cost!=''"> 1036 <tr> 1037 <td class="fieldname">Cost:</td> 1038 <td colspan="2" class="fieldval"><xsl:value-of select="cost"/></td> 1039 </tr> 1040 </xsl:if> 1041 <xsl:if test="link != ''"> 1042 <tr> 1043 <td class="fieldname">See:</td> 1044 <td colspan="2" class="fieldval"> 1045 <xsl:variable name="link" select="link"/> 1046 <a href="{$link}"><xsl:value-of select="link"/></a> 1047 </td> 1048 </tr> 1049 </xsl:if> 1050 <xsl:if test="contact/name!='none'"> 1051 <tr> 1052 <td class="fieldname">Contact:</td> 1053 <td colspan="2" class="fieldval"> 1054 <xsl:choose> 1055 <xsl:when test="contact/link=''"> 1056 <xsl:value-of select="contact/name"/> 1057 </xsl:when> 1058 <xsl:otherwise> 1059 <xsl:variable name="sponsorLink" select="contact/link"/> 1060 <a href="{$sponsorLink}"> 1061 <xsl:value-of select="contact/name"/> 1062 </a> 1063 </xsl:otherwise> 1064 </xsl:choose> 1065 <xsl:if test="contact/phone!=''"> 1066 <br /><xsl:value-of select="contact/phone"/> 1067 </xsl:if> 1068 <!-- If you want to display email addresses, uncomment the 1069 following 8 lines. --> 1070 <!-- <xsl:if test="contact/email!=''"> 1071 <br /> 1072 <xsl:variable name="email" select="contact/email"/> 1073 <xsl:variable name="subject" select="summary"/> 1074 <a href="mailto:{$email}&subject={$subject}"> 1075 <xsl:value-of select="contact/email"/> 1076 </a> 1077 </xsl:if> --> 1078 </td> 1079 </tr> 1080 </xsl:if> 1081 <xsl:if test="calendar/path!=''"> 1082 <tr> 1083 <td class="fieldname">Calendar:</td> 1084 <td class="fieldval"> 1085 <xsl:variable name="calUrl" select="calendar/encodedPath"/> 1086 <a href="{$setSelection}&calUrl={$calUrl}"> 1087 <xsl:value-of select="calendar/name"/> 1088 </a> 1089 </td> 1090 </tr> 1091 </xsl:if> 1092 <xsl:if test="categories/category"> 1093 <tr> 1094 <td class="fieldname">Categories:</td> 1095 <td class="fieldval"> 1096 <xsl:for-each select="categories/category"> 1097 <xsl:value-of select="word"/><xsl:if test="position() != last()">, </xsl:if> 1098 </xsl:for-each> 1099 </td> 1100 </tr> 1101 </xsl:if> 1102 <xsl:if test="comments/comment"> 1103 <tr> 1104 <td class="fieldname">Comments:</td> 1105 <td class="fieldval comments"> 1106 <xsl:for-each select="comments/comment"> 1107 <p><xsl:value-of select="value"/></p> 1108 </xsl:for-each> 1109 </td> 1110 </tr> 1111 </xsl:if> 1112 </table> 1113 </xsl:template> 828 1114 </xsl:stylesheet> branches/xslt-rewrite/deployment/resources/xsl/default/default/misc.xsl
r1626 r1644 180 180 </xsl:template> 181 181 182 <xsl:template name="stats"> 183 <div id="stats"> 184 <h2>System Statistics</h2> 185 186 <p> 187 Stats collection: 188 </p> 189 <ul> 190 <li> 191 <a href="{$stats}&enable=yes">enable</a> | 192 <a href="{$stats}&disable=yes">disable</a> 193 </li> 194 <li><a href="{$stats}&fetch=yes">fetch statistics</a></li> 195 <li><a href="{$stats}&dump=yes">dump stats to log</a></li> 196 </ul> 197 <table id="statsTable" cellpadding="0"> 198 <xsl:for-each select="/bedework/sysStats/*"> 199 <xsl:choose> 200 <xsl:when test="name(.) = 'header'"> 201 <tr> 202 <th colspan="2"> 203 <xsl:value-of select="."/> 204 </th> 205 </tr> 206 </xsl:when> 207 <xsl:otherwise> 208 <tr> 209 <td class="label"> 210 <xsl:value-of select="label"/> 211 </td> 212 <td class="value"> 213 <xsl:value-of select="value"/> 214 </td> 215 </tr> 216 </xsl:otherwise> 217 </xsl:choose> 218 </xsl:for-each> 219 </table> 220 </div> 221 </xsl:template> 182 222 </xsl:stylesheet> branches/xslt-rewrite/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/default.xsl
r1643 r1644 65 65 <xsl:include href="../../../bedework-common/default/default/calendar.xsl"/> 66 66 <xsl:include href="../../../bedework-common/default/default/util.xsl"/> 67 <xsl:include href="../../../bedework-common/default/default/misc.xsl"/> 68 <xsl:include href="../../../bedework-common/default/default/event.xsl"/> 67 69 68 70 <!-- MAIN TEMPLATE --> … … 103 105 <xsl:when test="/bedework/page='event'"> 104 106 <!-- show an event --> 105 <xsl:apply-templates select="/bedework/event" />107 <xsl:apply-templates select="/bedework/event" mode="publicSingle" /> 106 108 </xsl:when> 107 109 <xsl:when test="/bedework/page='showSysStats'"> … … 160 162 </html> 161 163 </xsl:template> 162 163 <!--==== SINGLE EVENT ====-->164 <xsl:template match="event">165 <xsl:variable name="subscriptionId" select="subscription/id"/>166 <xsl:variable name="calPath" select="calendar/encodedPath"/>167 <xsl:variable name="guid" select="guid"/>168 <xsl:variable name="recurrenceId" select="recurrenceId"/>169 <xsl:variable name="statusClass">170 <xsl:choose>171 <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when>172 <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when>173 <xsl:otherwise>bwStatusConfirmed</xsl:otherwise>174 </xsl:choose>175 </xsl:variable>176 <h2 class="{$statusClass}">177 <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if>178 <xsl:choose>179 <xsl:when test="link != ''">180 <xsl:variable name="link" select="link"/>181 <a href="{$link}">182 <xsl:value-of select="summary"/>183 </a>184 </xsl:when>185 <xsl:otherwise>186 <xsl:value-of select="summary"/>187 </xsl:otherwise>188 </xsl:choose>189 </h2>190 <table id="eventTable" cellpadding="0" cellspacing="0">191 <tr>192 <td class="fieldname">When:</td>193 <td class="fieldval">194 <!-- always display local time -->195 <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text>196 <xsl:if test="start/allday = 'false'">197 <span class="time"><xsl:value-of select="start/time"/></span>198 </xsl:if>199 <xsl:if test="(end/longdate != start/longdate) or200 ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if>201 <xsl:if test="end/longdate != start/longdate">202 <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text>203 </xsl:if>204 <xsl:choose>205 <xsl:when test="start/allday = 'true'">206 <span class="time"><em>(all day)</em></span>207 </xsl:when>208 <xsl:when test="end/longdate != start/longdate">209 <span class="time"><xsl:value-of select="end/time"/></span>210 </xsl:when>211 <xsl:when test="end/time != start/time">212 <span class="time"><xsl:value-of select="end/time"/></span>213 </xsl:when>214 </xsl:choose>215 <!-- if timezones are not local, or if floating add labels: -->216 <xsl:if test="start/timezone/islocal = 'false' or end/timezone/islocal = 'false'">217 <xsl:text> </xsl:text>218 --219 <strong>220 <xsl:choose>221 <xsl:when test="start/floating = 'true'">222 Floating time223 </xsl:when>224 <xsl:otherwise>225 Local time226 </xsl:otherwise>227 </xsl:choose>228 </strong>229 <br/>230 </xsl:if>231 <!-- display in timezone if not local or floating time) -->232 <xsl:if test="(start/timezone/islocal = 'false' or end/timezone/islocal = 'false') and start/floating = 'false'">233 <xsl:choose>234 <xsl:when test="start/timezone/id != end/timezone/id">235 <!-- need to display both timezones if they differ from start to end -->236 <table border="0" cellspacing="0" id="tztable">237 <tr>238 <td>239 <strong>Start:</strong>240 </td>241 <td>242 <xsl:choose>243 <xsl:when test="start/timezone/islocal='true'">244 <xsl:value-of select="start/dayname"/>,245 <xsl:value-of select="start/longdate"/>246 <xsl:text> </xsl:text>247 <span class="time"><xsl:value-of select="start/time"/></span>248 </xsl:when>249 <xsl:otherwise>250 <xsl:value-of select="start/timezone/dayname"/>,251 <xsl:value-of select="start/timezone/longdate"/>252 <xsl:text> </xsl:text>253 <span class="time"><xsl:value-of select="start/timezone/time"/></span>254 </xsl:otherwise>255 </xsl:choose>256 </td>257 <td>258 --259 <strong><xsl:value-of select="start/timezone/id"/></strong>260 </td>261 </tr>262 <tr>263 <td>264 <strong>End:</strong>265 </td>266 <td>267 <xsl:choose>268 <xsl:when test="end/timezone/islocal='true'">269 <xsl:value-of select="end/dayname"/>,270 <xsl:value-of select="end/longdate"/>271 <xsl:text> </xsl:text>272 <span class="time"><xsl:value-of select="end/time"/></span>273 </xsl:when>274 <xsl:otherwise>275 <xsl:value-of select="end/timezone/dayname"/>,276 <xsl:value-of select="end/timezone/longdate"/>277 <xsl:text> </xsl:text>278 <span class="time"><xsl:value-of select="end/timezone/time"/></span>279 </xsl:otherwise>280 </xsl:choose>281 </td>282 <td>283 --284 <strong><xsl:value-of select="end/timezone/id"/></strong>285 </td>286 </tr>287 </table>288 </xsl:when>289 <xsl:otherwise>290 <!-- otherwise, timezones are the same: display as a single line -->291 <xsl:value-of select="start/timezone/dayname"/>, <xsl:value-of select="start/timezone/longdate"/><xsl:text> </xsl:text>292 <xsl:if test="start/allday = 'false'">293 <span class="time"><xsl:value-of select="start/timezone/time"/></span>294 </xsl:if>295 <xsl:if test="(end/timezone/longdate != start/timezone/longdate) or296 ((end/timezone/longdate = start/timezone/longdate) and (end/timezone/time != start/timezone/time))"> - </xsl:if>297 <xsl:if test="end/timezone/longdate != start/timezone/longdate">298 <xsl:value-of select="substring(end/timezone/dayname,1,3)"/>, <xsl:value-of select="end/timezone/longdate"/><xsl:text> </xsl:text>299 </xsl:if>300 <xsl:choose>301 <xsl:when test="start/allday = 'true'">302 <span class="time"><em>(all day)</em></span>303 </xsl:when>304 <xsl:when test="end/timezone/longdate != start/timezone/longdate">305 <span class="time"><xsl:value-of select="end/timezone/time"/></span>306 </xsl:when>307 <xsl:when test="end/timezone/time != start/timezone/time">308 <span class="time"><xsl:value-of select="end/timezone/time"/></span>309 </xsl:when>310 </xsl:choose>311 <xsl:text> </xsl:text>312 --313 <strong><xsl:value-of select="start/timezone/id"/></strong>314 </xsl:otherwise>315 </xsl:choose>316 </xsl:if>317 </td>318 <th class="icalIcon" rowspan="2">319 <div id="eventIcons">320 <xsl:if test="recurrenceId = ''">321 <!-- hide this for a 3.3.1 bug: can't add a reference to a recurring event at this time -->322 <a href="{$privateCal}/event/addEventRef.do?subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}" title="Add event to MyCalendar" target="myCalendar">323 <img class="addref" src="{$resourcesRoot}/resources/add2mycal-icon.gif" width="20" height="26" border="0" alt="Add event to MyCalendar"/>324 add to my calendar</a>325 </xsl:if>326 <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/>327 <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">328 <img src="{$resourcesRoot}/resources/std-ical_icon.gif" width="20" height="26" border="0" alt="Download this event"/>329 download</a>330 </div>331 </th>332 </tr>333 <tr>334 <td class="fieldname">Where:</td>335 <td class="fieldval">336 <xsl:choose>337 <xsl:when test="location/link=''">338 <xsl:value-of select="location/address"/>339 </xsl:when>340 <xsl:otherwise>341 <xsl:variable name="locationLink" select="location/link"/>342 <a href="{$locationLink}">343 <xsl:value-of select="location/address"/>344 </a>345 </xsl:otherwise>346 </xsl:choose>347 <xsl:if test="location/subaddress!=''">348 <br/><xsl:value-of select="location/subaddress"/>349 </xsl:if>350 </td>351 </tr>352 <tr>353 <td class="fieldname">Description:</td>354 <td colspan="2" class="fieldval description">355 <xsl:call-template name="replace">356 <xsl:with-param name="string" select="description"/>357 <xsl:with-param name="pattern" select="'
'"/>358 <xsl:with-param name="replacement"><br/></xsl:with-param>359 </xsl:call-template>360 </td>361 </tr>362 <xsl:if test="status !='' and status != 'CONFIRMED'">363 <tr>364 <td class="fieldname">Status:</td>365 <td class="fieldval">366 <xsl:value-of select="status"/>367 </td>368 </tr>369 </xsl:if>370 <xsl:if test="cost!=''">371 <tr>372 <td class="fieldname">Cost:</td>373 <td colspan="2" class="fieldval"><xsl:value-of select="cost"/></td>374 </tr>375 </xsl:if>376 <xsl:if test="link != ''">377 <tr>378 <td class="fieldname">See:</td>379 <td colspan="2" class="fieldval">380 <xsl:variable name="link" select="link"/>381 <a href="{$link}"><xsl:value-of select="link"/></a>382 </td>383 </tr>384 </xsl:if>385 <xsl:if test="contact/name!='none'">386 <tr>387 <td class="fieldname">Contact:</td>388 <td colspan="2" class="fieldval">389 <xsl:choose>390 <xsl:when test="contact/link=''">391 <xsl:value-of select="contact/name"/>392 </xsl:when>393 <xsl:otherwise>394 <xsl:variable name="sponsorLink" select="contact/link"/>395 <a href="{$sponsorLink}">396 <xsl:value-of select="contact/name"/>397 </a>398 </xsl:otherwise>399 </xsl:choose>400 <xsl:if test="contact/phone!=''">401 <br /><xsl:value-of select="contact/phone"/>402 </xsl:if>403 <!-- If you want to display email addresses, uncomment the404 following 8 lines. -->405 <!-- <xsl:if test="contact/email!=''">406 <br />407 <xsl:variable name="email" select="contact/email"/>408 <xsl:variable name="subject" select="summary"/>409 <a href="mailto:{$email}&subject={$subject}">410 <xsl:value-of select="contact/email"/>411 </a>412 </xsl:if> -->413 </td>414 </tr>415 </xsl:if>416 <xsl:if test="calendar/path!=''">417 <tr>418 <td class="fieldname">Calendar:</td>419 <td class="fieldval">420 <xsl:variable name="calUrl" select="calendar/encodedPath"/>421 <a href="{$setSelection}&calUrl={$calUrl}">422 <xsl:value-of select="calendar/name"/>423 </a>424 </td>425 </tr>426 </xsl:if>427 <xsl:if test="categories/category">428 <tr>429 <td class="fieldname">Categories:</td>430 <td class="fieldval">431 <xsl:for-each select="categories/category">432 <xsl:value-of select="word"/><xsl:if test="position() != last()">, </xsl:if>433 </xsl:for-each>434 </td>435 </tr>436 </xsl:if>437 <xsl:if test="comments/comment">438 <tr>439 <td class="fieldname">Comments:</td>440 <td class="fieldval comments">441 <xsl:for-each select="comments/comment">442 <p><xsl:value-of select="value"/></p>443 </xsl:for-each>444 </td>445 </tr>446 </xsl:if>447 </table>448 </xsl:template>449 450 <!--+++++++++++++++ System Stats ++++++++++++++++++++-->451 <xsl:template name="stats">452 <div id="stats">453 <h2>System Statistics</h2>454 455 <p>456 Stats collection:457 </p>458 <ul>459 <li>460 <a href="{$stats}&enable=yes">enable</a> |461 <a href="{$stats}&disable=yes">disable</a>462 </li>463 <li><a href="{$stats}&fetch=yes">fetch statistics</a></li>464 <li><a href="{$stats}&dump=yes">dump stats to log</a></li>465 </ul>466 <table id="statsTable" cellpadding="0">467 <xsl:for-each select="/bedework/sysStats/*">468 <xsl:choose>469 <xsl:when test="name(.) = 'header'">470 <tr>471 <th colspan="2">472 <xsl:value-of select="."/>473 </th>474 </tr>475 </xsl:when>476 <xsl:otherwise>477 <tr>478 <td class="label">479 <xsl:value-of select="label"/>480 </td>481 <td class="value">482 <xsl:value-of select="value"/>483 </td>484 </tr>485 </xsl:otherwise>486 </xsl:choose>487 </xsl:for-each>488 </table>489 </div>490 </xsl:template>491 492 <!--==== UTILITY TEMPLATES ====-->493 494 <!-- search and replace template taken from495 http://www.biglist.com/lists/xsl-list/archives/200211/msg00337.html -->496 <xsl:template name="replace">497 <xsl:param name="string" select="''"/>498 <xsl:param name="pattern" select="''"/>499 <xsl:param name="replacement" select="''"/>500 <xsl:choose>501 <xsl:when test="$pattern != '' and $string != '' and contains($string, $pattern)">502 <xsl:value-of select="substring-before($string, $pattern)"/>503 <xsl:copy-of select="$replacement"/>504 <xsl:call-template name="replace">505 <xsl:with-param name="string" select="substring-after($string, $pattern)"/>506 <xsl:with-param name="pattern" select="$pattern"/>507 <xsl:with-param name="replacement" select="$replacement"/>508 </xsl:call-template>509 </xsl:when>510 <xsl:otherwise>511 <xsl:value-of select="$string"/>512 </xsl:otherwise>513 </xsl:choose>514 </xsl:template>515 164 </xsl:stylesheet>
