Blame view

web/repositoryInfo.jsp 8.8 KB
6c53bca13   Fernando Ribeiro   Create public val...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
  <?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.database.sql.OrderType"%>
  <%@ 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.io.session.*" %>
  <%@ page import="pt.keep.metarepository.core.configuration.*" %>
  <%@ page import="pt.keep.metarepository.core.localization.*" %>
  <%@ page import="pt.keep.metarepository.core.util.data.*" %>
  <%@ page import="pt.keep.metarepository.core.util.*" %>
  <%@ 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="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/results.css" type="text/css" media="screen,projection" />
  	<link rel="stylesheet" href="_css/results_<%=lang%>.css" type="text/css" media="screen,projection" />
  
  	<!--[if IE]>
  	<link rel="stylesheet" href="_css/results_ie.css" type="text/css" media="screen,projection" />
  	<![endif]-->
  
  <%
  	ArchiveInterface arqIface = new ArchiveInterface(getServletContext());
  	String archiveId = request.getParameter("id");
  	List<Archive> archives = null, inactiveArchives=null;
  	if(archiveId!=null && !archiveId.equals("")){
  		try{
  			Archive archive = arqIface.findArchiveByID(archiveId);
  			if(archive.isActive()){
  %>
  				<meta property="og:title" content="<%=archive.getName() %>"/>
  				<meta property="og:image" content="<%=ConfigurationManager.getProperty("site.url","www.rcaap.pt") %>/images/repositories/<%=archive.getId() %>.jpg"/>
  				<meta property="og:type" content="website"/>
  				<meta property="og:url" content="<%=ConfigurationManager.getProperty("site.url","www.rcaap.pt") %>/repositoryInfo.jsp?id=<%=archive.getId() %>"/>
  				<meta property="fb:admins" content="piskeirinho"/>
  <% 
  				archives = new ArrayList<Archive>();
  				archives.add(archive);
  			}
  		}catch(Throwable t){ 
  			archives = arqIface.findAllActive();
  		}
  	}else{
  		archives = arqIface.findAllActive();
  	}
  	inactiveArchives = arqIface.findAllInactive();
  	HashMap<String, Integer> number = SolrClient.getInstance().getNumberOfDocumentsCountByArchive(true, inactiveArchives);
  
  	int i;
  	boolean isPt = lang.equals("pt");
  	arqIface.closeConnection();
  %>
  </head>
  <body>
  <div id="siteBox">
  	<div id="container">
  		<jsp:include page="header.jsp" />
  		<div id="directoryBox">
  	  		<h1><KEEP:lang lang='<%=lang %>' key="webui.directory.legend"/></h1>
  			<% for (Archive arc : archives) {
  				String urlToShare = StringUtils.urlEncodeFromUTF8(ConfigurationManager.getProperty("site.url", "http://www.rcaap.pt")+"/repositoryInfo.jsp?id="+arc.getId());
  				String titleToShare = StringUtils.urlEncodeFromUTF8(arc.getName());
  				titleToShare = titleToShare.replaceAll(":", "%3A");
  				titleToShare = titleToShare.replaceAll("/", "%2F");
  				titleToShare = titleToShare.replaceAll("#", "%23");
  				titleToShare = titleToShare.replaceAll("&", "%26");
  			%>
  	  		<div class="sep"><hr /></div>
  		 	<div class="floatBox">
  		 		<div id="titlePlusSocial">
  					<h2><a href="<%=arc.getHomePage() %>" target="_blank"><%=arc.getName() %></a></h2>
  					<div id="social">
  						<a href="http://delicious.com/post?url=<%=urlToShare%>&title=<%=titleToShare%>" target="_blank"><img src="_img/delicious_16.png" title="<KEEP:lang lang='<%=lang %>' key="webui.repositoryinfo.delicious.repository" />" alt="delicious logo" /></a>
  						<a href="http://www.facebook.com/sharer.php?u=<%=urlToShare%>&t=<%=titleToShare%>" target="_blank"><img src="_img/facebook_16.png" title="<KEEP:lang lang='<%=lang %>' key="webui.repositoryinfo.facebook.repository" />" alt="facebook logo" /></a>
  						<a href="http://www.linkedin.com/shareArticle?mini=true&url=<%=urlToShare%>&title=<%=titleToShare%>" target="_blank"><img src="_img/linkedin_16.png" title="<KEEP:lang lang='<%=lang %>' key="webui.repositoryinfo.linkedin.repository" />" alt="linkedin logo" /></a>
  						<a href="http://twitter.com/home?status=<%=titleToShare%> - <%=urlToShare%>" target="_blank"><img src="_img/twitter_16.png" title="<KEEP:lang lang='<%=lang %>' key="webui.repositoryinfo.twitter.repository" />" alt="twitter logo" /></a>
  					</div>
  				</div>
  		        <div class="colsBox">
  					<div class="col1">
  						<p><%=(isPt)?arc.getPtDescription():arc.getEnDescription()%></p>
  						<ul>
  							<li>
  	  							<strong><KEEP:lang lang='<%=lang %>' key="webui.directory.contact" /></strong>
  	  							<a href="mailto:<%=arc.getAdminEmail()%>"><%=arc.getAdminEmail() %></a>
  	  						</li>
  						</ul>
  						<div id="features">
  							<%
  								if(arc.isDegois()){
  							%>
  								<a><img src="_img/degois.png" title="<KEEP:lang lang='<%=lang %>' key="webui.directory.degois" />" alt="degois logo"/></a>
  							<%
  								}
  								if(arc.isOpenAire()){
  							%>
  								<a><img src="_img/openaire.png" title="<KEEP:lang lang='<%=lang %>' key="webui.directory.openaire" />" alt="openaire logo"/></a>
  							<%
  								}
  								if(arc.harvestFullText()){
  							%>
  								<a><img src="_img/text.png" title="<KEEP:lang lang='<%=lang %>' key="webui.directory.fulltext" />" alt="fulltext logo"/></a>
  							<%
  								}
  								if(arc.isDriver()){
  							%>
  								<a><img src="_img/driver.png" title="<KEEP:lang lang='<%=lang %>' key="webui.directory.driver" />" alt="driver logo"/></a>
  							<%
  								}
  							%>
  						</div>
  	  				</div>	
  					<div class="col2">
  						<ul>
  							<li>
  								<strong><KEEP:lang lang='<%=lang %>' key="webui.directory.url.location" /></strong>
  								<a title="<%=arc.getName() %>" href="<%=arc.getHomePage() %>" target="_blank"><%=arc.getHomePage() %></a>
  							</li>
  	  						<li>
  	  							<strong><KEEP:lang lang='<%=lang %>' key="webui.directory.oai.interface" /></strong>
  								<a href="<%=arc.getOaiUrl() %>" target="_blank"><%=arc.getOaiUrl() %></a>
  							</li>
  	  						
  	  						<li>
  	  							<strong><KEEP:lang lang='<%=lang %>' key="webui.repositoryinfo.directorio.luso.brasileiro" /></strong>
  	  							<a href="<%=arc.getDirectoryURL()%>"><%=arc.getDirectoryURL() %></a>
  	  						</li>
  	  						<li class="num">
  								<strong><KEEP:lang lang='<%=lang %>' key="webui.directory.number.of.documents" /></strong>
  								<a title="<KEEP:lang lang='<%=lang %>' key='webui.directory.number.of.documents.title'/> <%=arc.getName() %>" href="<KEEP:url url='/search' />?<%=Constants.REQUEST_FORMNAME%>=<%=SearchType.ADVANCED.toString()%>&amp;<%=Constants.REQUEST_REPOSITORY %>=<%=arc.getId() %>&amp;<%=Constants.INCLUDE_ALL_REPOSITORIES%>=yes&amp;<%=Constants.REQUEST_ORDER_COLUMN %>=<%=ColumnOrder.ISSUE_DATE.toString() %>&amp;<%=Constants.REQUEST_ORDER_TYPE %>=<%=OrderType.DESC.toString() %>"><%=(number.get(arc.getId())!=null?number.get(arc.getId()).toString():"0")%></a>
  							</li>
  						</ul>
  					</div>
  					<div class="col3">
  						<a href="<%=arc.getHomePage() %>" target="_blank"><img src="/images/repositories/<%=arc.getId() %>.jpg" alt="<%=arc.getName() %>" /></a>
  						<a><img src="/images/repositoriesStatistics/<%=arc.getId() %>.png" title="<%=arc.getName() %>" alt="repository evolution"/></a>
  					</div>
  					<div id="backToDirectory">
  						<a href="<KEEP:url url='/directory.jsp'/>"><KEEP:lang lang='<%=lang %>' key="webui.repositoryinfo.back.to.directory" /></a>
  					</div>
  				</div>
  			</div>
  			<% } %>
  		</div>
  		<jsp:include page="footer.jsp" />
  	</div>
  </div>
  	<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>