index.jsp 7.87 KB
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1 2
<!DOCTYPE html>

Matija Obreza's avatar
Matija Obreza committed
3
<%@ include file="/WEB-INF/jsp/init.jsp" %>
4
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
Matija Obreza's avatar
Matija Obreza committed
5 6 7

<html>
<head>
Matija Obreza's avatar
Matija Obreza committed
8
<title><spring:message code="page.home.title" /></title>
Matija Obreza's avatar
Matija Obreza committed
9
</head>
Matija Obreza's avatar
Matija Obreza committed
10
<body class="welcome-page">
11
	<div class="row no-space intro">
Matija Obreza's avatar
Matija Obreza committed
12
		<div class="hidden-sm hidden-xs col-md-6 col-lg-6">
13 14 15
			<div class="intro-image">
			</div>
		</div>
Matija Obreza's avatar
Matija Obreza committed
16
		<div class="col-sm-12 col-md-6 col-lg-6 no-space">
17 18 19
			<div class="intro-text">
				<c:if test="${welcomeBlurp ne null}">
					<div class="">
20
						<cms:blurb blurb="${welcomeBlurp}"/>
21
						<a class="btn btn-default" href="<c:url value="/content/about/about" />"><spring:message code="welcome.read-more" /></a>
Matija Obreza's avatar
Matija Obreza committed
22 23
					</div>
				</c:if>
24
			</div>
25
		</div>
Matija Obreza's avatar
Matija Obreza committed
26
	</div>
Matija Obreza's avatar
Posts  
Matija Obreza committed
27

Matija Obreza's avatar
Matija Obreza committed
28
	<div class="row no-space map">
Taisiya Glushko's avatar
Taisiya Glushko committed
29 30
		<div id="stats" class="col-md-4 col-sm-12 col-xs-12">
			<h2 class="short text-right pull-left">
Matija Obreza's avatar
Matija Obreza committed
31 32
				<spring:message code="maps.accession-map" />
			</h2>
33

Matija Obreza's avatar
Matija Obreza committed
34
			<div class="stats-map">
Matija Obreza's avatar
Matija Obreza committed
35 36 37
				<div class="all-stats">
					<%-- 	        <div class="one-stat"><a href="<c:url value="/geo/" />"><spring:message code="stats.number-of-countries" arguments="${numberOfCountries}" /></a></div> --%>
					<div class="one-stat">
Matija Obreza's avatar
Matija Obreza committed
38
						<a href="<c:url value="/explore" />">
39
							<spring:message code="stats.number-of-accessions" arguments="${numberOfActiveAccessions}" />
Matija Obreza's avatar
Matija Obreza committed
40 41
						</a>
					</div>
42 43 44 45 46
					<%-- <div class="one-stat">
						<a href="<c:url value="/explore"><c:param name="filter" value='{"historic":[true]}' /></c:url>">
							<spring:message code="stats.number-of-historic-accessions" arguments="${numberOfHistoricAccessions}" />
						</a>
					</div> --%>
Matija Obreza's avatar
Matija Obreza committed
47
					<div class="one-stat">
Matija Obreza's avatar
Matija Obreza committed
48 49
						<a href="<c:url value="/wiews/active" />">
							<spring:message code="stats.number-of-institutes" arguments="${numberOfInstitutes}" />
Matija Obreza's avatar
Matija Obreza committed
50 51 52
						</a>
					</div>
				</div>
Matija Obreza's avatar
Matija Obreza committed
53
				<p><spring:message code="maps.accession-map.intro" /></p>
Matija Obreza's avatar
Matija Obreza committed
54 55 56
			</div>
		</div>

57
		<div class="col-xs-12 col-md-8 map-wrapper-mobile">
58
		<%-- 	<h2>
Matija Obreza's avatar
Matija Obreza committed
59
				<spring:message code="maps.accession-map" />
60
			</h2> --%>
Matija Obreza's avatar
Matija Obreza committed
61
			<div class="">
62
				<div id="globalmap" x-href="<c:url value="/explore/map" />" class="gis-map"></div>
Matija Obreza's avatar
Matija Obreza committed
63 64 65
			</div>
		</div>
	</div>
66

Matija Obreza's avatar
Matija Obreza committed
67
	<div class="row see-also-row">
Taisiya Glushko's avatar
Taisiya Glushko committed
68
		<div class="col-md-4 col-sm-12 col-xs-12 no-space">
Matija Obreza's avatar
Matija Obreza committed
69
			<div class="see-also-block">
70
				<div class="content">
Taisiya Glushko's avatar
Taisiya Glushko committed
71
					<h2 class="short text-right pull-left">
Matija Obreza's avatar
Matija Obreza committed
72
						<spring:message code="welcome.search-genesys" />
73
					</h2>
Matija Obreza's avatar
Matija Obreza committed
74
					<div class="body">
Matija Obreza's avatar
Matija Obreza committed
75 76 77 78
						<div class="row">
							<div class="col-lg-4 hidden-md">
								<div class="see-also-img" style="background-image: url('/html/1/images/three-1.jpg');"></div>
							</div>
Taisiya Glushko's avatar
Taisiya Glushko committed
79
							<div class="col-xs-12 col-sm-12 col-md-12 col-lg-8 no-space">
Matija Obreza's avatar
Matija Obreza committed
80 81 82 83

								<p>
									<spring:message code="search.search-query-missing" />
								</p>
Taisiya Glushko's avatar
Taisiya Glushko committed
84
								<form action="<c:url value="/acn/search2" />" class="form-inline home-search">
Matija Obreza's avatar
Matija Obreza committed
85
									<div class="form-group">
86 87
										<input name="q"  class="form-control" placeholder="<spring:message code="search.input.placeholder" />" />
										<button class="search-btn"></button>
Matija Obreza's avatar
Matija Obreza committed
88
									</div>
Matija Obreza's avatar
Matija Obreza committed
89
								</form>
90
							</div>
Matija Obreza's avatar
Matija Obreza committed
91
						</div>
92 93
					</div>
				</div>
Matija Obreza's avatar
Matija Obreza committed
94 95
			</div>
		</div>
Matija Obreza's avatar
Matija Obreza committed
96 97

		<!-- Block Organizations -->
Taisiya Glushko's avatar
Taisiya Glushko committed
98
		<div class="col-md-4 col-sm-12 col-xs-12 no-space">
Matija Obreza's avatar
Matija Obreza committed
99
			<div class="see-also-block">
100
				<div class="content">
Taisiya Glushko's avatar
Taisiya Glushko committed
101
					<h2 class="short text-right pull-left">
102
						<c:out value="${organizationsBlurb.title}" />
103
					</h2>
104
					<div class="body free-text">
105
						<c:out value="${organizationsBlurb.body}" escapeXml="false" />
106 107
					</div>
				</div>
Matija Obreza's avatar
Matija Obreza committed
108

Matija Obreza's avatar
Matija Obreza committed
109 110
			</div>
		</div>
111

Matija Obreza's avatar
Matija Obreza committed
112
			<!-- Block Help -->
Taisiya Glushko's avatar
Taisiya Glushko committed
113
		<div class="col-md-4 col-sm-12 col-xs-12 no-space">
114
			<div class="see-also-block">
Matija Obreza's avatar
Matija Obreza committed
115

116
				<div class="content">
Taisiya Glushko's avatar
Taisiya Glushko committed
117
					<h2 class="short text-right pull-left">
118 119
						<spring:message code="menu.help" />
					</h2>
Matija Obreza's avatar
Matija Obreza committed
120 121 122
					<div class="body">
						<div class="row">
							<div class="col-lg-4 hidden-md">
123
								<div class="see-also-img" style="background: url('<c:url value="/html/1/images/three-3.jpg" />') 82% no-repeat;"></div>
Matija Obreza's avatar
Matija Obreza committed
124 125
							</div>
							<div class="col-md-12 col-lg-8  no-space">
126
								<a href="<c:url value='/content/help/how-to-use-genesys' />">
Matija Obreza's avatar
Matija Obreza committed
127 128 129 130
									<spring:message code="help.page.intro" />
								</a>
							</div>
						</div>
Matija Obreza's avatar
Matija Obreza committed
131

Matija Obreza's avatar
Matija Obreza committed
132
					</div>
Matija Obreza's avatar
Matija Obreza committed
133 134 135
				</div>
			</div>
		</div>
Matija Obreza's avatar
Matija Obreza committed
136
	</div>
137

Matija Obreza's avatar
Matija Obreza committed
138 139
		<div class="center-divider">
			<div class="row white-background">
Matija Obreza's avatar
Matija Obreza committed
140 141

		<!-- left column end / middle columns start -->
Taisiya Glushko's avatar
Taisiya Glushko committed
142 143
			<div class="col-lg-8 col-md-8 col-xs-12 no-space" id="middle-col">
				<h2 class="short text-right pull-left">
Matija Obreza's avatar
Matija Obreza committed
144
					<spring:message code="activity.recent-activity" />
Matija Obreza's avatar
Matija Obreza committed
145
			</h2>
Matija Obreza's avatar
Matija Obreza committed
146 147 148 149 150 151 152 153 154 155 156 157 158 159

			<div class="tab-content">
				<div class="tab-pane active" id="news-feed">
					<security:authorize access="hasRole('ADMINISTRATOR')">
						<a href="<c:url value="/content/activitypost/new" />" class="pull-right close" style="">
							<spring:message code="activitypost.add-new-post" />
						</a>
					</security:authorize>

					<div class="all-posts">
						<c:forEach items="${lastNews}" var="activityPost" varStatus="status">
							<cms:activitypost activityPost="${activityPost}" />
						</c:forEach>
					</div>
Matija Obreza's avatar
Matija Obreza committed
160 161

					<a id="show-moar-news" href="<c:url value="/content/news" />"><spring:message code="news.content.page.all.title" /></a>
Matija Obreza's avatar
Matija Obreza committed
162 163 164
				</div>
			</div>
		</div>
Matija Obreza's avatar
Matija Obreza committed
165 166

		<!-- middle column end / right columns start -->
Taisiya Glushko's avatar
Taisiya Glushko committed
167
		<div class="col-lg-4 col-md-4 col-xs-12 no-space" id="right-col">
Matija Obreza's avatar
Matija Obreza committed
168 169
			<c:if test="${sideBlurp ne null}">
				<div class="content-block">
Taisiya Glushko's avatar
Taisiya Glushko committed
170
					<h2 class="short text-right pull-left"><c:out value="${sideBlurp.title}" /></h2>
Matija Obreza's avatar
Matija Obreza committed
171
					<cms:blurb blurb="${sideBlurp}"/>
Matija Obreza's avatar
Matija Obreza committed
172 173
				</div>
			</c:if>
174 175


Matija Obreza's avatar
Matija Obreza committed
176
			<div class="content-block" id="crop-list">
Taisiya Glushko's avatar
Taisiya Glushko committed
177
				<h2 class="short text-right pull-left">
Matija Obreza's avatar
Matija Obreza committed
178 179 180 181 182 183 184 185 186
					<spring:message code="crop.croplist" />
				</h2>
				<sec:authorize access="hasRole('ADMINISTRATOR')">
					<form method="post" action="<c:url value="/c/rebuild" />">
						<input type="submit" class="btn form-control" value="Rebuild" />
						<!-- CSRF protection -->
						<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
					</form>
				</sec:authorize>
Matija Obreza's avatar
Matija Obreza committed
187
				<%-- <div class="dropdown padding10">
Matija Obreza's avatar
Matija Obreza committed
188 189
					<input class="form-control autocomplete-genus" placeholder="<spring:message code="autocomplete.genus" />" x-source="<c:url value="/explore/ac/taxonomy.genus" />" />
				</div>
Matija Obreza's avatar
Matija Obreza committed
190
			</div> --%>
Matija Obreza's avatar
Matija Obreza committed
191 192

			<c:if test="${cropList ne null and cropList.size() gt 0}">
Matija Obreza's avatar
Matija Obreza committed
193
				<c:set var="cropCount" value="${cropList.size()}" />
Matija Obreza's avatar
Matija Obreza committed
194
					<ul class="nav">
Matija Obreza's avatar
Matija Obreza committed
195
						<div class="row">
Taisiya Glushko's avatar
Taisiya Glushko committed
196
							<div class="col-md-12 col-sm-12 col-xs-12">
Matija Obreza's avatar
Matija Obreza committed
197
								<li class="all-crops">
198
									<a class="show" href="<c:url value="/c/" />">
Matija Obreza's avatar
Matija Obreza committed
199 200 201
										<spring:message code="crop.all-crops" />
									</a>
								</li>
202 203 204 205 206 207 208 209 210 211 212
								<c:forEach items="${cropList}" var="crop" varStatus="status">
									<li>
										<a class="show" href="<c:url value="/c/${crop.shortName}" />">
											<c:out value="${crop.getName(pageContext.response.locale)}" />
										</a>
									</li>
									<c:if test="${status.count % Math.round(cropCount / 3) == 0}">
											</div>
											<div class="col-md-12 col-sm-12 col-xs-12">
									</c:if>
								</c:forEach>
Matija Obreza's avatar
Matija Obreza committed
213 214
							</div>
						</div>
Matija Obreza's avatar
Matija Obreza committed
215 216
					</ul>
				</div>
Matija Obreza's avatar
Matija Obreza committed
217
				</div>
Matija Obreza's avatar
Matija Obreza committed
218
			</c:if>
Matija Obreza's avatar
Matija Obreza committed
219
		</div>
220
	</div>
221 222


Matija Obreza's avatar
Matija Obreza committed
223
	<content tag="javascript">
Matija Obreza's avatar
Matija Obreza committed
224
<!-- Index Javascripts -->
225
<script type="text/javascript">
Maxym Borodenko's avatar
Maxym Borodenko committed
226 227 228

	//The document and all resources are loaded
    window.onload = function() {
Matija Obreza's avatar
Matija Obreza committed
229
        $(".genesys-page #content .intro"). css("background-image", "url( '<c:url value="/html/1/images/welcome-bg.png" />' )");
Maxym Borodenko's avatar
Maxym Borodenko committed
230 231
    };

232
  $( document ).ready(function() {
233 234 235
      $('#home-li').find("a").addClass('active active-group');
      $('#home-li').addClass('active');
      $(".autocomplete-genus").each(function() {
236 237
			var t=$(this);
			t.autocomplete({ delay: 200, minLength: 3, source: t.attr('x-source'),
Matija Obreza's avatar
Matija Obreza committed
238 239 240
				messages: { noResults: '', results: function() {} },
				select: function(event, ui) { document.location.pathname='/acn/t/'+ui.item.value; } });
		});
241 242 243
  });
</script>
</content>
244

Matija Obreza's avatar
Matija Obreza committed
245
</body>
246
</html>