Changeset 1440

Show
Ignore:
Timestamp:
06/22/07 10:50:30
Author:
johnsa
Message:

user client: better attendee support in UI

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/resources/xsl/default/default/errors.xsl

    r1409 r1440  
    1111        An exception occurred: <em><xsl:value-of select="param"/></em> 
    1212      </xsl:when> 
    13  
     13       
    1414      <!-- client.error messages generally do not quite constitute validation errors 
    1515           which mostly involve changing a field content. 
     
    2929      <xsl:when test="id='org.bedework.client.error.badschedulewhat'"> 
    3030        Error: Bad scheduling what parameter. 
     31      </xsl:when> 
     32      <xsl:when test="id='org.bedework.error.scheduling.baddestinationcalendar'"> 
     33        Error: You must set a destination calendar 
    3134      </xsl:when> 
    3235      <xsl:when test="id='org.bedework.client.error.calsuitenotadded'"> 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r1439 r1440  
    55485548        <th class="commonHeader">&#160;</th> 
    55495549        <th class="commonHeader">sent</th> 
    5550         <th class="commonHeader">organizer</th> 
     5550        <th class="commonHeader">from</th> 
    55515551        <th class="commonHeader">title</th> 
    55525552        <th class="commonHeader">start</th> 
     
    55935593          </td> 
    55945594          <td> 
    5595             <xsl:if test="organizer"> 
    5596               <xsl:variable name="organizerUri" select="organizer/organizerUri"/> 
    5597               <xsl:choose> 
    5598                 <xsl:when test="organizer/cn != ''"> 
    5599                   <xsl:value-of select="organizer/cn"/> 
    5600                 </xsl:when> 
    5601                 <xsl:otherwise> 
    5602                   <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/> 
    5603                 </xsl:otherwise> 
    5604               </xsl:choose> 
    5605               <xsl:if test="organizer/organizerUri != ''"> 
    5606                 <a href="{$organizerUri}" class="emailIcon" title="email"> 
    5607                   <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> 
    5608                 </a> 
    5609               </xsl:if> 
    5610             </xsl:if> 
     5595            <xsl:choose> 
     5596              <xsl:when test="scheduleMethod = '1' or  
     5597                              scheduleMethod = '2' or 
     5598                              scheduleMethod = '4' or 
     5599                              scheduleMethod = '5' or 
     5600                              scheduleMethod = '8'"> 
     5601                <xsl:if test="organizer"> 
     5602                  <xsl:variable name="organizerUri" select="organizer/organizerUri"/> 
     5603                  <xsl:choose> 
     5604                    <xsl:when test="organizer/cn != ''"> 
     5605                      <xsl:value-of select="organizer/cn"/> 
     5606                    </xsl:when> 
     5607                    <xsl:otherwise> 
     5608                      <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/> 
     5609                    </xsl:otherwise> 
     5610                  </xsl:choose> 
     5611                  <xsl:if test="organizer/organizerUri != ''"> 
     5612                    <a href="{$organizerUri}" class="emailIcon" title="email"> 
     5613                      <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> 
     5614                    </a> 
     5615                  </xsl:if> 
     5616                </xsl:if> 
     5617              </xsl:when> 
     5618              <xsl:otherwise> 
     5619                <xsl:if test="attendees/attendee"> 
     5620                  <!-- there will only be one attendee at this point --> 
     5621                  <xsl:variable name="attendeeUri" select="attendees/attendee/attendeeUri"/> 
     5622                  <xsl:choose> 
     5623                    <xsl:when test="attendees/attendee/cn != ''"> 
     5624                      <xsl:value-of select="attendees/attendee/cn"/> 
     5625                    </xsl:when> 
     5626                    <xsl:otherwise> 
     5627                      <xsl:value-of select="substring-after(attendees/attendee/attendeeUri,'mailto:')"/> 
     5628                    </xsl:otherwise> 
     5629                  </xsl:choose> 
     5630                  <xsl:if test="$attendeeUri != ''"> 
     5631                    <a href="{$attendeeUri}" class="emailIcon" title="email"> 
     5632                      <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> 
     5633                    </a> 
     5634                  </xsl:if> 
     5635                </xsl:if> 
     5636              </xsl:otherwise> 
     5637            </xsl:choose> 
    56115638          </td> 
    56125639          <td> 
     
    57805807            </xsl:choose> 
    57815808          </th> 
     5809        </tr> 
     5810         
     5811        <tr> 
     5812          <td class="fieldname"> 
     5813            Calendar: 
     5814          </td> 
     5815          <td class="fieldval scheduleActions"> 
     5816            <!-- the string "user/" should not be hard coded; fix this --> 
     5817            <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable> 
     5818            <xsl:variable name="writableCalendars"> 
     5819              <xsl:value-of select=" 
     5820                count(/bedework/myCalendars//calendar[calType = '1' and 
     5821                       currentAccess/current-user-privilege-set/privilege/write-content]) + 
     5822                count(/bedework/mySubscriptions//calendar[calType = '1' and 
     5823                       currentAccess/current-user-privilege-set/privilege/write-content and 
     5824                       (not(contains(path,$userPath)))])"/> 
     5825            </xsl:variable> 
     5826            <xsl:choose> 
     5827              <xsl:when test="$writableCalendars = 1"> 
     5828                <!-- there is only 1 writable calendar, so find it by looking down both trees at once --> 
     5829                <xsl:variable name="newCalPath"><xsl:value-of select="/bedework/myCalendars//calendar[calType = '1' and 
     5830                         currentAccess/current-user-privilege-set/privilege/write-content]/path"/><xsl:value-of select="/bedework/mySubscriptions//calendar[calType = '1' and 
     5831                       currentAccess/current-user-privilege-set/privilege/write-content and 
     5832                       (not(contains(path,$userPath)))]/path"/></xsl:variable> 
     5833 
     5834                <input type="hidden" name="newCalPath" value="{$newCalPath}"/> 
     5835 
     5836                <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable> 
     5837                <span id="bwEventCalDisplay"> 
     5838                  <xsl:choose> 
     5839                    <xsl:when test="contains($newCalPath,$userFullPath)"> 
     5840                      <xsl:value-of select="substring-after($newCalPath,$userFullPath)"/> 
     5841                    </xsl:when> 
     5842                    <xsl:otherwise> 
     5843                      <xsl:value-of select="$newCalPath"/> 
     5844                    </xsl:otherwise> 
     5845                  </xsl:choose> 
     5846                </span> 
     5847              </xsl:when> 
     5848              <xsl:otherwise> 
     5849                <input type="hidden" name="newCalPath" id="bwNewCalPathField" value=""> 
     5850                  <xsl:if test="form/calendar/calType = '1'"><xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute></xsl:if> 
     5851                </input> 
     5852 
     5853                <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable> 
     5854                 
     5855                <span id="bwEventCalDisplay"> 
     5856                  <xsl:if test="form/calendar/calType = '1'"> 
     5857                    <xsl:choose> 
     5858                      <xsl:when test="contains(form/calendar/path,$userFullPath)"> 
     5859                        <xsl:value-of select="substring-after(form/calendar/path,$userFullPath)"/> 
     5860                      </xsl:when> 
     5861                      <xsl:otherwise> 
     5862                        <xsl:value-of select="form/calendar/path"/> 
     5863                      </xsl:otherwise> 
     5864                    </xsl:choose> 
     5865                  </xsl:if> 
     5866                  <xsl:text> </xsl:text> 
     5867                  <!-- this final text element is required to avoid an empty 
     5868                       span element which is improperly rendered in the browser --> 
     5869                </span> 
     5870 
     5871                <xsl:call-template name="selectCalForEvent"/> 
     5872 
     5873              </xsl:otherwise> 
     5874            </xsl:choose> 
     5875          </td> 
    57825876        </tr> 
    57835877        <tr> 
     
    60996193          </tr> 
    61006194        </xsl:if> 
    6101         <tr> 
    6102           <td class="fieldname"> 
    6103             Calendar: 
    6104           </td> 
    6105           <td class="fieldval"> 
    6106             <xsl:variable name="newCalPath" select="/bedework/formElements/form/calendar/path"/> 
    6107             <input type="hidden" name="newCalPath" value="{$newCalPath}" id="bwNewCalPathField"/> 
    6108             <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
    6109             <span id="bwEventCalDisplay"> 
    6110               <xsl:choose> 
    6111                 <xsl:when test="contains(/bedework/formElements/form/calendar/path,$userPath)"> 
    6112                   <xsl:value-of select="substring-after(/bedework/formElements/form/calendar/path,$userPath)"/> 
    6113                 </xsl:when> 
    6114                 <xsl:otherwise> 
    6115                   <xsl:value-of select="/bedework/formElements/form/calendar/path"/> 
    6116                 </xsl:otherwise> 
    6117               </xsl:choose> 
    6118             </span> 
    6119             copy this event to a calendar: <xsl:call-template name="selectCalForEvent"/> 
    6120           </td> 
    6121         </tr> 
    61226195        <!--  Transparency  --> 
    61236196        <!-- 
     
    62016274          <strong> 
    62026275            <a> 
    6203               <xsl:attribute name="href"><xsl:value-of select="attendee/attendeeUri"/></xsl:attribute> 
     6276              <xsl:attribute name="href"><xsl:value-of select="attendees/attendee/attendeeUri"/></xsl:attribute> 
    62046277              <xsl:choose> 
    62056278                <xsl:when test="cn != ''"> 
     
    62076280                </xsl:when> 
    62086281                <xsl:otherwise> 
    6209                   <xsl:value-of select="substring-after(attendee/attendeeUri,'mailto:')"/> 
     6282                  <xsl:value-of select="substring-after(attendees/attendee/attendeeUri,'mailto:')"/> 
    62106283                </xsl:otherwise> 
    62116284              </xsl:choose> 
     
    62196292        </td> 
    62206293        <td class="fieldval scheduleActions"> 
    6221           <xsl:value-of select="attendee/partstat"/> 
    6222           <xsl:if test="comments/comment"> 
     6294          <xsl:value-of select="attendees/attendee/partstat"/> 
     6295          <xsl:if test="comments/value"> 
    62236296            <p><strong>Comments:</strong></p> 
    62246297            <div id="comments"> 
    6225               <xsl:for-each select="comments/comment/value"> 
     6298              <xsl:for-each select="comments/value"> 
    62266299                <p><xsl:value-of select="."/></p> 
    62276300              </xsl:for-each>