loginDeGois.jsp 5.2 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="pt.keep.metarepository.core.localization.*" %>
<%@ page import="pt.keep.metarepository.core.database.orm.interfaces.*"%>
<%@ page import="pt.keep.metarepository.core.database.orm.entities.*" %>
<%@ page import="pt.keep.metarepository.modules.webui.transform.*" %>
<%@ page import="pt.keep.metarepository.core.solr.SolrClient"%>

<%@ taglib uri="keep/tags/KeepTags.tld" prefix="KEEP" %>
<% String lang = LocalizationFetcher.getLocaleString(request,response); %>
<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 lang='<%=lang %>' key="webui.general.rcaap.title" /></title>
	
	<link rel="icon" href="favicon.ico" type="image/x-icon" />
	<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
	<link rel="alternate" type="application/rss+xml" title="RCAAP RSS" href="<KEEP:url url='/rss.xml' />" />
	
	<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/results.css" type="text/css" media="screen,projection" />
	
	<%
		String documentId = request.getParameter("id");
		String status = request.getParameter("status");
// 		DocumentInterface docInterface = new DocumentInterface(getServletContext());
		Document doc=null;
		DocumentTransform docTrans = null;
		if(documentId!=null){
// 			doc = docInterface.findDocument(documentId);
			doc = SolrClient.getInstance().getDocumentById(documentId);
			docTrans = new DocumentTransform(doc,lang);
		}
// 		docInterface.closeConnection();
	%>
</head>
<body>
	<div id="degoisContent">
		<%if(documentId!=null){ %>
			<div id="degoisTitle"><span><KEEP:lang lang='<%=lang %>' key='webui.degois.title' /></span></div>
			<div id="degoisDescription"><KEEP:lang lang='<%=lang %>' key='webui.degois.description' /></div>
			<div id="degoisContentInner">
				<div id="degoisForm">
					<form id="sendDocumentToDeGois" action="<KEEP:url url='/sendDocumentToDeGois' />" method="post">
						<input type="hidden" value="<%=documentId%>" name="documentId"/>
						<div id="degoisCol1"><KEEP:lang lang='<%=lang %>' key='webui.degois.area' /></div>
						<div id="degoisCol2">
							<select name="degois_area">
								<option value="1"><KEEP:lang lang='<%=lang %>' key='webui.degois.areas.naturalSciences' /></option>
								<option value="2"><KEEP:lang lang='<%=lang %>' key='webui.degois.areas.technology' /></option>
								<option value="3"><KEEP:lang lang='<%=lang %>' key='webui.degois.areas.medicalSciences' /></option>
								<option value="4"><KEEP:lang lang='<%=lang %>' key='webui.degois.areas.agriculturalSciences' /></option>
								<option value="5"><KEEP:lang lang='<%=lang %>' key='webui.degois.areas.socialSciences' /></option>
								<option value="6"><KEEP:lang lang='<%=lang %>' key='webui.degois.areas.humanities' /></option>
								<option value="7"><KEEP:lang lang='<%=lang %>' key='webui.degois.areas.sciences' /></option>
							</select>
						</div>
						<div class="clearDiv"></div>
						<div id="degoisCol1"><KEEP:lang lang='<%=lang %>' key='webui.degois.username' /></div>
						<div id="degoisCol2"><input type="text" name="degois_user" /></div>
						<div class="clearDiv"></div>
						<div id="degoisCol1"><KEEP:lang lang='<%=lang %>' key='webui.degois.password' /></div>
						<div id="degoisCol2"><input type="password" name="degois_pass" /></div>
						<div class="clearDiv"></div>
						<div id="degoisSubmit">
							<input type="submit" value="<KEEP:lang lang='<%=lang %>' key='webui.degois.submit' />"/>
						</div>
					</form>
				</div>
				<div id="degoisInfo">
					<a><img src="_img/LogoDG.png"/></a>
					<a href="http://degois.pt" target="_blank"><KEEP:lang lang='<%=lang %>' key='webui.degois.createcurriculum' /></a>
				</div>
			</div>
		<% }else{ %>
				<% if(status == null || (!status.trim().equals("1") && !status.trim().equals("0") )){ %>
					<div id="degoisTitle"><span><KEEP:lang lang='<%=lang %>' key='webui.degois.title.2' /></span></div>
					<div id="degoisStatusMessage">
						<img src="_img/degoisStatus2.png"/>
						<span><KEEP:lang lang='<%=lang %>' key='webui.degois.description.2' /></span>
				<% }else if(status.trim().equals("0")){ %>
					<div id="degoisTitle"><span><KEEP:lang lang='<%=lang %>' key='webui.degois.title.0' /></span></div>
					<div id="degoisStatusMessage">
						<img src="_img/degoisStatus0.png"/>
						<span><KEEP:lang lang='<%=lang %>' key='webui.degois.description.0' /></span>
				<% }else{ %>
					<div id="degoisTitle"><span><KEEP:lang lang='<%=lang %>' key='webui.degois.title.1' /></span></div>
					<div id="degoisStatusMessage">
						<img src="_img/degoisStatus1.png"/>
						<span><KEEP:lang lang='<%=lang %>' key='webui.degois.description.1' /></span>
				<% } %>
				</div>
		<% } %>
	</div>
</body>
</html>