Changeset 2559

Show
Ignore:
Timestamp:
12/26/09 12:09:58
Author:
bleibson
Message:

o rename jsonCategoryFilter.xsl to categoryFilter.xsl because I can use those templates in the rss-list sheet, change references in the json sheets.
o Add category filtering to the rss sheet

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/feeder/webapp/resources/demoskins/MainCampus/default/default/grid-json.xsl

    r2557 r2559  
    3434  <xsl:include href="./xsl/jsonEvent.xsl"/> 
    3535  <!-- Provides category filter templates --> 
    36   <xsl:include href="./xsl/jsonCategoryFiltering.xsl"/> 
     36  <xsl:include href="./xsl/categoryFiltering.xsl"/> 
    3737 
    3838  <!--  global variables -->  
  • trunk/deployment/feeder/webapp/resources/demoskins/MainCampus/default/default/list-json.xsl

    r2557 r2559  
    4040  <xsl:include href="./xsl/jsonEvent.xsl"/> 
    4141  <!-- Provides category filter templates --> 
    42   <xsl:include href="./xsl/jsonCategoryFiltering.xsl"/> 
     42  <xsl:include href="./xsl/categoryFiltering.xsl"/> 
    4343 
    4444  <!--  global variables --> 
  • trunk/deployment/feeder/webapp/resources/demoskins/MainCampus/default/default/list-rss.xsl

    r2549 r2559  
    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" 
     3  <xsl:output method="xml" omit-xml-declaration="no" indent="yes"  
    74    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    /> 
     5    media-type="text/xml" encoding="UTF-8" /> 
    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/feeder/main/listEvents.do?setappvar=summaryMode(details)&skinName=list-rss&days=5 
    26  
     19     days=n    To return n days from today into the future add this to the paramater list: &days=5  
    2720 
    2821     ===============================================================  --> 
     
    5245    to the maximum extent the law permits. --> 
    5346 
     47   <!-- Provides category filter templates --> 
     48   <xsl:include href="./xsl/categoryFiltering.xsl"/> 
     49 
    5450   <xsl:template match="/"> 
    5551     <rss version="2.0"> 
     
    7571             <xsl:apply-templates select="/bedework/searchResults/searchResult"/> 
    7672           </xsl:when> 
    77            <xsl:otherwise> 
    78              <xsl:apply-templates select="/bedework/events/event"/> 
     73           <xsl:otherwise>             
     74                 <xsl:choose> 
     75                          <xsl:when test="/bedework/appvar/key = 'filter'"> 
     76                                <xsl:variable name="filterName" select="substring-before(/bedework/appvar[key='filter']/value,':')"/> 
     77                                <xsl:variable name="filterVal" select="substring-after(/bedework/appvar[key='filter']/value,':')"/> 
     78                                <!-- Define filters here: --> 
     79                                <xsl:choose> 
     80                              <xsl:when test="$filterName = 'grpAndCats'"> 
     81                                        <xsl:call-template name="preprocessCats"> 
     82                                          <xsl:with-param name="allCats" select="$filterVal"/> 
     83                                        </xsl:call-template> 
     84                              </xsl:when> 
     85                                  <xsl:otherwise> 
     86                                        <!-- Filter name not defined? Turn off filtering. --> 
     87                                        <xsl:apply-templates select="event"/> 
     88                              </xsl:otherwise> 
     89                            </xsl:choose> 
     90                          </xsl:when> 
     91                          <xsl:otherwise> 
     92                                <xsl:apply-templates select="event"/> 
     93                          </xsl:otherwise> 
     94                         </xsl:choose> 
    7995           </xsl:otherwise> 
    8096        </xsl:choose>