Changeset 474

Show
Ignore:
Timestamp:
05/13/06 15:23:56
Author:
johnsa
Message:

updating public and personal client time display to properly account for events without duration and all day events

Files:

Legend:

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

    r444 r474  
    535535        <td class="fieldname">When:</td> 
    536536        <td class="fieldval"> 
    537           <!-- was using abbrev dayname: substring(start/dayname,1,3) --> 
    538537          <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> 
    539538          <xsl:if test="start/allday = 'false'"> 
    540539            <span class="time"><xsl:value-of select="start/time"/></span> 
    541540          </xsl:if> 
    542           <xsl:if test="end/allday = 'false' or end/longdate != start/longdate"> - </xsl:if> 
    543           <xsl:if test="end/longdate != start/longdate"><xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text></xsl:if> 
    544           <xsl:if test="end/allday = 'false'"><span class="time"><xsl:value-of select="end/time"/></span></xsl:if> 
    545           <xsl:if test="start/allday = 'true'"><span class="time"><em>(all day)</em></span></xsl:if> 
     541          <xsl:if test="(end/longdate != start/longdate) or 
     542                        ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> 
     543          <xsl:if test="end/longdate != start/longdate"> 
     544            <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> 
     545          </xsl:if> 
     546          <xsl:choose> 
     547            <xsl:when test="start/allday = 'true'"> 
     548              <span class="time"><em>(all day)</em></span> 
     549            </xsl:when> 
     550            <xsl:when test="end/longdate != start/longdate"> 
     551              <span class="time"><xsl:value-of select="end/time"/></span> 
     552            </xsl:when> 
     553            <xsl:when test="end/time != start/time"> 
     554              <span class="time"><xsl:value-of select="end/time"/></span> 
     555            </xsl:when> 
     556          </xsl:choose> 
    546557        </td> 
    547558        <th class="icalIcon" rowspan="2"> 
     
    654665          <tr> 
    655666            <td class="noEventsCell"> 
    656               There are no events posted 
    657               <xsl:choose> 
    658                 <xsl:when test="/bedework/periodname='Day'"> 
    659                   today<xsl:if test="/bedework/title!=''"> for <strong><xsl:value-of select="/bedework/title"/></strong></xsl:if><xsl:if test="/bedework/search!=''"> for search term <strong>"<xsl:value-of select="/bedework/search"/>"</strong></xsl:if>. 
    660                 </xsl:when> 
    661                 <xsl:when test="/bedework/periodname='Month'"> 
    662                   this month<xsl:if test="/bedework/title!=''"> for <strong><xsl:value-of select="/bedework/title"/></strong></xsl:if><xsl:if test="/bedework/search!=''"> for search term <strong>"<xsl:value-of select="/bedework/search"/>"</strong></xsl:if>. 
    663                 </xsl:when> 
    664                 <xsl:otherwise> 
    665                   this week<xsl:if test="/bedework/title!=''"> for <strong><xsl:value-of select="/bedework/title"/></strong></xsl:if><xsl:if test="/bedework/search!=''"> for search term <strong>"<xsl:value-of select="/bedework/search"/>"</strong></xsl:if>. 
    666                 </xsl:otherwise> 
    667               </xsl:choose> 
     667              No events to display. 
    668668            </td> 
    669669          </tr> 
     
    707707                    <td class="{$dateRangeStyle} center" colspan="3"> 
    708708                      all day 
     709                    </td> 
     710                  </xsl:when> 
     711                  <xsl:when test="start/shortdate = end/shortdate and  
     712                                  start/time = end/time"> 
     713                    <td class="{$dateRangeStyle} center" colspan="3"> 
     714                      <a href="{$eventView}?subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     715                        <xsl:value-of select="start/time"/>                       
     716                      </a> 
    709717                    </td> 
    710718                  </xsl:when> 
     
    784792                    <xsl:otherwise> 
    785793                      <a href="{$eventView}?subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    786                         <xsl:value-of select="summary"/>, <xsl:value-of select="location/address"/> 
     794                        <xsl:value-of select="summary"/> 
     795                        <xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if> 
    787796                      </a> 
    788797                    </xsl:otherwise> 
     
    905914            <xsl:when test="start/allday = 'false'"> 
    906915              <xsl:value-of select="start/time"/> 
    907                - <xsl:value-of select="end/time"/> 
     916              <xsl:if test="start/time != end/time"> 
     917                - <xsl:value-of select="end/time"/> 
     918              </xsl:if> 
    908919            </xsl:when> 
    909920            <xsl:otherwise> 
  • trunk/calendar3/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r473 r474  
    724724                    </td> 
    725725                  </xsl:when> 
     726                  <xsl:when test="start/shortdate = end/shortdate and  
     727                                  start/time = end/time"> 
     728                    <td class="{$dateRangeStyle} center" colspan="3"> 
     729                      <a href="{$eventView}?subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     730                        <xsl:value-of select="start/time"/>                       
     731                      </a> 
     732                    </td> 
     733                  </xsl:when> 
    726734                  <xsl:otherwise> 
    727735                    <td class="{$dateRangeStyle} right"> 
     
    766774                <xsl:variable name="descriptionClass"> 
    767775                  <xsl:choose> 
    768                     <xsl:when test="priority='cancelled'">description cancelled</xsl:when> 
     776                    <xsl:when test="status='CANCELLED'">description cancelled</xsl:when> 
    769777                    <xsl:otherwise>description</xsl:otherwise> 
    770778                  </xsl:choose> 
    771779                </xsl:variable> 
    772780                <td class="{$descriptionClass}"> 
     781                  <xsl:if test="status='CANCELLED'"><strong>CANCELLED: </strong></xsl:if> 
    773782                  <xsl:choose> 
    774783                    <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
    775784                      <a href="{$eventView}?subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    776                         <strong><xsl:value-of select="summary"/>: </strong> 
     785                        <strong> 
     786                          <xsl:value-of select="summary"/>: 
     787                        </strong> 
    777788                        <xsl:value-of select="description"/>&#160; 
    778789                        <em> 
     
    932943      <xsl:choose> 
    933944        <!-- Special styles for the month grid --> 
    934         <xsl:when test="status='cancelled'">eventCancelled</xsl:when> 
     945        <xsl:when test="status='CANCELLED'">eventCancelled</xsl:when> 
    935946        <xsl:when test="calendar/name='Holidays'">holiday</xsl:when> 
    936947        <!-- Alternating colors for all standard events --> 
     
    941952    <li> 
    942953      <a href="{$eventView}?subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" class="{$eventClass}"> 
     954        <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> 
    943955        <xsl:value-of select="summary"/> 
    944956        <xsl:variable name="eventTipClass"> 
     
    949961        </xsl:variable> 
    950962        <span class="{$eventTipClass}"> 
     963          <xsl:if test="status='CANCELLED'"><span class="eventTipStatus">CANCELLED</span></xsl:if> 
    951964          <strong><xsl:value-of select="summary"/></strong><br/> 
    952965          Time: 
     
    954967            <xsl:when test="start/allday = 'false'"> 
    955968              <xsl:value-of select="start/time"/> 
    956                - <xsl:value-of select="end/time"/> 
     969              <xsl:if test="start/time != end/time"> 
     970                - <xsl:value-of select="end/time"/> 
     971              </xsl:if> 
    957972            </xsl:when> 
    958973            <xsl:otherwise> 
     
    11441159        <td class="fieldname">When:</td> 
    11451160        <td class="fieldval"> 
    1146           <!-- was using abbrev dayname: substring(start/dayname,1,3) --> 
    11471161          <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> 
    1148           <span class="time"><xsl:value-of select="start/time"/></span> 
    1149           <xsl:if test="end/time != '' or end/longdate != start/longdate"> - </xsl:if> 
    1150           <xsl:if test="end/longdate != start/longdate"><xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text></xsl:if> 
    1151           <xsl:if test="end/time != ''"><span class="time"><xsl:value-of select="end/time"/></span></xsl:if> 
     1162          <xsl:if test="start/allday = 'false'"> 
     1163            <span class="time"><xsl:value-of select="start/time"/></span> 
     1164          </xsl:if> 
     1165          <xsl:if test="(end/longdate != start/longdate) or 
     1166                        ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> 
     1167          <xsl:if test="end/longdate != start/longdate"> 
     1168            <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> 
     1169          </xsl:if> 
     1170          <xsl:choose> 
     1171            <xsl:when test="start/allday = 'true'"> 
     1172              <span class="time"><em>(all day)</em></span> 
     1173            </xsl:when> 
     1174            <xsl:when test="end/longdate != start/longdate"> 
     1175              <span class="time"><xsl:value-of select="end/time"/></span> 
     1176            </xsl:when> 
     1177            <xsl:when test="end/time != start/time"> 
     1178              <span class="time"><xsl:value-of select="end/time"/></span> 
     1179            </xsl:when> 
     1180          </xsl:choose> 
    11521181        </td> 
    11531182        <!--<th class="icon" rowspan="2">