| 1040 | | <!-- Disabling calendar selection is temporary - but we must determine if we're using |
|---|
| 1041 | | a single calendar model (e.g. excluding submissions calendar, etc). The following value should *not* be |
|---|
| 1042 | | hard coded, but we'll do this for the moment. --> |
|---|
| 1043 | | <input type="hidden" name="newCalPath" value="/public/cals/MainCal"/> |
|---|
| 1044 | | <!-- |
|---|
| 1045 | | <xsl:if test="not(starts-with(form/calendar/path,$submissionsRootUnencoded))"> |
|---|
| | 1055 | |
|---|
| | 1056 | <xsl:if test="count(form/calendar/all/select/option) > 1 and |
|---|
| | 1057 | not(starts-with(form/calendar/path,$submissionsRootUnencoded))"> |
|---|
| | 1058 | <!-- check to see if we have more than one publishing calendar |
|---|
| | 1059 | but disallow directly setting for pending events --> |
|---|
| 2437 | | <div id="publishBox" class="invisible"> |
|---|
| 2438 | | <div id="publishBoxCloseButton"> |
|---|
| 2439 | | <a href="javascript:resetPublishBox('calendarId')"> |
|---|
| 2440 | | <img src="{$resourcesRoot}/resources/closeIcon.gif" width="20" height="20" alt="close" border="0"/> |
|---|
| 2441 | | </a> |
|---|
| 2442 | | </div> |
|---|
| 2443 | | <strong>Select a calendar in which to publish this event:</strong><br/> |
|---|
| 2444 | | <select name="calendarId" id="calendarId"> |
|---|
| 2445 | | <option> |
|---|
| 2446 | | <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> |
|---|
| 2447 | | Select: |
|---|
| 2448 | | </option> |
|---|
| 2449 | | <xsl:for-each select="form/calendar/all/select/option"> |
|---|
| 2450 | | <xsl:sort select="." order="ascending"/> |
|---|
| 2451 | | <option> |
|---|
| 2452 | | <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> |
|---|
| 2453 | | <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> |
|---|
| 2454 | | <xsl:choose> |
|---|
| 2455 | | <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)"> |
|---|
| 2456 | | submitted events |
|---|
| 2457 | | </xsl:when> |
|---|
| 2458 | | <xsl:otherwise> |
|---|
| 2459 | | <xsl:value-of select="substring-after(node(),'/public/')"/> |
|---|
| 2460 | | </xsl:otherwise> |
|---|
| 2461 | | </xsl:choose> |
|---|
| 2462 | | </option> |
|---|
| 2463 | | </xsl:for-each> |
|---|
| 2464 | | </select> |
|---|
| 2465 | | <input type="submit" name="publishEvent" value="Publish" onclick="changeClass('publishBox','invisible')"/> |
|---|
| 2466 | | <xsl:if test="$portalFriendly = 'false'"> |
|---|
| 2467 | | <br/> |
|---|
| 2468 | | <span id="calDescriptionsLink"> |
|---|
| 2469 | | <a href="javascript:launchSimpleWindow('{$calendar-fetchDescriptions}')">calendar descriptions</a> |
|---|
| 2470 | | </span> |
|---|
| 2471 | | </xsl:if> |
|---|
| 2472 | | </div> |
|---|
| 2473 | | <input type="submit" name="updateSubmitEvent" value="Update Event"/> |
|---|
| 2474 | | <input type="button" name="publishEvent" value="Publish Event" onclick="changeClass('publishBox','visible')"/> |
|---|
| 2475 | | <input type="submit" name="cancel" value="Cancel"/> |
|---|
| | 2448 | <!-- no need for a publish box in the single calendar model unless we have more than one calendar; --> |
|---|
| | 2449 | <xsl:choose> |
|---|
| | 2450 | <xsl:when test="count(form/calendar/all/select/option) > 1"><!-- test for the presence of more than one publishing calendar --> |
|---|
| | 2451 | <div id="publishBox" class="invisible"> |
|---|
| | 2452 | <div id="publishBoxCloseButton"> |
|---|
| | 2453 | <a href="javascript:resetPublishBox('calendarId')"> |
|---|
| | 2454 | <img src="{$resourcesRoot}/resources/closeIcon.gif" width="20" height="20" alt="close" border="0"/> |
|---|
| | 2455 | </a> |
|---|
| | 2456 | </div> |
|---|
| | 2457 | <strong>Select a calendar in which to publish this event:</strong><br/> |
|---|
| | 2458 | <select name="calendarId" id="calendarId"> |
|---|
| | 2459 | <option> |
|---|
| | 2460 | <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> |
|---|
| | 2461 | Select: |
|---|
| | 2462 | </option> |
|---|
| | 2463 | <xsl:for-each select="form/calendar/all/select/option"> |
|---|
| | 2464 | <xsl:sort select="." order="ascending"/> |
|---|
| | 2465 | <option> |
|---|
| | 2466 | <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> |
|---|
| | 2467 | <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> |
|---|
| | 2468 | <xsl:choose> |
|---|
| | 2469 | <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)"> |
|---|
| | 2470 | submitted events |
|---|
| | 2471 | </xsl:when> |
|---|
| | 2472 | <xsl:otherwise> |
|---|
| | 2473 | <xsl:value-of select="substring-after(node(),'/public/')"/> |
|---|
| | 2474 | </xsl:otherwise> |
|---|
| | 2475 | </xsl:choose> |
|---|
| | 2476 | </option> |
|---|
| | 2477 | </xsl:for-each> |
|---|
| | 2478 | </select> |
|---|
| | 2479 | <input type="submit" name="publishEvent" value="Publish" onclick="changeClass('publishBox','invisible')"/> |
|---|
| | 2480 | <xsl:if test="$portalFriendly = 'false'"> |
|---|
| | 2481 | <br/> |
|---|
| | 2482 | <span id="calDescriptionsLink"> |
|---|
| | 2483 | <a href="javascript:launchSimpleWindow('{$calendar-fetchDescriptions}')">calendar descriptions</a> |
|---|
| | 2484 | </span> |
|---|
| | 2485 | </xsl:if> |
|---|
| | 2486 | </div> |
|---|
| | 2487 | <input type="submit" name="updateSubmitEvent" value="Update Event"/> |
|---|
| | 2488 | <input type="button" name="publishEvent" value="Publish Event" onclick="changeClass('publishBox','visible')"/> |
|---|
| | 2489 | <input type="submit" name="cancel" value="Cancel"/> |
|---|
| | 2490 | </xsl:when> |
|---|
| | 2491 | <xsl:otherwise> |
|---|
| | 2492 | <!-- we are using the single calendar model for public events --> |
|---|
| | 2493 | <input type="submit" name="updateSubmitEvent" value="Update Event"/> |
|---|
| | 2494 | <input type="button" name="publishEvent" value="Publish Event"> |
|---|
| | 2495 | <xsl:attribute name="onclick">publishEvent('<xsl:value-of select="form/calendar/all/select/option/@value"/>');</xsl:attribute> |
|---|
| | 2496 | </input> |
|---|
| | 2497 | <input type="submit" name="cancel" value="Cancel"/> |
|---|
| | 2498 | </xsl:otherwise> |
|---|
| | 2499 | </xsl:choose> |
|---|