Changeset 1640

Show
Ignore:
Timestamp:
11/30/07 08:00:54
Author:
kllin
Message:

restructuring image locations for webpublic so it looks the same as webuser.

Files:

Legend:

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

    r1637 r1640  
    6161  <xsl:include href="../../../bedework-common/default/default/errors.xsl"/> 
    6262  <xsl:include href="../../../bedework-common/default/default/messages.xsl"/> 
    63  
    64   <!-- DEFINE GLOBAL CONSTANTS --> 
    65  
    66   <!-- URL of html resources (images, css, other html); by default this is 
    67        set to the application root --> 
    68   <xsl:variable name="resourcesRoot" select="/bedework/approot"/> 
    69  
    70   <!-- URL of the XSL template directory --> 
    71   <!-- The approot is an appropriate place to put 
    72        included stylesheets and xml fragments. These are generally 
    73        referenced relatively (like errors.xsl and messages.xsl above); 
    74        this variable is here for your convenience if you choose to 
    75        reference it explicitly.  It is not used in this stylesheet, however, 
    76        and can be safely removed if you so choose. --> 
    77   <xsl:variable name="appRoot" select="/bedework/approot"/> 
    78  
    79   <!-- Properly encoded prefixes to the application actions; use these to build 
    80        urls; allows the application to be used without cookies or within a portal. 
    81        These urls are rewritten in header.jsp and simply passed through for use 
    82        here. Every url includes a query string (either ?b=de or a real query 
    83        string) so that all links constructed in this stylesheet may begin the 
    84        query string with an ampersand. --> 
    85   <xsl:variable name="setup" select="/bedework/urlPrefixes/setup"/> 
    86   <xsl:variable name="setSelection" select="/bedework/urlPrefixes/main/setSelection"/> 
    87   <xsl:variable name="fetchPublicCalendars" select="/bedework/urlPrefixes/calendar/fetchPublicCalendars"/> 
    88   <xsl:variable name="setViewPeriod" select="/bedework/urlPrefixes/main/setViewPeriod"/> 
    89   <xsl:variable name="eventView" select="/bedework/urlPrefixes/event/eventView"/> 
    90   <xsl:variable name="addEventRef" select="/bedework/urlPrefixes/event/addEventRef"/> 
    91   <xsl:variable name="export" select="/bedework/urlPrefixes/misc/export"/> 
    92   <xsl:variable name="search" select="/bedework/urlPrefixes/search/search"/> 
    93   <xsl:variable name="search-next" select="/bedework/urlPrefixes/search/next"/> 
    94   <xsl:variable name="calendar-fetchForExport" select="/bedework/urlPrefixes/calendar/fetchForExport"/> 
    95   <xsl:variable name="mailEvent" select="/bedework/urlPrefixes/mail/mailEvent"/> 
    96   <!-- Unused 
    97   <xsl:variable name="showPage" select="/bedework/urlPrefixes/main/showPage"/> 
    98    --> 
    99  <xsl:variable name="stats" select="/bedework/urlPrefixes/stats/stats"/> 
    100  
    101   <!-- URL of the web application - includes web context --> 
    102   <xsl:variable name="urlPrefix" select="/bedework/urlprefix"/> 
    103  
    104   <!-- Other generally useful global variables --> 
    105   <xsl:variable name="privateCal">/ucal</xsl:variable> 
    106   <xsl:variable name="prevdate" select="/bedework/previousdate"/> 
    107   <xsl:variable name="nextdate" select="/bedework/nextdate"/> 
    108   <xsl:variable name="curdate" select="/bedework/currentdate/date"/> 
    109  
     63  <xsl:include href="../../../bedework-common/default/default/variables.xsl"/> 
    11064 
    11165  <!-- MAIN TEMPLATE --> 
     
    13993      <body> 
    14094        <xsl:call-template name="headBar"/> 
    141         <xsl:if test="/bedework/error"> 
    142           <div id="errors"> 
    143             <xsl:apply-templates select="/bedework/error"/> 
    144           </div> 
    145         </xsl:if> 
     95        <xsl:call-template name="messagesAndErrors"/> 
    14696        <xsl:call-template name="tabs"/> 
    14797        <xsl:call-template name="navigation"/> 
     
    274224  </xsl:template> 
    275225 
     226  <xsl:template name="messagesAndErrors"> 
     227    <xsl:if test="/bedework/message"> 
     228      <ul id="messages"> 
     229        <xsl:for-each select="/bedework/message"> 
     230          <li><xsl:apply-templates select="."/></li> 
     231        </xsl:for-each> 
     232      </ul> 
     233    </xsl:if> 
     234    <xsl:if test="/bedework/error"> 
     235      <ul id="errors"> 
     236        <xsl:for-each select="/bedework/error"> 
     237          <li><xsl:apply-templates select="."/></li> 
     238        </xsl:for-each> 
     239      </ul> 
     240    </xsl:if> 
     241  </xsl:template> 
     242 
    276243  <xsl:template name="tabs"> 
    277     <xsl:choose> 
    278       <xsl:when test="/bedework/page='eventscalendar'"> 
    279         <table border="0" cellpadding="0" cellspacing="0" id="tabsTable"> 
    280           <tr> 
    281             <td> 
     244    <xsl:variable name="navAction"> 
     245      <xsl:choose> 
     246        <xsl:when test="/bedework/page='attendees'"><xsl:value-of select="$event-attendeesForEvent"/></xsl:when> 
     247        <xsl:when test="/bedework/page='freeBusy'"><xsl:value-of select="$freeBusy-fetch"/></xsl:when> 
     248        <xsl:otherwise><xsl:value-of select="$setViewPeriod"/></xsl:otherwise> 
     249      </xsl:choose> 
     250    </xsl:variable> 
     251    <table cellspacing="0" id="tabsTable"> 
     252      <tr> 
     253        <td> 
     254          <xsl:choose> 
     255            <xsl:when test="/bedework/periodname='Day'"> 
     256              <a href="{$navAction}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-day-on.gif" width="90" height="20" border="0" alt="DAY"/></a> 
     257            </xsl:when> 
     258            <xsl:otherwise> 
     259              <a href="{$navAction}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-day-off.gif" width="90" height="20" border="0" alt="DAY"/></a> 
     260            </xsl:otherwise> 
     261          </xsl:choose> 
     262        </td> 
     263        <td> 
     264          <xsl:choose> 
     265            <xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> 
     266              <a href="{$navAction}&amp;viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-week-on.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
     267             </xsl:when> 
     268            <xsl:otherwise> 
     269              <a href="{$navAction}&amp;viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
     270             </xsl:otherwise> 
     271          </xsl:choose> 
     272        </td> 
     273        <td> 
     274          <xsl:choose> 
     275            <xsl:when test="/bedework/periodname='Month'"> 
     276              <a href="{$navAction}&amp;viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-month-on.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
     277            </xsl:when> 
     278            <xsl:otherwise> 
     279              <a href="{$navAction}&amp;viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
     280            </xsl:otherwise> 
     281          </xsl:choose> 
     282        </td> 
     283        <td> 
     284          <xsl:choose> 
     285            <!-- don't allow switching to year for free busy view, so only use setViewPeriod action --> 
     286            <xsl:when test="/bedework/periodname='Year'"> 
     287              <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-year-on.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
     288            </xsl:when> 
     289            <xsl:otherwise> 
    282290              <xsl:choose> 
    283                 <xsl:when test="/bedework/periodname='Day'"> 
    284                   <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-day-on.gif" width="91" height="20" border="0" alt="DAY"/></a
     291                <xsl:when test="/bedework/page='attendees' or /bedework/page='freeBusy'"> 
     292                  <img src="{$resourcesRoot}/resources/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/
    285293                </xsl:when> 
    286294                <xsl:otherwise> 
    287                   <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-day-off.gif" width="91" height="20" border="0" alt="DAY"/></a> 
     295                  <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
    288296                </xsl:otherwise> 
    289297              </xsl:choose> 
    290             </td> 
    291             <td> 
    292               <xsl:choose> 
    293                 <xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> 
    294                   <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-week-on.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
    295                  </xsl:when> 
    296                 <xsl:otherwise> 
    297                   <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
    298                  </xsl:otherwise> 
    299               </xsl:choose> 
    300             </td> 
    301             <td> 
    302               <xsl:choose> 
    303                 <xsl:when test="/bedework/periodname='Month'"> 
    304                   <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-month-on.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
    305                 </xsl:when> 
    306                 <xsl:otherwise> 
    307                   <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
    308                 </xsl:otherwise> 
    309               </xsl:choose> 
    310             </td> 
    311             <td> 
    312               <xsl:choose> 
    313                 <xsl:when test="/bedework/periodname='Year'"> 
    314                   <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-year-on.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
    315                 </xsl:when> 
    316                 <xsl:otherwise> 
    317                   <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
    318                 </xsl:otherwise> 
    319               </xsl:choose> 
    320             </td> 
    321             <td class="centerCell"> 
    322               &#160;<!--<img src="{$resourcesRoot}/images/std-button-today.gif" width="46" height="17" border="0" alt="TODAY"/>--> 
    323             </td> 
    324             <td class="rightCell"> 
    325               &#160; 
    326             </td> 
    327           </tr> 
    328         </table> 
    329       </xsl:when> 
    330       <xsl:otherwise> 
    331         <table border="0" cellpadding="0" cellspacing="0" id="tabsTable"> 
    332           <tr> 
    333             <td> 
    334               <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-day-off.gif" width="91" height="20" border="0" alt="DAY"/></a> 
    335             </td> 
    336             <td> 
    337               <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
    338             </td> 
    339             <td> 
    340               <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
    341             </td> 
    342             <td> 
    343               <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
    344             </td> 
    345             <td class="centerCell"> 
    346               &#160;<!--<img src="{$resourcesRoot}/images/std-button-today.gif" width="46" height="17" border="0" alt="TODAY"/>--> 
    347             </td> 
    348             <td class="rightCell"> 
    349               &#160; 
    350             </td> 
    351           </tr> 
    352         </table> 
    353       </xsl:otherwise> 
    354     </xsl:choose> 
     298            </xsl:otherwise> 
     299          </xsl:choose> 
     300        </td> 
     301        <td class="rightCell"> 
     302          <xsl:if test="/bedework/userid"> 
     303            logged in as 
     304            <xsl:text> </xsl:text> 
     305            <strong><xsl:value-of select="/bedework/userid"/></strong> 
     306            <xsl:text> </xsl:text> 
     307            <span class="logout"><a href="{$setup}&amp;logout=true">logout</a></span> 
     308          </xsl:if> 
     309        </td> 
     310      </tr> 
     311    </table> 
    355312  </xsl:template> 
    356313