Ignore:
Timestamp:
2011-05-04T17:13:29+12:00 (13 years ago)
Author:
sjm84
Message:

More updates to the Oran skin

Location:
main/trunk/greenstone3/web/interfaces/oran
Files:
11 added
8 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/oran/style/berry.css

    r23813 r23989  
    1111}
    1212
     13#berrybasket_new {
     14    min-height: 22px;
     15    padding: 5px;
     16    /* background: #E0F0E0 url("../images/berrybasket.png") scroll no-repeat 0 0; */
     17    background: transparent url("../images/kete2.png") scroll repeat 0 0;
     18    z-index:10;
     19    /*cursor: pointer;*/
     20    font-size: 80%;
     21    min-height: 2em;
     22    top:120px;
     23    right:0;
     24    position:fixed;
     25    height:500px;
     26    width:9.5%;
     27}
     28
    1329#baskethandle {
    1430    cursor: move;
  • main/trunk/greenstone3/web/interfaces/oran/style/core.css

    r23813 r23989  
    1111}
    1212
     13h3 {
     14    margin-top:2px;
     15    margin-bottom:2px;
     16}
     17
     18p {
     19    margin-top:0px;
     20    margin-bottom:0.75em;
     21}
     22
     23.sectionHeader {
     24    margin-top:0px;
     25    margin-bottom:0px;
     26}
     27
     28.headerTD {
     29    vertical-align: middle;
     30}
     31
     32/* Styles for the different depths */
     33.sectionHeaderDepthTitle{
     34    font-size:1.8em;
     35    line-height:1em;
     36    font-weight:bold;
     37}
     38
     39.sectionHeaderDepth1{
     40    font-size:1.6em;
     41    line-height:1em;
     42    font-weight:bold;
     43}
     44
     45.sectionHeaderDepth2{
     46    font-size:1.4em;
     47    line-height:1em;
     48    font-weight:bold;
     49    font-style:italic;
     50}
     51
     52.sectionHeaderDepth3{
     53    font-size:1.2em;
     54    line-height:1em;
     55    font-style:italic;
     56}
     57
     58.sectionHeaderDepth4{
     59    font-size:1em;
     60    line-height:1em;
     61    font-weight:italic;
     62}
     63
     64.sectionNumberSpan{
     65    /*Uncomment this line to disable automatic section numbering*/
     66    /*display:none;*/
     67}
     68
     69.sectionContainer{
     70    padding-top:1em;
     71    padding-bottom:1em;
     72    padding-left:1.5em;
     73}
     74
     75.icon{
     76    background-repeat: no-repeat;
     77    height:16px;
     78    width:16px;
     79    cursor:pointer;
     80}
     81
     82.toggleImageExpand {
     83    background-image: url('../images/expand.png');
     84    background-position: 2px 2px;
     85}
     86
     87.toggleImageCollapse {
     88    background-image: url('../images/collapse.png');
     89    background-position: 2px 2px;
     90}
     91
     92.toggleImagePage {
     93    background-image: url('../images/page.png');
     94    background-position: 2px 2px;
     95}
     96
     97.toggleImageChapter {
     98    background-image: url('../images/chapter.png');
     99}
     100
     101.realisticBookIcon {
     102    background-repeat: no-repeat;
     103    background-image: url('../images/rbook.png');
     104    height: 32px;
     105    width: 32px;
     106}
     107
     108.backToTop {
     109    font-size:0.7em;
     110    padding-left: 2em;
     111    text-align:center;
     112}
     113
    13114#container {
    14115    position: relative;
     
    16117    max-width: 1000px;
    17118    padding: 0;
    18     line-height: 160%;
     119    line-height: 120%;
    19120    background-color: #fff;
    20121    border: 1px solid #c8c3b9;
     
    31132#gs_content {
    32133    padding: 1em;
     134    padding-right: 2em;
    33135    min-height: 300px;
    34136    /* background-color: #ff0; */
    35137}
    36138
     139.termList {
     140    font-size:12px;
     141    line-height:14px;
     142}
     143
     144.noTermHighlight{
     145
     146}
     147
     148.termHighlight{
     149    background:yellow;
     150}
     151
     152.viewOptions {
     153    width: 100%;
     154    text-align:center;
     155    background:#008800;
     156}
     157
     158.viewOptions td {
     159    padding-top:4px;
     160    padding-bottom:4px;
     161}
     162
     163.viewOptions a:link, .viewOptions a:hover, .viewOptions a:active, .viewOptions a:visited {
     164    color:white;
     165    text-decoration:none;
     166}
     167
    37168#rightSidebar {
    38169    border: 1px solid #cdc;
    39     padding: 10px;
    40170    width: 25%;
    41171    min-width: 180px;
     
    45175}
    46176
     177#contentsArea {
     178    padding:10px;
     179}
     180
    47181#quickSearch {
    48182}
     
    55189.collectionLink {
    56190    display: block;
    57     width: 140px;
    58     height: 100px;
    59191    float: left;
    60192    border: 1px solid #888;
     
    114246    width:60%;
    115247    text-align:right;
    116     padding: 5px;
     248    padding: 0.4em;
    117249    color:white;
    118250    background-color:#007200;
     
    130262    text-transform:lowercase;
    131263    padding-left:10px;
    132 }
    133 
    134 #expandqueryboxbutton {
    135     color:white;
    136     text-decoration:none;
    137264}
    138265
     
    164291}
    165292
    166 #nav a {
     293#nav a{
    167294
    168295    display: block;
     
    263390/* style the search and classifier results */
    264391#results {
     392    line-height: 160%;
    265393    margin: 0;
    266394    padding: 0;
     
    677805    margin: 0;
    678806    padding: 0;
    679     font-size: 80%;
     807    font-size: 70%;
    680808}
    681809
     
    707835
    708836#tableOfContents ul {
    709     padding: 0 0 0 20px;
     837    padding: 0 0 0 0;
     838}
     839
     840#tableOfContents ul ul{
     841    padding: 0 0 0 0;
     842}
     843
     844#tableOfContents ul ul ul{
     845    padding: 0 0 0 16px;
    710846}
    711847
     
    721857
    722858table{
    723     border-collapse:collapse;border-spacing:0;
    724 }
    725 
     859    border-collapse:collapse;
     860    border-spacing:0;
     861}
     862
  • main/trunk/greenstone3/web/interfaces/oran/transform/layouts/main.xsl

    r23813 r23989  
    4242           
    4343            <body><xsl:call-template name="textDirectionAttribute"/><xsl:call-template name="actionClass"/>
    44 
     44               
    4545                <xsl:call-template name="displayErrorsIfAny"/>
    46 
     46                <a name="top"><xsl:text> </xsl:text></a>
    4747                <div id="container">
    4848
  • main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl

    r23813 r23989  
    6363
    6464            <a>
    65                 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@nodeID"/>&amp;dt=<xsl:value-of select="@docType"/>&amp;p.a=b&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/></xsl:attribute>
     65                <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@nodeID"/>&amp;dt=<xsl:value-of select="@docType"/>&amp;p.a=b&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;ed=1</xsl:attribute>
    6666                <xsl:value-of disable-output-escaping="yes"  select="metadataList/metadata[@name='Title']"/>
    6767            </a>
  • main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl

    r23813 r23989  
    99    exclude-result-prefixes="java util gsf">
    1010
     11    <!-- use the 'main' layout -->
     12    <xsl:import href="layouts/main.xsl"/>
     13   
    1114    <!-- style includes global params interface_name, library_name -->
    1215    <xsl:include href=".old/berrytools.xsl"/>
    13 
    14     <!-- use the 'main' layout -->
    15     <xsl:include href="layouts/main.xsl"/>
     16    <xsl:include href="document-scripts.xsl"/>
     17   
     18    <xsl:variable name="bookswitch">
     19        <xsl:choose>
     20            <xsl:when test="/page/pageRequest/paramList/param[@name='book']/@value">
     21                <xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/>
     22            </xsl:when>
     23            <xsl:otherwise>off</xsl:otherwise>
     24        </xsl:choose>
     25    </xsl:variable>
    1626
    1727    <!-- set page title -->
     
    3242        </a>
    3343    </xsl:template>
     44   
     45    <xsl:template match="/">
     46        <xsl:choose>
     47            <!-- if this is the realistic books version of the page -->
     48            <xsl:when test="$bookswitch = 'flashxml'">
     49                <html>
     50                    <body>
     51                        <xsl:apply-templates select="/page/pageResponse/document"/>
     52                    </body>
     53                </html>
     54            </xsl:when>
     55            <!-- if this is the regular version of the page -->
     56            <xsl:otherwise>
     57                <xsl:apply-imports/>
     58            </xsl:otherwise>
     59        </xsl:choose>
     60    </xsl:template>
    3461
    3562    <!-- the page content -->
    3663    <xsl:template match="/page/pageResponse/document">
    37 
    38         <!-- show the little berries for this document -->
    39         <xsl:call-template name="documentBerryForDocumentPage"/>
    40 
    41         <!-- the sidebar -->
    42         <div id="rightSidebar">
    43 
    44             <!-- show the berry basket if it's turned on -->
    45             <gslib:berryBasket/>
    46 
    47             <!-- the book's cover image -->
    48             <div id="coverImage"><gslib:coverImage/></div>
    49             <br/>
    50 
    51             <!-- the contents -->
    52             <ul id="tableOfContents">
    53                 <xsl:apply-templates select="documentNode/documentNode"/>
    54             </ul>
    55 
    56         </div>
    57 
     64        <xsl:if test="$bookswitch = 'off'">
     65            <!-- Add the Javascript that adds and removes highlighting ( *** in document-scripts.xsl *** ) -->
     66            <xsl:call-template name="highlightingScript"/>
     67           
     68            <!-- Add the Javascript that expands and collapses sections ( *** in document-scripts.xsl *** ) -->
     69            <xsl:call-template name="expansionScript"/>
     70       
     71            <!-- show the little berries for this document -->
     72            <xsl:call-template name="documentBerryForDocumentPage"/>
     73
     74            <table id="rightSidebar">
     75                <tr><td>
     76                    <xsl:call-template name="viewOptions"/>
     77                </td></tr>
     78                <tr><td>
     79                    <!-- the sidebar -->
     80                    <div id="contentsArea">             
     81                        <!-- show the berry basket if it's turned on -->
     82                        <gslib:berryBasket/>
     83
     84                        <!-- the book's cover image -->
     85                        <div id="coverImage"><gslib:coverImage/></div>
     86
     87                        <!-- the contents -->
     88                        <div id="tableOfContents">
     89                            <xsl:apply-templates select="documentNode" mode="TOC"/>
     90                        </div>
     91                    </div>
     92                </td></tr>
     93            </table>
     94        </xsl:if>
     95       
    5896        <!-- display the document -->
    5997        <xsl:choose>
     
    63101                </xsl:call-template>
    64102            </xsl:when>
    65 
     103            <xsl:when test="$bookswitch = 'flashxml'">
     104                <xsl:apply-templates mode="flashxml"/>
     105            </xsl:when>
     106            <xsl:when test="$bookswitch = 'on'">
     107                <!-- *** in document-scripts.xsl *** -->
     108                <xsl:call-template name="realisticBooksScript"/>
     109            </xsl:when>
    66110            <xsl:otherwise>
    67                 <!-- document heading -->
    68                 <xsl:variable name="doCoverImage" select="/page/pageResponse/format/gsf:option[@name='coverImages']/@value"/>
    69                 <xsl:variable name="doTOC" select="/page/pageResponse/format/gsf:option[@name='documentTOC']/@value"/>
    70                 <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
    71                 <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
    72                 <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
    73                 <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
    74 
    75                 <!--
    76                 <div id="documentheading">
    77 
    78                     <!- -<a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param></xsl:call-template></a>- ->
    79 
     111                <div id="gs-document-text" class="documenttext">
     112                    <xsl:apply-templates select="documentNode" mode="document"/>
     113                </div>
     114            </xsl:otherwise>
     115        </xsl:choose>
     116
     117        <div class="clear"><xsl:text> </xsl:text></div>
     118    </xsl:template>
     119   
     120    <!-- Highlight annotations if requested -->
     121    <xsl:template match="annotation">
     122        <xsl:choose>
     123            <xsl:when test="/page/pageRequest/paramList/param[@name='hl' and @value='on']">
     124                <span class="termHighlight"><xsl:value-of select="."/></span>
     125            </xsl:when>
     126            <xsl:otherwise>
     127                <span class="noTermHighlight"><xsl:value-of select="."/></span>
     128            </xsl:otherwise>
     129        </xsl:choose>
     130    </xsl:template>
     131   
     132    <!-- This template is used to display the document content -->
     133    <xsl:template match="documentNode" mode="document">
     134        <a name="{@nodeID}"><xsl:text> </xsl:text></a>
     135        <!-- Section header -->
     136        <table><tr>
     137            <!-- Expand/collapse button -->
     138            <td class="headerTD">
     139                <div id="dtoggle{@nodeID}" onclick="toggleSection('{@nodeID}');">           
     140                    <xsl:attribute name="class">
    80141                    <xsl:choose>
    81                         <xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when>
    82                         <xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise>
     142                        <xsl:when test="nodeContent and not(documentNode)">icon leafNode toggleImageCollapse</xsl:when>
     143                        <xsl:otherwise>icon toggleImageCollapse</xsl:otherwise>
    83144                    </xsl:choose>
    84 
     145                    </xsl:attribute>
    85146                </div>
    86                 -->
    87 
    88                 <div id="gs-document-text" class="documenttext">
    89                     <xsl:for-each select="descendant-or-self::node()/nodeContent">
    90                         <h3><xsl:value-of disable-output-escaping="yes" select="../metadataList/metadata[@name='Title']"/></h3>
    91                         <xsl:for-each select="node()">
     147            </td>
     148           
     149            <!-- Automatic section number -->
     150            <td class="headerTD">
     151                <p>
     152                    <xsl:attribute name="class"><xsl:value-of select="util:hashToDepthClass(@nodeID)"/> sectionHeader</xsl:attribute>
     153                   
     154                    <xsl:if test="util:hashToSectionId(@nodeID)">
     155                        <span class="sectionNumberSpan">
     156                            <xsl:value-of select="util:hashToSectionId(@nodeID)"/>
     157                            <xsl:text> </xsl:text>
     158                        </span>
     159                    </xsl:if>
     160                    <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Title']"/>
     161                </p>
     162            </td>
     163           
     164            <!-- "back to top" link -->
     165            <xsl:if test="util:hashToDepthClass(@nodeID) != 'sectionHeaderDepthTitle'">
     166                <td class="backToTop headerTD">
     167                    <a href="#top">
     168                        <xsl:text disable-output-escaping="yes">&#9650;back to top</xsl:text>
     169                    </a>
     170                </td>
     171            </xsl:if>
     172        </tr></table>
     173       
     174        <!-- Section text -->
     175        <div id="doc{@nodeID}" class="sectionContainer" style="display:block;">     
     176            <xsl:for-each select="nodeContent">
     177                <xsl:for-each select="node()">
     178                    <xsl:choose>
     179                        <xsl:when test="not(name())">
     180                            <xsl:value-of select="." disable-output-escaping="yes"/>
     181                        </xsl:when>
     182                        <xsl:otherwise>
     183                            <xsl:apply-templates select="."/>
     184                        </xsl:otherwise>
     185                    </xsl:choose>
     186                </xsl:for-each>
     187            </xsl:for-each>
     188            <xsl:if test="documentNode">
     189                <xsl:apply-templates select="documentNode" mode="document"/>
     190            </xsl:if>
     191        </div> 
     192
     193    </xsl:template>
     194
     195    <!-- This template is used to display the table of contents -->
     196    <xsl:template match="documentNode" mode="TOC">
     197
     198        <!-- check if this is the currently selected table of contents item -->
     199        <xsl:variable name="isCurrent" select="nodeContent"/>
     200
     201        <!-- formulate the link -->
     202        <xsl:variable name="contentsLink">
     203            <xsl:value-of select='$library_name'/>?a=d&amp;c=<gslib:collectionNameShort/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1
     204        </xsl:variable>
     205
     206        <ul>
     207            <table><tr>
     208                <!-- The expand/collapse button (not displayed for the top level node) -->
     209                <xsl:if test="util:hashToDepthClass(@nodeID) != 'sectionHeaderDepthTitle'">
     210                    <td>
     211                        <xsl:choose>
     212                            <xsl:when test="not(nodeContent and not(documentNode))">
     213                                <div id="ttoggle{@nodeID}" onclick="toggleSection('{@nodeID}');" class="icon toggleImageCollapse"/>
     214                            </xsl:when>
     215                            <xsl:otherwise>
     216                                <div class="icon"/>
     217                            </xsl:otherwise>
     218                        </xsl:choose>
     219                    </td>
     220                </xsl:if>
     221               
     222                <!-- The chapter/page icon -->
     223                <td>
     224                    <div>
     225                        <xsl:attribute name="class">
    92226                            <xsl:choose>
    93                                 <xsl:when test="not(name())">
    94                                     <xsl:value-of select="." disable-output-escaping="yes"/>
     227                                <xsl:when test="nodeContent and not(documentNode)">
     228                                    icon leafNode toggleImagePage
    95229                                </xsl:when>
    96230                                <xsl:otherwise>
    97                                     <xsl:apply-templates select="."/>
     231                                    icon toggleImageChapter
    98232                                </xsl:otherwise>
    99233                            </xsl:choose>
    100                         </xsl:for-each>
    101                     </xsl:for-each>
    102                 </div>
    103 
    104                 <gslib:previousNextButtons/>
    105 
    106             </xsl:otherwise>
    107         </xsl:choose>
    108 
    109         <div class="clear"><xsl:text> </xsl:text></div>
    110 
    111     </xsl:template>
    112 
    113     <xsl:template match="documentNode">
    114 
    115         <!-- check if this is the currently selected table of contents item -->
    116         <xsl:variable name="isCurrent" select="nodeContent"/>
    117 
    118         <!-- formulate the link -->
    119         <xsl:variable name="contentsLink">
    120             <xsl:value-of select='$library_name'/>?a=d&amp;c=<gslib:collectionNameShort/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1<!--&amp;<xsl:if test="string($ec) = '1'">ec=1&amp;</xsl:if>
    121             p.a=<xsl:value-of select="$p.a"/>&amp;
    122             p.sa=<xsl:value-of select="$p.sa"/>&amp;
    123             p.s=<xsl:value-of select="$p.s"/>&amp;
    124             p.c=<xsl:value-of select="$p.c"/>-->
    125         </xsl:variable>
    126 
    127         <li>
    128             <!-- display this item from the table of contents -->
    129             <xsl:if test="$isCurrent"><xsl:attribute name="class">current</xsl:attribute></xsl:if>
    130             <a>
    131                 <xsl:attribute name="href"><xsl:value-of select="translate( $contentsLink , ' ', '' )"/></xsl:attribute>
    132                 <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
    133             </a>
    134 
    135             <!-- display any child items -->           
     234                        </xsl:attribute>
     235                    </div>
     236                </td>
     237               
     238                <!-- The section name, links to the section in the document -->
     239                <td>               
     240                    <!-- display this item from the table of contents -->
     241                    <xsl:if test="$isCurrent"><xsl:attribute name="class">current</xsl:attribute></xsl:if>
     242                    <a>
     243                        <xsl:attribute name="href">#<xsl:value-of select="@nodeID"/></xsl:attribute>
     244                        <xsl:if test="util:hashToSectionId(@nodeID)">
     245                            <xsl:value-of select="util:hashToSectionId(@nodeID)"/>
     246                            <xsl:text> </xsl:text>
     247                        </xsl:if>
     248                        <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Title']"/>
     249                    </a>
     250                </td>
     251            </tr></table>
     252       
     253            <!-- display any child items -->       
    136254            <xsl:if test="documentNode">
    137                 <ul>
    138                     <xsl:apply-templates select="documentNode"/>
    139                 </ul>
    140             </xsl:if>
    141 
    142         </li>
    143 
     255                <li id="toc{@nodeID}" style="display:block;">
     256                    <xsl:apply-templates select="documentNode" mode="TOC"/>
     257                </li>
     258            </xsl:if>
     259           
     260        </ul>
     261    </xsl:template>
     262   
     263    <!-- Used to produce a version of the page in a format that can be read by the realistic books plugin -->
     264    <xsl:template match="documentNode" mode="flashxml">
     265        <xsl:text disable-output-escaping="yes">
     266            &lt;Section&gt;
     267            &lt;Description&gt;
     268            &lt;Metadata name="Title"&gt;
     269        </xsl:text>
     270        <xsl:value-of select="normalize-space(metadataList/metadata[@name = 'Title'])"/>
     271        <xsl:text disable-output-escaping="yes">
     272            &lt;/Metadata&gt;
     273            &lt;/Description&gt;
     274        </xsl:text>
     275       
     276        <xsl:value-of select="normalize-space(nodeContent)" disable-output-escaping="yes"/>
     277               
     278        <xsl:if test="documentNode">
     279            <xsl:apply-templates select="documentNode" mode="flashxml"/>
     280        </xsl:if>
     281               
     282        <xsl:text disable-output-escaping="yes">
     283            &lt;/Section&gt;
     284        </xsl:text>
    144285    </xsl:template>
    145286   
     
    159300
    160301    <xsl:template match="/page"><xsl:apply-templates select="/page/pageResponse/document"/></xsl:template> <!-- this to be deleted eventually -->
    161 
     302   
     303    <xsl:template name="viewOptions">
     304        <table class="viewOptions"><tr>
     305            <!-- Highlight on/off button -->
     306            <xsl:if test="/page/pageRequest/paramList/param[@name = 'p.a']/@value = 'q'">
     307                <td>
     308                    <a id="highlightOption">
     309                        <xsl:choose>
     310                            <xsl:when test="/page/pageRequest/paramList/param[@name = 'hl']/@value = 'on'">
     311                                <xsl:attribute name="href">
     312                                    <xsl:text>javascript:removeHighlight();</xsl:text>
     313                                </xsl:attribute>
     314                                <xsl:text>No Highlighting</xsl:text>
     315                            </xsl:when>
     316                            <xsl:otherwise>
     317                                <xsl:attribute name="href">
     318                                    <xsl:text>javascript:addHighlight();</xsl:text>
     319                                </xsl:attribute>
     320                                <xsl:text>Highlighting</xsl:text>
     321                            </xsl:otherwise>
     322                        </xsl:choose>
     323                    </a>
     324                </td>
     325            </xsl:if>
     326           
     327            <!-- Realistic books link -->
     328            <xsl:if test="/page/pageResponse/collection[@name = $collName]/metadataList/metadata[@name = 'tidyoption'] = 'tidy'">
     329                <td>
     330                    <a title="Realistic book view" href="{$library_name}?a=d&amp;c={$collName}&amp;d={/page/pageResponse/document/documentNode[1]/@nodeID}&amp;dt={/page/pageResponse/document/documentNode/@docType}&amp;p.a=b&amp;p.s={/page/pageResponse/service/@name}&amp;book=on&amp;ed=1">
     331                        <img src="interfaces/oran/images/rbook.png"/>
     332                    </a>
     333                </td>
     334            </xsl:if>
     335        </tr></table>   
     336    </xsl:template>
    162337</xsl:stylesheet>
    163338
  • main/trunk/greenstone3/web/interfaces/oran/transform/pages/pref.xsl

    r23813 r23989  
    2828        <script type="text/javascript"><xsl:text disable-output-escaping="yes">
    2929            var modified = false;
     30            var bypass = false;
    3031                   
    3132            function assembleURLFromForm(formElem)
     
    5859            function checkModified(e)
    5960            {
    60                 if (modified)
     61                if (modified &amp;&amp; !bypass)
    6162                {
    6263                    var ok = confirm("Would you like to save your preferences?");
     
    7576                            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    7677                        }
    77                         //assembleURLFromForm(formElem);
     78
    7879                        xmlhttp.open("GET",assembleURLFromForm(formElem),false);
    7980                        xmlhttp.send();
     
    8586            {
    8687                modified = true;
     88                bypass = false;
    8789            }
    8890           
     
    243245                <br/>
    244246
    245                 <input type='submit'><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.set_prefs')"/></xsl:attribute></input>
     247                <input type='submit' onclick="bypass=true;"><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.set_prefs')"/></xsl:attribute></input>
    246248
    247249            </form>
  • main/trunk/greenstone3/web/interfaces/oran/transform/pages/query.xsl

    r23813 r23989  
    6767
    6868            <xsl:otherwise>
     69                <p class="termList">
     70                    <xsl:choose>
     71                        <xsl:when test="count(/page/pageResponse/termList/term) &lt; 3">
     72                            <xsl:for-each select="/page/pageResponse/termList/term">
     73                                <span style="font-style:italic;"><xsl:value-of select="@name"/></span> occurs <xsl:value-of select="@freq"/> times in <xsl:value-of select="@numDocsMatch"/> document(s) <br />
     74                            </xsl:for-each>
     75                        </xsl:when>
     76                        <xsl:otherwise>
     77                            <xsl:for-each select="/page/pageResponse/termList/term">
     78                                <span style="font-style:italic;"><xsl:value-of select="@name"/></span> (<xsl:value-of select="@freq"/>);
     79                            </xsl:for-each>
     80                        </xsl:otherwise>
     81                    </xsl:choose>
     82                </p>
    6983               
    7084                <ul id="results">
     
    7286                        <li class="document">
    7387                            <a>
    74                                 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@nodeID"/>&amp;dt=<xsl:value-of select="@docType"/>&amp;p.a=b&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/></xsl:attribute>
    75                                 <xsl:value-of disable-output-escaping="yes"  select="metadataList/metadata[@name='Title']"/>
     88                                <xsl:choose>
     89                                    <xsl:when test="/page/pageResponse/collection/@name">
     90                                        <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@nodeID"/>&amp;dt=<xsl:value-of select="@docType"/>&amp;p.a=q&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;hl=on&amp;ed=1#<xsl:value-of select="@nodeID"/></xsl:attribute>
     91                                    </xsl:when>
     92                                    <xsl:when test="@collection">
     93                                        <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="@collection"/>&amp;d=<xsl:value-of select="@nodeID"/>&amp;dt=<xsl:value-of select="@docType"/>&amp;p.a=q&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;hl=on&amp;ed=1#<xsl:value-of select="@nodeID"/></xsl:attribute>
     94                                    </xsl:when>
     95                                </xsl:choose>
     96                               
     97                                <xsl:value-of disable-output-escaping="yes"  select="metadataList/metadata[@name='Title']"/>
    7698                            </a>
     99                           
     100                            <!-- If this is results from a cross collection search then add a link to the collection that it is from -->
     101                            <xsl:if test="@collection">
     102                                (<a style="background-image:none; padding:3px;">
     103                                    <xsl:attribute name="href">
     104                                        <xsl:value-of select="$library_name"/>?a=p&amp;sa=about&amp;c=<xsl:value-of select="@collection"/>
     105                                    </xsl:attribute>
     106                                    <xsl:value-of select="@collection"/>
     107                                </a>)
     108                            </xsl:if>
    77109                            <xsl:call-template name="documentBerryForClassifierOrSearchPage"/>
    78110                        </li>
  • main/trunk/greenstone3/web/interfaces/oran/transform/util.xsl

    r23813 r23989  
    536536        <img class="pick" id="{/page/pageResponse/collection/@name}:{$rootNode}" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"/>
    537537        <span id="{/page/pageResponse/collection/@name}:{$rootNode}:root" class="documentberry">the whole document</span>
    538         <xsl:if test="$selectedNode != $rootNode">
     538        <!--<xsl:if test="$selectedNode != $rootNode">
    539539          <img class="pick" id="{/page/pageResponse/collection/@name}:{$selectedNode}" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"/>
    540540          <span id="{/page/pageResponse/collection/@name}:{$selectedNode}:section" class="documentberry">the current section</span>
    541         </xsl:if>
     541        </xsl:if>-->
    542542      </div>
    543543    </xsl:if>
     
    549549  <xsl:template name="coverImage">
    550550    <img>
    551       <xsl:attribute name="src"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute>
     551      <xsl:attribute name="src"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='assocfilepath']"/>/cover.jpg</xsl:attribute>
    552552    </img>
    553553  </xsl:template>
Note: See TracChangeset for help on using the changeset viewer.