| 5595 | | <xsl:if test="organizer"> |
|---|
| 5596 | | <xsl:variable name="organizerUri" select="organizer/organizerUri"/> |
|---|
| 5597 | | <xsl:choose> |
|---|
| 5598 | | <xsl:when test="organizer/cn != ''"> |
|---|
| 5599 | | <xsl:value-of select="organizer/cn"/> |
|---|
| 5600 | | </xsl:when> |
|---|
| 5601 | | <xsl:otherwise> |
|---|
| 5602 | | <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/> |
|---|
| 5603 | | </xsl:otherwise> |
|---|
| 5604 | | </xsl:choose> |
|---|
| 5605 | | <xsl:if test="organizer/organizerUri != ''"> |
|---|
| 5606 | | <a href="{$organizerUri}" class="emailIcon" title="email"> |
|---|
| 5607 | | <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> |
|---|
| 5608 | | </a> |
|---|
| 5609 | | </xsl:if> |
|---|
| 5610 | | </xsl:if> |
|---|
| | 5595 | <xsl:choose> |
|---|
| | 5596 | <xsl:when test="scheduleMethod = '1' or |
|---|
| | 5597 | scheduleMethod = '2' or |
|---|
| | 5598 | scheduleMethod = '4' or |
|---|
| | 5599 | scheduleMethod = '5' or |
|---|
| | 5600 | scheduleMethod = '8'"> |
|---|
| | 5601 | <xsl:if test="organizer"> |
|---|
| | 5602 | <xsl:variable name="organizerUri" select="organizer/organizerUri"/> |
|---|
| | 5603 | <xsl:choose> |
|---|
| | 5604 | <xsl:when test="organizer/cn != ''"> |
|---|
| | 5605 | <xsl:value-of select="organizer/cn"/> |
|---|
| | 5606 | </xsl:when> |
|---|
| | 5607 | <xsl:otherwise> |
|---|
| | 5608 | <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/> |
|---|
| | 5609 | </xsl:otherwise> |
|---|
| | 5610 | </xsl:choose> |
|---|
| | 5611 | <xsl:if test="organizer/organizerUri != ''"> |
|---|
| | 5612 | <a href="{$organizerUri}" class="emailIcon" title="email"> |
|---|
| | 5613 | <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> |
|---|
| | 5614 | </a> |
|---|
| | 5615 | </xsl:if> |
|---|
| | 5616 | </xsl:if> |
|---|
| | 5617 | </xsl:when> |
|---|
| | 5618 | <xsl:otherwise> |
|---|
| | 5619 | <xsl:if test="attendees/attendee"> |
|---|
| | 5620 | <!-- there will only be one attendee at this point --> |
|---|
| | 5621 | <xsl:variable name="attendeeUri" select="attendees/attendee/attendeeUri"/> |
|---|
| | 5622 | <xsl:choose> |
|---|
| | 5623 | <xsl:when test="attendees/attendee/cn != ''"> |
|---|
| | 5624 | <xsl:value-of select="attendees/attendee/cn"/> |
|---|
| | 5625 | </xsl:when> |
|---|
| | 5626 | <xsl:otherwise> |
|---|
| | 5627 | <xsl:value-of select="substring-after(attendees/attendee/attendeeUri,'mailto:')"/> |
|---|
| | 5628 | </xsl:otherwise> |
|---|
| | 5629 | </xsl:choose> |
|---|
| | 5630 | <xsl:if test="$attendeeUri != ''"> |
|---|
| | 5631 | <a href="{$attendeeUri}" class="emailIcon" title="email"> |
|---|
| | 5632 | <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> |
|---|
| | 5633 | </a> |
|---|
| | 5634 | </xsl:if> |
|---|
| | 5635 | </xsl:if> |
|---|
| | 5636 | </xsl:otherwise> |
|---|
| | 5637 | </xsl:choose> |
|---|
| | 5809 | </tr> |
|---|
| | 5810 | |
|---|
| | 5811 | <tr> |
|---|
| | 5812 | <td class="fieldname"> |
|---|
| | 5813 | Calendar: |
|---|
| | 5814 | </td> |
|---|
| | 5815 | <td class="fieldval scheduleActions"> |
|---|
| | 5816 | <!-- the string "user/" should not be hard coded; fix this --> |
|---|
| | 5817 | <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable> |
|---|
| | 5818 | <xsl:variable name="writableCalendars"> |
|---|
| | 5819 | <xsl:value-of select=" |
|---|
| | 5820 | count(/bedework/myCalendars//calendar[calType = '1' and |
|---|
| | 5821 | currentAccess/current-user-privilege-set/privilege/write-content]) + |
|---|
| | 5822 | count(/bedework/mySubscriptions//calendar[calType = '1' and |
|---|
| | 5823 | currentAccess/current-user-privilege-set/privilege/write-content and |
|---|
| | 5824 | (not(contains(path,$userPath)))])"/> |
|---|
| | 5825 | </xsl:variable> |
|---|
| | 5826 | <xsl:choose> |
|---|
| | 5827 | <xsl:when test="$writableCalendars = 1"> |
|---|
| | 5828 | <!-- there is only 1 writable calendar, so find it by looking down both trees at once --> |
|---|
| | 5829 | <xsl:variable name="newCalPath"><xsl:value-of select="/bedework/myCalendars//calendar[calType = '1' and |
|---|
| | 5830 | currentAccess/current-user-privilege-set/privilege/write-content]/path"/><xsl:value-of select="/bedework/mySubscriptions//calendar[calType = '1' and |
|---|
| | 5831 | currentAccess/current-user-privilege-set/privilege/write-content and |
|---|
| | 5832 | (not(contains(path,$userPath)))]/path"/></xsl:variable> |
|---|
| | 5833 | |
|---|
| | 5834 | <input type="hidden" name="newCalPath" value="{$newCalPath}"/> |
|---|
| | 5835 | |
|---|
| | 5836 | <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable> |
|---|
| | 5837 | <span id="bwEventCalDisplay"> |
|---|
| | 5838 | <xsl:choose> |
|---|
| | 5839 | <xsl:when test="contains($newCalPath,$userFullPath)"> |
|---|
| | 5840 | <xsl:value-of select="substring-after($newCalPath,$userFullPath)"/> |
|---|
| | 5841 | </xsl:when> |
|---|
| | 5842 | <xsl:otherwise> |
|---|
| | 5843 | <xsl:value-of select="$newCalPath"/> |
|---|
| | 5844 | </xsl:otherwise> |
|---|
| | 5845 | </xsl:choose> |
|---|
| | 5846 | </span> |
|---|
| | 5847 | </xsl:when> |
|---|
| | 5848 | <xsl:otherwise> |
|---|
| | 5849 | <input type="hidden" name="newCalPath" id="bwNewCalPathField" value=""> |
|---|
| | 5850 | <xsl:if test="form/calendar/calType = '1'"><xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute></xsl:if> |
|---|
| | 5851 | </input> |
|---|
| | 5852 | |
|---|
| | 5853 | <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable> |
|---|
| | 5854 | |
|---|
| | 5855 | <span id="bwEventCalDisplay"> |
|---|
| | 5856 | <xsl:if test="form/calendar/calType = '1'"> |
|---|
| | 5857 | <xsl:choose> |
|---|
| | 5858 | <xsl:when test="contains(form/calendar/path,$userFullPath)"> |
|---|
| | 5859 | <xsl:value-of select="substring-after(form/calendar/path,$userFullPath)"/> |
|---|
| | 5860 | </xsl:when> |
|---|
| | 5861 | <xsl:otherwise> |
|---|
| | 5862 | <xsl:value-of select="form/calendar/path"/> |
|---|
| | 5863 | </xsl:otherwise> |
|---|
| | 5864 | </xsl:choose> |
|---|
| | 5865 | </xsl:if> |
|---|
| | 5866 | <xsl:text> </xsl:text> |
|---|
| | 5867 | <!-- this final text element is required to avoid an empty |
|---|
| | 5868 | span element which is improperly rendered in the browser --> |
|---|
| | 5869 | </span> |
|---|
| | 5870 | |
|---|
| | 5871 | <xsl:call-template name="selectCalForEvent"/> |
|---|
| | 5872 | |
|---|
| | 5873 | </xsl:otherwise> |
|---|
| | 5874 | </xsl:choose> |
|---|
| | 5875 | </td> |
|---|
| 6101 | | <tr> |
|---|
| 6102 | | <td class="fieldname"> |
|---|
| 6103 | | Calendar: |
|---|
| 6104 | | </td> |
|---|
| 6105 | | <td class="fieldval"> |
|---|
| 6106 | | <xsl:variable name="newCalPath" select="/bedework/formElements/form/calendar/path"/> |
|---|
| 6107 | | <input type="hidden" name="newCalPath" value="{$newCalPath}" id="bwNewCalPathField"/> |
|---|
| 6108 | | <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> |
|---|
| 6109 | | <span id="bwEventCalDisplay"> |
|---|
| 6110 | | <xsl:choose> |
|---|
| 6111 | | <xsl:when test="contains(/bedework/formElements/form/calendar/path,$userPath)"> |
|---|
| 6112 | | <xsl:value-of select="substring-after(/bedework/formElements/form/calendar/path,$userPath)"/> |
|---|
| 6113 | | </xsl:when> |
|---|
| 6114 | | <xsl:otherwise> |
|---|
| 6115 | | <xsl:value-of select="/bedework/formElements/form/calendar/path"/> |
|---|
| 6116 | | </xsl:otherwise> |
|---|
| 6117 | | </xsl:choose> |
|---|
| 6118 | | </span> |
|---|
| 6119 | | copy this event to a calendar: <xsl:call-template name="selectCalForEvent"/> |
|---|
| 6120 | | </td> |
|---|
| 6121 | | </tr> |
|---|