Commit b43a071c authored by Matija Obreza's avatar Matija Obreza

Included build number in footer.jsp, preparing for minified CSS and JS

parent e55711f4
This diff is collapsed.
...@@ -19,10 +19,17 @@ package org.genesys2.spring; ...@@ -19,10 +19,17 @@ package org.genesys2.spring;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
public class AddStuffInterceptor implements HandlerInterceptor { public class AddStuffInterceptor implements HandlerInterceptor {
@Value("${build.name}")
private String buildName;
@Value("${build.revision}")
private String buildRevision;
@Override @Override
public void afterCompletion(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, Exception arg3) throws Exception { public void afterCompletion(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, Exception arg3) throws Exception {
...@@ -41,6 +48,8 @@ public class AddStuffInterceptor implements HandlerInterceptor { ...@@ -41,6 +48,8 @@ public class AddStuffInterceptor implements HandlerInterceptor {
public boolean preHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2) throws Exception { public boolean preHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2) throws Exception {
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
arg0.setAttribute("springStartTime", startTime); arg0.setAttribute("springStartTime", startTime);
arg0.setAttribute("buildName", buildName);
arg0.setAttribute("buildRevision", buildRevision);
return true; return true;
} }
......
...@@ -19,4 +19,7 @@ paginator.default.fastStep=3 ...@@ -19,4 +19,7 @@ paginator.default.fastStep=3
paginator.default.maxPage=4 paginator.default.maxPage=4
#Admin #Admin
default.admin.email=admin@example.com default.admin.email=admin@example.com
\ No newline at end of file
build.name=${project.artifactId}-${buildNumber}
build.revision=${buildNumber}
...@@ -13,10 +13,11 @@ ...@@ -13,10 +13,11 @@
<title><sitemesh:write property="title" /></title> <title><sitemesh:write property="title" /></title>
<!-- Bootstrap core CSS --> <!-- Bootstrap core CSS -->
<link href="<c:url value="/html/css/bootstrap.css" />" rel="stylesheet" /> <link href="<c:url value="/html/css/bootstrap.min.css" />" rel="stylesheet" />
<link href="<c:url value="/html/css/jquery-ui.min.css" />" rel="stylesheet" /> <link href="<c:url value="/html/css/jquery-ui.min.css" />" rel="stylesheet" />
<!-- Custom styles for this template --> <!-- Custom styles for this template -->
<!-- <link href="<c:url value="/html/css/genesys.min.css" />" rel="stylesheet" /> -->
<link href="<c:url value="/html/css/custom.css" />" rel="stylesheet" /> <link href="<c:url value="/html/css/custom.css" />" rel="stylesheet" />
<link href="<c:url value="/html/css/responsive.css" />" rel="stylesheet" /> <link href="<c:url value="/html/css/responsive.css" />" rel="stylesheet" />
<link href="<c:url value="/html/font/forza.css" />" rel="stylesheet" /> <link href="<c:url value="/html/font/forza.css" />" rel="stylesheet" />
......
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
<a href="<c:url value="/" />" class="pull-left"><img src="/html/images/logo_genesys_footer.png" alt="Genesys - Gateway to Genetic Resources" /></a> <a href="<c:url value="/" />" class="pull-left"><img src="/html/images/logo_genesys_footer.png" alt="Genesys - Gateway to Genetic Resources" /></a>
<p class="pull-left"><spring:message code="footer.copyright-statement" /></p> <p class="pull-left"><spring:message code="footer.copyright-statement" /></p>
</div> </div>
<div class="pull-right">
<div class="pull-left" style="text-align: right; color: #808080; font-family: monospace; font-size: 8px;"><spring:message code="page.rendertime" arguments="${springExecuteTime}" />
<br /><a target="_blank" href="https://bitbucket.org/genesys2/genesys2-server/commits/${buildRevision}">${buildName}</a></div>
</div>
</div> </div>
</div> </div>
...@@ -34,6 +38,7 @@ ...@@ -34,6 +38,7 @@
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="/html/js/jquery.min.js"></script> <script type="text/javascript" src="/html/js/jquery.min.js"></script>
<script type="text/javascript" src="/html/js/bootstrap.min.js"></script> <script type="text/javascript" src="/html/js/bootstrap.min.js"></script>
<!-- <script type="text/javascript" src="/html/js/genesys.min.js"></script> -->
<script type="text/javascript" src="/html/js/tab.js"></script> <script type="text/javascript" src="/html/js/tab.js"></script>
<script type="text/javascript" src="/html/js/crophub.js"></script> <script type="text/javascript" src="/html/js/crophub.js"></script>
<script type="text/javascript"> <script type="text/javascript">
...@@ -65,6 +70,3 @@ ...@@ -65,6 +70,3 @@
}); });
</script> </script>
<!-- Processing time:
<div class="footer clearfix" style="font-size: 80%"><spring:message code="page.rendertime" arguments="${springExecuteTime}" /></div>
-->
...@@ -16,10 +16,11 @@ ...@@ -16,10 +16,11 @@
<title><sitemesh:write property="title" /></title> <title><sitemesh:write property="title" /></title>
<!-- Bootstrap core CSS --> <!-- Bootstrap core CSS -->
<link href="<c:url value="/html/css/bootstrap.css" />" rel="stylesheet" /> <link href="<c:url value="/html/css/bootstrap.min.css" />" rel="stylesheet" />
<link href="<c:url value="/html/css/jquery-ui.min.css" />" rel="stylesheet" /> <link href="<c:url value="/html/css/jquery-ui.min.css" />" rel="stylesheet" />
<!-- Custom styles for this template --> <!-- Custom styles for this template -->
<!-- <link href="<c:url value="/html/css/genesys.min.css" />" rel="stylesheet" /> -->
<link href="<c:url value="/html/css/custom.css" />" rel="stylesheet" /> <link href="<c:url value="/html/css/custom.css" />" rel="stylesheet" />
<link href="<c:url value="/html/css/responsive.css" />" rel="stylesheet" /> <link href="<c:url value="/html/css/responsive.css" />" rel="stylesheet" />
<link href="<c:url value="/html/font/forza.css" />" rel="stylesheet" /> <link href="<c:url value="/html/font/forza.css" />" rel="stylesheet" />
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<c:if test="${cropList ne null and cropList.size() gt 0}"> <c:if test="${cropList ne null and cropList.size() gt 0}">
<div class="content-block" id="crop-list"> <div class="content-block" id="crop-list">
<ul class="nav"> <ul class="nav">
<li><a class="show" href="<c:url value="/acn/" />"><spring:message code="crop.all-crops" /></a></li> <li><a class="show" href="<c:url value="/explore/" />"><spring:message code="crop.all-crops" /></a></li>
<c:forEach items="${cropList}" var="crop" varStatus="status"> <c:forEach items="${cropList}" var="crop" varStatus="status">
<li><a class="show" href="/explore/c/${crop.shortName}"><c:out value="${crop.getName(pageContext.response.locale)}" /></a></li> <li><a class="show" href="/explore/c/${crop.shortName}"><c:out value="${crop.getName(pageContext.response.locale)}" /></a></li>
</c:forEach> </c:forEach>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment