Changeset 1783

Show
Ignore:
Timestamp:
03/17/08 14:59:14
Author:
johnsa
Message:

submissions client: correct calendar path bug

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • releases/bedework-3.4.1/deployment/websubmit/webapp/resources/demoskins/default/default/default.xsl

    r1726 r1783  
    467467          <!-- Calendar --> 
    468468          <!-- ======== --> 
    469           <!--  the string "user/" should not be hard coded; fix this --> 
    470469          <xsl:variable name="submissionCalendars"> 
    471             <xsl:value-of select="count(/bedework/myCalendars//calendar[starts-with(path,/bedework/submissionsRoot/unencoded) and calType='1']) = '1'"/> 
     470            <xsl:value-of select="count(/bedework/myCalendars//calendar[calType='1'])"/> 
    472471          </xsl:variable> 
    473472          <tr> 
     
    483482              <xsl:choose> 
    484483                <xsl:when test="$submissionCalendars = 1"> 
    485                   <!-- there is only 1 writable calendar, so find it by looking down both trees at once --> 
    486                   <xsl:variable name="newCalPath"><xsl:value-of select="/bedework/myCalendars//calendar[starts-with(path,/bedework/submissionsRoot/unencoded) and calType='1']/path"/></xsl:variable> 
     484                  <!-- there is only 1 writable calendar, just send a hidden field --> 
     485                  <xsl:variable name="newCalPath"><xsl:value-of select="/bedework/myCalendars//calendar[calType='1']/path"/></xsl:variable> 
    487486                  <input type="hidden" name="newCalPath" value="{$newCalPath}"/> 
    488  
    489487                  <span id="bwEventCalDisplay"> 
    490488                    <xsl:value-of select="$newCalPath"/> 
     
    493491                <xsl:otherwise> 
    494492                  <select name="newCalPath" id="bwNewCalPathField"> 
    495                     <xsl:for-each select="/bedework/myCalendars//calendar[starts-with(path,/bedework/submissionsRoot/unencoded) and calType='1']"> 
     493                    <xsl:for-each select="/bedework/myCalendars//calendar[calType='1']"> 
    496494                      <option> 
    497                         <xsl:attribute name="value"><xsl:value-of select="/bedework/submissionsRoot/unencoded"/></xsl:attribute> 
     495                        <xsl:attribute name="value"><xsl:value-of select="path"/></xsl:attribute> 
    498496                        <xsl:value-of select="substring-after(substring-after(path,/bedework/submissionsRoot/unencoded),'/')"/> 
    499497                      </option>