Changeset 25832


Ignore:
Timestamp:
2012-06-27T14:08:50+12:00 (12 years ago)
Author:
sjm84
Message:

Some updates for Solr facets in a query. Also changing to a new font stack.

Location:
main/trunk/greenstone3/web/interfaces/default
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/style/core.css

    r25659 r25832  
    44}
    55body {
    6     font-family: sans-serif;
     6    font-family: "Segoe UI", Candara, "Bitstream Vera Sans", "DejaVu Sans", "Bitstream Vera Sans", "Trebuchet MS", Verdana, "Verdana Ref", sans-serif;
    77    margin: 0;
    88    background-color: #eae4d9;
     
    7373.classifierContainer {
    7474    padding-left:1.5em;
     75}
     76
     77.horizontalClassifierNode {
     78    padding:0px 0px 10px 10px;
    7579}
    7680
     
    430434
    431435/* style the search and classifier results */
    432 #results {
     436#resultsTable {
    433437    line-height: 160%;
    434438    margin: 0;
     
    437441}
    438442
    439 #results ul {
     443#resultsTable ul {
    440444    margin: 0 0 0 20px;
    441445    padding: 0;
    442446}
    443447
    444 #results li {
     448#resultsTable li {
    445449    list-style: none;
    446450    margin: 0 0 .2em 0;
     
    448452}
    449453
    450 #results li a {
     454#resultsTable li a {
    451455    padding: 3px 3px 3px 3px;
    452456    background-repeat: no-repeat;
     
    455459
    456460
    457 #results .document a { /*background-image: url('../images/book.png'); */}
    458 #results .document a:visited { background-image: url('../images/book-visited.png'); color: #999; }
    459 #results .shelf>a { background-image: url('../images/bookshelf.png'); }
     461#resultsTable .document a { /*background-image: url('../images/book.png'); */}
     462#resultsTable .document a:visited { background-image: url('../images/book-visited.png'); color: #999; }
     463#resultsTable .shelf>a { background-image: url('../images/bookshelf.png'); }
    460464
    461465/* corners of the banner */
     
    774778dl dd { padding-bottom:10px}
    775779
     780#facetSelector{
     781    padding: 0px;
     782    width:30%;
     783    float:right;
     784}
     785
     786.facetTable{
     787    list-style:none;
     788    margin: 0px 0px 20px;
     789    padding: 0px;
     790    overflow:auto;
     791}
     792
     793.facetTable li{
     794    margin-bottom:5px;
     795}
     796
     797.checkboxList{
     798    list-style:none;
     799    padding-left:0px;
     800}
     801
     802.facetedResults{
     803    float:left;
     804    width:65%;
     805}
     806
    776807/*
    777808ul.childrenlist li {
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/query.xsl

    r25736 r25832  
    3232   
    3333    <xsl:template name="displayResults">
    34         <table id="results">
    35             <xsl:for-each select="pageResponse/documentNodeList/documentNode">
    36                 <tr class="document">
    37                     <xsl:apply-templates select="."/>
    38                     <xsl:call-template name="documentNodePost"/>
    39                 </tr>
    40             </xsl:for-each>
    41             <br/>
    42         </table>
    43        
    44         <!-- Previous/Next buttons-->
    45         <xsl:call-template name="prevNextButtons"/>
     34        <xsl:if test="/page/pageResponse/facetList/facet">
     35            <script type="text/javascript" src="interfaces/{$interface_name}/js/facet-scripts.js"><xsl:text> </xsl:text></script>
     36            <div id="facetSelector">
     37                <xsl:for-each select="/page/pageResponse/facetList/facet">
     38                    <xsl:if test="count(count) > 0">
     39                        <ul class="facetTable ui-widget-content" indexName="{@name}">
     40                            <xsl:variable name="serviceName"><xsl:value-of select="/page/pageRequest/paramList/param[@name = 's']/@value"/></xsl:variable>
     41                            <xsl:variable name="indexShortName"><xsl:value-of select="@name"/></xsl:variable>
     42                            <xsl:variable name="countSize">
     43                                <xsl:choose>
     44                                    <xsl:when test="/page/pageResponse/format[@type='search']/gsf:option[@name='facetTableRows']">
     45                                        <xsl:value-of select="/page/pageResponse/format[@type='search']/gsf:option[@name='facetTableRows']/@value"/>
     46                                    </xsl:when>
     47                                    <xsl:otherwise>8</xsl:otherwise>
     48                                </xsl:choose>
     49                            </xsl:variable>
     50                           
     51                            <li class="ui-widget-header" style="text-transform:capitalize; text-align:center;">
     52                                <xsl:choose>
     53                                    <xsl:when test="/page/pageResponse/collection/serviceList/service[@name = $serviceName]/paramList/param[@name = 'index']">
     54                                        <xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name = $serviceName]/paramList/param[@name = 'index']/option[@name = $indexShortName]/displayItem"/>
     55                                    </xsl:when>
     56                                    <xsl:when test="/page/pageResponse/collection/serviceList/service[@name = $serviceName]/paramList/param[@name = 'complexField']/param[@name = 'fqf']">
     57                                        <xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name = $serviceName]/paramList/param[@name = 'complexField']/param[@name = 'fqf']/option[@name = $indexShortName]/displayItem"/>
     58                                    </xsl:when>
     59                                </xsl:choose>
     60                            </li>
     61                            <xsl:for-each select="count">
     62                                <li>
     63                                    <xsl:attribute name="style">
     64                                        <xsl:if test="position() > $countSize">display:none;<xsl:value-of select="$indexShortName"/></xsl:if>
     65                                    </xsl:attribute>
     66                                    <input type="checkbox" onclick="performRefinedSearch();"/><span><xsl:value-of select="@name"/></span>(<xsl:value-of select="."/>)
     67                                </li>
     68                            </xsl:for-each>
     69                            <xsl:if test="count(count) > $countSize">
     70                                <li class="expandCollapseFacetList{$indexShortName}"><a class="expandCollapseFacetListLink{$indexShortName}" href="javascript:expandFacetList('{$indexShortName}', {$countSize});">See more...</a></li>
     71                            </xsl:if>
     72                        </ul>
     73                    </xsl:if>
     74                </xsl:for-each>
     75            </div>
     76        </xsl:if>
     77        <div id="resultsArea">
     78            <xsl:attribute name="class">
     79                <xsl:if test="/page/pageResponse/facetList/facet">facetedResults</xsl:if>
     80            </xsl:attribute>
     81            <table id="resultsTable">
     82                <xsl:for-each select="pageResponse/documentNodeList/documentNode">
     83                    <tr class="document">
     84                        <xsl:apply-templates select="."/>
     85                        <xsl:call-template name="documentNodePost"/>
     86                    </tr>
     87                </xsl:for-each>
     88                <br/>
     89            </table>
     90           
     91            <!-- Previous/Next buttons-->
     92            <xsl:call-template name="prevNextButtons"/>
     93        </div>
     94        <xsl:if test="/page/pageResponse/facetList/facet">
     95            <div style="clear:both;"><xsl:text> </xsl:text></div>
     96        </xsl:if>
    4697    </xsl:template>
    4798   
     
    448499
    449500    </xsl:template>
     501   
     502    <xsl:template match="param[@type = 'checkbox_list']">
     503        <xsl:param name="ns">s1.</xsl:param>
     504        <ul class="checkboxList">
     505            <xsl:for-each select="option">
     506                <li><input type="checkbox" name="{$ns}{../@name}" value="{@name}"/><xsl:value-of select="displayItem"/></li>
     507            </xsl:for-each>
     508        </ul>
     509    </xsl:template>
    450510
    451511    <xsl:template match="param[@type='multi']" mode="contents">
Note: See TracChangeset for help on using the changeset viewer.