Changeset 3282

Show
Ignore:
Timestamp:
06/21/11 12:16:19
Author:
johnsa
Message:

user web client: hide references to an event's calendar in the event form when there is only one writable calendar

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • releases/bedework-3.7/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/eventForm.xsl

    r3204 r3282  
    208208       
    209209        <!--  Calendar  --> 
    210         <tr> 
    211           <td class="fieldname"> 
    212             <xsl:copy-of select="$bwStr-AEEF-Calendar"/><xsl:text> </xsl:text> 
    213           </td> 
    214           <td class="fieldval"> 
     210         
    215211            <!-- the string "user/" should not be hard coded; fix this --> 
    216212            <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable> 
     
    230226                       currentAccess/current-user-privilege-set/privilege/write-content and 
    231227                       (not(contains(path,$userPath)))]/path"/></xsl:variable> 
    232  
    233                 <input type="hidden" name="newCalPath" value="{$newCalPath}"/> 
    234                 <span id="bwEventCalDisplay"> 
    235                   <xsl:value-of select="form/calendar/summary"/> 
    236                   <xsl:text> </xsl:text> 
    237                 </span> 
     228                <tr class="hidden"><td><input type="hidden" name="newCalPath" value="{$newCalPath}"/></td></tr> 
    238229              </xsl:when> 
    239230              <xsl:otherwise> 
    240                 <input type="hidden" name="newCalPath" id="bwNewCalPathField"> 
    241                   <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
    242                 </input> 
    243                 <span id="bwEventCalDisplay"> 
    244                   <xsl:value-of select="form/calendar/summary"/> 
    245                   <xsl:text> </xsl:text> 
    246                 </span> 
    247                 <xsl:call-template name="selectCalForEvent"/> 
     231                <tr> 
     232                                          <td class="fieldname"> 
     233                                            <xsl:copy-of select="$bwStr-AEEF-Calendar"/><xsl:text> </xsl:text> 
     234                                          </td> 
     235                                          <td class="fieldval"> 
     236                                <input type="hidden" name="newCalPath" id="bwNewCalPathField"> 
     237                                  <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
     238                                </input> 
     239                                <span id="bwEventCalDisplay"> 
     240                                  <xsl:value-of select="form/calendar/summary"/> 
     241                                  <xsl:text> </xsl:text> 
     242                                </span> 
     243                                <xsl:call-template name="selectCalForEvent"/> 
     244                              </td> 
     245                            </tr> 
    248246              </xsl:otherwise> 
    249247            </xsl:choose> 
    250           </td> 
    251         </tr> 
    252248         
    253249        <!--  Summary (title) of event  --> 
  • trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/eventForm.xsl

    r3204 r3282  
    208208       
    209209        <!--  Calendar  --> 
    210         <tr> 
    211           <td class="fieldname"> 
    212             <xsl:copy-of select="$bwStr-AEEF-Calendar"/><xsl:text> </xsl:text> 
    213           </td> 
    214           <td class="fieldval"> 
     210         
    215211            <!-- the string "user/" should not be hard coded; fix this --> 
    216212            <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable> 
     
    230226                       currentAccess/current-user-privilege-set/privilege/write-content and 
    231227                       (not(contains(path,$userPath)))]/path"/></xsl:variable> 
    232  
    233                 <input type="hidden" name="newCalPath" value="{$newCalPath}"/> 
    234                 <span id="bwEventCalDisplay"> 
    235                   <xsl:value-of select="form/calendar/summary"/> 
    236                   <xsl:text> </xsl:text> 
    237                 </span> 
     228                <tr class="hidden"><td><input type="hidden" name="newCalPath" value="{$newCalPath}"/></td></tr> 
    238229              </xsl:when> 
    239230              <xsl:otherwise> 
    240                 <input type="hidden" name="newCalPath" id="bwNewCalPathField"> 
    241                   <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
    242                 </input> 
    243                 <span id="bwEventCalDisplay"> 
    244                   <xsl:value-of select="form/calendar/summary"/> 
    245                   <xsl:text> </xsl:text> 
    246                 </span> 
    247                 <xsl:call-template name="selectCalForEvent"/> 
     231                <tr> 
     232                                          <td class="fieldname"> 
     233                                            <xsl:copy-of select="$bwStr-AEEF-Calendar"/><xsl:text> </xsl:text> 
     234                                          </td> 
     235                                          <td class="fieldval"> 
     236                                <input type="hidden" name="newCalPath" id="bwNewCalPathField"> 
     237                                  <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
     238                                </input> 
     239                                <span id="bwEventCalDisplay"> 
     240                                  <xsl:value-of select="form/calendar/summary"/> 
     241                                  <xsl:text> </xsl:text> 
     242                                </span> 
     243                                <xsl:call-template name="selectCalForEvent"/> 
     244                              </td> 
     245                            </tr> 
    248246              </xsl:otherwise> 
    249247            </xsl:choose> 
    250           </td> 
    251         </tr> 
    252248         
    253249        <!--  Summary (title) of event  -->