Changeset 2339

Show
Ignore:
Timestamp:
08/12/09 13:56:27
Author:
douglm
Message:

Bring up to date with trunk

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/douglm/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/default.xsl

    r2235 r2339  
    133133          </xsl:otherwise> 
    134134        </xsl:choose> 
    135         <link rel="stylesheet" href="{$resourcesRoot}/default/default/subColors.css"/> 
     135        <link rel="stylesheet" href="../../../bedework-common/default/default/subColors.css"/> 
    136136        <link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/default/default/print.css" /> 
    137137        <!-- load javascript --> 
     
    990990                     subscription styles should not be used for canceled events (tentative is ok). --> 
    991991                <xsl:variable name="subscriptionClass"> 
    992                   <xsl:if test="status != 'CANCELLED' and 
    993                                 subscription/subStyle != '' and 
    994                                 subscription/subStyle != 'default'"><xsl:value-of select="subscription/subStyle"/></xsl:if> 
     992                  <xsl:if test="status != 'CANCELLED'"> 
     993                    <xsl:apply-templates select="categories" mode="customEventColor"/> 
     994                  </xsl:if> 
    995995                </xsl:variable> 
    996996                <td class="{$descriptionClass} {$subscriptionClass}"> 
     
    13171317         subscription styles should not be used for cancelled events (tentative is ok). --> 
    13181318    <xsl:variable name="subscriptionClass"> 
    1319       <xsl:if test="status != 'CANCELLED' and 
    1320                     subscription/subStyle != '' and 
    1321                     subscription/subStyle != 'default'"><xsl:value-of select="subscription/subStyle"/></xsl:if> 
     1319      <xsl:if test="status != 'CANCELLED'"> 
     1320        <xsl:apply-templates select="categories" mode="customEventColor"/> 
     1321      </xsl:if> 
    13221322    </xsl:variable> 
    13231323    <li> 
     
    13831383      </a> 
    13841384    </li> 
     1385  </xsl:template> 
     1386 
     1387  <xsl:template match="categories" mode="customEventColor"> 
     1388    <!-- Set custom color schemes here. 
     1389         This template looks at the categories found in the event and 
     1390         returns a color class for use with the "subscriptionClass" variable. 
     1391         The classes suggested below come from bwColors.css found in the bedework-common directory. --> 
     1392    <xsl:choose> 
     1393       <!-- 
     1394       <xsl:when test="category/value = 'Athletics'">bwltpurple</xsl:when> 
     1395       <xsl:when test="category/value = 'Arts'">bwltsalmon</xsl:when> 
     1396       --> 
     1397       <xsl:otherwise></xsl:otherwise> <!-- do nothing --> 
     1398    </xsl:choose> 
    13851399  </xsl:template> 
    13861400 
  • branches/douglm/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r2235 r2339  
    400400    <meta content="text/html;charset=utf-8" http-equiv="Content-Type" /> 
    401401    <link rel="stylesheet" href="{$resourcesRoot}/default/default/default.css"/> 
    402     <link rel="stylesheet" href="{$resourcesRoot}/default/default/subColors.css"/> 
    403402    <link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/default/default/print.css" /> 
    404403    <link rel="icon" type="image/ico" href="{$resourcesRoot}/resources/bedework.ico" /> 
     
    15921591            Location: <xsl:value-of select="location/address"/><br/> 
    15931592          </xsl:if> 
    1594           Calendar: 
    1595           <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
    1596           <xsl:choose> 
    1597             <xsl:when test="contains(calendar/path,$userPath)"> 
    1598               <xsl:value-of select="substring-after(calendar/path,$userPath)"/> 
    1599             </xsl:when> 
    1600             <xsl:otherwise> 
    1601               <xsl:value-of select="calendar/path"/> 
    1602             </xsl:otherwise> 
    1603           </xsl:choose><br/> 
    16041593          Type: 
    16051594          <xsl:variable name="entityType"> 
     
    16131602            recurring 
    16141603          </xsl:if> 
    1615           <xsl:variable name="userStr">/principals/users/<xsl:value-of select="/bedework/userid"/></xsl:variable> 
     1604          <xsl:variable name="userStr"><xsl:value-of select="/bedework/syspars/userPrincipalRoot"/>/<xsl:value-of select="/bedework/userid"/></xsl:variable> 
    16161605          <xsl:choose> 
    16171606            <xsl:when test="$userStr = owner"> 
     
    16221611            </xsl:when> 
    16231612            <xsl:otherwise> 
    1624               <xsl:value-of select="$entityType"/> (<xsl:value-of select="calendar/owner"/>) 
     1613              <xsl:value-of select="$entityType"/> 
     1614            </xsl:otherwise> 
     1615          </xsl:choose><br/> 
     1616          Calendar: 
     1617          <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
     1618          <xsl:choose> 
     1619            <xsl:when test="contains(calendar/path,$userPath)"> 
     1620              <xsl:value-of select="substring-after(calendar/path,$userPath)"/> 
     1621            </xsl:when> 
     1622            <xsl:otherwise> 
     1623              <xsl:value-of select="calendar/path"/> 
    16251624            </xsl:otherwise> 
    16261625          </xsl:choose> 
     
    53615360          </td> 
    53625361        </tr> 
    5363         <tr> 
    5364           <th>Color:</th> 
    5365           <td> 
    5366             <input type="text" name="calendar.color" id="bwCalColor" size="7"> 
    5367               <xsl:attribute name="value"><xsl:value-of select="color"/></xsl:attribute> 
    5368               <xsl:attribute name="style">background-color: <xsl:value-of select="color"/>;color: black;</xsl:attribute> 
    5369             </input> 
    5370             <xsl:call-template name="colorPicker"> 
    5371               <xsl:with-param name="colorFieldId">bwCalColor</xsl:with-param> 
    5372             </xsl:call-template> 
    5373           </td> 
    5374         </tr> 
     5362        <xsl:if test="isSubscription='false'"> 
     5363          <!-- we can't color subscriptions yet --> 
     5364          <tr> 
     5365            <th>Color:</th> 
     5366            <td> 
     5367              <input type="text" name="calendar.color" id="bwCalColor" size="7"> 
     5368                <xsl:attribute name="value"><xsl:value-of select="color"/></xsl:attribute> 
     5369                <xsl:attribute name="style">background-color: <xsl:value-of select="color"/>;color: black;</xsl:attribute> 
     5370              </input> 
     5371              <xsl:call-template name="colorPicker"> 
     5372                <xsl:with-param name="colorFieldId">bwCalColor</xsl:with-param> 
     5373              </xsl:call-template> 
     5374            </td> 
     5375          </tr> 
     5376        </xsl:if> 
    53755377        <tr> 
    53765378          <th>Display:</th>