⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main-page.xsl.svn-base

📁 由国外的一个著名的geonetwork修改而来
💻 SVN-BASE
📖 第 1 页 / 共 2 页
字号:
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"	xmlns:xalan= "http://xml.apache.org/xalan"	xmlns:geonet="http://www.fao.org/geonetwork"	exclude-result-prefixes="xsl xalan geonet">		<xsl:include href="main.xsl"/>	<xsl:include href="metadata.xsl"/>	<!--	additional scripts	-->	<xsl:template mode="script" match="/">		<script type="text/javascript" language="JavaScript1.2">						function goExtended(onoff, link)			{				document.search.extended.value=onoff;				document.search.action=link;				document.search.submit();			}				function goRemote(onoff, link)			{				document.search.remote.value=onoff;				document.search.action=link;				document.search.submit();			}				function deselect(select)			{				for (var i=0; i &lt; select.length; i++)				{					select.options[i].selected = false;				}			}				function profileSelected()			{				var serverList = document.search.profile.options[document.search.profile.selectedIndex].value;				var serverArray = serverList.split(' ');				deselectAllServers();				for (var i=0; i &lt; serverArray.length; i++)					selectServer(serverArray[i]);			}				function serverSelected()			{				document.search.profile.options[0].selected = true;			}				function deselectAllServers()			{				for (var i=0; i &lt; document.search.servers.length; i++)					document.search.servers.options[i].selected = false;			}				function selectServer(server)			{				for (var i=0; i &lt; document.search.servers.length; i++)					if (document.search.servers.options[i].value == server)						document.search.servers.options[i].selected = true;			}					function checkSubmit()			{				if (document.search.remote.value == 'on')				{					if (isWhitespace(document.search.any.value) &amp;&amp;						!(document.search.title    &amp;&amp; !isWhitespace(document.search.title.value)) &amp;&amp;						!(document.search['abstract'] &amp;&amp; !isWhitespace(document.search['abstract'].value)) &amp;&amp;						!(document.search.themekey &amp;&amp; !isWhitespace(document.search.themekey.value)))					{						alert("Please type some search criteria");						return false;					}					servers = 0;					for (var i=0; i &lt; document.search.servers.length; i++)						if (document.search.servers.options[i].selected) servers++;					if (servers == 0)					{						alert("Please select a server");						return false;					}				}				return true;			}						function doSubmit()			{				if (checkSubmit())					document.search.submit();			}		</script>	</xsl:template>		<xsl:variable name="lang" select="/root/gui/language"/>	<!--	page content	-->	<xsl:template name="content">		<table width="100%" height="100%">			<tr height="100%">							<!-- search and purpose -->				<td class="padded-content" width="70%" height="100%">					<table width="100%" height="100%">						<tr>													<!-- search -->							<td>								<h1><xsl:value-of select="/root/gui/strings/mainpageTitle"/></h1>								<form name="search" action="{/root/gui/locService}/main.search" method="get" onsubmit="return checkSubmit()">									<input name="extended" type="hidden" value="{/root/gui/searchDefaults/extended}"/>									<input name="remote" type="hidden" value="{/root/gui/searchDefaults/remote}"/>									<input name="attrset" type="hidden" value="geo"/> <!-- FIXME: possibly replace with menu -->									<table width="100%" height="100%"><tr>										<td valign="top">											<xsl:call-template name="fields"/>										</td>										<td width="200">											<table height="100%">												<tr>													<td class="padded" align="right">														<xsl:choose>															<xsl:when test="/root/gui/searchDefaults/extended='off'">																<button class="content-small" type="button" onclick="goExtended('on','{/root/gui/locService}/main.home')"><xsl:value-of select="/root/gui/strings/extended"/></button>															</xsl:when>															<xsl:otherwise>																<button class="content-small" type="button" onclick="goExtended('off','{/root/gui/locService}/main.home')"><xsl:value-of select="/root/gui/strings/simple"/></button>															</xsl:otherwise>														</xsl:choose>													</td>												</tr>												<tr>													<td class="padded" align="right">														<xsl:choose>															<xsl:when test="/root/gui/searchDefaults/remote='off'">																<button class="content-small" type="button" onclick="goRemote('on','{/root/gui/locService}/main.home')"><xsl:value-of select="/root/gui/strings/remote"/></button>															</xsl:when>															<xsl:otherwise>																<button class="content-small" type="button" onclick="goRemote('off','{/root/gui/locService}/main.home')"><xsl:value-of select="/root/gui/strings/local"/></button>															</xsl:otherwise>														</xsl:choose>													</td>												</tr>												<tr height="100%">													<td align="right" valign="baseline">														<a onclick="doSubmit()"><img onmouseover="this.src='{/root/gui/locUrl}/images/search-white.gif'" onmouseout="this.src='{/root/gui/locUrl}/images/search-blue.gif'" style="cursor:hand;cursor:pointer" src="{/root/gui/locUrl}/images/search-blue.gif" alt="Search" title="{/root/gui/strings/search}" align="top"/></a>													</td>												</tr>											</table>										</td>									</tr></table>								</form>							</td>						</tr>						<tr><td class="dots"/></tr>												<tr height="100%">							<!-- Info -->							<td valign="top">								<xsl:copy-of select="/root/gui/strings/mainpage1"/>								<xsl:copy-of select="/root/gui/strings/mainpage2"/>							</td>						</tr>					</table>				</td>								<td class="separator"/>								<!-- right -->				<td class="padded-content" valign="top">					<center><a href="javascript:popInterMap('{/root/gui/url}/intermap')"><img src="{/root/gui/url}/images/intermap.gif" alt="InterMap" align="top" /></a></center>					<xsl:copy-of select="/root/gui/strings/interMapInfo"/>				</td>			</tr>						<tr><td class="separator"/></tr>									<!-- types -->			<tr><td colspan="3">				<table width="100%">					<tr>												<xsl:choose>							<xsl:when test="/root/gui/featured/*">															<!-- featured map -->								<td class="footer" align="center" valign="top" width="33%">									<xsl:call-template name="featured"/>								</td>																<td class="separator"/>																<!-- latest updates -->								<td class="footer" align="left" valign="top" width="33%">									<xsl:call-template name="latestUpdates"/>								</td>															</xsl:when>							<xsl:otherwise>															<!-- latest updates -->								<td class="footer" align="left" valign="top" width="50%">									<xsl:call-template name="latestUpdates"/>								</td>															</xsl:otherwise>						</xsl:choose>												<td class="separator"/>												<!-- categories -->						<td class="footer" align="left" valign="top">							<xsl:call-template name="categories"/>						</td>											</tr>				</table>			</td></tr>		</table>	</xsl:template>		<!--	featured map	-->	<xsl:template name="featured">		<h1><xsl:value-of select="/root/gui/strings/featuredMap"/></h1>		<table>			<xsl:for-each select="/root/gui/featured/*">				<xsl:variable name="md">					<xsl:apply-templates mode="brief" select="."/>				</xsl:variable>				<xsl:variable name="metadata" select="xalan:nodeset($md)/*[1]"/>				<tr>					<td width="40%">						<xsl:call-template name="thumbnail">							<xsl:with-param name="metadata" select="$metadata"/>						</xsl:call-template>					</td>					<td class="footer">						<h2><a class="footer" href="{/root/gui/locService}/metadata.show?id={geonet:info/id}"><xsl:value-of select="$metadata/title"/></a></h2>						<p/>						<xsl:variable name="abstract" select="$metadata/abstract"/>						<xsl:choose>							<xsl:when test="string-length($abstract) &gt; $maxAbstract">								<xsl:value-of select="substring($abstract, 0, $maxAbstract)"/>								<a href="{/root/gui/locService}/metadata.show?id={geonet:info/id}&amp;currTab=simple">...<xsl:value-of select="/root/gui/strings/more"/>...</a>							</xsl:when>							<xsl:otherwise>								<xsl:value-of select="$abstract"/>							</xsl:otherwise>						</xsl:choose>					</td>				</tr>			</xsl:for-each>		</table>	</xsl:template>	<!--	latest updates	-->	<xsl:template name="latestUpdates">		<h1 align="center">			<xsl:value-of select="/root/gui/strings/recentAdditions"/>			&#160;			<a href="{/root/gui/locService}/rss.latest"><img style="cursor:hand;cursor:pointer" src="{/root/gui/url}/images/rss.gif" alt="RSS" title="{/root/gui/strings/rss}" align="top"/></a>			&#160;			<a href="{/root/gui/locService}/rss.latest?georss=gml"><img style="cursor:hand;cursor:pointer" src="{/root/gui/url}/images/georss.gif" alt="GeoRSS-GML" title="{/root/gui/strings/georss}" align="top"/></a>		</h1>		<ul>			<xsl:for-each select="/root/gui/latestUpdated/*">				<xsl:variable name="md">					<xsl:apply-templates mode="brief" select="."/>				</xsl:variable>				<xsl:variable name="metadata" select="xalan:nodeset($md)/*[1]"/>						<li><a class="footer" href="{/root/gui/locService}/metadata.show?id={geonet:info/id}"><xsl:value-of select="$metadata/title"/></a></li>			</xsl:for-each>		</ul>	</xsl:template>	<!--	categories	-->	<xsl:template name="categories">		<h1 align="center"><xsl:value-of select="/root/gui/strings/categories"/></h1>		<ul>			<xsl:for-each select="/root/gui/categories/*">				<xsl:sort select="label/child::*[name() = $lang]" order="ascending"/>				<xsl:variable name="categoryName"  select="name"/>				<xsl:variable name="categoryLabel" select="label/child::*[name() = $lang]"/>				<li><a class="footer" href="{/root/gui/locService}/main.search?category={$categoryName}"><xsl:value-of select="$categoryLabel"/></a></li>			</xsl:for-each>		</ul>	</xsl:template>		<!--	search fields	-->	<xsl:template name="fields">		<table>			<!-- Title -->			<xsl:if test="string(/root/gui/searchDefaults/extended)='on'">				<tr>					<th class="padded"><xsl:value-of select="/root/gui/strings/rtitle"/></th>					<td class="padded"><input class="content" name="title" size="30" value="{/root/gui/searchDefaults/title}"/></td>				</tr>			</xsl:if>								<!-- Abstract -->			<xsl:if test="string(/root/gui/searchDefaults/extended)='on'">				<tr>					<th class="padded"><xsl:value-of select="/root/gui/strings/abstract"/></th>					<td class="padded"><input class="content" name="abstract" size="30" value="{/root/gui/searchDefaults/abstract}"/></td>				</tr>			</xsl:if>								<!-- Any (free text) -->			<tr>				<th class="padded"><xsl:value-of select="/root/gui/strings/searchText"/></th>				<td class="padded"><input class="content" name="any" size="30" value="{/root/gui/searchDefaults/any}"/><br/>				</td>			</tr>						<!-- Keywords -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -