| | 3902 | </xsl:template> |
|---|
| | 3903 | |
|---|
| | 3904 | <xsl:template match="calendars" mode="exportCalendars"> |
|---|
| | 3905 | <h2>Export Calendars as iCal</h2> |
|---|
| | 3906 | <form name="exportCalendarForm" id="exportCalendarForm" action="{$export}" method="post"> |
|---|
| | 3907 | <input type="hidden" name="calPath" value=""/> |
|---|
| | 3908 | <input type="hidden" name="nocache" value="no"/> |
|---|
| | 3909 | <input type="hidden" name="skinName" value="ical"/> |
|---|
| | 3910 | <input type="hidden" name="contentType" value="text/calendar"/> |
|---|
| | 3911 | <input type="hidden" name="contentName" value="calendar.ics"/> |
|---|
| | 3912 | |
|---|
| | 3913 | <table class="common" cellspacing="0"> |
|---|
| | 3914 | <tr> |
|---|
| | 3915 | <th class="commonHeader" colspan="3"> |
|---|
| | 3916 | Date limits: |
|---|
| | 3917 | <input type="radio" name="dateLimits" value="active" checked="checked"/> active |
|---|
| | 3918 | <input type="radio" name="dateLimits" value="none"/> all (includes past events) |
|---|
| | 3919 | <!--<input type="radio" name="dateLimits" value="limited"/> limited to:--> |
|---|
| | 3920 | </th> |
|---|
| | 3921 | </tr> |
|---|
| | 3922 | <tr> |
|---|
| | 3923 | <th class="borderRight"> |
|---|
| | 3924 | My Calendars |
|---|
| | 3925 | </th> |
|---|
| | 3926 | <th class="borderRight"> |
|---|
| | 3927 | Subscriptions |
|---|
| | 3928 | </th> |
|---|
| | 3929 | <th> |
|---|
| | 3930 | Public Calendars |
|---|
| | 3931 | </th> |
|---|
| | 3932 | </tr> |
|---|
| | 3933 | <tr> |
|---|
| | 3934 | <td class="borderRight"> |
|---|
| | 3935 | <!-- My Calendars --> |
|---|
| | 3936 | <ul> |
|---|
| | 3937 | <!-- list normal calendars first --> |
|---|
| | 3938 | <xsl:for-each select="/bedework/myCalendars/calendars/calendar//calendar[calendarCollection='true' and calType < 2]"> |
|---|
| | 3939 | <li> |
|---|
| | 3940 | <xsl:variable name="calPath" select="path"/> |
|---|
| | 3941 | <xsl:variable name="name" select="name"/> |
|---|
| | 3942 | <a href="javascript:exportCalendar('exportCalendarForm','{$name}','{$calPath}')"> |
|---|
| | 3943 | <xsl:value-of select="name"/> |
|---|
| | 3944 | </a> |
|---|
| | 3945 | </li> |
|---|
| | 3946 | </xsl:for-each> |
|---|
| | 3947 | </ul> |
|---|
| | 3948 | <ul> |
|---|
| | 3949 | <!-- list special calendars next --> |
|---|
| | 3950 | <xsl:for-each select="/bedework/myCalendars/calendars/calendar//calendar[calendarCollection='true' and calType > 1]"> |
|---|
| | 3951 | <li> |
|---|
| | 3952 | <xsl:variable name="calPath" select="path"/> |
|---|
| | 3953 | <xsl:variable name="name" select="name"/> |
|---|
| | 3954 | <a href="javascript:exportCalendar('exportCalendarForm','{$name}','{$calPath}')"> |
|---|
| | 3955 | <xsl:value-of select="name"/> |
|---|
| | 3956 | </a> |
|---|
| | 3957 | </li> |
|---|
| | 3958 | </xsl:for-each> |
|---|
| | 3959 | </ul> |
|---|
| | 3960 | </td> |
|---|
| | 3961 | <td class="borderRight"> |
|---|
| | 3962 | <!-- My Subscriptions (underlying calendars) --> |
|---|
| | 3963 | <ul> |
|---|
| | 3964 | <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable> |
|---|
| | 3965 | <xsl:for-each select="/bedework/mySubscriptions/subscription[not(contains(uri,$userPath))]/calendars//calendar[calendarCollection='true']"> |
|---|
| | 3966 | <li> |
|---|
| | 3967 | <xsl:variable name="calPath" select="path"/> |
|---|
| | 3968 | <xsl:variable name="name" select="name"/> |
|---|
| | 3969 | <a href="javascript:exportCalendar('exportCalendarForm','{$name}','{$calPath}')"> |
|---|
| | 3970 | <xsl:value-of select="name"/> |
|---|
| | 3971 | </a> |
|---|
| | 3972 | </li> |
|---|
| | 3973 | </xsl:for-each> |
|---|
| | 3974 | </ul> |
|---|
| | 3975 | </td> |
|---|
| | 3976 | <td> |
|---|
| | 3977 | <ul> |
|---|
| | 3978 | <xsl:for-each select=".//calendar[calendarCollection='true']"> |
|---|
| | 3979 | <li> |
|---|
| | 3980 | <xsl:variable name="calPath" select="path"/> |
|---|
| | 3981 | <xsl:variable name="name" select="name"/> |
|---|
| | 3982 | <a href="javascript:exportCalendar('exportCalendarForm','{$name}','{$calPath}')"> |
|---|
| | 3983 | <xsl:value-of select="name"/> |
|---|
| | 3984 | </a> |
|---|
| | 3985 | </li> |
|---|
| | 3986 | </xsl:for-each> |
|---|
| | 3987 | </ul> |
|---|
| | 3988 | </td> |
|---|
| | 3989 | </tr> |
|---|
| | 3990 | </table> |
|---|
| | 3991 | </form> |
|---|