📄 main-page.xsl.svn-base
字号:
<xsl:if test="string(/root/gui/searchDefaults/extended)='on'"> <tr> <th class="padded"><xsl:value-of select="/root/gui/strings/keywords"/></th> <td class="padded"><input class="content" name="themekey" size="30" value="{/root/gui/searchDefaults/themekey}"/></td> </tr> </xsl:if> <!-- Fuzzy search similarity for text field only (ie. Keywords, Any, Abstract, Title) set to 80% by default --> <input class="content" id="similarity" name="similarity" type="hidden" value=".8"/> <xsl:if test="string(/root/gui/searchDefaults/extended)='on'"> <tr><th><xsl:value-of select="/root/gui/strings/fuzzy"/></th><td> <table> <tr><td width="20px" align="center">-</td><td> <div class="track" id="similarityTrack" style="width:100px;height:5px;"> <xsl:attribute name="alt"><xsl:value-of select="/root/gui/strings/fuzzySearch"/></xsl:attribute> <xsl:attribute name="title"><xsl:value-of select="/root/gui/strings/fuzzySearch"/></xsl:attribute> <div class="handle" id="similarityHandle" style="width:5px;height:10px;"> </div> </div> </td><td width="20px" align="center">+</td> <td><div id="similarityDebug" style="display:none;"></div> </td></tr> </table> <script type="text/javascript" language="JavaScript1.2"> var similaritySlider = new Control.Slider( 'similarityHandle', 'similarityTrack' ,{range:$R(0,10), values:[0,1,2,3,4,5,6,7,8,9,10]} ); similaritySlider.options.onSlide = function(v){ $('similarity').value = (v/10); $('similarityDebug').innerHTML = '('+(v/10)+')'; }; similaritySlider.options.onChange = function(v){ $('similarity').value = (v/10); $('similarityDebug').innerHTML = '('+(v/10)+')'; }; similaritySlider.setValue($('similarity').value*10); </script> </td></tr> </xsl:if> <!-- Area --> <xsl:if test="string(/root/gui/searchDefaults/extended)='on'"> <tr> <th class="padded"><xsl:value-of select="/root/gui/strings/location"/></th> <td class="padded"> <table> <tr> <td> <select class="content" name="relation"> <xsl:for-each select="/root/gui/strings/boundingRelation"> <option> <xsl:if test="@value=/root/gui/searchDefaults/relation"> <xsl:attribute name="selected"/> </xsl:if> <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> <xsl:value-of select="."/> </option> </xsl:for-each> </select> </td> <td><xsl:text disable-output-escaping="yes">&nbsp;&nbsp;</xsl:text></td> <td> <!-- regions combobox --> <select class="content" name="region"> <option value=""> <xsl:if test="/root/gui/searchDefaults/theme='_any_'"> <xsl:attribute name="selected"/> </xsl:if> <xsl:value-of select="/root/gui/strings/any"/> </option> <xsl:for-each select="/root/gui/regions/record"> <xsl:sort select="label/child::*[name() = $lang]" order="ascending"/> <option> <xsl:if test="id=/root/gui/searchDefaults/region"> <xsl:attribute name="selected"/> </xsl:if> <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> <xsl:value-of select="label/child::*[name() = $lang]"/> </option> </xsl:for-each> </select> </td> </tr> </table> </td> </tr> </xsl:if> <!-- Group --> <xsl:if test="string(/root/gui/session/userId)!='' and string(/root/gui/searchDefaults/extended)='on' and string(/root/gui/searchDefaults/remote)='off'"> <tr> <th class="padded"><xsl:value-of select="/root/gui/strings/group"/></th> <td class="padded"> <select class="content" name="group"> <option value=""> <xsl:if test="/root/gui/searchDefaults/group=''"> <xsl:attribute name="selected"/> </xsl:if> <xsl:value-of select="/root/gui/strings/any"/> </option> <xsl:for-each select="/root/gui/groups/record"> <xsl:sort order="ascending" select="(.)"/> <option> <xsl:if test="id=/root/gui/searchDefaults/group"> <xsl:attribute name="selected"/> </xsl:if> <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> <xsl:value-of select="name"/> </option> </xsl:for-each> </select> </td> </tr> </xsl:if> <!-- Category --> <xsl:if test="string(/root/gui/searchDefaults/extended)='on' and string(/root/gui/searchDefaults/remote)='off'"> <tr> <th class="padded"><xsl:value-of select="/root/gui/strings/category"/></th> <td class="padded"> <select class="content" name="category"> <option value=""> <xsl:if test="/root/gui/searchDefaults/category=''"> <xsl:attribute name="selected"/> </xsl:if> <xsl:value-of select="/root/gui/strings/any"/> </option> <xsl:for-each select="/root/gui/categories/record"> <xsl:sort select="label/child::*[name() = $lang]" order="ascending"/> <option> <xsl:if test="name = /root/gui/searchDefaults/category"> <xsl:attribute name="selected"/> </xsl:if> <xsl:attribute name="value"><xsl:value-of select="name"/></xsl:attribute> <xsl:value-of select="label/child::*[name() = $lang]"/> </option> </xsl:for-each> </select> </td> </tr> </xsl:if> <!-- Source --> <xsl:if test="string(/root/gui/searchDefaults/extended)='on' and string(/root/gui/searchDefaults/remote)='off'"> <tr> <th class="padded"><xsl:value-of select="/root/gui/strings/site"/></th> <td class="padded"> <select class="content" name="siteId"> <option value=""> <xsl:if test="/root/gui/searchDefaults/siteId=''"> <xsl:attribute name="selected"/> </xsl:if> <xsl:value-of select="/root/gui/strings/any"/> </option> <xsl:for-each select="/root/gui/sources/source"> <!-- <xsl:sort order="ascending" select="name"/> --> <xsl:variable name="source" select="code/text()"/> <xsl:variable name="sourceName" select="name/text()"/> <option> <xsl:if test="$source=/root/gui/searchDefaults/siteId"> <xsl:attribute name="selected"/> </xsl:if> <xsl:attribute name="value"><xsl:value-of select="$source"/></xsl:attribute> <xsl:value-of select="$sourceName"/> </option> </xsl:for-each> </select> </td> </tr> </xsl:if> <!-- Map type --> <xsl:if test="string(/root/gui/searchDefaults/remote)='off'"> <tr> <th class="padded"><xsl:value-of select="/root/gui/strings/mapType"/></th> <td> <input name="digital" type="checkbox" value="on"> <xsl:if test="/root/gui/searchDefaults/digital='on'"> <xsl:attribute name="checked"/> </xsl:if> <xsl:value-of select="/root/gui/strings/digital"/> </input> <!-- FIXME: disabled <xsl:if test="string(/root/gui/searchDefaults/extended)='on' and string(/root/gui/searchDefaults/remote)='off'">    <input class="content" name="download" type="checkbox"> <xsl:if test="/root/gui/searchDefaults/download='on'"> <xsl:attribute name="checked"/> </xsl:if> <xsl:value-of select="/root/gui/strings/downloadData"/> </input>    <input class="content" name="online" type="checkbox"> <xsl:if test="/root/gui/searchDefaults/online='on'"> <xsl:attribute name="checked"/> </xsl:if> <xsl:value-of select="/root/gui/strings/interactiveMap"/> </input>       </xsl:if> -->    <input name="paper" type="checkbox" value="on"> <xsl:if test="/root/gui/searchDefaults/paper='on'"> <xsl:attribute name="checked"/> </xsl:if> <xsl:value-of select="/root/gui/strings/paper"/> </input> </td> </tr> </xsl:if> <!-- Template --> <xsl:if test="string(/root/gui/session/userId)!='' and /root/gui/services/service[@name='metadata.edit'] and string(/root/gui/searchDefaults/remote)='off'"> <tr> <th class="padded"><xsl:value-of select="/root/gui/strings/template"/></th> <td> <input name="template" type="checkbox" value="on"> <xsl:if test="/root/gui/searchDefaults/template='on'"> <xsl:attribute name="checked"/> </xsl:if> <xsl:value-of select="/root/gui/strings/searchTemplates"/> </input> </td> </tr> </xsl:if> <!-- remote search fields --> <xsl:if test="string(/root/gui/searchDefaults/remote)='on'"> <tr><td class="dots" colspan="2"/></tr> <!-- Profiles and servers --> <tr> <th class="padded"><xsl:value-of select="/root/gui/strings/profile"/></th> <td class="padded"> <select class="content" name="profile" onchange="profileSelected()"> <xsl:for-each select="/root/gui/searchProfiles/profile"> <option> <xsl:if test="string(@value)=string(/root/gui/searchDefaults/profile)"> <xsl:attribute name="selected"/> </xsl:if> <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> <xsl:value-of select="."/> </option> </xsl:for-each> </select> </td> </tr> <tr> <th class="padded"><xsl:value-of select="/root/gui/strings/server"/></th> <td class="padded"> <select class="content" name="servers" size="6" multiple="true" onchange="serverSelected()"> <xsl:for-each select="/root/gui/repositories/Instance"> <xsl:variable name="name" select="@instance_dn"/> <xsl:variable name="collection" select="@collection_dn"/> <xsl:variable name="description" select="/root/gui/repositories/Collection[@collection_dn=$collection]/@collection_name"/> <option> <xsl:if test="/root/gui/searchDefaults/servers/server[string(.)=$name]"> <xsl:attribute name="selected"/> </xsl:if> <xsl:attribute name="value"><xsl:value-of select="$name"/></xsl:attribute> <xsl:value-of select="$description"/> </option> </xsl:for-each> </select> </td> </tr> <!-- timeout --> <tr> <th class="padded"><xsl:apply-templates select="/root/gui/strings/timeout" mode="caption"/></th> <td class="padded"> <select class="content" name="timeout"> <xsl:for-each select="/root/gui/strings/timeoutChoice"> <option> <xsl:if test="string(@value)=string(/root/gui/searchDefaults/timeout)"> <xsl:attribute name="selected"/> </xsl:if> <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> <xsl:value-of select="."/> </option> </xsl:for-each> </select> </td> </tr> </xsl:if> <!-- other search options --> <tr><td class="dots" colspan="2"/></tr> <!-- hits per page --> <tr> <th class="padded"><xsl:value-of select="/root/gui/strings/hitsPerPage"/></th> <td class="padded"> <select class="content" name="hitsPerPage" onchange="profileSelected()"> <xsl:for-each select="/root/gui/strings/hitsPerPageChoice"> <option> <xsl:if test="string(@value)=string(/root/gui/searchDefaults/hitsPerPage)"> <xsl:attribute name="selected"/> </xsl:if> <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> <xsl:value-of select="."/> </option> </xsl:for-each> </select> </td> </tr> </table> </xsl:template></xsl:stylesheet>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -