Changeset 34582 for documentation


Ignore:
Timestamp:
2020-12-05T18:53:14+13:00 (3 years ago)
Author:
anupama
Message:

Updates and new interface.txt file with code snippets for the final 3 customisation tutorials. Not sure why we didn't already have one. By copying directly from the tutorial html, I may not have noticed there was no text file containing all the prepared code snippets to paste into the various xsl files.

Location:
documentation/trunk/tutorial_sample_files
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • documentation/trunk/tutorial_sample_files/custom/gs3-homepage.txt

    r28331 r34582  
    4646<xsl:template name="loginButton">
    4747<xsl:variable name="username" select="/page/pageRequest/userInformation/@username"/>
     48<xsl:variable name="groups" select="/page/pageRequest/userInformation/@groups"/>
     49
    4850<xsl:choose>
    4951<xsl:when test="$username">
    50 <li><a>
    51 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>/admin/AccountSettings?s1.username=<xsl:value-of select="$username"/></xsl:attribute><xsl:value-of select="$username"/>
    52 </a></li>
    53 <li><a href="{$library_name}/admin/AddUser">Register a new user</a></li>
    54 <li><a href="{$library_name}/admin/ListUsers">Administration</a></li>
    55 <li><a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?logout=</xsl:attribute>Logout</a></li>
     52<xsl:if test="contains($groups,'admin')">
     53<li class="login"><a href="{$library_name}/admin/AddUser">Add user</a></li>
     54<li class="login"><a href="{$library_name}/admin/ListUsers">Administration</a></li>
     55</xsl:if>
     56<li class="login"><a href="{$library_name}/admin/AccountSettings?s1.username={$username}">Logged in as: <xsl:value-of select="$username"/></a></li>
     57<li class="login"><a href="{$library_name}?logout=">Logout</a></li>
    5658</xsl:when>
    5759<xsl:otherwise>
    58 <li><a href="?a=p&amp;sa=login&amp;redirectURL={$library_name}%3Fa=p%26sa=home">Login
    59 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_tip')"/></xsl:attribute>
    60 </a></li>
     60<li class="login">
     61<a href="{$library_name}?a=p&amp;sa=login&amp;redirectURL={$library_name}%3Fa=p%26sa=home">Login
     62<xsl:attribute name="title">
     63<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_tip')"/>
     64</xsl:attribute>
     65</a>
     66</li>
    6167</xsl:otherwise>
    6268</xsl:choose>
  • documentation/trunk/tutorial_sample_files/interfaces/aybara/main.xsl

    r28516 r34582  
    2020<html>
    2121    <head>
    22         <!-- ***** in header.xsl ***** -->
    23         <xsl:call-template name="create-html-header"/>
     22      <!-- ***** in header.xsl ***** -->
     23      <xsl:call-template name="create-html-header"/>
    2424    </head>
    2525    <body>
    26         <xsl:apply-templates select="/page"/>
    27         <xsl:call-template name="gs_footer"/>
     26      <div class="container" id="gs_content">
     27        <xsl:apply-templates select="/page"/>
     28      </div>
     29      <xsl:call-template name="gs_footer"/>
    2830    </body>
    2931</html>
Note: See TracChangeset for help on using the changeset viewer.