index.jsp 11 KB
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" %>
<%@ page pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="pt.keep.metarepository.core.configuration.*" %>
<%@ page import="pt.keep.metarepository.core.localization.*" %>
<%@ page import="pt.keep.metarepository.core.web.io.SearchParameters"%>
<%@ taglib uri="keep/tags/KeepTags.tld" prefix="KEEP" %>
<%@page import="pt.keep.metarepository.core.util.data.SearchType" %>
<% String lang = LocalizationFetcher.getLocaleString(request,response); %>

<%@page import="pt.keep.metarepository.core.util.StringUtils"%><html xmlns="http://www.w3.org/1999/xhtml" lang="<%=lang%>" xml:lang="<%=lang%>">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<jsp:include page="./metatags.jsp"></jsp:include>
    <title><KEEP:lang key="webui.general.rcaap.title" lang='<%=lang %>' /></title>
	
	<link rel="alternate" type="application/rss+xml" title="RCAAP RSS" href="<KEEP:url url='/rss.xml' />" />
	<link rel="icon" href="favicon.ico" type="image/x-icon" />
	<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
	<link rel="search" type="application/opensearchdescription+xml" href="opensearch.xml" title="RCAAP Search" />
	<link rel="stylesheet" href="_css/init.css" type="text/css" media="screen,projection" />
	<link rel="stylesheet" href="_css/screen_<%=lang%>.css" type="text/css" media="screen,projection" />
	<script type="text/javascript">
		var initialText = "<KEEP:lang key='webui.index.search.label' lang='<%=lang %>' />";
	</script>
</head>
<%
	SearchParameters searchParams = (SearchParameters) session.getAttribute(Constants.SESSION_SEARCH_PARAMS);
	String allRep = request.getParameter("allRep"); 
	if(allRep!=null){
		if(allRep.equals("yes")){
			allRep="no";
			if(searchParams!=null){
				searchParams.setIncludeAllRepositories(false);
			}else{
				searchParams = new SearchParameters();
				searchParams.setIncludeAllRepositories(false);
				session.setAttribute(Constants.SESSION_SEARCH_PARAMS,searchParams);
			}
		}else{
			allRep="yes";
			if(searchParams!=null){
				searchParams.setIncludeAllRepositories(true);
			}else{
				searchParams = new SearchParameters();
				searchParams.setIncludeAllRepositories(true);
				session.setAttribute(Constants.SESSION_SEARCH_PARAMS,searchParams);
			}
		}
	}else{
		if(searchParams!=null){
			allRep=searchParams.includeAllRepositories()?"yes":"no";
		}else{
			allRep="yes";
		}
	}
%>
<body>
	<div id="container">
		<div id="logo">
			<h1><img src="_img/logotipo_rcaap.png" width="200" height="210" alt="Repositório Científico de Acesso Aberto de Portugal" /></h1>
		</div>
		<div class="floatBox">
			<div class="floatLeft col1">
				<form id="frmSearch" enctype="application/x-www-form-urlencoded" action="<KEEP:url url='/search' />" method="post">
					<input type="hidden" value="<%=SearchType.SIMPLE.toString() %>" name="<%=Constants.REQUEST_FORMNAME %>"/>
					<input type="hidden" name="<%=Constants.INCLUDE_ALL_REPOSITORIES%>" value="<%=allRep%>"/>
					<fieldset>
						<legend><KEEP:lang key="webui.index.search.legend" lang='<%=lang %>' /></legend>
						<label for="txt" id="txtLbl"><KEEP:lang key="webui.index.search.label" lang='<%=lang %>' /></label>
						<input type="text" id="txt" name="<%=Constants.REQUEST_TEXT %>" class="floatLeft txtOn" value="<KEEP:lang key='webui.index.search.label' lang='<%=lang %>' />" accesskey="1" />
						<div class="floatLeft btnBox"><input type="submit" name="pesquisar" value="<KEEP:lang key='webui.index.submit.button.label' lang='<%=lang %>' />" accesskey="2" /></div>
					</fieldset>
					<div id="info">
						<p><KEEP:formatQuickStatisticsIndexExpression includeAll="<%=allRep%>" lang='<%=lang %>' /></p>
						<ul>
							<li><a href="<KEEP:url url='/search.jsp' />" title=""><KEEP:lang key='webui.index.advanced.search.title' lang='<%=lang %>' /></a></li>
							<li><a href="<KEEP:url url='/help.jsp' />" title="<KEEP:lang key='webui.index.how.to.use.label' lang='<%=lang %>' />"><KEEP:lang key='webui.index.how.to.use' lang='<%=lang %>' /></a></li>
						</ul>
					</div>
				</form>
				<div id="changeSearchCountries">
					<form action="" method="post">
						<input type="hidden" name="allRep" value="<%=allRep%>"/>
						<%
							if(allRep.equals("yes")){
						%>
								<input id ="leftComponent" type="image" src="_img/pt_<%=allRep%>.png" title="<KEEP:lang key='webui.index.changecountrysearch.portugal' lang='<%=lang %>' />" alt="portugal logo"/>
								<img src="_img/pt_br_<%=allRep%>.png" title="<KEEP:lang key='webui.index.changecountrysearch.all' lang='<%=lang %>' />" alt="all logo" />
						<%
							}else{
						%>
								<img id ="leftComponent" src="_img/pt_<%=allRep%>.png" title="<KEEP:lang key='webui.index.changecountrysearch.portugal' lang='<%=lang %>' />" alt="portugal logo"/>
								<input type="image" src="_img/pt_br_<%=allRep%>.png" title="<KEEP:lang key='webui.index.changecountrysearch.all' lang='<%=lang %>' />" alt="all logo"/>
								
						<%
							}
						%>
					</form>
				</div>
				<div class="floatBox">
					<div class="floatLeft">
						<a href="<KEEP:url url='/index.jsp' />?locale=<KEEP:otherLanguage lang='<%=lang %>' />" title="<KEEP:langLabel lang='<%=lang %>' />"><KEEP:langLabel lang='<%=lang %>' /></a>
					</div>
					<div class="floatRight">
						<ul id="menu">
							<li><a href="<KEEP:url url='/directory.jsp' />" title="<KEEP:lang key='webui.index.directory.label' lang='<%=lang %>' />"><KEEP:lang key='webui.index.directory' lang='<%=lang %>' /></a></li>
							<li><a href="<KEEP:url url='/about.jsp' />" title="<KEEP:lang key='webui.index.about.label' lang='<%=lang %>' />"><KEEP:lang key='webui.index.about' lang='<%=lang %>' /></a></li>
						</ul>
					</div>
				</div>
			</div>
			<div class="floatRight col2">
				<dl id="tagCloudBox">
					<dt id="dt1"><span><strong><KEEP:lang key='webui.index.tagcloud.subjects.title' lang='<%=lang %>' /></strong></span></dt>
					<dd class="tagCloud" id="dd1">
						<ul>
							<KEEP:SubjectTagCloud includeAll="<%=allRep%>"/>
						</ul>
					</dd>
					<dt id="dt2"><span><strong><KEEP:lang key='webui.index.tagcloud.search.title' lang='<%=lang %>' /></strong></span></dt>
					<dd class="tagCloud" id="dd2">
						<ul>
							<KEEP:SearchTagCloud includeAll="<%=allRep%>"/>
						</ul>
					</dd> 
					<dt id="dt3"><span><strong><KEEP:lang key='webui.index.tagcloud.collections.title' lang='<%=lang %>' /></strong></span></dt>
					<dd class="tagCloud" id="dd3">
						<ul>
							<%
							List<String> collections = ConfigurationManager.getProperties("webui.dynamic.collections",new ArrayList<String>());
							String[] splitResult;
							String path;
							String collectionNameInternationalized;
							String style;
							for(String collection : collections){
								splitResult = collection.split("\\.");
								if(splitResult.length == 2){
									path=ConfigurationManager.getProperty("webui.dynamic.collection."+splitResult[0]+".search","/search?formname=ADVANCED");
									if(allRep.equals("yes")){
										path+="&amp;"+Constants.INCLUDE_ALL_REPOSITORIES+"=yes";
									}
									collectionNameInternationalized="webui.dynamic.collection."+splitResult[0];
									style=ConfigurationManager.getProperty("webui.dynamic.collection."+splitResult[0]+".style","");
							%>
								<li>
									<a <%= (style.equals("") ? "" : "style=\""+style+"\" ") %>class="<%=splitResult[1] %>" href="<KEEP:url url='<%=path %>' />"
									 	title="<KEEP:lang key='<%=collectionNameInternationalized %>' lang='<%=lang %>' />"><KEEP:lang key='<%=collectionNameInternationalized %>' lang='<%=lang %>' />
									 </a>
								</li>
							<%
								}
							}
							%>
						</ul>
					</dd>
				</dl>
				<br />
			</div>
		</div>
		<div class="floatBox" id="footer">
			<!-- rcaap footer -->
			<table class="pageFooterBar" style="background-color:white;">
				<tbody>
					<tr style="font: 10px/10px arial, helvetica, sans-serif; color: #666;">
						<td colspan="2" rowspan="1" style="text-align:left;padding-left: 10px;">&nbsp;</td>
						<td width="30">&nbsp;</td>
						<td colspan="3" rowspan="1" style="text-align:left;">Financiadores do RCAAP</td>
					</tr>
					<tr style="font: 10px/10px serif;">
						<td colspan="8" rowspan="1"><hr style="height: 1px; border: 0; color: #ccc; background-color: #ccc;" /></td>
					</tr>
					<tr valign="bottom">
						<td style="padding-left: 10px;padding-right: 10px;">
							<a href="http://www.fct.pt" target="_blank" title="<KEEP:lang lang='<%=lang %>' key='webui.general.alt.fct' />">
								<img src="../_img/logos/fctfccn.gif" alt="<KEEP:lang lang='<%=lang %>' key='webui.general.alt.fct' />" border="0" />
							</a>
						</td>
						<td style="padding-right: 10px;">
							<a href="http://www.uminho.pt" target="_blank" title="<KEEP:lang lang='<%=lang %>' key='webui.general.alt.uminho' />">
								<img src="../_img/logos/uminho.gif" alt="<KEEP:lang lang='<%=lang %>' key='webui.general.alt.uminho' />" border="0" />
							</a>
						</td>
						<td width="50%">&nbsp;</td>
						<td style="padding-right: 10px;">
							<a href="http://www.portugal.gov.pt" target="_blank" title="Governo Portugu&ecirc;s">
								<img src="../_img/logos/govpt.gif" alt="Governo Portugu&ecirc;s" border="0" />
							</a>
						</td>
						<td style="padding-right: 10px;">
							<a href="http://www.portugal.gov.pt/pt/os-ministerios/ministerio-da-educacao-e-ciencia.aspx" target="_blank" title="<KEEP:lang key='webui.general.alt.mec' lang='<%=lang %>' />">
								<img src="../_img/logos/mec.gif" alt="<KEEP:lang key='webui.general.alt.mec' lang='<%=lang %>' />" border="0" />
							</a>
						</td>
						<td style="padding-right: 10px;">
							<a href="http://www.qca.pt/pos/posc.asp" target="_blank" title="<KEEP:lang lang='<%=lang %>' key='webui.general.alt.pos' />">
								<img src="../_img/logos/pos.gif" alt="<KEEP:lang lang='<%=lang %>' key='webui.general.alt.pos' />" border="0" />
							</a>
						</td>
						<td style="padding-right: 10px;">
							<a href="http://europa.eu" target="_blank" title="<KEEP:lang lang='<%=lang %>' key='webui.general.alt.eu' />">
								<img src="../_img/logos/ue.gif" alt="<KEEP:lang lang='<%=lang %>' key='webui.general.alt.eu' />" border="0" />
							</a>
						</td>
						<td>&nbsp;</td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
	<script type="text/javascript" src="_js/init.js"></script>
	<noscript>
	Formatting elements
	</noscript>
	<script type="text/javascript">
		var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
		document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
	</script>
	<noscript>
	Google Analytics
	</noscript>
	<script type="text/javascript">
		try {
			var pageTracker = _gat._getTracker("UA-6710497-1");
			pageTracker._trackPageview();
		} catch(err) {}
	</script>
	<noscript>
	Google Analytics
	</noscript>
</body>
</html>