Changeset 2493
- Timestamp:
- 12/17/09 04:09:51
- Files:
-
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/bwclassic.xsl (modified) (1 diff)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/bwclassicTheme/javascript/bedework.js (modified) (3 diffs)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/default.xsl (modified) (4 diffs)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/calendarList.xsl (added)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/css/fixed.css (modified) (4 diffs)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/event.xsl (modified) (3 diffs)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/eventList.xsl (moved) (moved from trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/eventslist.xsl) (2 diffs)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/featuredEvents.xsl (modified) (1 diff)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/head.xsl (modified) (3 diffs)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/header.xsl (modified) (2 diffs)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/javascript/bedework.js (modified) (3 diffs)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/javascript/ifs-calendar.js (modified) (6 diffs)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/leftColumn.xsl (added)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/navigation.xsl (added)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/ongoing.xsl (modified) (2 diffs)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/search.xsl (added)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/template.xsl (modified) (1 diff)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/themeSettings.xsl (modified) (2 diffs)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/themeUtil.xsl (added)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/year.xsl (added)
- trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/strings.xsl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/bwclassic.xsl
r2479 r2493 870 870 <xsl:copy-of select="$bwStr-LsEv-Categories"/> 871 871 <xsl:for-each select="categories/category"> 872 <xsl:value-of select=" word"/><xsl:if test="position() != last()">, </xsl:if>872 <xsl:value-of select="value"/><xsl:if test="position() != last()">, </xsl:if> 873 873 </xsl:for-each> 874 874 </xsl:if> trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/bwclassicTheme/javascript/bedework.js
r2450 r2493 1 /* Dojo is deprecated; jQuery is in use.2 dojo.require("dojo.event.*");3 dojo.require("dojo.widget.*");4 dojo.require("dojo.widget.FloatingPane");5 dojo.require("dojo.widget.DatePicker");*/6 7 1 function changeClass(id, newClass) { 8 2 identity = document.getElementById(id); 9 3 identity.className=newClass; 10 4 } 11 /*function launchExportWidget(formId,action,name,calPath) {12 var exportWidget = dojo.widget.byId('bwCalendarExportWidget');13 exportWidget.show();14 var formObj = document.getElementById(formId);15 formObj.calPath.value = calPath;16 formObj.contentName.value = name + '.ics';17 document.getElementById('bwCalendarExportWidgetCalName').innerHTML = name;18 }*/19 5 function fillExportFields(formObj) { 20 6 var startDate = new Date(); 21 //startDate = dojo.widget.byId("bwExportCalendarWidgetStartDate").getDate();22 7 startDate = $("bwExportCalendarWidgetStartDate").datepicker("getDate"); 23 8 formObj["eventStartDate.year"].value = startDate.getFullYear(); … … 31 16 formObj["eventEndDate.day"].value = endDate.getDate(); 32 17 } 33 /*function hideWidget(id) {34 var widget = dojo.widget.byId(id);35 widget.hide();36 }*/37 18 function showLink(urlString) { 38 19 var linkWindow = window.open("", "linkWindow", "width=1100,height=100,scrollbars=yes,resizable=yes,alwaysRaised=yes,menubar=no,toolbar=no"); … … 46 27 linkWindow.focus(); 47 28 } 48 /*function init() {49 var widget = dojo.widget.byId("bwCalendarExportWidget");50 }51 52 dojo.addOnLoad(init);53 */trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/default.xsl
r2488 r2493 62 62 <xsl:include href="./defaultTheme/themeSettings.xsl" /> 63 63 64 <!-- theme utility functions --> 65 <xsl:include href="./defaultTheme/themeUtil.xsl" /> 66 64 67 <!-- Page subsections --> 65 68 <xsl:include href="./defaultTheme/head.xsl" /> 66 69 <xsl:include href="./defaultTheme/header.xsl" /> 67 <xsl:include href="./defaultTheme/footer.xsl" /> 68 <xsl:include href="./defaultTheme/eventslist.xsl" /> 70 <xsl:include href="./defaultTheme/leftColumn.xsl" /> 71 <xsl:include href="./defaultTheme/views.xsl" /> 72 <xsl:include href="./defaultTheme/featuredEvents.xsl"/> 73 <xsl:include href="./defaultTheme/navigation.xsl" /> 74 <xsl:include href="./defaultTheme/eventList.xsl" /> 69 75 <xsl:include href="./defaultTheme/event.xsl" /> 70 <xsl:include href="./defaultTheme/views.xsl" /> 76 <xsl:include href="./defaultTheme/year.xsl" /> 77 <xsl:include href="./defaultTheme/calendarList.xsl" /> 78 <xsl:include href="./defaultTheme/search.xsl"/> 71 79 <xsl:include href="./defaultTheme/ongoing.xsl" /> 72 <xsl:include href="./defaultTheme/featuredEvents.xsl"/>73 80 <xsl:include href="./defaultTheme/groups.xsl"/> 74 81 <xsl:include href="./defaultTheme/systemStats.xsl"/> 82 <xsl:include href="./defaultTheme/footer.xsl" /> 75 83 76 84 <!-- MAIN TEMPLATE --> … … 80 88 <body> 81 89 <div id="wrap"> 90 <!-- HEADER BAR and TABS --> 82 91 <div id="header"> 83 92 <xsl:call-template name="titleBar" /> 84 93 <xsl:call-template name="tabs" /> 85 94 </div> 95 <!-- ERROR MESSAGES --> 86 96 <xsl:if test="/bedework/error"> 87 97 <div id="errors"> … … 89 99 </div> 90 100 </xsl:if> 101 91 102 <div id="content"> 92 <xsl:choose> 93 <!-- Set up the layouts for each type of display --> 103 <div id="contentSection"> 94 104 95 <!-- Layout for: Single Event Display--> 96 <xsl:when test="/bedework/page = 'event'"> 97 <div id="contentSection"> 98 <xsl:call-template name="display-left-column" /> 99 <div class="double_center_column" id="center_column"> 105 <!-- LEFT COLUMN: calendar widget, views, and links --> 106 <xsl:call-template name="leftColumn" /> 107 108 <!-- FEATURED EVENTS, if enabled --> 109 <xsl:if test="$featuredEventsEnabled = 'true'"> 110 <xsl:call-template name="featuredEvents"/> 111 </xsl:if> 112 113 <!-- MAIN CONTENT: event listings, single events, calendar lists, search results --> 114 <div id="center_column"> 115 <xsl:attribute name="class"> 116 <xsl:choose> 117 <xsl:when test="$ongoingEvents = 'true'">center_column</xsl:when> 118 <xsl:otherwise>double_center_column</xsl:otherwise> 119 </xsl:choose> 120 </xsl:attribute> 121 122 123 <!-- branch on content, as defined by /bedework/page --> 124 <xsl:choose> 125 <!-- day, week, month, year event listings --> 126 <xsl:when test="/bedework/page='eventscalendar'"> 100 127 <div class="secondaryColHeader"> 101 < h3>Event Information</h3>128 <xsl:call-template name="navigation" /> 102 129 </div> 103 <xsl:apply-templates select="/bedework/event" /> 104 <div class="right_column" id="right_column"></div> 105 </div> 106 </div> 107 </xsl:when> 108 109 <!-- Layout for: Calendar List --> 110 <xsl:when test="/bedework/page='calendarList'"> 111 <div id="contentSection"> 112 <div class="secondaryColHeader"> 113 <h3>All Calendars</h3> 114 </div> 115 <xsl:apply-templates select="/bedework/calendars" /> 116 </div> 117 </xsl:when> 118 119 <!-- Layout for: Search Results --> 120 <xsl:when test="/bedework/page='searchResult'"> 121 <div id="contentSection"> 122 <xsl:call-template name="display-left-column" /> 123 </div> 124 <div class="double_center_column" id="right_column"> 125 </div> 126 <div class="double_center_column" id="center_column"> 127 <xsl:call-template name="searchResult" /> 128 <xsl:call-template name="advancedSearch" /> 129 </div> 130 </xsl:when> 131 132 <!-- Main calendar output --> 133 <xsl:when test="/bedework/page='eventscalendar'"> 134 <xsl:choose> 135 <!-- Layout for Current Day --> 136 <!-- Here we expose the Featured Events --> 137 <xsl:when test="/bedework/periodname = 'Today' or (/bedework/periodname = 'Day' and (/bedework/now/date = /bedework/currentdate/date))"> 138 <div id="contentSection"> 139 <xsl:call-template name="jsDateSelectionCal" /> 140 <div id="feature"> 141 <!-- pulls in the first three images from the FeaturedEvent.xml document --> 142 <xsl:apply-templates select="document('defaultTheme/data/FeaturedEvent.xml')/featuredEvents/image[position() < 4]" mode="featuredEvents" /> 143 </div> 144 <div class="clear"> </div> 145 </div> 146 <div id="contentSection"> 147 <div class="left_column"> 148 <xsl:call-template name="display-side-bar" /> 149 </div> 150 <xsl:call-template name="groupsList" /> 151 152 <xsl:call-template name="display-center-column" /> 153 <div class="right_column" id="right_column"> 154 <xsl:call-template name="ongoingEventList" /> 155 </div> 156 </div> 130 <xsl:choose> 131 <xsl:when test="/bedework/periodname = 'Year'"> 132 <xsl:call-template name="yearView" /> 133 </xsl:when> 134 <xsl:otherwise> 135 <xsl:call-template name="eventList"/> 136 </xsl:otherwise> 137 </xsl:choose> 157 138 </xsl:when> 158 139 159 <!-- Layout for: Day, Week, and Month (list only) --> 160 <xsl:when test="/bedework/periodname != 'Year' "> 161 <div id="contentSection"> 162 <xsl:call-template name="display-left-column" /> 163 <xsl:call-template name="display-center-column" /> 164 <div class="right_column" id="right_column"> 165 <xsl:call-template name="ongoingEventList" /> 166 </div> 167 </div> 140 <!-- single event display --> 141 <xsl:when test="/bedework/page = 'event'"> 142 <xsl:apply-templates select="/bedework/event" mode="singleEvent"/> 168 143 </xsl:when> 169 144 170 <!-- Layout for: Year --> 171 <xsl:when 172 test="bedework/periodname = 'Year'"> 173 <div id="contentSection"> 174 <xsl:call-template name="display-left-column" /> 175 <div class="double_center_column" id="center_column"> 176 <div class="secondaryColHeader"> 177 <xsl:call-template name="navigation" /> 178 </div> 179 <xsl:call-template name="yearView" /> 180 </div> 181 <div class="right_column" id="right_column"></div> 182 </div> 145 <!-- list of calendar suite's subscriptions --> 146 <xsl:when test="/bedework/page='calendarList'"> 147 <xsl:apply-templates select="/bedework/calendars" /> 183 148 </xsl:when> 184 149 150 <!-- export calendar form --> 151 <xsl:when test="/bedework/page='displayCalendarForExport'"> 152 <xsl:apply-templates select="/bedework/currentCalendar" mode="export" /> 153 </xsl:when> 154 155 <!-- search result --> 156 <xsl:when test="/bedework/page='searchResult'"> 157 <xsl:call-template name="searchResult" /> 158 <xsl:call-template name="advancedSearch" /> 159 </xsl:when> 160 161 <!-- system statistics --> 162 <xsl:when test="/bedework/page='showSysStats'"> 163 <xsl:call-template name="stats" /> 164 </xsl:when> 165 166 <xsl:otherwise> 167 <xsl:copy-of select="$bwStr-Error"/> 168 <xsl:text> </xsl:text> 169 <xsl:value-of select="/bedework/page" /> 170 </xsl:otherwise> 171 185 172 </xsl:choose> 186 </xsl:when> 173 </div> 174 </div> 187 175 188 <!-- Layout for: System Stats --> 189 <xsl:when test="/bedework/page='showSysStats'"> 190 <xsl:call-template name="stats" /> 191 </xsl:when> 192 193 <!-- page for calendar export (can optionally be replaced by 194 a pop-up widget; see the calendars template) --> 195 <xsl:when test="/bedework/page='displayCalendarForExport'"> 196 <xsl:apply-templates select="/bedework/currentCalendar" mode="export" /> 197 </xsl:when> 198 199 <!-- Layout for: Catch all errors --> 200 <xsl:otherwise> 201 Error: <xsl:value-of select="/bedework/page" /> 202 </xsl:otherwise> 203 </xsl:choose> 176 <!-- ONGOING EVENTS, if enabled --> 177 <xsl:if test="$ongoingEvents = 'true'"> 178 <div class="right_column" id="right_column"> 179 <xsl:call-template name="ongoingEventList" /> 180 </div> 181 </xsl:if> 204 182 205 183 <div class="clear"> </div> 206 184 </div> 207 <!-- footer-->185 <!-- FOOTER --> 208 186 <xsl:call-template name="footer" /> 209 187 </div> … … 212 190 </html> 213 191 </xsl:template> 214 215 <!--======= Display Left Column ===========-->216 <xsl:template name="display-left-column">217 <div class="left_column">218 <xsl:call-template name="jsDateSelectionCal" />219 <div class="clear"> </div>220 <xsl:call-template name="display-side-bar" />221 </div>222 <xsl:call-template name="groupsList" />223 </xsl:template>224 225 <!--======= Display Center Column ===========-->226 <xsl:template name="display-center-column">227 <div class="center_column" id="center_column">228 <div class="secondaryColHeader">229 <xsl:call-template name="navigation" />230 </div>231 <xsl:call-template name="list-view">232 <xsl:with-param name="node" select="." />233 <xsl:with-param name="suite-name">Main</xsl:with-param>234 </xsl:call-template>235 </div>236 </xsl:template>237 238 <!--============= Display Side Bar ======-->239 <xsl:template name="display-side-bar">240 <xsl:call-template name="viewList" />241 <div class="sideBarContainer">242 <h4>FILTER BY GROUP/ ORG/ DEPT:</h4>243 <ul class="sideLinks">244 <li>245 <a href="#"246 onclick="javascript:toggleDiv('groupListDiv'); toggleDiv('right_column'); toggleDiv('center_column');">247 Group List248 </a>249 </li>250 </ul>251 <xsl:call-template name="display-events-calendar-info" />252 <xsl:call-template name="sideLinksList" />253 </div>254 </xsl:template>255 256 <!--============= Display Events Calendar Info ======-->257 <xsl:template name="display-events-calendar-info">258 <h4>EVENTS CALENDAR INFO:</h4>259 <ul class="sideLinks">260 <li>261 <a href="/caladmin">Manage Events</a>262 </li>263 <li>264 <a href="/eventsubmit?setappvar=confirmed(no)">265 Submit an Event266 </a>267 </li>268 <li>269 <a href="http://calendar.duke.edu/help">Help</a>270 </li>271 </ul>272 </xsl:template>273 274 <!-- JavaScript Array for Calendar (might be good to turn into JSON if more properties need to be passed in)-->275 <xsl:template name="jsonDataObject">276 <!-- Month to display (to be handed in to js, so it aligns with the events beeing shown) -->277 <xsl:variable name="displayMonthYear">278 <xsl:value-of select="substring(/bedework/currentdate/date,5,2)" />279 <xsl:text>/</xsl:text>280 <xsl:value-of select="substring(/bedework/currentdate/date,0,5)" />281 </xsl:variable>282 <xsl:variable name="rangeStartMo">283 <xsl:value-of select="substring(/bedework/firstday/date,5,2)" />284 </xsl:variable>285 <xsl:variable name="rangeStartDay">286 <xsl:value-of select="substring(/bedework/firstday/date,7,2)" />287 </xsl:variable>288 <xsl:variable name="rangeStartYear">289 <xsl:value-of select="substring(/bedework/firstday/date,1,4)" />290 </xsl:variable>291 <xsl:variable name="rangeEndMo">292 <xsl:value-of select="substring(/bedework/lastday/date,5,2)" />293 </xsl:variable>294 <xsl:variable name="rangeEndDay">295 <xsl:value-of select="substring(/bedework/lastday/date,7,2)" />296 </xsl:variable>297 <xsl:variable name="rangeEndYear">298 <xsl:value-of select="substring(/bedework/lastday/date,1,4)" />299 </xsl:variable>300 navcalendar = [ "<xsl:value-of select="$displayMonthYear" />", "<xsl:value-of select="$rangeStartMo" />", "<xsl:value-of select="$rangeStartDay" />", "<xsl:value-of select="$rangeStartYear" />", "<xsl:value-of select="$rangeEndMo" />", "<xsl:value-of select="$rangeEndDay" />", "<xsl:value-of select="$rangeEndYear" />", ];301 </xsl:template>302 303 <!-- Date Selection Cal -->304 <xsl:template name="jsDateSelectionCal">305 <div id="cal1" class="calContainer">306 <xsl:call-template name="dateSelectForm" />307 <p>308 To view the interactive calendar, please enable309 Javascript on your browser.310 </p>311 </div>312 </xsl:template>313 314 315 316 <!-- Side Links Navigation -->317 <xsl:template name="sideLinksList">318 <ul class="sideLinksExpand">319 <li>320 <h4>OTHER UNIVERSITY CALENDARS</h4>321 <span id="additionalUnivClicker">+</span>322 <ul id="additionalUnivSub"323 style="height:0px;overflow:hidden;">324 <li>325 <a href="http://dukehealth.org/events"326 target="_blank">327 DukeHealth.org Event Calendar328 </a>329 </li>330 <li>331 <a332 href="http://calendar.activedatax.com/ncstate/EventList.aspx"333 target="_blank">334 NC State Calendar335 </a>336 </li>337 <li>338 <a339 href="http://webevent.nccu.edu/CalendarNOW.aspx"340 target="_blank">341 NCCU Calendar342 </a>343 </li>344 <li>345 <a href="http://events.unc.edu/cal/"346 target="_blank">347 UNC Calendar348 </a>349 </li>350 </ul>351 </li>352 <li>353 <h4>OTHER LINKS</h4>354 <span id="additionalOptionsClicker">+</span>355 <ul id="additionalOptionsSub"356 style="height:0px;overflow:hidden">357 <li>358 <a href="http://www.durham-nc.com"359 target="_blank">360 Durham Visitor's Bureau Calendar361 </a>362 </li>363 <li>364 <a href="http://map.duke.edu" target="_blank">365 Duke Campus Map366 </a>367 </li>368 </ul>369 </li>370 </ul>371 </xsl:template>372 373 <!-- Date Navigation -->374 <xsl:template name="navigation">375 <!-- View Options -->376 <!-- There were a few hundred lines here of all sorts of complicated tests,377 if you ever need to regain different options based on combinations of date range / list vs calendar, etc.,378 review svn or a current version bedework xsl, either way it can probably be simplified a ton -->379 <xsl:if test="/bedework/periodname != 'Year'">380 <ul id="calDisplayOptions">381 <li>382 <xsl:choose>383 <xsl:when384 test="/bedework/appvar[key='summaryMode']/value='details'">385 <a386 href="{$setup}&setappvar=summaryMode(summary)"387 title="toggle summary/detailed view">388 Summary389 </a>390 </xsl:when>391 <xsl:otherwise>392 <a393 href="{$setup}&setappvar=summaryMode(details)"394 title="toggle summary/detailed view">395 Details396 </a>397 </xsl:otherwise>398 </xsl:choose>399 </li>400 </ul>401 <xsl:variable name="rssCurrDate"402 select="/bedework/currentdate/date" />403 <xsl:variable name="rssGroups">404 <xsl:choose>405 <xsl:when406 test="(/bedework/appvar[key = 'group']/value) = 'all' or not(/bedework/appvar[key = 'group']/value)">407 <xsl:text>(all)</xsl:text>408 </xsl:when>409 <xsl:otherwise>410 <xsl:variable name="rssCurrGroup"411 select="/bedework/appvar[key = 'group']/value" />412 <xsl:variable name="rssGroupTemplate">413 <xsl:text>(</xsl:text>414 <xsl:value-of select="$rssCurrGroup" />415 <xsl:text>)</xsl:text>416 </xsl:variable>417 <xsl:value-of select="$rssGroupTemplate" />418 </xsl:otherwise>419 </xsl:choose>420 </xsl:variable>421 422 <xsl:variable name="rssCategory">423 <xsl:choose>424 <xsl:when425 test="(/bedework/appvar[key = 'category']/value = 'all') or not(/bedework/appvar[key = 'category']/value)">426 <xsl:text>all</xsl:text>427 </xsl:when>428 <xsl:otherwise>429 <xsl:variable name="rssCurrCategory"430 select="/bedework/appvar[key = 'category']/value" />431 <xsl:variable name="rssCatTemplate">432 <xsl:text />433 <xsl:value-of select="$rssCurrCategory" />434 <xsl:text />435 </xsl:variable>436 <xsl:value-of select="$rssCatTemplate" />437 </xsl:otherwise>438 </xsl:choose>439 </xsl:variable>440 441 <xsl:variable name="rssViewType">442 <xsl:if test="(/bedework/periodname) = 'Day'">443 <xsl:text>dayView</xsl:text>444 </xsl:if>445 <xsl:if test="(/bedework/periodname) = 'Week'">446 <xsl:text>weekView</xsl:text>447 </xsl:if>448 <xsl:if test="(/bedework/periodname) = 'Month'">449 <xsl:text>monthView</xsl:text>450 </xsl:if>451 </xsl:variable>452 <a id="rssRequest" class="rss"453 href="/feed/calendar/{$rssViewType}/rss/{$rssGroups}/details/{$rssCategory}"454 title="RSS feed">455 <!-- &date={$rssCurrDate} -->456 <img src="{$resourcesRoot}/images/feed-icon-14x14.png"457 alt="RSS Feed Icon" />458 </a>459 <div id="rssPopUp" style="display:none;position:absolute">460 <!-- RSS Popup window -->461 <p id="rssClose"462 onclick="this.parentNode.style.display = 'none'">463 X - Close464 </p>465 <h5 style="padding: 6px;">RSS Feed Details</h5>466 <!-- setappvar=summaryMode(details){$rssGroups}skinName=rss{$rssCategory}viewType={$rssViewType} -->467 <ul style="padding: 6px;">468 <li style="border-bottom: solid 1px #CCC;">469 Time Period: Current470 <xsl:value-of select="/bedework/periodname" />471 </li>472 <li style="border-bottom: solid 1px #CCC;">473 Group:474 <span id="rssDetailGroup">All</span>475 </li>476 <li style="border-bottom: solid 1px #CCC;">477 Calendar Categories:478 <span id="rssDetailCategory">All</span>479 </li>480 </ul>481 <p style="padding: 6px;">482 To subscribe to an RSS feed of your current calendar483 view, copy and paste the entire URL below into your484 preferred RSS reader.485 </p>486 <p style="padding: 6px;">487 <strong>Your RSS URL:</strong>488 </p>489 <input id="rssValue" size="35" type="text" value="" />490 <ul style="padding: 6px;">491 <li>492 <a href="/feed/list/30">493 Click here for 30-day feed of events494 </a>495 </li>496 <li>497 <a href="/feed/list/60">498 Click here for 60-day feed of events499 </a>500 </li>501 <li>502 <a href="/feed/list/90">503 Click here for 90-day feed of events504 </a>505 </li>506 </ul>507 </div>508 </xsl:if>509 <a id="prevViewPeriod"510 href="{$setViewPeriod}&date={$prevdate}">511 «512 </a>513 <h3>514 <xsl:choose>515 <xsl:when test="/bedework/periodname='Year'">516 <xsl:value-of517 select="substring(/bedework/firstday/date,1,4)" />518 </xsl:when>519 <xsl:when test="/bedework/periodname='Month'">520 <xsl:value-of select="/bedework/firstday/monthname" />521 ,522 <xsl:value-of523 select="substring(/bedework/firstday/date,1,4)" />524 </xsl:when>525 <xsl:when test="/bedework/periodname='Week'">526 Week of527 <xsl:value-of528 select="substring-after(/bedework/firstday/longdate,', ')" />529 </xsl:when>530 <xsl:otherwise>531 <xsl:value-of select="/bedework/firstday/longdate" />532 </xsl:otherwise>533 </xsl:choose>534 </h3>535 <a id="nextViewPeriod"536 href="{$setViewPeriod}&date={$nextdate}">537 »538 </a>539 </xsl:template>540 <xsl:template name="searchBar">SEARCH BAR</xsl:template>541 542 <!--==== WEEK CALENDAR VIEW ====-->543 <xsl:template name="weekViewCal">544 <table id="monthCalendarTable">545 <tr>546 <xsl:for-each select="/bedework/daynames/val">547 <th class="dayHeading">548 <xsl:value-of select="." />549 </th>550 </xsl:for-each>551 </tr>552 <tr>553 <xsl:for-each554 select="/bedework/eventscalendar/year/month/week/day">555 <xsl:if test="filler='false'">556 <xsl:call-template557 name="display-month-calendar" />558 </xsl:if>559 </xsl:for-each>560 </tr>561 </table>562 </xsl:template>563 564 <!--==== MONTH CALENDAR VIEW ====-->565 <xsl:template name="monthView">566 <table id="monthCalendarTable">567 <tr>568 <xsl:for-each select="/bedework/daynames/val">569 <th class="dayHeading">570 <xsl:value-of select="." />571 </th>572 </xsl:for-each>573 </tr>574 <xsl:for-each575 select="/bedework/eventscalendar/year/month/week">576 <tr>577 <xsl:for-each select="day">578 <xsl:choose>579 <xsl:when test="filler='true'">580 <td class="filler"> </td>581 </xsl:when>582 <xsl:otherwise>583 <xsl:call-template584 name="display-month-calendar" />585 </xsl:otherwise>586 </xsl:choose>587 </xsl:for-each>588 </tr>589 </xsl:for-each>590 </table>591 </xsl:template>592 593 <!--== EVENTS IN THE CALENDAR GRID ==-->594 <xsl:template match="event" mode="calendarLayout">595 <xsl:param name="dayPos" />596 <xsl:variable name="subscriptionId" select="subscription/id" />597 <xsl:variable name="calPath" select="calendar/encodedPath" />598 <xsl:variable name="guid" select="guid" />599 <xsl:variable name="recurrenceId" select="recurrenceId" />600 <xsl:variable name="eventClass">601 <xsl:choose>602 <!-- Special styles for the month grid -->603 <xsl:when test="status='CANCELLED'">604 eventCancelled605 </xsl:when>606 <xsl:when test="status='TENTATIVE'">607 eventTentative608 </xsl:when>609 <!-- Default alternating colors for all standard events -->610 <xsl:when test="position() mod 2 = 1">611 eventLinkA612 </xsl:when>613 <xsl:otherwise>eventLinkB</xsl:otherwise>614 </xsl:choose>615 </xsl:variable>616 <!-- Subscription styles.617 These are set in the add/modify subscription forms in the admin client;618 if present, these override the background-color set by eventClass. The619 subscription styles should not be used for cancelled events (tentative is ok). -->620 <xsl:variable name="subscriptionClass">621 <xsl:if622 test="status != 'CANCELLED' and subscription/subStyle != '' and subscription/subStyle != 'default'">623 <xsl:value-of select="subscription/subStyle" />624 </xsl:if>625 </xsl:variable>626 <li>627 <a628 href="{$eventView}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"629 class="{$eventClass} {$subscriptionClass}">630 <xsl:if test="status='CANCELLED'">CANCELLED:</xsl:if>631 <xsl:choose>632 <xsl:when test="start/shortdate != ../shortdate">633 (cont)634 </xsl:when>635 <xsl:when test="start/allday = 'false'">636 <xsl:value-of select="start/time" />637 :638 </xsl:when>639 <xsl:otherwise>All day:</xsl:otherwise>640 </xsl:choose>641 <xsl:value-of select="summary" />642 <xsl:variable name="eventTipClass">643 <xsl:choose>644 <xsl:when test="$dayPos > 5">645 eventTipReverse646 </xsl:when>647 <xsl:otherwise>eventTip</xsl:otherwise>648 </xsl:choose>649 </xsl:variable>650 <span class="{$eventTipClass}">651 <xsl:if test="status='CANCELLED'">652 <span class="eventTipStatusCancelled">653 CANCELLED654 </span>655 </xsl:if>656 <xsl:if test="status='TENTATIVE'">657 <span class="eventTipStatusTentative">658 TENTATIVE659 </span>660 </xsl:if>661 <strong>662 <xsl:value-of select="summary" />663 </strong>664 <br />665 Time:666 <xsl:choose>667 <xsl:when test="start/allday = 'true'">668 All day669 </xsl:when>670 <xsl:otherwise>671 <xsl:if672 test="start/shortdate != ../shortdate">673 <xsl:value-of select="start/month" />674 /675 <xsl:value-of select="start/day" />676 <xsl:text> </xsl:text>677 </xsl:if>678 <xsl:value-of select="start/time" />679 <xsl:if680 test="(start/time != end/time) or (start/shortdate != end/shortdate)">681 -682 <xsl:if683 test="end/shortdate != ../shortdate">684 <xsl:value-of select="end/month" />685 /686 <xsl:value-of select="end/day" />687 <xsl:text> </xsl:text>688 </xsl:if>689 <xsl:value-of select="end/time" />690 </xsl:if>691 </xsl:otherwise>692 </xsl:choose>693 <br />694 <xsl:if test="location/address">695 Location:696 <xsl:value-of select="location/address" />697 <br />698 </xsl:if>699 Calendar:700 <xsl:value-of select="calendar/name" />701 </span>702 </a>703 </li>704 </xsl:template>705 706 707 <!--==== YEAR VIEW ====-->708 <xsl:template name="yearView">709 <div class="yearMonthRow">710 <xsl:apply-templates711 select="/bedework/eventscalendar/year/month[position() <= 4]" />712 </div>713 <div class="yearMonthRow">714 <xsl:apply-templates715 select="/bedework/eventscalendar/year/month[(position() > 4) and (position() <= 8)]" />716 </div>717 <div class="yearMonthRow">718 <xsl:apply-templates719 select="/bedework/eventscalendar/year/month[position() > 8]" />720 </div>721 </xsl:template>722 <!-- year view month tables -->723 <xsl:template match="month">724 <table class="yearViewMonthTable" cellspacing="0"725 cellpadding="0">726 <tr>727 <td colspan="7" class="monthName">728 <xsl:variable name="firstDayOfMonth"729 select="week/day/date" />730 <a731 href="{$setViewPeriod}&viewType=monthView&date={$firstDayOfMonth}">732 <xsl:value-of select="longname" />733 </a>734 </td>735 </tr>736 <tr>737 <!-- Uhh... skipping the week numbers738 <th> </th>739 -->740 <xsl:for-each select="/bedework/shortdaynames/val">741 <th>742 <xsl:value-of select="." />743 </th>744 </xsl:for-each>745 </tr>746 <xsl:for-each select="week">747 <tr>748 <!-- Uhh... skipping the week numbers749 <td class="weekCell">750 <xsl:variable name="firstDayOfWeek" select="day/date"/>751 752 <a href="{$setViewPeriod}&viewType=weekView&date={$firstDayOfWeek}">753 me<xsl:value-of select="value"/>754 </a>755 756 </td>-->757 <xsl:for-each select="day">758 <xsl:choose>759 <xsl:when test="filler='true'">760 <td class="filler"> </td>761 </xsl:when>762 <xsl:otherwise>763 <td>764 <xsl:if765 test="/bedework/now/date = date">766 <xsl:attribute name="class">today</xsl:attribute>767 </xsl:if>768 <xsl:variable name="dayDate"769 select="date" />770 <a771 href="{$setViewPeriod}&viewType=dayView&date={$dayDate}">772 <xsl:attribute name="class">today</xsl:attribute>773 <xsl:value-of select="value" />774 </a>775 </td>776 </xsl:otherwise>777 </xsl:choose>778 </xsl:for-each>779 </tr>780 </xsl:for-each>781 </table>782 </xsl:template>783 784 <!--==== CALENDARS ====-->785 <!-- list of available calendars -->786 <xsl:template match="calendars">787 <xsl:variable name="topLevelCalCount"788 select="count(calendar/calendar)" />789 <ul class="calendarTree">790 <li>791 <a class="breadcrumb" href="/cal/">792 « Return to Main Calendar793 </a>794 </li>795 <xsl:apply-templates select="calendar/calendar"796 mode="calTree" />797 </ul>798 </xsl:template>799 800 <xsl:template match="calendar" mode="calTree">801 <xsl:variable name="itemClass">802 <xsl:choose>803 <xsl:when test="calendarCollection='false'">804 folder805 </xsl:when>806 <xsl:otherwise>calendar</xsl:otherwise>807 </xsl:choose>808 </xsl:variable>809 <xsl:variable name="url" select="encodedPath" />810 <li class="{$itemClass}">811 <a href="{$setSelection}&calUrl={$url}"812 title="view calendar">813 <xsl:value-of select="name" />814 </a>815 <xsl:if test="calendarCollection='true'">816 <xsl:variable name="calPath" select="path" />817 <span class="exportCalLink">818 <a819 href="{$calendar-fetchForExport}&calPath={$calPath}"820 title="export calendar as iCal">821 <img822 src="{$resourcesRoot}/images/calIconExport-sm.gif"823 alt="export calendar" />824 </a>825 </span>826 </xsl:if>827 <xsl:if test="calendar">828 <ul>829 <xsl:apply-templates select="calendar"830 mode="calTree" />831 </ul>832 </xsl:if>833 </li>834 </xsl:template>835 <!-- calendar export page -->836 <xsl:template match="currentCalendar" mode="export">837 <h2 class="bwStatusConfirmed">Export Calendar</h2>838 <div id="export">839 <p>840 <strong>Calendar to export:</strong>841 </p>842 <div class="indent">843 Name:844 <strong>845 <em>846 <xsl:value-of select="name" />847 </em>848 </strong>849 <br />850 Path:851 <xsl:value-of select="path" />852 </div>853 <p>854 <strong>Event date limits:</strong>855 </p>856 <form name="exportCalendarForm" id="exportCalendarForm"857 action="{$export}" method="post">858 <input type="hidden" name="calPath">859 <xsl:attribute name="value">860 <xsl:value-of select="path" />861 </xsl:attribute>862 </input>863 <!-- fill these on submit -->864 <input type="hidden" name="eventStartDate.year"865 value="" />866 <input type="hidden" name="eventStartDate.month"867 value="" />868 <input type="hidden" name="eventStartDate.day" value="" />869 <input type="hidden" name="eventEndDate.year" value="" />870 <input type="hidden" name="eventEndDate.month" value="" />871 <input type="hidden" name="eventEndDate.day" value="" />872 <!-- static fields -->873 <input type="hidden" name="nocache" value="no" />874 <input type="hidden" name="skinName" value="ical" />875 <input type="hidden" name="contentType"876 value="text/calendar" />877 <input type="hidden" name="contentName">878 <xsl:attribute name="value"><xsl:value-of879 select="name" />.ics</xsl:attribute>880 </input>881 <!-- visible fields -->882 <input type="radio" name="dateLimits" value="active"883 checked="checked"884 onclick="changeClass('exportDateRange','invisible')" />885 today forward886 <input type="radio" name="dateLimits" value="none"887 onclick="changeClass('exportDateRange','invisible')" />888 all dates889 <input type="radio" name="dateLimits" value="limited"890 onclick="changeClass('exportDateRange','visible')" />891 date range892 <div id="exportDateRange" class="invisible">893 Start:894 <div dojoType="dropdowndatepicker"895 formatLength="medium" saveFormat="yyyyMMdd"896 id="bwExportCalendarWidgetStartDate">897 <xsl:text> </xsl:text>898 </div>899 Ends900 <div dojoType="dropdowndatepicker"901 formatLength="medium" saveFormat="yyyyMMdd"902 id="bwExportCalendarWidgetEndDate">903 <xsl:text> </xsl:text>904 </div>905 </div>906 <p>907 <input type="submit" value="export"908 class="bwWidgetSubmit" onclick="fillExportFields(this.form)" />909 </p>910 </form>911 </div>912 </xsl:template>913 914 <!--==== SEARCH RESULT ====-->915 <xsl:template name="searchResult">916 <div class="secondaryColHeader">917 <h3>Search Results</h3>918 </div>919 920 <!-- <xsl:if test="/bedework/searchResults/numPages > 1">921 <span class="resultPages">922 <xsl:variable name="curPage" select="/bedework/searchResults/curPage"/>923 <xsl:if test="/bedework/searchResults/curPage != 1">924 <xsl:variable name="prevPage" select="number($curPage) - 1"/>925 <a href="{$search-next}&pageNum={$prevPage}">«</a>926 </xsl:if>927 <xsl:text> </xsl:text>928 <xsl:call-template name="searchResultPageNav">929 <xsl:with-param name="page">930 <xsl:choose>931 <xsl:when test="number($curPage) - 10 < 1">1</xsl:when>932 <xsl:otherwise>933 <xsl:value-of select="number($curPage) - 6"/>934 </xsl:otherwise>935 </xsl:choose>936 </xsl:with-param>937 </xsl:call-template>938 <xsl:text> </xsl:text>939 <xsl:choose>940 <xsl:when test="$curPage != /bedework/searchResults/numPages">941 <xsl:variable name="nextPage" select="number($curPage) + 1"/>942 <a href="{$search-next}&pageNum={$nextPage}">»</a></xsl:when>943 <xsl:otherwise>944 <span class="hidden">«</span>945 </xsl:otherwise>946 </xsl:choose>947 </span>948 </xsl:if> -->949 950 <xsl:if test="/bedework/searchResults/curPage < 2">951 <span class="numReturnedResults">952 <xsl:value-of953 select="/bedework/searchResults/resultSize" />954 <xsl:text> result</xsl:text>955 <xsl:if956 test="/bedework/searchResults/resultSize != 1">957 s958 </xsl:if>959 <xsl:text> returned for: </xsl:text>960 <em>961 <xsl:value-of962 select="/bedework/searchResults/query" />963 </em>964 </span>965 </xsl:if>966 <xsl:if test="/bedework/searchResults/searchResult">967 <table id="searchTable" cellpadding="0" cellspacing="0"968 width="100%">969 <tr>970 <th class="search_relevance">Rank</th>971 <th class="search_date">Date</th>972 <th class="search_summary">Summary</th>973 <th class="search_location">Location</th>974 </tr>975 <xsl:for-each976 select="/bedework/searchResults/searchResult[not(event/categories/category/value = 'Local')]">977 <xsl:if test="event/summary">978 <xsl:variable name="subscriptionId"979 select="event/subscription/id" />980 <xsl:variable name="calPath"981 select="event/calendar/encodedPath" />982 <xsl:variable name="guid" select="event/guid" />983 <xsl:variable name="recurrenceId"984 select="event/recurrenceId" />985 <tr>986 <td class="search_relevance">987 <xsl:choose>988 <xsl:when989 test="contains(score,'E')">990 1%991 </xsl:when>992 <xsl:otherwise>993 <xsl:value-of994 select="ceiling(number(score)*100)" />995 %996 </xsl:otherwise>997 </xsl:choose>998 </td>999 <td class="search_date">1000 <xsl:value-of1001 select="event/start/shortdate" />1002 <xsl:text> </xsl:text>1003 </td>1004 <td class="search_summary">1005 <a1006 href="{$eventView}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}">1007 <xsl:value-of1008 select="event/summary" />1009 </a>1010 </td>1011 <td class="search_location">1012 <xsl:value-of1013 select="event/location/address" />1014 </td>1015 </tr>1016 </xsl:if>1017 </xsl:for-each>1018 </table>1019 </xsl:if>1020 <xsl:if test="/bedework/searchResults/numPages > 1">1021 <span class="resultPages" id="resultsBottom">1022 Page(s):1023 <xsl:variable name="curPage"1024 select="/bedework/searchResults/curPage" />1025 <xsl:if test="/bedework/searchResults/curPage != 1">1026 <xsl:variable name="prevPage"1027 select="number($curPage) - 1" />1028 <a href="{$search-next}&pageNum={$prevPage}">1029 «1030 </a>1031 </xsl:if>1032 <xsl:text> </xsl:text>1033 <xsl:call-template name="searchResultPageNav">1034 <xsl:with-param name="page">1035 <xsl:choose>1036 <xsl:when1037 test="number($curPage) - 10 < 1">1038 11039 </xsl:when>1040 <xsl:otherwise>1041 <xsl:value-of1042 select="number($curPage) - 6" />1043 </xsl:otherwise>1044 </xsl:choose>1045 </xsl:with-param>1046 </xsl:call-template>1047 <xsl:text> </xsl:text>1048 <xsl:choose>1049 <xsl:when1050 test="$curPage != /bedework/searchResults/numPages">1051 <xsl:variable name="nextPage"1052 select="number($curPage) + 1" />1053 <a1054 href="{$search-next}&pageNum={$nextPage}">1055 »1056 </a>1057 </xsl:when>1058 <xsl:otherwise>1059 <span class="hidden">«</span>1060 <!-- occupy the space to keep the navigation from moving around -->1061 </xsl:otherwise>1062 </xsl:choose>1063 </span>1064 </xsl:if>1065 </xsl:template>1066 1067 <xsl:template name="advancedSearch">1068 <div id="advSearch">1069 <h3>Advanced Search</h3>1070 <form id="advSearchForm" name="searchForm"1071 onsubmit="return initCat()" method="post" action="{$search}">1072 Search:1073 <input type="text" name="query" size="40" value="" />1074 <!-- <xsl:attribute name="value">1075 <xsl:value-of select="/bedework/searchResults/query"/>1076 </xsl:attribute>1077 </input>-->1078 <br />1079 <label>Limit by:</label>1080 <br />1081 <xsl:choose>1082 <xsl:when1083 test="/bedework/searchResults/searchLimits = 'beforeToday'">1084 <input type="radio" name="searchLimits"1085 value="fromToday" />1086 Today forward1087 <br />1088 <input type="radio" name="searchLimits"1089 value="beforeToday" checked="checked" />1090 Past dates1091 <br />1092 <input type="radio" name="searchLimits"1093 value="none" />1094 All dates1095 <br />1096 </xsl:when>1097 <xsl:when1098 test="/bedework/searchResults/searchLimits = 'none'">1099 <input type="radio" name="searchLimits"1100 value="fromToday" />1101 Today forward1102 <br />1103 <input type="radio" name="searchLimits"1104 value="beforeToday" />1105 Past dates1106 <br />1107 <input type="radio" name="searchLimits"1108 value="none" checked="checked" />1109 All dates1110 <br />1111 </xsl:when>1112 <xsl:otherwise>1113 <input type="radio" name="searchLimits"1114 value="fromToday" checked="checked" />1115 Today forward1116 <br />1117 <input type="radio" name="searchLimits"1118 value="beforeToday" />1119 Past dates1120 <br />1121 <input type="radio" name="searchLimits"1122 value="none" />1123 All dates1124 <br />1125 </xsl:otherwise>1126 </xsl:choose>1127 1128 <input type="submit" name="submit" value="Search" />1129 1130 <div id="searchCats">1131 <h4>Select Categories to Search (Optional)</h4>1132 <p>1133 A search term is not required if at least one1134 category is selected.1135 </p>1136 <xsl:variable name="catCount"1137 select="count(/bedework/categories/category)" />1138 <table>1139 <tr>1140 <td>1141 <ul>1142 <xsl:for-each1143 select="/bedework/categories/category[(position() <= ceiling($catCount div 2)) and (keyword != 'Local') and (creator != 'agrp_public-user') and (keyword != 'Main') and (keyword != 'Student') and (keyword != 'calCrossPublish')]">1144 <xsl:variable name="currId"1145 select="keyword" />1146 <li>1147 <p>1148 <input type="checkbox"1149 name="categoryKey" value="{$currId}" />1150 <xsl:value-of1151 select="keyword" />1152 </p>1153 </li>1154 </xsl:for-each>1155 </ul>1156 </td>1157 <td>1158 <ul>1159 <xsl:for-each1160 select="/bedework/categories/category[(position() > ceiling($catCount div 2)) and (keyword != 'Local') and (creator != 'agrp_public-user') and (keyword != 'Main') and (keyword != 'Student') and (keyword != 'calCrossPublish')]">1161 <xsl:variable name="currId2"1162 select="keyword" />1163 <li>1164 <p>1165 <input type="checkbox"1166 name="categoryKey" value="{$currId2}" />1167 <xsl:value-of1168 select="keyword" />1169 </p>1170 </li>1171 </xsl:for-each>1172 </ul>1173 </td>1174 </tr>1175 </table>1176 </div>1177 <input type="submit" name="submit" value="Search" />1178 </form>1179 </div>1180 </xsl:template>1181 1182 <xsl:template name="searchResultPageNav">1183 <xsl:param name="page">1</xsl:param>1184 <xsl:variable name="curPage"1185 select="/bedework/searchResults/curPage" />1186 <xsl:variable name="numPages"1187 select="/bedework/searchResults/numPages" />1188 <xsl:variable name="endPage">1189 <xsl:choose>1190 <xsl:when1191 test="number($curPage) + 6 > number($numPages)">1192 <xsl:value-of select="$numPages" />1193 </xsl:when>1194 <xsl:otherwise>1195 <xsl:value-of select="number($curPage) + 6" />1196 </xsl:otherwise>1197 </xsl:choose>1198 </xsl:variable>1199 <xsl:choose>1200 <xsl:when test="$page = $curPage">1201 <span class="current">1202 <xsl:value-of select="$page" />1203 </span>1204 </xsl:when>1205 <xsl:otherwise>1206 <a href="{$search-next}&pageNum={$page}">1207 <xsl:value-of select="$page" />1208 </a>1209 </xsl:otherwise>1210 </xsl:choose>1211 <xsl:text> </xsl:text>1212 <xsl:if test="$page < $endPage">1213 <xsl:call-template name="searchResultPageNav">1214 <xsl:with-param name="page" select="number($page)+1" />1215 </xsl:call-template>1216 </xsl:if>1217 </xsl:template>1218 1219 <!--==== Display Month Calendar ====-->1220 <xsl:template name="display-month-calendar">1221 <xsl:variable name="dayPos" select="position()" />1222 <td>1223 <xsl:if test="/bedework/now/date = date">1224 <xsl:attribute name="class">today</xsl:attribute>1225 </xsl:if>1226 <xsl:variable name="dayDate" select="date" />1227 <a1228 href="{$setViewPeriod}&viewType=dayView&date={$dayDate}"1229 class="dayLink">1230 <xsl:value-of select="value" />1231 </a>1232 <xsl:if test="event">1233 <ul>1234 <xsl:apply-templates select="event"1235 mode="calendarLayout">1236 <xsl:with-param name="dayPos" select="$dayPos" />1237 </xsl:apply-templates>1238 </ul>1239 </xsl:if>1240 </td>1241 </xsl:template>1242 1243 192 </xsl:stylesheet> trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/css/fixed.css
r2480 r2493 55 55 position: relative; 56 56 height: 90px; 57 cursor: pointer;58 57 background: #014B94 url("../images/bedeworkLogo3p6.gif") top left no-repeat; 59 58 color: white; 59 } 60 div#title-logoArea { 61 position: absolute; 62 top: 0; 63 left: 0; 64 height: 90px; 65 width: 330px; 66 cursor: pointer; 60 67 } 61 68 div#title-text { … … 295 302 display: inline; 296 303 } 304 a.linkBack:link, 305 a.linkBack:active, 306 a.linkBack:visited { 307 display: block; 308 float: right; 309 margin: 1em 1em 0 0; 310 text-decoration: none; 311 color: #ddd; 312 background-color: transparent; 313 } 314 a.linkBack:hover { 315 display: block; 316 float: right; 317 margin: 1em 1em 0 0; 318 text-decoration: none; 319 color: #fff; 320 background-color: transparent; 321 } 297 322 .groupHeader { 298 323 padding: 0 12px; … … 477 502 background: #ECECEC; 478 503 width: 8em; 504 white-space: nowrap; 479 505 } 480 506 table.eventList tr td.description a { … … 483 509 table.eventList tr td.icons { 484 510 width: 5em; 511 } 512 table.eventList .icons { 513 float: right; 514 } 515 table.eventList .icons a { 516 padding: 2px; 517 display: inline; 485 518 } 486 519 table.eventList tr td.fillrow { trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/event.xsl
r2476 r2493 5 5 6 6 <!--==== SINGLE EVENT ====--> 7 <xsl:template match="event" >7 <xsl:template match="event" mode="singleEvent"> 8 8 <xsl:variable name="calPath" select="calendar/encodedPath"/> 9 9 <xsl:variable name="guid" select="guid"/> … … 18 18 </xsl:variable> 19 19 20 <div class="secondaryColHeader"> 21 <a class="linkBack" href="{$setup}"><xsl:copy-of select="$bwStr-HdBr-BackLink"/></a> 22 <h3> 23 <xsl:copy-of select="$bwStr-HdBr-EventInformation"/> 24 </h3> 25 </div> 26 20 27 <div class="singleEvent"> 21 28 … … 27 34 <xsl:variable name="gDetails" select="summary" /> 28 35 <a class="eventIcons" href="http://www.google.com/calendar/event?action=TEMPLATE&dates={$gStartdate}/{$gEnddate}&text={$gText}&details={$gDetails}&location={$gLocation}" title="{$bwStr-SgEv-AddToGoogleCalendar}"> 29 <img title=" Add to Google Calendar" src="{$resourcesRoot}/images/gcal.gif" alt="{$bwStr-SgEv-AddToGoogleCalendar}" />36 <img title="{$bwStr-SgEv-AddToGoogleCalendar}" src="{$resourcesRoot}/images/gcal.gif" alt="{$bwStr-SgEv-AddToGoogleCalendar}" /> 30 37 </a> 31 38 <xsl:choose> 32 39 <xsl:when test="string-length($recurrenceId)"> 33 <a class="eventIcons" href="http://www.facebook.com/share.php?u={$feederPrefix}/event/cal/html/Public/{$recurrenceId}/{$guidEsc}" title="{$bwStr-SgEv-AddTo GoogleCalendar}">34 <img title=" Add to Facebook" src="{$resourcesRoot}/images/Facebook_Badge.gif" alt="{$bwStr-SgEv-AddToFacebook}" />40 <a class="eventIcons" href="http://www.facebook.com/share.php?u={$feederPrefix}/event/cal/html/Public/{$recurrenceId}/{$guidEsc}" title="{$bwStr-SgEv-AddToFacebook}"> 41 <img title="{$bwStr-SgEv-AddToFacebook}" src="{$resourcesRoot}/images/Facebook_Badge.gif" alt="{$bwStr-SgEv-AddToFacebook}" /> 35 42 </a> 36 43 </xsl:when> 37 44 <xsl:otherwise> 38 <a class="eventIcons" href="http://www.facebook.com/share.php?u={$feederPrefix}/event/cal/html/Public/0/{$guidEsc}" title="{$bwStr-SgEv-AddTo GoogleCalendar}">39 <img title=" Add to Facebook" src="{$resourcesRoot}/images/Facebook_Badge.gif" alt="{$bwStr-SgEv-AddToGoogleCalendar}" />45 <a class="eventIcons" href="http://www.facebook.com/share.php?u={$feederPrefix}/event/cal/html/Public/0/{$guidEsc}" title="{$bwStr-SgEv-AddToFacebook}"> 46 <img title="{$bwStr-SgEv-AddToFacebook}" src="{$resourcesRoot}/images/Facebook_Badge.gif" alt="{$bwStr-SgEv-AddToFacebook}" /> 40 47 </a> 41 48 </xsl:otherwise> 42 49 </xsl:choose> 50 <a class="eventIcons" href="{$privateCal}/event/addEventRef.do?calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}" title="{$bwStr-SgEv-AddEventToMyCalendar}" target="myCalendar"> 51 <img class="addref" src="{$resourcesRoot}/images/add2mycal-icon.gif" alt="{$bwStr-SgEv-AddEventToMyCalendar}"/> 52 </a> 43 53 <xsl:variable name="eventIcalName" select="concat($guid,'.ics')" /> 44 54 <a class="eventIcons" href="{$export}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}&nocache=no&contentName={$eventIcalName}" title="{$bwStr-SgEv-DownloadEvent}"> trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/eventList.xsl
r2474 r2493 2 2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 3 3 4 <!--======== Display Events Table =========--> 5 <xsl:template name="display-events-table"> 6 <xsl:param name="node"/> 7 <xsl:param name="suite-name"/> 8 <xsl:choose> 9 10 <!-- filter on group but not category --> 11 <xsl:when test="(/bedework/appvar[key = 'group']/value and not(/bedework/appvar[key = 'group']/value = 'all')) and (not(/bedework/appvar[key = 'category']/value) or (/bedework/appvar[key = 'category']/value='all'))"> 12 <xsl:for-each select="event[not(categories/category[value|word ='Ongoing']) and not(categories/category[value|word ='Local'])]"> 13 <xsl:if test="categories/category[value=$suite-name] or categories/category[word=$suite-name]"> 14 <xsl:call-template name="split-for-groups"> 15 <xsl:with-param name="node" select="."/> 16 <xsl:with-param name="list"><xsl:value-of select="/bedework/appvar[key = 'group']/value"/></xsl:with-param> 17 <xsl:with-param name="delimiter">,</xsl:with-param> 18 <xsl:with-param name="suite-name" select="$suite-name"/> 19 </xsl:call-template> 20 </xsl:if> 21 </xsl:for-each> 22 </xsl:when> 23 24 <!-- filter on category but not group --> 25 <xsl:when test="(not(/bedework/appvar[key = 'group']/value) or (/bedework/appvar[key = 'group']/value = 'all')) and (/bedework/appvar[key = 'category']/value) and not(/bedework/appvar[key = 'category']/value='all')"> 26 <xsl:for-each select="event[not(categories/category[value|word ='Ongoing']) and not(categories/category[value|word ='Local'])]"> 27 <xsl:if test="categories/category[value=$suite-name] or categories/category[word=$suite-name]"> 28 <xsl:call-template name="split-for-events"> 29 <xsl:with-param name="node" select="."/> 30 <xsl:with-param name="list"> <xsl:value-of select="/bedework/appvar[key = 'category']/value"/></xsl:with-param> 31 <xsl:with-param name="delimiter">~</xsl:with-param> 32 <xsl:with-param name="suite-name" select="$suite-name"/> 33 </xsl:call-template> 34 </xsl:if> 35 </xsl:for-each> 36 </xsl:when> 37 38 <!-- filter on both group and category --> 39 <xsl:when test="(/bedework/appvar[key = 'group']/value) and not(/bedework/appvar[key = 'group']/value = 'all') and (/bedework/appvar[key = 'category']/value) and not(/bedework/appvar[key = 'category']/value='all')"> 40 <xsl:for-each select="event[not(categories/category[value|word ='Ongoing']) and not(categories/category[value|word ='Local'])]"> 41 <xsl:if test="categories/category[value=$suite-name] or categories/category[word=$suite-name]"> 42 <xsl:call-template name="split-for-groups-events-wrapper"> 43 <xsl:with-param name="node" select="."/> 44 <xsl:with-param name="list"><xsl:value-of select="/bedework/appvar[key = 'group']/value"/></xsl:with-param> 45 <xsl:with-param name="delimiter">,</xsl:with-param> 46 <xsl:with-param name="suite-name" select="$suite-name"/> 47 </xsl:call-template> 48 </xsl:if> 49 </xsl:for-each> 50 </xsl:when> 51 52 <!-- NO filter (either group or category) --> 53 <xsl:otherwise> 54 <xsl:for-each select="event[not(categories/category[value|word ='Ongoing']) and not(categories/category[value|word ='Local'])]"> 55 <xsl:call-template name="eventRow"> 56 <xsl:with-param name="node" select="."/> 57 <xsl:with-param name="suite-name" select="$suite-name"/> 58 </xsl:call-template> 59 </xsl:for-each> 60 </xsl:otherwise> 61 </xsl:choose> 62 </xsl:template> 63 64 <!--======== list view ==========--> 65 <xsl:template name="list-view"> 66 <xsl:param name="node"/> 67 <xsl:param name="suite-name"/> 4 <!--======== list events ==========--> 5 <!-- This formats a list of events from /bedework/eventscalendar, the default 6 day, week, and month views. Look to eventListDiscrete.xsl for the listing 7 produced by the listEvents.do action --> 8 9 10 <xsl:template name="eventList"> 68 11 69 12 <table class="eventList"> 13 14 <!-- display information about the current selection state if not default --> 70 15 <xsl:choose> 71 <!-- User filtered on a group or subset of groups, but not on category --> 72 <xsl:when test="not(/bedework/appvar[key = 'group']/value = 'all') and (/bedework/appvar[key = 'group']) and (not(/bedework/appvar[key = 'category']/value) or (/bedework/appvar[key = 'category']/value='all'))"> 16 <xsl:when test="/bedework/selectionState/selectionType = 'calendar'"> 73 17 <tr> 74 <td class="eventFilterInfo" colspan="3">Displaying Events for Group: <span id="currGroupName" class="displayGroupName"> 75 <xsl:value-of select="/bedework/urlPrefixes/groups/group[eventOwner = (/bedework/appvar[key = 'group']/value)]/name"/> 76 </span> 77 <xsl:text> </xsl:text> 78 <xsl:choose> 79 <xsl:when test="$suite-name='Main'"> 80 <a id="allView" href="/cal/?setappvar=group(all)">(select all groups)</a> 81 </xsl:when> 82 <xsl:otherwise> 83 <a id="allView" href="/student/?setappvar=group(all)">(select all groups)</a> 84 </xsl:otherwise> 85 </xsl:choose> 86 </td> 18 <td class="eventFilterInfo" colspan="3"> 19 Displaying Events for Topical Area 20 <span class="displayGroupName"> 21 <xsl:value-of select="/bedework/selectionState/subscriptions/subscription/calendar/name"/> 22 </span><xsl:text> </xsl:text> 23 <a id="allView" href="{$setSelection}">(show all)</a></td> 87 24 </tr> 88 <xsl:for-each select="/bedework/eventscalendar/year/month/week/day[not(filler = 'true')]"> 89 <xsl:call-template name="display-events-table"> 90 <xsl:with-param name="node" select="."/> 91 <xsl:with-param name="suite-name" select="$suite-name"/> 92 </xsl:call-template> 93 </xsl:for-each> 94 </xsl:when> 95 96 <!-- User filtered on a category or subset of categories, but not on group --> 97 <xsl:when test="not(/bedework/appvar[key = 'category']/value = 'all') and (/bedework/appvar[key = 'category']/value) and (not(/bedework/appvar[key = 'group']/value) or (/bedework/appvar[key = 'group']/value = 'all'))"> 98 <tr> 99 <td class="eventFilterInfo" colspan="3">Displaying Events for Calendar View 100 <span class="displayGroupName"><xsl:value-of select="/bedework/appvar[key = 'categoryclass']/value"/>,</span> 101 <xsl:choose> 102 <xsl:when test="contains(/bedework/appvar[key = 'category']/value,'~')"> 103 Categories: 104 <xsl:choose> 105 <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'Arts'"> 106 <span id="currCategories" class="displayGroupName">Concert/Music, Dance Performance, Exhibit, Masterclass, Movie/Film, Reading, Theater</span> 107 </xsl:when> 108 <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'Athletics/Recreation'"> 109 <span id="currCategories" class="displayGroupName">Athletics/Intramurals/Recreation, Athletics/Varsity Sports/Men, Athletics/Varsity Sports/Women</span> 110 </xsl:when> 111 <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'Lectures/Conferences'"> 112 <span id="currCategories" class="displayGroupName">Conference/Symposium, Lecture/Talk, Panel/Seminar/Colloquium</span> 113 </xsl:when> 114 <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'University Events'"> 115 <span id="currCategories" class="displayGroupName">Commencement, Founders' Day, Holiday, MLK, Parents' and Family Weekend</span> 116 </xsl:when> 117 </xsl:choose> 118 </xsl:when> 119 <xsl:otherwise> 120 Category: 121 <span id="currCategories" class="displayGroupName"><xsl:value-of select="/bedework/appvar[key = 'category']/value"/></span> 122 </xsl:otherwise> 25 </xsl:when> 26 <xsl:when test="/bedework/selectionState/selectionType/view/name != 'All'"> 27 <tr> 28 <td class="eventFilterInfo" colspan="3"> 29 Displaying Events for View 30 <span class="displayGroupName"> 31 <xsl:value-of select="/bedework/selectionState/subscriptions/subscription/calendar/name"/> 32 </span><xsl:text> </xsl:text> 33 <a id="allView" href="setSelection.do?b=de{$allGroupsAppVar}">(show all)</a></td> 34 </tr> 35 </xsl:when> 123 36 </xsl:choose> 124 <xsl:text> </xsl:text> 125 126 <xsl:choose> 127 <xsl:when test="$suite-name='Main'"> 128 <a id="allView" href="/cal/?setappvar=category(all)&setappvar=categoryclass(all)">(select all categories)</a> 129 </xsl:when> 130 <xsl:otherwise> 131 <a id="allView" href="/student/?setappvar=category(all)&setappvar=categoryclass(all)">(select all categories)</a> 132 </xsl:otherwise> 133 </xsl:choose> 134 </td> 135 </tr> 136 <xsl:for-each select="/bedework/eventscalendar/year/month/week/day[not(filler = 'true')]"> 137 <xsl:call-template name="display-events-table"> 138 <xsl:with-param name="node" select="."/> 139 <xsl:with-param name="suite-name" select="$suite-name"/> 140 </xsl:call-template> 141 </xsl:for-each> 142 </xsl:when> 143 144 <!-- User filtered on both group and category --> 145 <xsl:when test="(/bedework/appvar[key = 'group']) and not(/bedework/appvar[key = 'group']/value = 'all') and (/bedework/appvar[key = 'category']/value) and not(/bedework/appvar[key = 'category']/value='all')"> 37 38 <xsl:choose> 39 <xsl:when test="not(/bedework/eventscalendar/year/month/week/day/event)"> 146 40 <tr> 147 <td class="eventFilterInfo" colspan="3">Displaying Events for Group: <span id="currGroupName" class="displayGroupName"> 148 <xsl:value-of select="/bedework/urlPrefixes/groups/group[eventOwner = (/bedework/appvar[key = 'group']/value)]/name"/> 149 </span><xsl:text> </xsl:text> 150 151 <xsl:choose> 152 <xsl:when test="$suite-name='Main'"> 153 <a id="allView" href="/cal/?setappvar=group(all)">(select all groups)</a> 154 </xsl:when> 155 <xsl:otherwise> 156 <a id="allView" href="/student/?setappvar=group(all)">(select all groups)</a> 157 </xsl:otherwise> 158 </xsl:choose> 159 </td> 160 161 </tr> 162 <tr> 163 <td class="eventFilterInfo" colspan="3">Displaying Events for Calendar View <span class="displayGroupName"><xsl:value-of select="/bedework/appvar[key = 'categoryclass']/value"/>,</span> 164 <xsl:choose> 165 <xsl:when test="contains(/bedework/appvar[key = 'category']/value,'~')"> 166 Categories: 167 <xsl:choose> 168 <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'Arts'"> 169 <span id="currCategories" class="displayGroupName">Concert/Music, Dance Performance, Exhibit, Masterclass, Movie/Film, Reading, Theater</span> 170 </xsl:when> 171 <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'Athletics/Recreation'"> 172 <span id="currCategories" class="displayGroupName">Athletics/Intramurals/Recreation, Athletics/Varsity Sports/Men, Athletics/Varsity Sports/Women</span> 173 </xsl:when> 174 <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'Lectures/Conferences'"> 175 <span id="currCategories" class="displayGroupName">Conference/Symposium, Lecture/Talk, Panel/Seminar/Colloquium</span> 176 </xsl:when> 177 <xsl:when test="/bedework/appvar[key = 'categoryclass']/value = 'University Events'"> 178 <span id="currCategories" class="displayGroupName">Commencement, Founders' Day, Holiday, MLK, Parents' and Family Weekend</span> 179 </xsl:when> 180 </xsl:choose> 181 </xsl:when> 182 <xsl:otherwise> 183 Category: 184 <span id="currCategories" class="displayGroupName"><xsl:value-of select="/bedework/appvar[key = 'category']/value"/></span> 185 </xsl:otherwise> 186 </xsl:choose> 187 188 <xsl:text> </xsl:text> 189 <xsl:choose> 190 <xsl:when test="$suite-name='Main'"> 191 <a id="allView" href="/cal/?setappvar=category(all)&setappvar=categoryclass(all)">(select all categories)</a> 192 </xsl:when> 193 <xsl:otherwise> 194 <a id="allView" href="/student/?setappvar=category(all)&setappvar=categoryclass(all)">(select all categories)</a> 195 </xsl:otherwise> 196 </xsl:choose> 41 <td class="noEventsCell"> 42 <xsl:copy-of select="$bwStr-LsVw-NoEventsToDisplay"/> 197 43 </td> 198 44 </tr> 199 <xsl:for-each select="/bedework/eventscalendar/year/month/week/day[not(filler = 'true')]"> 200 <xsl:call-template name="display-events-table"> 201 <xsl:with-param name="node" select="."/> 202 <xsl:with-param name="suite-name" select="$suite-name"/> 203 </xsl:call-template> 204 </xsl:for-each> 205 </xsl:when> 206 207 <xsl:when test="(/bedework/selectionState/selectionType = 'calendar')"> 208 <tr> 209 <td class="eventFilterInfo" colspan="3">Only displaying events in calendar: <span class="displayGroupName"><xsl:value-of select="/bedework/selectionState/subscriptions/subscription/calendar/name"/></span><xsl:text> </xsl:text><a id="allView" href="setSelection.do?b=de{$allGroupsAppVar}">(return to all calendars)</a></td> 210 </tr> 211 <xsl:for-each select="/bedework/eventscalendar/year/month/week/day[not(filler = 'true')]"> 212 <xsl:call-template name="display-events-table"> 213 <xsl:with-param name="node" select="."/> 214 <xsl:with-param name="suite-name" select="$suite-name"/> 215 </xsl:call-template> 216 </xsl:for-each> 45 </xsl:when> 46 <xsl:when test="$ongoingEventsEnabled = 'true' 47 and not(/bedework/eventscalendar/year/month/week/day/event[not(categories/category = $ongoingEventsCatName)])"> 48 <tr> 49 <td class="noEventsCell"> 50 <xsl:copy-of select="$bwStr-LsVw-NoEventsToDisplay"/> 51 </td> 52 </tr> 217 53 </xsl:when> 218 54 <xsl:otherwise> 219 <xsl:for-each select="/bedework/eventscalendar/year/month/week/day[not(filler = 'true')]"> 220 <xsl:call-template name="display-events-table"> 221 <xsl:with-param name="node" select="."/> 222 <xsl:with-param name="suite-name" select="$suite-name"/> 223 </xsl:call-template> 224 </xsl:for-each> 55 <xsl:choose> 56 <xsl:when test="$ongoingEventsEnabled = 'true'"> 57 <xsl:apply-templates select="/bedework/eventscalendar/year/month/week/day[event[not(categories/category/value = $ongoingEventsCatName)]]" mode="dayInList"/> 58 </xsl:when> 59 <xsl:otherwise> 60 <xsl:apply-templates select="/bedework/eventscalendar/year/month/week/day[event]" mode="dayInList"/> 61 </xsl:otherwise> 62 </xsl:choose> 225 63 </xsl:otherwise> 226 64 </xsl:choose> 227 <tr>228 <td class="fillrow"> </td>229 <td class="fillrow"> </td>230 <td class="fillrow"> </td>231 </tr>232 65 </table> 233 66 </xsl:template> 234 67 235 <!--========= Split for Groups ==========--> 236 <xsl:template name="split-for-groups"> 237 <xsl:param name="node"/> 238 <xsl:param name="list"/> 239 <xsl:param name="delimiter"/> 240 <xsl:param name="suite-name"/> 241 <xsl:variable name="newlist"> 242 <xsl:choose> 243 <xsl:when test="contains($list, $delimiter)"><xsl:value-of select="normalize-space($list)"/></xsl:when> 244 <xsl:otherwise><xsl:value-of select="concat(normalize-space($list), $delimiter)"/></xsl:otherwise> 245 </xsl:choose> 246 </xsl:variable> 247 <xsl:variable name="first" select="substring-before($newlist, $delimiter)"/> 248 <xsl:variable name="remaining" select="substring-after($newlist, $delimiter)"/> 249 <xsl:variable name="cosponsors" select="xproperties/X-BEDEWORK-CS/parameters/X-BEDEWORK-PARAM-DESCRIPTION"/> 250 <xsl:if test="($first = /bedework/urlPrefixes/groups/group/eventOwner)"> 251 <xsl:choose> 252 <xsl:when test="$first = creator"> 253 <xsl:call-template name="eventRow"> 254 <xsl:with-param name="node" select="."/> 255 <xsl:with-param name="suite-name" select="$suite-name"/> 256 </xsl:call-template> 257 </xsl:when> 258 <xsl:when test="(contains($cosponsors, concat($first,',')) and ($first != ''))"> 259 <xsl:call-template name="eventRow"> 260 <xsl:with-param name="node" select="."/> 261 <xsl:with-param name="suite-name" select="$suite-name"/> 262 </xsl:call-template> 263 </xsl:when> 264 <xsl:otherwise> 265 <xsl:if test="$remaining"> 266 <xsl:call-template name="split-for-groups"> 267 <xsl:with-param name="node" select="."/> 268 <xsl:with-param name="list" select="$remaining"/> 269 <xsl:with-param name="delimiter">,</xsl:with-param> 270 <xsl:with-param name="suite-name" select="$suite-name"/> 271 </xsl:call-template> 272 </xsl:if> 273 </xsl:otherwise> 274 </xsl:choose> 275 </xsl:if> 276 </xsl:template> 277 278 <!--========= Split for Groups Wrapper ==========--> 279 <xsl:template name="split-for-groups-events-wrapper"> 280 <xsl:param name="node"/> 281 <xsl:param name="list"/> 282 <xsl:param name="delimiter"/> 283 <xsl:param name="suite-name"/> 284 <xsl:variable name="newlist"> 285 <xsl:choose> 286 <xsl:when test="contains($list, $delimiter)"> 287 <xsl:value-of select="normalize-space($list)"/> 288 </xsl:when> 289 <xsl:otherwise> 290 <xsl:value-of select="concat(normalize-space($list), $delimiter)"/> 291 </xsl:otherwise> 292 </xsl:choose> 293 </xsl:variable> 294 295 <xsl:variable name="first" select="substring-before($newlist, $delimiter)"/> 296 <xsl:variable name="remaining" select="substring-after($newlist, $delimiter)"/> 297 <xsl:variable name="cosponsors" select="xproperties/X-BEDEWORK-CS/parameters/X-BEDEWORK-PARAM-DESCRIPTION"/> 298 <xsl:choose> 299 <xsl:when test="$first = creator"> 300 <xsl:call-template name="split-for-events"> 301 <xsl:with-param name="node" select="."/> 302 <xsl:with-param name="list"><xsl:value-of select="/bedework/appvar[key = 'category']/value"/></xsl:with-param> 303 <xsl:with-param name="delimiter">~</xsl:with-param> 304 <xsl:with-param name="suite-name" select="$suite-name"/> 305 </xsl:call-template> 306 </xsl:when> 307 <xsl:when test="(contains($cosponsors, concat($first,',')) and ($first != ''))"> 308 <xsl:call-template name="split-for-events"> 309 <xsl:with-param name="node" select="."/> 310 <xsl:with-param name="list"><xsl:value-of select="/bedework/appvar[key = 'category']/value"/></xsl:with-param> 311 <xsl:with-param name="delimiter">~</xsl:with-param> 312 <xsl:with-param name="suite-name" select="$suite-name"/> 313 </xsl:call-template> 314 </xsl:when> 315 <xsl:otherwise> 316 <xsl:if test="$remaining"> 317 <xsl:call-template name="split-for-groups-events-wrapper"> 318 <xsl:with-param name="node" select="."/> 319 <xsl:with-param name="list" select="$remaining"/> 320 <xsl:with-param name="delimiter">,</xsl:with-param> 321 <xsl:with-param name="suite-name" select="$suite-name"/> 322 </xsl:call-template> 323 </xsl:if> 324 </xsl:otherwise> 325 </xsl:choose> 326 </xsl:template> 327 328 <!--========= Event Row ==========--> 329 <xsl:template name="eventRow"> 330 <xsl:param name="node"/> 331 <xsl:param name="suite-name"/> 68 <xsl:template match="day" mode="dayInList"> 69 <tr> 70 <td colspan="2" class="dateRow"> 71 <xsl:variable name="date" select="date"/> 72 <a href="{$setViewPeriod}&viewType=dayView&date={$date}"> 73 <xsl:value-of select="name"/>, <xsl:value-of select="longdate"/> 74 </a> 75 </td> 76 </tr> 77 <xsl:choose> 78 <xsl:when test="$ongoingEventsEnabled = 'true'"> 79 <xsl:apply-templates select="event[not(categories/category/value = $ongoingEventsCatName)]]" mode="eventInList"/> 80 </xsl:when> 81 <xsl:otherwise> 82 <xsl:apply-templates select="event" mode="eventInList"/> 83 </xsl:otherwise> 84 </xsl:choose> 85 </xsl:template> 86 87 <xsl:template match="event" mode="eventInList"> 332 88 <xsl:variable name="id" select="id"/> 333 <xsl:variable name="subscriptionId" select="subscription/id"/>334 89 <xsl:variable name="calPath" select="calendar/encodedPath"/> 335 90 <xsl:variable name="guid" select="guid"/> 336 91 <xsl:variable name="guidEsc" select="translate(guid, '.', '_')"/> 337 92 <xsl:variable name="recurrenceId" select="recurrenceId"/> 338 <xsl:variable name="currentdate" select="parent::day/date"/> 339 <!-- <xsl:if test="not(preceding::event[parent::day/date=$currentdate])"> --> 340 <tr> 341 <td colspan="3" class="dateRow"> 342 <xsl:variable name="date" select="parent::day/date"/> 343 <a href="{$setViewPeriod}&viewType=dayView&date={$date}"> <xsl:value-of select="parent::day/name"/>, <xsl:value-of select="parent::day/longdate"/> </a> 344 </td> 345 </tr> 346 <!-- </xsl:if> --> 347 <tr> 348 349 <!-- Event Date / Time column--> 93 <tr> 350 94 <xsl:variable name="dateRangeStyle"> 351 95 <xsl:choose> … … 362 106 </xsl:choose> 363 107 </xsl:variable> 108 109 <!-- Event Date / Time Column --> 364 110 <td class="time {$dateRangeStyle}"> 111 <xsl:choose> 112 <xsl:when test="start/allday = 'true' and start/shortdate = end/shortdate"> 113 <xsl:copy-of select="$bwStr-LsVw-AllDay"/> 114 </xsl:when> 115 <xsl:when test="start/shortdate = end/shortdate and start/time = end/time"> 116 <a href="{$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> 117 <xsl:value-of select="start/time"/> 118 </a> 119 </xsl:when> 120 <xsl:otherwise> 121 <a href="{$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> 122 <xsl:choose> 123 <xsl:when test="start/allday = 'true' and 124 parent::day/shortdate = start/shortdate"> 125 <xsl:copy-of select="$bwStr-LsVw-Today"/> 126 </xsl:when> 127 <xsl:when test="parent::day/shortdate != start/shortdate"> 128 <span class="littleArrow">«</span>  129 <xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/> 130 </xsl:when> 131 <xsl:otherwise> 132 <xsl:value-of select="start/time"/> 133 </xsl:otherwise> 134 </xsl:choose> 135 - 136 <xsl:choose> 137 <xsl:when test="end/allday = 'true' and 138 parent::day/shortdate = end/shortdate"> 139 <xsl:copy-of select="$bwStr-LsVw-Today"/> 140 </xsl:when> 141 <xsl:when test="parent::day/shortdate != end/shortdate"> 142 <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/> 143  <span class="littleArrow">»</span> 144 </xsl:when> 145 <xsl:otherwise> 146 <xsl:value-of select="end/time"/> 147 </xsl:otherwise> 148 </xsl:choose> 149 </a> 150 </xsl:otherwise> 151 </xsl:choose> 152 </td> 153 154 155 <!-- Event Description Column --> 156 <xsl:variable name="descriptionClass"> 157 <xsl:choose> 158 <xsl:when test="status='CANCELLED'">description bwStatusCancelled</xsl:when> 159 <xsl:when test="status='TENTATIVE'">description bwStatusTentative</xsl:when> 160 <xsl:otherwise><xsl:copy-of select="$bwStr-LsVw-Description"/></xsl:otherwise> 161 </xsl:choose> 162 </xsl:variable> 163 <!-- Subscription styles. 164 These are set in the add/modify subscription forms in the admin client; 165 if present, these override the background-color set by eventClass. The 166 subscription styles should not be used for canceled events (tentative is ok). --> 167 <xsl:variable name="subscriptionClass"> 168 <xsl:if test="status != 'CANCELLED'"> 169 <xsl:apply-templates select="categories" mode="customEventColor"/> 170 </xsl:if> 171 </xsl:variable> 172 <td class="{$descriptionClass} {$subscriptionClass}"> 173 174 <ul> 175 <li class="titleEvent"> 176 177 <!-- event icons --> 178 <span class="icons"> 179 <xsl:variable name="gStartdate" select="start/utcdate"/> 180 <xsl:variable name="gLocation" select="location/address"/> 181 <xsl:variable name="gEnddate" select="end/utcdate"/> 182 <xsl:variable name="gText" select="summary"/> 183 <xsl:variable name="gDetails" select="summary"/> 184 185 <a href="http://www.google.com/calendar/event?action=TEMPLATE&dates={$gStartdate}/{$gEnddate}&text={$gText}&details={$gDetails}&location={$gLocation}"> 186 <img title="Add to Google Calendar" src="{$resourcesRoot}/images/gcal_small.gif" alt="Add to Google Calendar"/> 187 </a> 188 <xsl:choose> 189 <xsl:when test="string-length($recurrenceId)"> 190 <a href="http://www.facebook.com/share.php?u=http://calendar.duke.edu/feed/event/cal/html/Public/{$recurrenceId}/{$guidEsc}"><img title="Add to Facebook" src="{$resourcesRoot}/images/Facebook_Badge_small.gif" alt="Add to Facebook"/></a> 191 </xsl:when> 192 <xsl:otherwise> 193 <a href="http://www.facebook.com/share.php?u=http://calendar.duke.edu/feed/event/cal/html/Public/0/{$guidEsc}"><img title="Add to Facebook" src="{$resourcesRoot}/images/Facebook_Badge_small.gif" alt="Add to Facebook"/></a> 194 </xsl:otherwise> 195 </xsl:choose> 196 <a href="{$privateCal}/event/addEventRef.do?calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}" title="{$bwStr-LsVw-AddEventToMyCalendar}" target="myCalendar"> 197 <img class="addref" src="{$resourcesRoot}/images/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="{$bwStr-LsVw-AddEventToMyCalendar}"/> 198 </a> 199 <xsl:variable name="eventIcalName" select="concat($id,'.ics')"/> 200 <a href="{$export}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}&nocache=no&contentName={$eventIcalName}" title="Download .ics file for import to other calendars"> 201 <img src="{$resourcesRoot}/images/std-ical_icon_small.gif" alt="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"/> 202 </a> 203 </span> 204 205 <!-- event title --> 206 <xsl:if test="status='CANCELLED'"><strong><xsl:copy-of select="$bwStr-LsVw-Canceled"/><xsl:text> </xsl:text></strong></xsl:if> 207 <xsl:if test="status='TENTATIVE'"><strong><xsl:copy-of select="$bwStr-LsEv-Tentative"/><xsl:text> </xsl:text></strong></xsl:if> 208 <a href="{$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> 209 <xsl:value-of select="summary"/> 210 </a> 211 </li> 212 365 213 <xsl:choose> 366 <xsl:when test="start/allday = 'true' and start/shortdate = end/shortdate">All day</xsl:when> 367 <xsl:when test="start/shortdate = end/shortdate and start/time = end/time"> 368 <xsl:value-of select="start/time"/> 214 <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 215 <xsl:if test="location/address != ''"> 216 <li> 217 Location:<xsl:text> </xsl:text> 218 <xsl:value-of select="location/address"/> 219 <xsl:if test="location/subaddress != ''"> 220 , <xsl:value-of select="location/subaddress"/> 221 </xsl:if> 222 </li> 223 </xsl:if> 224 225 <xsl:if test="cost!=''"> 226 <li> 227 Cost:<xsl:text> </xsl:text> 228 <xsl:value-of select="cost"/> 229 </li> 230 </xsl:if> 231 232 <xsl:if test="contact/name!='none'"> 233 <li> 234 <xsl:copy-of select="$bwStr-LsVw-Contact"/><xsl:text> </xsl:text> 235 <xsl:value-of select="contact/name"/> 236 </li> 237 </xsl:if> 238 239 <li> 240 Description:<xsl:text> </xsl:text> 241 <xsl:value-of select="description"/> 242 </li> 243 244 <xsl:if test="link != ''"> 245 <li> 246 Link:<xsl:text> </xsl:text> 247 <a> 248 <xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute> 249 <xsl:value-of select="link"/> 250 </a> 251 </li> 252 </xsl:if> 253 254 <xsl:if test="xproperties/X-BEDEWORK-ALIAS"> 255 <li> 256 Topical Areas:<xsl:text> </xsl:text> 257 <span class="eventSubscription"> 258 <xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> 259 <xsl:call-template name="substring-afterLastInstanceOf"> 260 <xsl:with-param name="string" select="values/text"/> 261 <xsl:with-param name="char">/</xsl:with-param> 262 </xsl:call-template> 263 <xsl:if test="position()!=last()">, </xsl:if> 264 </xsl:for-each> 265 </span> 266 </li> 267 </xsl:if> 268 369 269 </xsl:when> 370 270 <xsl:otherwise> 371 <xsl:choose> 372 <xsl:when test="start/allday = 'true' and parent::day/shortdate = start/shortdate"> Today </xsl:when> 373 <xsl:when test="parent::day/shortdate != start/shortdate"> 374 <span class="littleArrow">«</span><xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/> 375 </xsl:when> 376 <xsl:otherwise> 377 <!-- <xsl:value-of select="start/time"/> --> 378 <!-- Display times without :00 and no AM / PM on first time --> 379 <xsl:value-of select="start/hour"/> 380 <xsl:if test="start/twodigitminute != '00'"> 381 <xsl:text>:</xsl:text> 382 <xsl:value-of select="start/twodigitminute"/> 383 </xsl:if> 384 <xsl:choose> 385 <xsl:when test="start/ampm = 1"> 386 <xsl:text>pm</xsl:text> 387 </xsl:when> 388 <xsl:otherwise> 389 <xsl:text>am</xsl:text> 390 </xsl:otherwise> 391 </xsl:choose> 392 </xsl:otherwise> 393 </xsl:choose> 394 <xsl:text> - </xsl:text> 395 <xsl:choose> 396 <xsl:when test="end/allday = 'true' and parent::day/shortdate = end/shortdate"> Today </xsl:when> 397 <xsl:when test="parent::day/shortdate != end/shortdate"> 398 <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/> 399 <span class="littleArrow">»</span> 400 </xsl:when> 401 <xsl:otherwise> 402 <!-- <xsl:value-of select="end/time"/> --> 403 <!-- Display times without :00 show AM / PM time --> 404 <xsl:value-of select="end/hour"/> 405 <xsl:if test="end/twodigitminute != '00'"> 406 <xsl:text>:</xsl:text> 407 <xsl:value-of select="end/twodigitminute"/> 408 </xsl:if> 409 <xsl:choose> 410 <xsl:when test="end/ampm = 1"> 411 <xsl:text>pm</xsl:text> 412 </xsl:when> 413 <xsl:otherwise> 414 <xsl:text>am</xsl:text> 415 </xsl:otherwise> 416 </xsl:choose> 417 </xsl:otherwise> 418 </xsl:choose> 271 272 <li> 273 Location:<xsl:text> </xsl:text> 274 <xsl:value-of select="location/address" /> 275 </li> 276 277 <xsl:if test="xproperties/X-BEDEWORK-ALIAS"> 278 <li> 279 Topical Areas:<xsl:text> </xsl:text> 280 <span class="eventSubscription"> 281 <xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> 282 <xsl:call-template name="substring-afterLastInstanceOf"> 283 <xsl:with-param name="string" select="values/text"/> 284 <xsl:with-param name="char">/</xsl:with-param> 285 </xsl:call-template> 286 <xsl:if test="position()!=last()">, </xsl:if> 287 </xsl:for-each> 288 </span> 289 </li> 290 </xsl:if> 291 419 292 </xsl:otherwise> 420 293 </xsl:choose> 421 </td> 422 <!-- Event Description Column --> 423 <xsl:variable name="descriptionClass"> 424 <xsl:choose> 425 <xsl:when test="status='CANCELLED'">description bwStatusCancelled</xsl:when> 426 <xsl:when test="status='TENTATIVE'">description bwStatusTentative</xsl:when> 427 <xsl:otherwise>description</xsl:otherwise> 428 </xsl:choose> 429 </xsl:variable> 430 <!-- Subscription styles. 431 These are set in the add/modify subscription forms in the admin client; 432 if present, these override the background-color set by eventClass. The 433 subscription styles should not be used for cancelled events (tentative is ok). --> 434 <xsl:variable name="subscriptionClass"> 435 <xsl:if test="status != 'CANCELLED' and subscription/subStyle != '' and subscription/subStyle != 'default'"> 436 <xsl:value-of select="subscription/subStyle"/> 437 </xsl:if> 438 </xsl:variable> 439 <td class="{$descriptionClass} {$subscriptionClass}"> 440 <ul> 441 <xsl:if test="status='CANCELLED'"> 442 <strong>CANCELLED: </strong> 443 </xsl:if> 444 <xsl:if test="status='TENTATIVE'"> 445 <strong>TENTATIVE: </strong> 446 </xsl:if> 447 448 <xsl:if test="$suite-name='Student'"> 449 <h5> <a href="{$eventView}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> <xsl:value-of select="summary"/> </a> </h5> 450 <xsl:if test="location/address != ''"> <li>Location: <xsl:value-of select="location/address"/></li> </xsl:if> 451 Categories: 452 <xsl:for-each select="categories[1]/category[(value != 'Local') and (value != 'Main') and (value != 'Student') and (value != 'calCrossPublish')]"> 453 <xsl:value-of select="value"/> 454 <xsl:if test="position() != last()">, </xsl:if> 455 </xsl:for-each> 456 </xsl:if> 457 <xsl:if test="$suite-name='Main'"> 458 <h5> <a href="{$eventView}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"/></h5> 459 <xsl:choose> 460 <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 461 <li class="titleEvent"><xsl:value-of select="summary"/></li> 462 <xsl:if test="location/address != ''"> <li>Location: <xsl:value-of select="location/address"/></li> </xsl:if> 463 <xsl:if test="cost!=''"><li>Cost: <xsl:value-of select="cost"/></li></xsl:if> 464 <xsl:if test="contact/name!='none'"><li>Contact: <xsl:value-of select="contact/name"/></li></xsl:if> 465 <xsl:choose> 466 <xsl:when test="xproperties/X-BEDEWORK-CS/values/text != ''"> 467 <li> 468 <span class="infoTitle">Co-sponsors: </span> 469 <xsl:if test="creator != ''"> 470 <xsl:variable name="creator" select="creator"/> 471 <xsl:value-of select="/bedework/urlPrefixes/groups/group[eventOwner = $creator]/name"/> 472 </xsl:if> 473 <xsl:value-of disable-output-escaping="yes" select="xproperties/X-BEDEWORK-CS/values/text"/> 474 </li> 475 </xsl:when> 476 <xsl:otherwise> 477 <li> 478 <span class="infoTitle">Sponsor: </span> 479 <xsl:if test="creator != ''"> 480 <xsl:variable name="creator" select="creator"/> 481 <xsl:value-of select="/bedework/urlPrefixes/groups/group[eventOwner = $creator]/name"/> 482 </xsl:if> 483 <xsl:value-of disable-output-escaping="yes" select="xproperties/X-BEDEWORK-CS/values/text"/> 484 </li> 485 </xsl:otherwise> 486 </xsl:choose> 487 <li>Description: <xsl:value-of select="description"/></li> 488 <xsl:if test="link != ''"><li>Link: <xsl:variable name="link" select="link"/><a href="{$link}" class="moreLink">More Info</a></li></xsl:if> 489 </xsl:when> 490 <xsl:otherwise> 491 <li class="titleEvent"><xsl:value-of select="summary"/></li> 492 <li> <xsl:if test="location/address != ''"> Location: <xsl:value-of select="location/address"/> </xsl:if> </li> 493 </xsl:otherwise> 494 </xsl:choose> 495 </xsl:if> 496 </ul> 497 </td> 498 <!-- Event Icon Column --> 499 <td class="icons"> 500 <xsl:variable name="gStartdate" select="start/utcdate"/> 501 <xsl:variable name="gLocation" select="location/address"/> 502 <xsl:variable name="gEnddate" select="end/utcdate"/> 503 <xsl:variable name="gText" select="summary"/> 504 <xsl:variable name="gDetails" select="summary"/> 505 <a style="padding:2px;display:inline" class="eventIcons" href="http://www.google.com/calendar/event?action=TEMPLATE&dates={$gStartdate}/{$gEnddate}&text={$gText}&details={$gDetails}&location={$gLocation}"><img title="Add to Google Calendar" src="{$resourcesRoot}/images/gcal_small.gif" alt="Add to Google Calendar"/></a> 506 <xsl:choose> 507 <xsl:when test="string-length($recurrenceId)"> 508 <a style="padding:2px;display:inline" class="eventIcons" href="http://www.facebook.com/share.php?u=http://calendar.duke.edu/feed/event/cal/html/{$subscriptionId}/Public/{$recurrenceId}/{$guidEsc}"><img title="Add to Facebook" src="{$resourcesRoot}/images/Facebook_Badge_small.gif" alt="Add to Facebook"/></a> 509 </xsl:when> 510 <xsl:otherwise> 511 <a style="padding:2px;display:inline" class="eventIcons" href="http://www.facebook.com/share.php?u=http://calendar.duke.edu/feed/event/cal/html/{$subscriptionId}/Public/0/{$guidEsc}"><img title="Add to Facebook" src="{$resourcesRoot}/images/Facebook_Badge_small.gif" alt="Add to Facebook"/></a> 512 </xsl:otherwise> 513 </xsl:choose> 514 <xsl:variable name="eventIcalName" select="concat($id,'.ics')"/> 515 <a href="{$export}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}&nocache=no&contentName={$eventIcalName}" title="Download .ics file for import to other calendars"> 516 <img src="{$resourcesRoot}/images/std-ical_icon_small.gif" alt="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"/> 517 </a> 518 </td> 294 </ul> 295 </td> 296 <!-- td class="icons"> 297 keep and place icons here if spacing is an issue 298 </td--> 519 299 </tr> 520 300 </xsl:template> 521 301 522 <!--========= Split for Events ==========-->523 <xsl:template name="split-for-events">524 <xsl:param name="node"/>525 <xsl:param name="list"/>526 <xsl:param name="delimiter"/>527 <xsl:param name="suite-name"/>528 <xsl:variable name="newlist">529 <xsl:choose>530 <xsl:when test="contains($list, $delimiter)">531 <xsl:value-of select="normalize-space($list)"/>532 </xsl:when>533 <xsl:otherwise>534 <xsl:value-of select="concat(normalize-space($list), $delimiter)"/>535 </xsl:otherwise>536 </xsl:choose>537 </xsl:variable>538 <xsl:variable name="first" select="substring-before($newlist, $delimiter)"/>539 <xsl:variable name="remaining" select="substring-after($newlist, $delimiter)"/>540 <xsl:choose>541 <xsl:when test="$first = categories/category/value">542 <xsl:call-template name="eventRow">543 <xsl:with-param name="node" select="."/>544 <xsl:with-param name="suite-name" select="$suite-name"/>545 </xsl:call-template>546 </xsl:when>547 <xsl:when test="$first = categories/category/word">548 <xsl:call-template name="eventRow">549 <xsl:with-param name="node" select="."/>550 <xsl:with-param name="suite-name" select="$suite-name"/>551 </xsl:call-template>552 </xsl:when>553 <xsl:otherwise>554 <xsl:if test="$remaining">555 <xsl:call-template name="split-for-events">556 <xsl:with-param name="suite-name" select="$suite-name"/>557 <xsl:with-param name="list" select="$remaining"/>558 <xsl:with-param name="delimiter">~</xsl:with-param>559 </xsl:call-template>560 </xsl:if>561 </xsl:otherwise>562 </xsl:choose>563 </xsl:template>564 565 302 </xsl:stylesheet> trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/featuredEvents.xsl
r2488 r2493 3 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 4 xmlns="http://www.w3.org/1999/xhtml"> 5 6 <xsl:template name="featuredEvents"> 7 <xsl:if test="$featuredEventsAlwaysOn = 'true' or 8 ($featuredEventsForEventDisplay = 'true' and /bedework/page = 'event') or 9 ($featuredEventsForCalList = 'true' and /bedework/page = 'calendarList') or 10 (/bedework/page = 'eventscalendar' and ( 11 ($featuredEventsForDay = 'true' and /bedework/periodname = 'Day') or 12 ($featuredEventsForWeek = 'true' and /bedework/periodname = 'Week') or 13 ($featuredEventsForMonth = 'true' and /bedework/periodname = 'Month') or 14 ($featuredEventsForYear = 'true' and /bedework/periodname = 'Year')))"> 15 <div id="feature"> 16 <!-- pulls in the first three images from the FeaturedEvent.xml document --> 17 <xsl:apply-templates select="document('defaultTheme/data/FeaturedEvent.xml')/featuredEvents/image[position() < 4]" mode="featuredEvents" /> 18 </div> 19 </xsl:if> 20 </xsl:template> 5 21 6 22 <xsl:template match="image" mode="featuredEvents"> trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/head.xsl
r2488 r2493 23 23 24 24 <!-- address bar favicon --> 25 <link rel="icon" type="image/ico" href="{$ bwTheme/favicon}" />25 <link rel="icon" type="image/ico" href="{$favicon}" /> 26 26 27 27 <!-- load css --> … … 51 51 </xsl:if> 52 52 <script type="text/javascript" src="{$resourcesRoot}/javascript/mainCampus.js"> </script> 53 54 <script type="text/javascript"> 55 <xsl:call-template name="themeJavascriptVariables"/> 56 </script> 57 <script type="text/javascript" src="{$resourcesRoot}/javascript/bedework.js"> </script> 58 59 <!-- set up the javascript navigational calendar --> 53 60 <script type="text/javascript"> 54 61 <xsl:call-template name="jsonDataObject" /> … … 58 65 </xsl:template> 59 66 67 <!-- JavaScript Array for Calendar (might be good to turn into JSON if more properties need to be passed in)--> 68 <xsl:template name="jsonDataObject"> 69 <!-- Month to display (to be handed in to js, so it aligns with the events beeing shown) --> 70 <xsl:variable name="displayMonthYear"> 71 <xsl:value-of select="substring(/bedework/currentdate/date,5,2)" /> 72 <xsl:text>/</xsl:text> 73 <xsl:value-of select="substring(/bedework/currentdate/date,0,5)" /> 74 </xsl:variable> 75 <xsl:variable name="rangeStartMo"> 76 <xsl:value-of select="substring(/bedework/firstday/date,5,2)" /> 77 </xsl:variable> 78 <xsl:variable name="rangeStartDay"> 79 <xsl:value-of select="substring(/bedework/firstday/date,7,2)" /> 80 </xsl:variable> 81 <xsl:variable name="rangeStartYear"> 82 <xsl:value-of select="substring(/bedework/firstday/date,1,4)" /> 83 </xsl:variable> 84 <xsl:variable name="rangeEndMo"> 85 <xsl:value-of select="substring(/bedework/lastday/date,5,2)" /> 86 </xsl:variable> 87 <xsl:variable name="rangeEndDay"> 88 <xsl:value-of select="substring(/bedework/lastday/date,7,2)" /> 89 </xsl:variable> 90 <xsl:variable name="rangeEndYear"> 91 <xsl:value-of select="substring(/bedework/lastday/date,1,4)" /> 92 </xsl:variable> 93 navcalendar = [ "<xsl:value-of select="$displayMonthYear" />", "<xsl:value-of select="$rangeStartMo" />", "<xsl:value-of select="$rangeStartDay" />", "<xsl:value-of select="$rangeStartYear" />", "<xsl:value-of select="$rangeEndMo" />", "<xsl:value-of select="$rangeEndDay" />", "<xsl:value-of select="$rangeEndYear" />", ]; 94 </xsl:template> 95 60 96 </xsl:stylesheet> trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/header.xsl
r2471 r2493 8 8 <xsl:template name="titleBar"> 9 9 <div id="head-top"> 10 <div id="title-logoArea"> 11 <!-- we attach the logoArea link to this div - do not remove the space --> 12 <xsl:text> </xsl:text> 13 </div> 10 14 <div id="title-text"> 11 15 <h2> … … 20 24 </a> 21 25 | 22 <a href="http://www.bedework.org/"> 26 <!-- a href="http://www.bedework.org/"--> 27 <a href="?refreshXslt=yes"> 23 28 <xsl:copy-of select="$bwStr-HdBr-OtherLink" /> 24 29 </a> trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/javascript/bedework.js
r2464 r2493 1 dojo.require("dojo.event.*");2 dojo.require("dojo.widget.*");3 dojo.require("dojo.widget.FloatingPane");4 dojo.require("dojo.widget.DatePicker");5 6 1 function changeClass(id, newClass) { 7 2 identity = document.getElementById(id); 8 3 identity.className=newClass; 9 4 } 10 function launchExportWidget(formId,action,name,calPath) {11 var exportWidget = dojo.widget.byId('bwCalendarExportWidget');12 exportWidget.show();13 var formObj = document.getElementById(formId);14 formObj.calPath.value = calPath;15 formObj.contentName.value = name + '.ics';16 document.getElementById('bwCalendarExportWidgetCalName').innerHTML = name;17 }18 5 function fillExportFields(formObj) { 19 6 var startDate = new Date(); 20 startDate = dojo.widget.byId("bwExportCalendarWidgetStartDate").getDate();7 startDate = $("bwExportCalendarWidgetStartDate").datepicker("getDate"); 21 8 formObj["eventStartDate.year"].value = startDate.getFullYear(); 22 9 formObj["eventStartDate.month"].value = startDate.getMonth() + 1; … … 24 11 25 12 var endDate = new Date(); 26 endDate = dojo.widget.byId("bwExportCalendarWidgetEndDate").getDate();13 endDate = $("bwExportCalendarWidgetEndDate").datepicker("getDate"); 27 14 formObj["eventEndDate.year"].value = endDate.getFullYear(); 28 15 formObj["eventEndDate.month"].value = endDate.getMonth() + 1; 29 16 formObj["eventEndDate.day"].value = endDate.getDate(); 30 }31 function hideWidget(id) {32 var widget = dojo.widget.byId(id);33 widget.hide();34 17 } 35 18 function showLink(urlString) { … … 44 27 linkWindow.focus(); 45 28 } 46 /*function init() {47 var widget = dojo.widget.byId("bwCalendarExportWidget");48 }49 29 50 dojo.addOnLoad(init); 51 */ 30 // topLink is defined in themeSettings.xsl 31 $(document).ready(function(){ 32 $("#title-logoArea").click(function(){ 33 location.href = headerBarLink; 34 }); 35 }); trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/javascript/ifs-calendar.js
r2464 r2493 2 2 3 3 var navCalSelectHandler = function(type,args,obj) { 4 var selected = args[0];4 var selected = args[0]; 5 5 if (selected[0][1] < 10) { selected[0][1] = "0" + selected[0][1]; }; 6 6 if (selected[0][2] < 10) { selected[0][2] = "0" + selected[0][2]; }; 7 7 8 8 var newUrl = '/cal/main/setViewPeriod.do?b=de&date=' + selected[0][0] + selected[0][1] + selected[0][2]; 9 window.location.href = newUrl;9 window.location.href = newUrl; 10 10 }; 11 11 12 12 var groupSelectHandler = function(e) { // Depricated 13 var myTarget = YAHOO.util.Event.getTarget(e);14 window.location.href = 'showMain.rdo?setappvar=group('+ myTarget.value +')';13 var myTarget = YAHOO.util.Event.getTarget(e); 14 window.location.href = 'showMain.rdo?setappvar=group('+ myTarget.value +')'; 15 15 } 16 16 17 17 YAHOO.ifs.init = function() { 18 18 // Mini Calendar 19 YAHOO.ifs.cal1 = new YAHOO.widget.Calendar("cal1","cal1", {pagedate: navcalendar[0], selected: navcalendar[1] 19 YAHOO.ifs.jsNavCal = new YAHOO.widget.Calendar("jsNavCal","jsNavCal", {pagedate: navcalendar[0], selected: navcalendar[1] 20 20 +"/"+ navcalendar[2] +"/"+ navcalendar[3] +"-"+ navcalendar[4]+"/"+ navcalendar[5] +"/"+ navcalendar[6]}); 21 YAHOO.ifs.cal1.selectEvent.subscribe(navCalSelectHandler, YAHOO.ifs.cal1, true);22 YAHOO.ifs.cal1.render();23 YAHOO.util.Event.addListener("groupSelection", "change", groupSelectHandler); // Depreicated21 YAHOO.ifs.jsNavCal.selectEvent.subscribe(navCalSelectHandler, YAHOO.ifs.jsNavCal, true); 22 YAHOO.ifs.jsNavCal.render(); 23 YAHOO.util.Event.addListener("groupSelection", "change", groupSelectHandler); // Depreicated 24 24 // Buzz Events Widget 25 25 if(document.getElementById('buzzTrigger')){ … … 40 40 }; 41 41 // Left nav menu initialization 42 var initMenu = new Menu;43 initMenu.activate('artsSub', 'artsClicker', 170); // target DOM id to toggle, DOM id of button to activate, max height of target44 initMenu.activate('athleticsSub', 'athleticsClicker', 75); 45 initMenu.activate('lecturesSub', 'lecturesClicker', 75);46 initMenu.activate('lifeSub', 'lifeClicker', 135); 47 initMenu.activate('otherSub', 'otherClicker', 470);48 initMenu.activate('additionalOptionsSub', 'additionalOptionsClicker', 60);49 initMenu.activate('additionalUnivSub', 'additionalUnivClicker', 125);42 var initMenu = new Menu; 43 initMenu.activate('artsSub', 'artsClicker', 170); // target DOM id to toggle, DOM id of button to activate, max height of target 44 initMenu.activate('athleticsSub', 'athleticsClicker', 75); 45 initMenu.activate('lecturesSub', 'lecturesClicker', 75); 46 initMenu.activate('lifeSub', 'lifeClicker', 135); 47 initMenu.activate('otherSub', 'otherClicker', 470); 48 initMenu.activate('additionalOptionsSub', 'additionalOptionsClicker', 60); 49 initMenu.activate('additionalUnivSub', 'additionalUnivClicker', 125); 50 50 // Link header graphic 51 51 var headerHomeClick = document.getElementById('head-top'); 52 52 headerHomeClick.onclick = function () { window.location.href = 'http://calendar.duke.edu' }; 53 53 // RSS widget 54 popUpRss();55 // Hide unnecessary date rows 56 try {57 alterDateDisplay();58 } catch (e) {59 alert('There was a problem altering the display of dates.');60 }54 popUpRss(); 55 // Hide unnecessary date rows 56 try { 57 alterDateDisplay(); 58 } catch (e) { 59 alert('There was a problem altering the display of dates.'); 60 } 61 61 }; 62 62 … … 65 65 // Callback for JSONP Buzz events widget 66 66 function eventsList(listData) { 67 var events = listData.bwEventList.events;68 var responseList = '<ul>';69 for (var i = 0; i < events.length; i++) {70 responseList += "<li><a href=\"" + events[i].eventlink + "\">" + events[i].summary + 67 var events = listData.bwEventList.events; 68 var responseList = '<ul>'; 69 for (var i = 0; i < events.length; i++) { 70 responseList += "<li><a href=\"" + events[i].eventlink + "\">" + events[i].summary + 71 71 " " + events[i].start.shortdate + " " + events[i].start.time + "</a></li>"; 72 };73 responseList += "</ul>";74 $("#buzzResult").html(responseList);72 }; 73 responseList += "</ul>"; 74 $("#buzzResult").html(responseList); 75 75 }; 76 76 // Hide date rows 77 77 function alterDateDisplay() { 78 var centerCol = document.getElementById("center_column");79 var modGroupTd = centerCol.getElementsByTagName('td');80 var tdInspector = [];81 var i = undefined;82 var j = undefined;83 78 var centerCol = document.getElementById("center_column"); 79 var modGroupTd = centerCol.getElementsByTagName('td'); 80 var tdInspector = []; 81 var i = undefined; 82 var j = undefined; 83 84 84 for (i = 0; i < modGroupTd.length; i++) { 85 85 if(modGroupTd[i].className === 'dateRow') { 86 tdInspector.push(modGroupTd[i].childNodes[0]);86 tdInspector.push(modGroupTd[i].childNodes[0]); 87 87 }; 88 88 }; 89 for (j = 0; j < tdInspector.length; j++) { // Search for dupes90 if(tdInspector[j + 1]) {91 if(tdInspector[j].href === tdInspector[j + 1].href) { // Found a duplicate date. // Hide it.92 tdInspector[j + 1].parentNode.parentNode.style.display = 'none'; 93 j++;94 while(tdInspector[j + 1] && tdInspector[j].href === tdInspector[j + 1].href) { // Look for more.95 tdInspector[j + 1].parentNode.parentNode.style.display = 'none';96 j++;97 }98 };99 };100 };101 } 102 103 function AlterSymbol() { // Alters submenu toggle from one character to another 104 this.triggerId = undefined;105 this.symbol = '-';89 for (j = 0; j < tdInspector.length; j++) { // Search for dupes 90 if(tdInspector[j + 1]) { 91 if(tdInspector[j].href === tdInspector[j + 1].href) { // Found a duplicate date. // Hide it. 92 tdInspector[j + 1].parentNode.parentNode.style.display = 'none'; 93 j++; 94 while(tdInspector[j + 1] && tdInspector[j].href === tdInspector[j + 1].href) { // Look for more. 95 tdInspector[j + 1].parentNode.parentNode.style.display = 'none'; 96 j++; 97 } 98 }; 99 }; 100 }; 101 } 102 103 function AlterSymbol() { // Alters submenu toggle from one character to another 104 this.triggerId = undefined; 105 this.symbol = '-'; 106 106 } 107 107 AlterSymbol.prototype.activate = function(triggerId, symbol) { 108 this.triggerId = triggerId;109 this.symbol = symbol;110 try {111 var myTriggerId = document.getElementById(this.triggerId);112 var triggerText = myTriggerId.firstChild;113 myTriggerId.removeChild(triggerText);114 var finalSymbol = document.createTextNode(this.symbol);115 myTriggerId.appendChild(finalSymbol);116 } catch(e) {117 alert('There was a problem altering the toggle icon.');118 }119 120 121 return;108 this.triggerId = triggerId; 109 this.symbol = symbol; 110 try { 111 var myTriggerId = document.getElementById(this.triggerId); 112 var triggerText = myTriggerId.firstChild; 113 myTriggerId.removeChild(triggerText); 114 var finalSymbol = document.createTextNode(this.symbol); 115 myTriggerId.appendChild(finalSymbol); 116 } catch(e) { 117 alert('There was a problem altering the toggle icon.'); 118 } 119 120 121 return; 122 122 } 123 123 // Menu logic - requires YUI animation library 124 124 function Menu() { // Enables the toggling of menu items with submenus via animating the height of the html element. 125 this.viewId = 'All';126 this.triggerId = undefined;127 this.duration = .5;125 this.viewId = 'All'; 126 this.triggerId = undefined; 127 this.duration = .5; 128 128 } 129 129 130 130 Menu.prototype.activate = function(viewId, triggerId, targetHeight) { // Assumes toggle button will be text "+" or "-" 131 this.viewId = viewId;132 this.triggerId = triggerId;133 var menuButton = document.getElementById(this.triggerId);134 menuButton.targetId = this.viewId;135 menuButton.targetHeight = targetHeight;136 menuButton.duration = this.duration;137 if (document.getElementById(menuButton.targetId).style.height !== '0px') {138 var toggleSym = new AlterSymbol;139 toggleSym.activate(triggerId, '-');140 toggleSym = undefined; // destroy object141 }142 143 menuButton.onclick = function() {144 var alterSymbol = function(sym) {145 var toggleSym = new AlterSymbol;146 toggleSym.activate(triggerId, sym);147 148 return;149 }150 151 if (this.targetHeight > 200) {152 this.duration = 1;153 }154 try{155 var myId = document.getElementById(this.targetId);156 var menuItemOff = new YAHOO.util.Anim(this.targetId, {157 height: { to: 0 }158 }, 1, YAHOO.util.Easing.easeOut); 159 var menuItemOn = new YAHOO.util.Anim(this.targetId, {160 height: { to: this.targetHeight } 161 }, 1, YAHOO.util.Easing.easeOut); 162 if (myId.style.height === '0px') {163 menuItemOn.duration = this.duration;164 menuItemOn.animate(); 165 menuItemOn.onComplete.subscribe(function(){ alterSymbol('-'); });166 } else {167 menuItemOff.duration = this.duration;168 menuItemOff.animate(); 169 menuItemOff.onComplete.subscribe(function(){ alterSymbol('+'); });170 }171 172 } catch(e) {173 alert('The menu controls have malfunctioned.');174 }175 176 }177 178 return;131 this.viewId = viewId; 132 this.triggerId = triggerId; 133 var menuButton = document.getElementById(this.triggerId); 134 menuButton.targetId = this.viewId; 135 menuButton.targetHeight = targetHeight; 136 menuButton.duration = this.duration; 137 if (document.getElementById(menuButton.targetId).style.height !== '0px') { 138 var toggleSym = new AlterSymbol; 139 toggleSym.activate(triggerId, '-'); 140 toggleSym = undefined; // destroy object 141 } 142 143 menuButton.onclick = function() { 144 var alterSymbol = function(sym) { 145 var toggleSym = new AlterSymbol; 146 toggleSym.activate(triggerId, sym); 147 148 return; 149 } 150 151 if (this.targetHeight > 200) { 152 this.duration = 1; 153 } 154 try{ 155 var myId = document.getElementById(this.targetId); 156 var menuItemOff = new YAHOO.util.Anim(this.targetId, { 157 height: { to: 0 } 158 }, 1, YAHOO.util.Easing.easeOut); 159 var menuItemOn = new YAHOO.util.Anim(this.targetId, { 160 height: { to: this.targetHeight } 161 }, 1, YAHOO.util.Easing.easeOut); 162 if (myId.style.height === '0px') { 163 menuItemOn.duration = this.duration; 164 menuItemOn.animate(); 165 menuItemOn.onComplete.subscribe(function(){ alterSymbol('-'); }); 166 } else { 167 menuItemOff.duration = this.duration; 168 menuItemOff.animate(); 169 menuItemOff.onComplete.subscribe(function(){ alterSymbol('+'); }); 170 } 171 172 } catch(e) { 173 alert('The menu controls have malfunctioned.'); 174 } 175 176 } 177 178 return; 179 179 } 180 180 181 181 function popUpRss() { 182 var theTrigger = document.getElementById('rssRequest');183 theTrigger.onclick = function() {184 var findPos = function(obj){ // for positioning menu on link click185 var curleft = curtop = 0;186 if (obj.offsetParent) {187 do {188 curleft += obj.offsetLeft;189 curtop += obj.offsetTop;190 }191 while (obj = obj.offsetParent);192 } else {193 alert('Your browser does not support offsetParent so we cannot position the menu.')194 };195 196 return [curleft, curtop];197 };198 199 var posArr = findPos(this);200 var theHost = document.getElementById('rssPopUp');201 var rssValueObj = document.getElementById('rssValue');202 rssValueObj.value = this.href; //RSS URL with params203 theHost.style.left = (posArr[0] + 15) + 'px';204 theHost.style.top = posArr[1] + 'px';205 if (theHost.style.display === 'none') {206 theHost.style.display = 'block';207 };208 // Format dialogue to reflect current settigns of Group and Category209 if(document.getElementById('currGroupName')) {210 var groupDisplay = document.getElementById('rssDetailGroup');211 var currentGroup = document.createTextNode(document.getElementById('currGroupName').childNodes[0].nodeValue);212 var removeDefault = groupDisplay.childNodes[0];213 var deleteDefault = groupDisplay.replaceChild(currentGroup, removeDefault);214 }215 if(document.getElementById('currCategories')) {216 var catDisplay = document.getElementById('rssDetailCategory');217 var currentCat = document.createTextNode(document.getElementById('currCategories').childNodes[0].nodeValue);218 var removeDefaultCat = catDisplay.childNodes[0];219 var deleteDefaultCat = catDisplay.replaceChild(currentCat, removeDefaultCat);220 }221 return false;222 223 };224 225 return;182 var theTrigger = document.getElementById('rssRequest'); 183 theTrigger.onclick = function() { 184 var findPos = function(obj){ // for positioning menu on link click 185 var curleft = curtop = 0; 186 if (obj.offsetParent) { 187 do { 188 curleft += obj.offsetLeft; 189 curtop += obj.offsetTop; 190 } 191 while (obj = obj.offsetParent); 192 } else { 193 alert('Your browser does not support offsetParent so we cannot position the menu.') 194 }; 195 196 return [curleft, curtop]; 197 }; 198 199 var posArr = findPos(this); 200 var theHost = document.getElementById('rssPopUp'); 201 var rssValueObj = document.getElementById('rssValue'); 202 rssValueObj.value = this.href; //RSS URL with params 203 theHost.style.left = (posArr[0] + 15) + 'px'; 204 theHost.style.top = posArr[1] + 'px'; 205 if (theHost.style.display === 'none') { 206 theHost.style.display = 'block'; 207 }; 208 // Format dialogue to reflect current settigns of Group and Category 209 if(document.getElementById('currGroupName')) { 210 var groupDisplay = document.getElementById('rssDetailGroup'); 211 var currentGroup = document.createTextNode(document.getElementById('currGroupName').childNodes[0].nodeValue); 212 var removeDefault = groupDisplay.childNodes[0]; 213 var deleteDefault = groupDisplay.replaceChild(currentGroup, removeDefault); 214 } 215 if(document.getElementById('currCategories')) { 216 var catDisplay = document.getElementById('rssDetailCategory'); 217 var currentCat = document.createTextNode(document.getElementById('currCategories').childNodes[0].nodeValue); 218 var removeDefaultCat = catDisplay.childNodes[0]; 219 var deleteDefaultCat = catDisplay.replaceChild(currentCat, removeDefaultCat); 220 } 221 return false; 222 223 }; 224 225 return; 226 226 }; 227 227 … … 237 237 var myDiv = document.getElementById(this.divId); 238 238 var myTrigger = document.getElementById(this.triggerId); 239 239 240 240 var showOrHide = function(targetEle, throwAway) { 241 241 var opacity = YAHOO.util.Dom.getStyle(targetEle, 'opacity'); … … 243 243 targetEle.style.display = 'none'; 244 244 }; 245 245 246 246 var currTextNode = myTrigger.firstChild; 247 247 myTrigger.removeChild(currTextNode); 248 248 var changeText = document.createTextNode(throwAway); 249 249 myTrigger.appendChild(changeText); 250 250 251 251 }; 252 252 253 253 var hideEvents = new YAHOO.util.Anim(myDiv, { 254 254 opacity: { … … 278 278 }); 279 279 }; 280 return; 281 }; 282 280 return; 281 }; 282 trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/ongoing.xsl
r2478 r2493 5 5 6 6 <xsl:template name="ongoingEventList"> 7 <h3 class="secondaryColHeader">Ongoing</h3> 7 <h3 class="secondaryColHeader"> 8 <xsl:copy-of select="$bwStr-Ongoing-Title"/> 9 </h3> 8 10 <ul class="eventList"> 9 <xsl:for-each 10 select="/bedework/eventscalendar/year/month/week/day/event[categories/category[value|word = 'Ongoing']]"> 11 <xsl:sort select="start/unformatted" order="ascending" data-type="number" /> 12 <xsl:sort select="id" data-type="number" /> 13 <xsl:variable name="lastId" select="id" /> 14 <xsl:if test="not(preceding::event[id=$lastId])"> 15 <xsl:choose> 16 <xsl:when test="(/bedework/appvar[key = 'group']/value = /bedework/urlPrefixes/groups/group/eventOwner) and (not(/bedework/appvar[key = 'category']/value) or (/bedework/appvar[key = 'category']/value = 'all'))"> 17 <xsl:variable name="creator" select="creator" /> 18 <xsl:variable name="envgroup" select="/bedework/appvar[key = 'group']/value" /> 19 <xsl:variable name="cosponsor" select="xproperties/X-BEDEWORK-CS/parameters/X-BEDEWORK-PARAM-DESCRIPTION" /> 20 <xsl:choose> 21 <xsl:when test="/bedework/appvar[key = 'group']/value = $creator"> 22 <xsl:call-template name="ongoingEvent" /> 23 </xsl:when> 24 <xsl:when test="contains($cosponsor, concat($envgroup,','))"> 25 <xsl:call-template name="ongoingEvent" /> 26 </xsl:when> 27 </xsl:choose> 28 </xsl:when> 29 <xsl:when test="not(/bedework/appvar[key = 'group']/value = /bedework/urlPrefixes/groups/group/eventOwner) and (/bedework/appvar[key = 'category']/value) and not(/bedework/appvar[key = 'category']/value = 'all')"> 30 <xsl:call-template name="split-for-ongoing"> 31 <xsl:with-param name="list"> 32 <xsl:value-of select="/bedework/appvar[key = 'category']/value" /> 33 </xsl:with-param> 34 <xsl:with-param name="delimiter"> 35 ~ 36 </xsl:with-param> 37 </xsl:call-template> 38 </xsl:when> 39 <xsl:when test="(/bedework/appvar[key = 'group']/value = /bedework/urlPrefixes/groups/group/eventOwner) and (/bedework/appvar[key = 'category']/value) and not(/bedework/appvar[key = 'category']/value = 'all')"> 40 <xsl:variable name="creator" select="creator" /> 41 <xsl:variable name="envgroup" select="/bedework/appvar[key = 'group']/value" /> 42 <xsl:variable name="cosponsor" select="xproperties/X-BEDEWORK-CS/parameters/X-BEDEWORK-PARAM-DESCRIPTION" /> 43 <xsl:choose> 44 <xsl:when test="/bedework/appvar[key = 'group']/value = $creator"> 45 <xsl:call-template name="split-for-ongoing"> 46 <xsl:with-param name="list"> 47 <xsl:value-of select="/bedework/appvar[key = 'category']/value" /> 48 </xsl:with-param> 49 <xsl:with-param name="delimiter"> 50 ~ 51 </xsl:with-param> 52 </xsl:call-template> 53 </xsl:when> 54 <xsl:when 55 test="contains($cosponsor, concat($envgroup,','))"> 56 <xsl:call-template 57 name="split-for-ongoing"> 58 <xsl:with-param name="list"> 59 <xsl:value-of 60 select="/bedework/appvar[key = 'category']/value" /> 61 </xsl:with-param> 62 <xsl:with-param 63 name="delimiter"> 64 ~ 65 </xsl:with-param> 66 </xsl:call-template> 67 </xsl:when> 68 </xsl:choose> 69 </xsl:when> 70 <xsl:otherwise> 11 <xsl:choose> 12 <xsl:when test="/bedework/eventscalendar//event[categories/category[value = $ongoingEventsCatName]]"> 13 <xsl:for-each 14 select="/bedework/eventscalendar/year/month/week/day/event[categories/category[value = $ongoingEventsCatName]]"> 15 <xsl:sort select="start/unformatted" order="ascending" data-type="number" /> 16 <xsl:sort select="id" data-type="number" /> 17 <xsl:variable name="lastId" select="id" /> 18 <xsl:if test="not(preceding::event[id=$lastId])"> 71 19 <xsl:call-template name="ongoingEvent" /> 72 </xsl:otherwise> 73 </xsl:choose> 74 </xsl:if> 75 </xsl:for-each> 76 </ul> 77 </xsl:template> 78 79 80 <xsl:template name="split-for-ongoing"> 81 <xsl:param name="list" /> 82 <xsl:param name="delimiter" /> 83 <xsl:variable name="newlist"> 84 <xsl:choose> 85 <xsl:when test="contains($list, $delimiter)"> 86 <xsl:value-of select="normalize-space($list)" /> 20 </xsl:if> 21 </xsl:for-each> 87 22 </xsl:when> 88 23 <xsl:otherwise> 89 <xsl:value-of 90 select="concat(normalize-space($list), $delimiter)" /> 24 <li> 25 <xsl:copy-of select="$bwStr-Ongoing-NoEvents"/> 26 </li> 91 27 </xsl:otherwise> 92 28 </xsl:choose> 93 </xsl:variable> 94 <xsl:variable name="first" 95 select="substring-before($newlist, $delimiter)" /> 96 <xsl:variable name="remaining" 97 select="substring-after($newlist, $delimiter)" /> 98 <xsl:choose> 99 <xsl:when test="$first = categories/category/value"> 100 <xsl:call-template name="ongoingEvent" /> 101 </xsl:when> 102 <xsl:when test="$first = categories/category/word"> 103 <xsl:call-template name="ongoingEvent" /> 104 </xsl:when> 105 <xsl:otherwise> 106 <xsl:if test="$remaining"> 107 <xsl:call-template name="split-for-ongoing"> 108 <xsl:with-param name="list" select="$remaining" /> 109 <xsl:with-param name="delimiter"> 110 <xsl:value-of select="$delimiter" /> 111 </xsl:with-param> 112 </xsl:call-template> 113 </xsl:if> 114 </xsl:otherwise> 115 </xsl:choose> 29 </ul> 116 30 </xsl:template> 117 31 118 32 <xsl:template name="ongoingEvent"> 119 33 <li> 120 <xsl:variable name="subscriptionId"121 select="subscription/id" />122 34 <xsl:variable name="calPath" select="calendar/encodedPath" /> 123 35 <xsl:variable name="guid" select="guid" /> … … 134 46 </xsl:choose> 135 47 </xsl:variable> 136 <a href="{$eventView}& subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}">48 <a href="{$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> 137 49 <xsl:if test="status != 'CONFIRMED'"> 138 50 <xsl:value-of select="status" /> trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/template.xsl
r2476 r2493 4 4 xmlns="http://www.w3.org/1999/xhtml"> 5 5 6 <!--==== THEME UTILITIES ====--> 7 <xsl:template match="events" mode="ongoingEventsExist"> 8 <xsl:choose> 9 10 ($ongoingEventsUseCategory = 'true' and /bedework/eventscalendar//events[category/name = $ongoingEventsCatName]) or 11 ($ongoingEventsUseDayRange = 'true' and $ 12 </xsl:template> 13 14 6 15 </xsl:stylesheet> trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/defaultTheme/themeSettings.xsl
r2488 r2493 2 2 version="1.0" 3 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 xmlns:bwTheme="my::bwTheme"5 4 xmlns="http://www.w3.org/1999/xhtml"> 6 5 … … 14 13 in the administrative web client (default view, default viewPeriod, etc) --> 15 14 16 <bwTheme:currentThemeSettings> 15 <!-- FAVICON --> 16 <!-- address bar icon --> 17 <xsl:variable name="favicon"><xsl:value-of select="$resourcesRoot"/>/images/bedework.ico</xsl:variable> 17 18 18 <!-- address bar icon --> 19 <favicon><xsl:value-of select="$resourcesRoot"/>/images/bedework.ico</favicon> 19 <!-- FEATURED EVENTS --> 20 <!-- display the featured event images? --> 21 <xsl:variable name="featuredEventsEnabled">true</xsl:variable> 22 <xsl:variable name="featuredEventsAlwaysOn">false</xsl:variable> 23 <xsl:variable name="featuredEventsForDay">true</xsl:variable> 24 <xsl:variable name="featuredEventsForWeek">true</xsl:variable> 25 <xsl:variable name="featuredEventsForMonth">false</xsl:variable> 26 <xsl:variable name="featuredEventsForYear">false</xsl:variable> 27 <xsl:variable name="featuredEventsForEventDisplay">false</xsl:variable> 28 <xsl:variable name="featuredEventsForCalList">false</xsl:variable> 20 29 21 30 22 <!-- display the featured event images? --> 23 <featuredEvents> 24 <enabled>true</enabled> 25 <forDay>true</forDay> 26 <forWeek>true</forWeek> 27 <forMonth>false</forMonth> 28 <forYear>false</forYear> 29 <forEventDisplay>false</forEventDisplay> 30 </featuredEvents> 31 <!-- ONGOING EVENTS --> 32 <!-- use the ongoing events sidebar? --> 33 <!-- if ongoing events sidebar is enabled, 34 you must set one or both of UseCategory 35 or UseDayRange (coming later) for ongoing events to appear. --> 36 <xsl:variable name="ongoingEventsEnabled">true</xsl:variable> 31 37 38 <!-- use the specified category to mark an event as ongoing --> 39 <xsl:variable name="ongoingEventsUseCategory">true</xsl:variable> 40 <xsl:variable name="ongoingEventsCatName">Ongoing</xsl:variable> 32 41 33 <!-- use the ongoing events sidebar? --> 34 <!-- if ongoing events sidebar is enabled, 35 you must set one or both of useCategory 36 or useDayRange for ongoing events to appear. --> 37 <ongoingEvents> 38 <enabled>true</enabled> 39 40 <!-- use the specified category to mark 41 an event as ongoing --> 42 <useCategory>true</useCategory> 43 <catName>Ongoing</catName> 44 <catUid></catUid> 45 46 <!-- automatically mark events longer 47 than the dayrange (e.g. 12 days) 48 as ongoing --> 49 <useDayRange>true</useDayRange> 50 <dayRange>12</dayRange> 51 52 <!-- always display sidebar, even 53 if no events are ongoing? --> 54 <alwaysDisplay>false</alwaysDisplay> 55 </ongoingEvents> 42 <!-- always display sidebar, even if no events are ongoing? --> 43 <xsl:variable name="ongoingEventsAlwaysDisplayed">true</xsl:variable> 56 44 57 45 58 46 59 <!-- force like-named views into a heirarchy?-->60 <!-- If enabled, views that follow a naming61 convention will appear as children of62 another view in the Calendar Views menu. E.g. views named63 "Arts" and "Arts_Dance Performance" will64 be assembled in a tree structure with "Arts" as the65 parent, and "Dance Performance" as its child66 ("Arts_" will be stripped for display).67 -->68 <makeChildViews>enabled</makeChildViews>47 <!-- VIEW HIERARCHY --> 48 <!-- force like-named views into a heirarchy? --> 49 <!-- If enabled, views that follow a naming 50 convention will appear as children of 51 another view in the Calendar Views menu. 52 E.g. views named "Arts" and "Arts_Dance Performance" will 53 be assembled in a tree structure with "Arts" as the 54 parent, and "Dance Performance" as its child 55 ("Arts_" will be stripped for display). --> 56 <xsl:variable name="childViewsEnabled">true</xsl:variable> 69 57 70 71 < /bwTheme:currentThemeSettings>72 73 <!-- make the settings available as a variable -->74 < xsl:variable name="bwTheme" select="document('')/*/bwTheme:*"/>58 <!-- JAVASCRIPT CONSTANTS --> 59 <xsl:template name="themeJavascriptVariables"> 60 // URL for the header/logo area 61 var headerBarLink = "/bedework"; 62 </xsl:template> 75 63 76 64 </xsl:stylesheet> trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/strings.xsl
r2488 r2493 8 8 9 9 <xsl:variable name="bwStr-Root-PageTitle">Bedework Events Calendar</xsl:variable> 10 <xsl:variable name="bwStr-Error">Error:</xsl:variable> 10 11 11 12 <!-- xsl:template name="headBar" --> … … 22 23 <xsl:variable name="bwStr-HdBr-RSSFeed">RSS feed</xsl:variable> 23 24 <xsl:variable name="bwStr-HdBr-EventInformation">Event Information</xsl:variable> 25 <xsl:variable name="bwStr-HdBr-BackLink">(return to events)</xsl:variable> 26 27 <!-- ongoing events --> 28 <xsl:variable name="bwStr-Ongoing-Title">Ongoing</xsl:variable> 29 <xsl:variable name="bwStr-Ongoing-NoEvents">There are no ongoing events in this time period or view</xsl:variable> 24 30 25 31 <!-- xsl:template name="tabs" --> … … 45 51 <xsl:variable name="bwStr-SrcB-ToggleListCalView">toggle list/calendar view</xsl:variable> 46 52 <xsl:variable name="bwStr-SrcB-ToggleSummDetView">toggle summary/detailed view</xsl:variable> 53 <xsl:variable name="bwStr-SrcB-ShowDetails">Show Details</xsl:variable> 54 <xsl:variable name="bwStr-SrcB-HideDetails">Hide Details</xsl:variable> 55 <xsl:variable name="bwStr-SrcB-Summary">Summary</xsl:variable> 56 <xsl:variable name="bwStr-SrcB-Details">Details</xsl:variable> 47 57 <xsl:variable name="bwStr-SrcB-TopicalArea">Topical Area:</xsl:variable> 48 58 <xsl:variable name="bwStr-SrcB-CurrentSearch">Current search:</xsl:variable> … … 113 123 114 124 <!-- xsl:template name="listView" --> 115 <xsl:variable name="bwStr-LsVw-NoEventsToDisplay">No events to display.</xsl:variable>125 <xsl:variable name="bwStr-LsVw-NoEventsToDisplay">No events found. Please try a different view or time period.</xsl:variable> 116 126 <xsl:variable name="bwStr-LsVw-Add">add...</xsl:variable> 117 <xsl:variable name="bwStr-LsVw-AllDay"> all day</xsl:variable>118 <xsl:variable name="bwStr-LsVw-Today"> today</xsl:variable>127 <xsl:variable name="bwStr-LsVw-AllDay">All Day</xsl:variable> 128 <xsl:variable name="bwStr-LsVw-Today">Today</xsl:variable> 119 129 <xsl:variable name="bwStr-LsVw-AddEventToMyCalendar">Add to MyCalendar</xsl:variable> 120 130 <xsl:variable name="bwStr-LsVw-DownloadEvent">Download ical</xsl:variable>
