Changeset 374

Show
Ignore:
Timestamp:
04/13/06 16:57:23
Author:
johnsa
Message:

fixed event download feature in single event view

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r373 r374  
    10991099        </td> 
    11001100        <th class="icon" rowspan="2"> 
    1101           <xsl:variable name="icalName" select="concat($guid,'.ics')"/> 
    1102           <a href="{$eventView}?subid={$subscriptionId}&amp;&amp;nocache=no&amp;skinName=ical&amp;contentType=text/calendar&amp;contentName={$icalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
     1101          <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
     1102          <a href="{$export}?subid={$subscriptionId}&amp;calid={$calendarId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;skinName=ical&amp;contentType=text/calendar&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
    11031103            <img src="{$resourcesRoot}/resources/std-ical-icon.gif" width="20" height="26" border="0" align="left" alt="Download this event"/> 
    11041104          </a><!-- <br /> 
  • trunk/calendar3/deployment/webuser/webapp/resources/demoskins/default/default/ical.xsl

    r2 r374  
    99 
    1010<xsl:strip-space elements="*"/> 
    11   <!-- ================= --> 
    12   <!--  iCAL STYLESHEET  --> 
    13   <!-- ================= --> 
    14  
    15   <!-- MAIN TEMPLATE --> 
    16   <xsl:template match="/"><xsl:apply-templates select="/ucalendar/event"/></xsl:template> 
    17  
    18   <!--==== SINGLE EVENT ====--> 
    19   <xsl:template match="event">BEGIN:VCALENDAR 
    20 BEGIN:VEVENT 
    21 ORGANIZER:<xsl:value-of select="sponsor/name"/> 
    22 MAILTO:<xsl:value-of select="sponsor/email"/> 
    23 DTSTART:<xsl:value-of select="start/fourdigityear"/><xsl:value-of select="start/twodigitmonth"/><xsl:value-of select="start/twodigitday"/>T<xsl:value-of select="start/twodigithour24"/><xsl:value-of select="start/twodigitminute"/>00 
    24 DTEND:<xsl:value-of select="end/fourdigityear"/><xsl:value-of select="end/twodigitmonth"/><xsl:value-of select="end/twodigitday"/>T<xsl:choose><xsl:when test="start/time='' and end/time=''">235959</xsl:when><xsl:when test="(end/longdate = start/longdate) and (end/twodigithour24 &lt; start/twodigithour24)"><xsl:value-of select="start/twodigithour24"/><xsl:value-of select="end/twodigitminute"/>00</xsl:when><xsl:otherwise><xsl:value-of select="end/twodigithour24"/><xsl:value-of select="end/twodigitminute"/>00</xsl:otherwise></xsl:choose> 
    25 LOCATION:<xsl:value-of select="location/address"/> 
    26 TRANSP:OPAQUE 
    27 SEQUENCE:0 
    28 UID:<xsl:value-of select="startdate"/><xsl:value-of select="starttime"/>_<xsl:value-of select="id"/>@<xsl:value-of select="/ucalendar/urlprefix"/> 
    29 DESCRIPTION:<xsl:value-of select="normalize-space(description)"/><xsl:if test="cost!=''">\nCost: <xsl:value-of select="cost"/></xsl:if><xsl:if test="sponsor/name!=''">\nSponsor: <xsl:value-of select="sponsor/name"/></xsl:if><xsl:if test="sponsor/phone!=''">\nSponsor phone: <xsl:value-of select="sponsor/phone"/></xsl:if>\n 
    30 SUMMARY:<xsl:value-of select="summary"/> 
    31 PRIORITY:5 
    32 CLASS:PUBLIC 
    33 END:VEVENT 
    34 END:VCALENDAR 
    35  
    36   </xsl:template> 
     11<!-- ================= --> 
     12<!--  iCAL STYLESHEET  --> 
     13<!-- ================= --> 
     14<xsl:template match="/"><xsl:value-of select="/bedework/vcalendar"/></xsl:template> 
    3715</xsl:stylesheet> 
  • trunk/calendar3/deployment/webuser/webapp/resources/demoskins/default/default/vcal.xsl

    r2 r374  
    99 
    1010<xsl:strip-space elements="*"/> 
    11   <!-- ================= --> 
    12   <!--  test vCAL STYLESHEET  --> 
    13   <!-- to produce vCal document --> 
    14   <!-- ================= --> 
    15  
    16   <!-- MAIN TEMPLATE --> 
    17   <xsl:template match="/"> 
    18     <xsl:apply-templates select="/ucalendar/event"/> 
    19   </xsl:template> 
    20  
    21   <!--==== SINGLE EVENT ====--> 
    22   <xsl:template match="event"> 
    23 BEGIN:VCALENDAR 
    24 BEGIN:VEVENT 
    25 ORGANIZER:<xsl:value-of select="sponsor/name"/> 
    26 MAILTO:<xsl:value-of select="sponsor/email"/> 
    27 DTSTART:<xsl:value-of select="start/fourdigityear"/><xsl:value-of select="start/twodigitmonth"/><xsl:value-of select="start/twodigitday"/>T<xsl:value-of select="start/twodigithour24"/><xsl:value-of select="start/twodigitminute"/>00 
    28 DTEND:<xsl:value-of select="end/fourdigityear"/><xsl:value-of select="end/twodigitmonth"/><xsl:value-of select="end/twodigitday"/>T<xsl:choose><xsl:when test="start/time='' and end/time=''">235959</xsl:when><xsl:when test="(end/longdate = start/longdate) and (end/twodigithour24 &lt; start/twodigithour24)"><xsl:value-of select="start/twodigithour24"/><xsl:value-of select="end/twodigitminute"/>00</xsl:when><xsl:otherwise><xsl:value-of select="end/twodigithour24"/><xsl:value-of select="end/twodigitminute"/>00</xsl:otherwise></xsl:choose> 
    29 LOCATION:<xsl:value-of select="location/address"/> 
    30 TRANSP:OPAQUE 
    31 SEQUENCE:0 
    32 UID:<xsl:value-of select="startdate"/><xsl:value-of select="starttime"/>_<xsl:value-of select="id"/>@<xsl:value-of select="/ucalendar/urlprefix"/> 
    33 DESCRIPTION:<xsl:value-of select="normalize-space(description)"/><xsl:if test="cost!=''">\nCost: <xsl:value-of select="cost"/></xsl:if><xsl:if test="sponsor/name!=''">\nSponsor: <xsl:value-of select="sponsor/name"/></xsl:if><xsl:if test="sponsor/phone!=''">\nSponsor phone: <xsl:value-of select="sponsor/phone"/></xsl:if>\n 
    34 SUMMARY:<xsl:value-of select="summary"/> 
    35 PRIORITY:5 
    36 CLASS:PUBLIC 
    37 END:VEVENT 
    38 END:VCALENDAR 
    39  
    40   </xsl:template> 
     11<!-- ================= --> 
     12<!--  vCAL STYLESHEET  --> 
     13<!-- ================= --> 
     14<xsl:template match="/"><xsl:value-of select="/bedework/vcalendar"/></xsl:template> 
    4115</xsl:stylesheet>