Changeset 2709

Show
Ignore:
Timestamp:
01/22/10 16:19:08
Author:
johnsa
Message:

Complete - # 544: update user client rss skin to reflect updates in feeder app
http://www.bedework.org/trac/bedework/ticket/544

Files:

Legend:

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

    r2195 r2709  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    3   <xsl:output 
    4     method="xml" 
    5     omit-xml-declaration="no" 
    6     indent="yes" 
    7     doctype-public="'-//Netscape Communications//DTD RSS 0.91//EN' 'http://my.netscape.com/public/formats/rss-0.91.dtd'" 
    8     media-type="text/xml" 
    9     encoding="UTF-8" 
    10    /> 
     3  <xsl:output method="xml" omit-xml-declaration="no" indent="yes" 
     4    media-type="text/xml" encoding="UTF-8" /> 
     5 
    116   <!-- ========================================================= 
    127 
     
    2217     Optional parameters that may be added to the query string: 
    2318 
    24      days=n    return n days from today into the future. 
    25                Example: http://localhost:8080/cal/main/listEvents.do?setappvar=summaryMode(details)&skinName=rss-list&days=5 
    26  
    27  
    28      Note: rss.xsl is an older file used to pull a list of events from the 
    29      day, week, or month views.  It is maintained for backwards 
    30      compatibility. 
     19     days=n    To return n days from today into the future add this to the paramater list: &days=5 
    3120 
    3221     ===============================================================  --> 
     
    5544    special, consequential, or incidental damages related to the software, 
    5645    to the maximum extent the law permits. --> 
     46     
     47     
     48   <xsl:include href="strings.xsl"/> 
    5749 
    5850   <xsl:template match="/"> 
     
    7163          --><xsl:call-template name="monthNumToName"><xsl:with-param name="monthNum" select="substring(/bedework/now/utc,5,2)"/></xsl:call-template><xsl:text> </xsl:text><!-- 
    7264          --><xsl:value-of select="substring(/bedework/now/utc,1,4)"/><xsl:text> </xsl:text><!-- 
    73           --><xsl:value-of select="substring(/bedework/now/utc,10,2)"/>:<xsl:value-of select="substring(/bedework/now/utc,11,2)"/>:00 UT</pubDate> 
     65          --><xsl:value-of select="substring(/bedework/now/utc,10,2)"/>:<xsl:value-of select="substring(/bedework/now/utc,12,2)"/>:00 UT</pubDate> 
    7466        <language>en-US</language> 
    7567        <copyright>Copyright <xsl:value-of select="substring(/bedework/now/utc,1,4)"/>, Bedework</copyright> 
    76         <managingEditor>editor@mysite.edu, Editor Name</managingEditor> 
     68        <managingEditor>editor@mysite.edu (Editor Name)</managingEditor> 
    7769        <xsl:choose> 
    7870           <xsl:when test="/bedework/page='searchResult'"> 
     
    9183      <title><xsl:if test="status = 'CANCELLED'">CANCELED: </xsl:if><xsl:value-of select="summary"/> - <xsl:value-of select="substring(start/dayname,1,3)"/>, <xsl:value-of select="start/longdate"/></title> 
    9284      <link><xsl:value-of select="/bedework/urlprefix"/>/event/eventView.do?calPath=<xsl:value-of select="calendar/encodedPath"/>&amp;guid=<xsl:value-of select="guid"/>&amp;recurrenceId=<xsl:value-of select="recurrenceId"/></link> 
     85      <guid><xsl:value-of select="/bedework/urlprefix"/>/event/eventView.do?calPath=<xsl:value-of select="calendar/encodedPath"/>&amp;guid=<xsl:value-of select="guid"/>&amp;recurrenceId=<xsl:value-of select="recurrenceId"/></guid> 
    9386      <pubDate><!-- takes the form: 11 Jan 2008 17:00:00 UT (note - do not output dayname - we only provide dayname in local time). 
    9487        --><xsl:value-of select="substring(start/utcdate,7,2)"/><xsl:text> </xsl:text><!-- 
    9588        --><xsl:call-template name="monthNumToName"><xsl:with-param name="monthNum" select="substring(start/utcdate,5,2)"/></xsl:call-template><xsl:text> </xsl:text><!-- 
    9689        --><xsl:value-of select="substring(start/utcdate,1,4)"/><xsl:text> </xsl:text><!-- 
    97         --><xsl:value-of select="substring(start/utcdate,10,2)"/>:<xsl:value-of select="substring(start/utcdate,11,2)"/>:00 UT</pubDate> 
    98       <description><!-- 
    99         --><xsl:value-of select="substring(start/dayname,1,3)"/>,<xsl:text> </xsl:text><!-- 
    100         --><xsl:value-of select="start/longdate"/><!-- 
    101         --><xsl:text> </xsl:text><!-- 
    102         --><xsl:value-of select="start/time"/><!-- 
    103         --><xsl:if test="end/time != ''"> - </xsl:if><!-- 
    104         --><xsl:if test="end/dayname != start/dayname"><xsl:value-of select="substring(end/dayname,1,3)"/>, </xsl:if><!-- 
    105         --><xsl:if test="end/longdate != start/longdate"><xsl:value-of select="end/longdate"/>, </xsl:if><!-- 
    106         --><xsl:if test="end/time != ''"><xsl:value-of select="end/time"/></xsl:if><!-- 
    107         --><xsl:text> </xsl:text><!-- 
    108         --><xsl:value-of select="location/address"/>.<!-- 
    109         --><xsl:text> </xsl:text><!-- 
    110         --><xsl:if test="cost!=''"><xsl:value-of select="cost"/>.</xsl:if><!-- 
    111         --><xsl:text> </xsl:text><!-- 
    112         --><xsl:value-of select="description"/><!-- 
    113         --><xsl:text> </xsl:text><xsl:if test="status = 'CANCELLED'">(CANCELED)</xsl:if><!-- 
    114       --></description> 
     90        --><xsl:value-of select="substring(start/utcdate,10,2)"/>:<xsl:value-of select="substring(start/utcdate,12,2)"/>:00 UT</pubDate> 
     91      <description> 
     92        <xsl:value-of select="start/dayname" />, 
     93        <xsl:value-of select="start/longdate" /> 
     94        <xsl:text> </xsl:text> 
     95        <xsl:if test="start/allday = 'false'"> 
     96          <xsl:value-of select="start/time" /> 
     97        </xsl:if> 
     98        <xsl:if 
     99          test="(end/longdate != start/longdate) or 
     100                ((end/longdate = start/longdate) and (end/time != start/time))"> 
     101          - 
     102        </xsl:if> 
     103        <xsl:if test="end/longdate != start/longdate"> 
     104          <xsl:value-of select="substring(end/dayname,1,3)" /> 
     105          , 
     106          <xsl:value-of select="end/longdate" /> 
     107          <xsl:text> </xsl:text> 
     108        </xsl:if> 
     109        <xsl:choose> 
     110          <xsl:when test="start/allday = 'true'"> 
     111            <xsl:copy-of select="$bwStr-SgEv-AllDay"/> 
     112          </xsl:when> 
     113          <xsl:when test="end/longdate != start/longdate"> 
     114            <xsl:value-of select="end/time" /> 
     115          </xsl:when> 
     116          <xsl:when test="end/time != start/time"> 
     117 
     118              <xsl:value-of select="end/time" /> 
     119 
     120          </xsl:when> 
     121        </xsl:choose> 
     122        <!-- if timezones are not local, or if floating add labels: --> 
     123        <xsl:if test="start/timezone/islocal = 'false' or end/timezone/islocal = 'false'"> 
     124          <xsl:text> </xsl:text> 
     125          -- 
     126          <xsl:choose> 
     127            <xsl:when test="start/floating = 'true'"> 
     128              <xsl:copy-of select="$bwStr-SgEv-FloatingTime"/> 
     129            </xsl:when> 
     130            <xsl:otherwise> 
     131              <xsl:copy-of select="$bwStr-SgEv-LocalTime"/> 
     132            </xsl:otherwise> 
     133          </xsl:choose> 
     134        </xsl:if> 
     135        <!-- display in timezone if not local or floating time) --> 
     136        <xsl:if test="(start/timezone/islocal = 'false' or end/timezone/islocal = 'false') and start/floating = 'false'"> 
     137          <xsl:choose> 
     138            <xsl:when test="start/timezone/id != end/timezone/id"> 
     139              <!-- need to display both timezones if they differ from start to end --> 
     140              <div class="tzdates"> 
     141                <xsl:copy-of select="$bwStr-SgEv-Start"/><xsl:text> </xsl:text> 
     142                <xsl:choose> 
     143                  <xsl:when test="start/timezone/islocal='true'"> 
     144                    <xsl:value-of select="start/dayname"/>, 
     145                    <xsl:value-of select="start/longdate"/> 
     146                    <xsl:text> </xsl:text> 
     147                    <xsl:value-of select="start/time"/> 
     148                  </xsl:when> 
     149                  <xsl:otherwise> 
     150                    <xsl:value-of select="start/timezone/dayname"/>, 
     151                    <xsl:value-of select="start/timezone/longdate"/> 
     152                    <xsl:text> </xsl:text> 
     153                    <xsl:value-of select="start/timezone/time"/> 
     154                  </xsl:otherwise> 
     155                </xsl:choose> 
     156                -- 
     157                <strong><xsl:value-of select="start/timezone/id"/></strong> 
     158                <xsl:copy-of select="$bwStr-SgEv-End"/><xsl:text> </xsl:text> 
     159                <xsl:choose> 
     160                  <xsl:when test="end/timezone/islocal='true'"> 
     161                    <xsl:value-of select="end/dayname"/>, 
     162                    <xsl:value-of select="end/longdate"/> 
     163                    <xsl:text> </xsl:text> 
     164                    <xsl:value-of select="end/time"/> 
     165                  </xsl:when> 
     166                  <xsl:otherwise> 
     167                    <xsl:value-of select="end/timezone/dayname"/>, 
     168                    <xsl:value-of select="end/timezone/longdate"/> 
     169                    <xsl:text> </xsl:text> 
     170                    <xsl:value-of select="end/timezone/time"/> 
     171                  </xsl:otherwise> 
     172                </xsl:choose> 
     173                -- 
     174                <strong><xsl:value-of select="end/timezone/id"/></strong> 
     175              </div> 
     176            </xsl:when> 
     177            <xsl:otherwise> 
     178              <!-- otherwise, timezones are the same: display as a single line  --> 
     179              <xsl:value-of select="start/timezone/dayname"/>, <xsl:value-of select="start/timezone/longdate"/><xsl:text> </xsl:text> 
     180              <xsl:if test="start/allday = 'false'"> 
     181                <xsl:value-of select="start/timezone/time"/> 
     182              </xsl:if> 
     183              <xsl:if test="(end/timezone/longdate != start/timezone/longdate) or 
     184                            ((end/timezone/longdate = start/timezone/longdate) and (end/timezone/time != start/timezone/time))"> - </xsl:if> 
     185              <xsl:if test="end/timezone/longdate != start/timezone/longdate"> 
     186                <xsl:value-of select="substring(end/timezone/dayname,1,3)"/>, <xsl:value-of select="end/timezone/longdate"/><xsl:text> </xsl:text> 
     187              </xsl:if> 
     188              <xsl:choose> 
     189                <xsl:when test="start/allday = 'true'"> 
     190                   <xsl:copy-of select="$bwStr-SgEv-AllDay"/> 
     191                </xsl:when> 
     192                <xsl:when test="end/timezone/longdate != start/timezone/longdate"> 
     193                  <xsl:value-of select="end/timezone/time"/> 
     194                </xsl:when> 
     195                <xsl:when test="end/timezone/time != start/timezone/time"> 
     196                  <xsl:value-of select="end/timezone/time"/> 
     197                </xsl:when> 
     198              </xsl:choose> 
     199              <xsl:text> </xsl:text> 
     200              -- 
     201              <strong><xsl:value-of select="start/timezone/id"/></strong> 
     202            </xsl:otherwise> 
     203          </xsl:choose> 
     204        </xsl:if> 
     205 
     206        <![CDATA[ 
     207          <br/> 
     208        ]]> 
     209 
     210        <xsl:copy-of select="$bwStr-SgEv-Where"/><xsl:text> </xsl:text> 
     211        <xsl:choose> 
     212          <xsl:when test="location/link=''"> 
     213            <xsl:value-of select="location/address" /> 
     214            <xsl:text> </xsl:text> 
     215            <xsl:if test="location/subaddress!=''"> 
     216              <xsl:text> </xsl:text> 
     217              <xsl:value-of select="location/subaddress" /> 
     218            </xsl:if> 
     219          </xsl:when> 
     220          <xsl:otherwise> 
     221            <a> 
     222              <xsl:attribute name="href"><xsl:value-of select="location/link"/></xsl:attribute> 
     223              <xsl:value-of select="location/address"/> 
     224              <xsl:if test="location/subaddress!=''"> 
     225                <xsl:text> </xsl:text> 
     226                <xsl:value-of select="location/subaddress" /> 
     227              </xsl:if> 
     228            </a> 
     229          </xsl:otherwise> 
     230        </xsl:choose> 
     231 
     232        <![CDATA[ 
     233          <br/> 
     234        ]]> 
     235 
     236        <xsl:if test="cost!=''"> 
     237          <xsl:copy-of select="$bwStr-SgEv-Cost"/><xsl:text> </xsl:text> 
     238          <xsl:value-of select="cost" /> 
     239          <![CDATA[ 
     240            <br/> 
     241          ]]> 
     242        </xsl:if> 
     243 
     244        <xsl:copy-of select="$bwStr-SgEv-Description"/><xsl:text> </xsl:text> 
     245        <xsl:value-of select="description"/> 
     246 
     247        <![CDATA[ 
     248          <br/> 
     249        ]]> 
     250 
     251        <xsl:if test="status !='' and status != 'CONFIRMED'"> 
     252          <xsl:copy-of select="$bwStr-SgEv-STATUS"/><xsl:text> </xsl:text> 
     253          <xsl:value-of select="status" /> 
     254          <![CDATA[ 
     255            <br/> 
     256          ]]> 
     257        </xsl:if> 
     258 
     259        <xsl:if test="contact/name!='None'"> 
     260          <xsl:copy-of select="$bwStr-SgEv-Contact"/><xsl:text> </xsl:text> 
     261          <xsl:value-of select="contact/name" /> 
     262          <xsl:if test="contact/phone!=''"> 
     263            <xsl:text> </xsl:text> 
     264            <xsl:value-of select="contact/phone" /> 
     265          </xsl:if> 
     266          <![CDATA[ 
     267            <br/> 
     268          ]]> 
     269        </xsl:if> 
     270 
     271        <xsl:if test="categories[1]/category"> 
     272          <xsl:copy-of select="$bwStr-SgEv-Categories"/><xsl:text> </xsl:text> 
     273          <xsl:for-each select="categories/category"> 
     274            <xsl:value-of select="value"/><xsl:if test="position() != last()">, </xsl:if> 
     275          </xsl:for-each> 
     276          <![CDATA[ 
     277            <br/> 
     278          ]]> 
     279        </xsl:if> 
     280      </description> 
    115281    </item> 
    116282  </xsl:template>