| 2361 | | <!-- Output descriptive recurrence information. Probably not |
|---|
| 2362 | | complete yet. Replace all strings so can be |
|---|
| 2363 | | more easily internationalized. --> |
|---|
| 2364 | | <xsl:if test="form/recurrence"> |
|---|
| 2365 | | <div id="recurrenceInfo"> |
|---|
| 2366 | | Every |
|---|
| 2367 | | <xsl:choose> |
|---|
| 2368 | | <xsl:when test="form/recurrence/interval > 1"> |
|---|
| 2369 | | <xsl:value-of select="form/recurrence/interval"/> |
|---|
| 2370 | | </xsl:when> |
|---|
| 2371 | | </xsl:choose> |
|---|
| 2372 | | <xsl:text> </xsl:text> |
|---|
| 2373 | | <xsl:choose> |
|---|
| 2374 | | <xsl:when test="form/recurrence/freq = 'HOURLY'">hour</xsl:when> |
|---|
| 2375 | | <xsl:when test="form/recurrence/freq = 'DAILY'">day</xsl:when> |
|---|
| 2376 | | <xsl:when test="form/recurrence/freq = 'WEEKLY'">week</xsl:when> |
|---|
| 2377 | | <xsl:when test="form/recurrence/freq = 'MONTHLY'">month</xsl:when> |
|---|
| 2378 | | <xsl:when test="form/recurrence/freq = 'YEARLY'">year</xsl:when> |
|---|
| 2379 | | </xsl:choose><xsl:if test="form/recurrence/interval > 1">s</xsl:if> |
|---|
| 2380 | | <xsl:text> </xsl:text> |
|---|
| 2381 | | |
|---|
| 2382 | | <xsl:if test="form/recurrence/byday"> |
|---|
| 2383 | | <xsl:for-each select="form/recurrence/byday/pos"> |
|---|
| 2384 | | <xsl:if test="position() != 1"> and </xsl:if> |
|---|
| 2385 | | on |
|---|
| 2386 | | <xsl:choose> |
|---|
| 2387 | | <xsl:when test="@val='1'"> |
|---|
| 2388 | | the first |
|---|
| 2389 | | </xsl:when> |
|---|
| 2390 | | <xsl:when test="@val='2'"> |
|---|
| 2391 | | the second |
|---|
| 2392 | | </xsl:when> |
|---|
| 2393 | | <xsl:when test="@val='3'"> |
|---|
| 2394 | | the third |
|---|
| 2395 | | </xsl:when> |
|---|
| 2396 | | <xsl:when test="@val='4'"> |
|---|
| 2397 | | the fourth |
|---|
| 2398 | | </xsl:when> |
|---|
| 2399 | | <xsl:when test="@val='5'"> |
|---|
| 2400 | | the fifth |
|---|
| 2401 | | </xsl:when> |
|---|
| 2402 | | <xsl:when test="@val='-1'"> |
|---|
| 2403 | | the last |
|---|
| 2404 | | </xsl:when> |
|---|
| 2405 | | <!-- don't output "every" --> |
|---|
| 2406 | | <!--<xsl:otherwise> |
|---|
| 2407 | | every |
|---|
| 2408 | | </xsl:otherwise>--> |
|---|
| 2409 | | </xsl:choose> |
|---|
| 2410 | | <xsl:for-each select="day"> |
|---|
| 2411 | | <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> |
|---|
| 2412 | | <xsl:variable name="dayVal" select="."/> |
|---|
| 2413 | | <xsl:variable name="dayPos"> |
|---|
| 2414 | | <xsl:for-each select="/bedework/recurdayvals/val"> |
|---|
| 2415 | | <xsl:if test="node() = $dayVal"><xsl:value-of select="position()"/></xsl:if> |
|---|
| 2416 | | </xsl:for-each> |
|---|
| 2417 | | </xsl:variable> |
|---|
| 2418 | | <xsl:value-of select="/bedework/shortdaynames/val[position() = $dayPos]"/> |
|---|
| 2419 | | <xsl:if test="position() != last()">, </xsl:if> |
|---|
| 2420 | | </xsl:for-each> |
|---|
| 2421 | | </xsl:for-each> |
|---|
| 2422 | | </xsl:if> |
|---|
| 2423 | | |
|---|
| 2424 | | <xsl:if test="form/recurrence/bymonth"> |
|---|
| 2425 | | in |
|---|
| 2426 | | <xsl:for-each select="form/recurrence/bymonth/val"> |
|---|
| 2427 | | <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> |
|---|
| 2428 | | <xsl:variable name="monthNum" select="number(.)"/> |
|---|
| 2429 | | <xsl:value-of select="/bedework/monthlabels/val[position() = $monthNum]"/> |
|---|
| 2430 | | <xsl:if test="position() != last()">, </xsl:if> |
|---|
| 2431 | | </xsl:for-each> |
|---|
| 2432 | | </xsl:if> |
|---|
| 2433 | | |
|---|
| 2434 | | <xsl:if test="form/recurrence/bymonthday"> |
|---|
| 2435 | | on the |
|---|
| 2436 | | <xsl:apply-templates select="form/recurrence/bymonthday/val" mode="weekMonthYearNumbers"/> |
|---|
| 2437 | | day<xsl:if test="form/recurrence/bymonthday/val[position()=2]">s</xsl:if> of the month |
|---|
| 2438 | | </xsl:if> |
|---|
| 2439 | | |
|---|
| 2440 | | <xsl:if test="form/recurrence/byyearday"> |
|---|
| 2441 | | on the |
|---|
| 2442 | | <xsl:apply-templates select="form/recurrence/byyearday/val" mode="weekMonthYearNumbers"/> |
|---|
| 2443 | | day<xsl:if test="form/recurrence/byyearday/val[position()=2]">s</xsl:if> of the year |
|---|
| 2444 | | </xsl:if> |
|---|
| 2445 | | |
|---|
| 2446 | | <xsl:if test="form/recurrence/byweekno"> |
|---|
| 2447 | | in the |
|---|
| 2448 | | <xsl:apply-templates select="form/recurrence/byweekno/val" mode="weekMonthYearNumbers"/> |
|---|
| 2449 | | week<xsl:if test="form/recurrence/byweekno/val[position()=2]">s</xsl:if> of the year |
|---|
| 2450 | | </xsl:if> |
|---|
| 2451 | | |
|---|
| 2452 | | repeating |
|---|
| 2453 | | <xsl:choose> |
|---|
| 2454 | | <xsl:when test="form/recurrence/count = '-1'">forever</xsl:when> |
|---|
| 2455 | | <xsl:when test="form/recurrence/until"> |
|---|
| 2456 | | <xsl:value-of select="form/recurrence/until"/> |
|---|
| 2457 | | </xsl:when> |
|---|
| 2458 | | <xsl:otherwise> |
|---|
| 2459 | | <xsl:value-of select="form/recurrence/count"/> |
|---|
| 2460 | | time<xsl:if test="form/recurrence/count > 1">s</xsl:if> |
|---|
| 2461 | | </xsl:otherwise> |
|---|
| 2462 | | </xsl:choose> |
|---|
| 2463 | | </div> |
|---|
| 2464 | | </xsl:if> |
|---|
| 2515 | | <p>does not recur</p> |
|---|
| | 2424 | <!-- Output descriptive recurrence information. Probably not |
|---|
| | 2425 | complete yet. Replace all strings so can be |
|---|
| | 2426 | more easily internationalized. --> |
|---|
| | 2427 | <xsl:choose> |
|---|
| | 2428 | <xsl:when test="form/recurrence"> |
|---|
| | 2429 | <strong>Recurrence:</strong> |
|---|
| | 2430 | <div id="recurrenceInfo"> |
|---|
| | 2431 | Every |
|---|
| | 2432 | <xsl:choose> |
|---|
| | 2433 | <xsl:when test="form/recurrence/interval > 1"> |
|---|
| | 2434 | <xsl:value-of select="form/recurrence/interval"/> |
|---|
| | 2435 | </xsl:when> |
|---|
| | 2436 | </xsl:choose> |
|---|
| | 2437 | <xsl:text> </xsl:text> |
|---|
| | 2438 | <xsl:choose> |
|---|
| | 2439 | <xsl:when test="form/recurrence/freq = 'HOURLY'">hour</xsl:when> |
|---|
| | 2440 | <xsl:when test="form/recurrence/freq = 'DAILY'">day</xsl:when> |
|---|
| | 2441 | <xsl:when test="form/recurrence/freq = 'WEEKLY'">week</xsl:when> |
|---|
| | 2442 | <xsl:when test="form/recurrence/freq = 'MONTHLY'">month</xsl:when> |
|---|
| | 2443 | <xsl:when test="form/recurrence/freq = 'YEARLY'">year</xsl:when> |
|---|
| | 2444 | </xsl:choose><xsl:if test="form/recurrence/interval > 1">s</xsl:if> |
|---|
| | 2445 | <xsl:text> </xsl:text> |
|---|
| | 2446 | |
|---|
| | 2447 | <xsl:if test="form/recurrence/byday"> |
|---|
| | 2448 | <xsl:for-each select="form/recurrence/byday/pos"> |
|---|
| | 2449 | <xsl:if test="position() != 1"> and </xsl:if> |
|---|
| | 2450 | on |
|---|
| | 2451 | <xsl:choose> |
|---|
| | 2452 | <xsl:when test="@val='1'"> |
|---|
| | 2453 | the first |
|---|
| | 2454 | </xsl:when> |
|---|
| | 2455 | <xsl:when test="@val='2'"> |
|---|
| | 2456 | the second |
|---|
| | 2457 | </xsl:when> |
|---|
| | 2458 | <xsl:when test="@val='3'"> |
|---|
| | 2459 | the third |
|---|
| | 2460 | </xsl:when> |
|---|
| | 2461 | <xsl:when test="@val='4'"> |
|---|
| | 2462 | the fourth |
|---|
| | 2463 | </xsl:when> |
|---|
| | 2464 | <xsl:when test="@val='5'"> |
|---|
| | 2465 | the fifth |
|---|
| | 2466 | </xsl:when> |
|---|
| | 2467 | <xsl:when test="@val='-1'"> |
|---|
| | 2468 | the last |
|---|
| | 2469 | </xsl:when> |
|---|
| | 2470 | <!-- don't output "every" --> |
|---|
| | 2471 | <!--<xsl:otherwise> |
|---|
| | 2472 | every |
|---|
| | 2473 | </xsl:otherwise>--> |
|---|
| | 2474 | </xsl:choose> |
|---|
| | 2475 | <xsl:for-each select="day"> |
|---|
| | 2476 | <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> |
|---|
| | 2477 | <xsl:variable name="dayVal" select="."/> |
|---|
| | 2478 | <xsl:variable name="dayPos"> |
|---|
| | 2479 | <xsl:for-each select="/bedework/recurdayvals/val"> |
|---|
| | 2480 | <xsl:if test="node() = $dayVal"><xsl:value-of select="position()"/></xsl:if> |
|---|
| | 2481 | </xsl:for-each> |
|---|
| | 2482 | </xsl:variable> |
|---|
| | 2483 | <xsl:value-of select="/bedework/shortdaynames/val[position() = $dayPos]"/> |
|---|
| | 2484 | <xsl:if test="position() != last()">, </xsl:if> |
|---|
| | 2485 | </xsl:for-each> |
|---|
| | 2486 | </xsl:for-each> |
|---|
| | 2487 | </xsl:if> |
|---|
| | 2488 | |
|---|
| | 2489 | <xsl:if test="form/recurrence/bymonth"> |
|---|
| | 2490 | in |
|---|
| | 2491 | <xsl:for-each select="form/recurrence/bymonth/val"> |
|---|
| | 2492 | <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> |
|---|
| | 2493 | <xsl:variable name="monthNum" select="number(.)"/> |
|---|
| | 2494 | <xsl:value-of select="/bedework/monthlabels/val[position() = $monthNum]"/> |
|---|
| | 2495 | <xsl:if test="position() != last()">, </xsl:if> |
|---|
| | 2496 | </xsl:for-each> |
|---|
| | 2497 | </xsl:if> |
|---|
| | 2498 | |
|---|
| | 2499 | <xsl:if test="form/recurrence/bymonthday"> |
|---|
| | 2500 | on the |
|---|
| | 2501 | <xsl:apply-templates select="form/recurrence/bymonthday/val" mode="weekMonthYearNumbers"/> |
|---|
| | 2502 | day<xsl:if test="form/recurrence/bymonthday/val[position()=2]">s</xsl:if> of the month |
|---|
| | 2503 | </xsl:if> |
|---|
| | 2504 | |
|---|
| | 2505 | <xsl:if test="form/recurrence/byyearday"> |
|---|
| | 2506 | on the |
|---|
| | 2507 | <xsl:apply-templates select="form/recurrence/byyearday/val" mode="weekMonthYearNumbers"/> |
|---|
| | 2508 | day<xsl:if test="form/recurrence/byyearday/val[position()=2]">s</xsl:if> of the year |
|---|
| | 2509 | </xsl:if> |
|---|
| | 2510 | |
|---|
| | 2511 | <xsl:if test="form/recurrence/byweekno"> |
|---|
| | 2512 | in the |
|---|
| | 2513 | <xsl:apply-templates select="form/recurrence/byweekno/val" mode="weekMonthYearNumbers"/> |
|---|
| | 2514 | week<xsl:if test="form/recurrence/byweekno/val[position()=2]">s</xsl:if> of the year |
|---|
| | 2515 | </xsl:if> |
|---|
| | 2516 | |
|---|
| | 2517 | repeating |
|---|
| | 2518 | <xsl:choose> |
|---|
| | 2519 | <xsl:when test="form/recurrence/count = '-1'">forever</xsl:when> |
|---|
| | 2520 | <xsl:when test="form/recurrence/until"> |
|---|
| | 2521 | <xsl:value-of select="form/recurrence/until"/> |
|---|
| | 2522 | </xsl:when> |
|---|
| | 2523 | <xsl:otherwise> |
|---|
| | 2524 | <xsl:value-of select="form/recurrence/count"/> |
|---|
| | 2525 | time<xsl:if test="form/recurrence/count > 1">s</xsl:if> |
|---|
| | 2526 | </xsl:otherwise> |
|---|
| | 2527 | </xsl:choose> |
|---|
| | 2528 | </div> |
|---|
| | 2529 | <div id="recurrenceNote"> |
|---|
| | 2530 | Change the recurrence fields to alter the recurrence. |
|---|
| | 2531 | </div> |
|---|
| | 2532 | </xsl:when> |
|---|
| | 2533 | <xsl:otherwise> |
|---|
| | 2534 | <p>does not recur</p> |
|---|
| | 2535 | </xsl:otherwise> |
|---|
| | 2536 | </xsl:choose> |
|---|
| 2527 | | <select name="untilMonth" onfocus="selectRecurCountUntil('recurUntil')"> |
|---|
| 2528 | | <xsl:for-each select="form/start/month/select/option"> |
|---|
| 2529 | | <xsl:copy-of select="."/> |
|---|
| 2530 | | </xsl:for-each> |
|---|
| 2531 | | </select> |
|---|
| 2532 | | <select name="untilDay" onfocus="selectRecurCountUntil('recurUntil')"> |
|---|
| 2533 | | <xsl:for-each select="form/start/day/select/option"> |
|---|
| 2534 | | <xsl:copy-of select="."/> |
|---|
| 2535 | | </xsl:for-each> |
|---|
| 2536 | | </select> |
|---|
| 2537 | | <xsl:choose> |
|---|
| 2538 | | <xsl:when test="/bedework/creating = 'true'"> |
|---|
| 2539 | | <select name="untilYear" onfocus="selectRecurCountUntil('recurUntil')"> |
|---|
| 2540 | | <xsl:for-each select="form/start/year/select/option"> |
|---|
| 2541 | | <xsl:copy-of select="."/> |
|---|
| 2542 | | </xsl:for-each> |
|---|
| 2543 | | </select> |
|---|
| 2544 | | </xsl:when> |
|---|
| 2545 | | <xsl:otherwise> |
|---|
| 2546 | | <input type="text" name="untilYear" size="4" onfocus="selectRecurCountUntil('recurUntil')"> |
|---|
| 2547 | | <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute> |
|---|
| 2548 | | </input> |
|---|
| 2549 | | </xsl:otherwise> |
|---|
| 2550 | | </xsl:choose> |
|---|
| | 2548 | bwEventWidgetUntilDate |
|---|