Commit 874f1a06 authored by Matija Obreza's avatar Matija Obreza
Browse files

Look-n-Feel update

parent 3ca2c119
...@@ -11,14 +11,26 @@ ...@@ -11,14 +11,26 @@
<spring:message code="accession.page.data.title" /> <spring:message code="accession.page.data.title" />
</h1> </h1>
<c:if test="${jsonFilter ne null}"> <div class="main-col-header clearfix">
<div class="clearfix filterinfo filter-block"> <div class="nav-header pull-left">
<div class="results"><spring:message code="accessions.number" arguments="${pagedData.totalElements}" /></div>
<div class="pagination">
<spring:message code="paged.pageOfPages" arguments="${pagedData.number+1},${pagedData.totalPages}" />
<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number eq 0 ? 1 : pagedData.number}" /><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="pagination.previous-page" /></a>
<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number+2}" /><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="pagination.next-page" /></a>
</div>
</div>
</div>
<c:if test="${filters eq null and jsonFilter ne null}">
<div class="applied-filters">
<spring:message code="filters.data-is-filtered" /> <spring:message code="filters.data-is-filtered" />
<a href="<spring:url value="/acn/filter"><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="filters.modify-filters" /></a> <a href="<spring:url value="/acn/filter"><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="filters.modify-filters" /></a>
</div> </div>
</c:if> </c:if>
<c:if test="${filters ne null}"> <c:if test="${filters ne null}">
<div class="applied-filters">
<c:forEach items="${filters.keySet()}" var="by"> <c:forEach items="${filters.keySet()}" var="by">
<c:set value="${filters[by].getClass().simpleName}" var="clazz" /> <c:set value="${filters[by].getClass().simpleName}" var="clazz" />
<div> <div>
...@@ -47,15 +59,9 @@ ...@@ -47,15 +59,9 @@
</div> </div>
<c:remove var="clazz" /> <c:remove var="clazz" />
</c:forEach> </c:forEach>
<a href="<spring:url value="/acn/filter"><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="filters.modify-filters" /></a>
</div>
</c:if> </c:if>
<div class="nav-header">
<spring:message code="accessions.number" arguments="${pagedData.totalElements}" />
<br />
<spring:message code="paged.pageOfPages" arguments="${pagedData.number+1},${pagedData.totalPages}" />
<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number eq 0 ? 1 : pagedData.number}" /><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="pagination.previous-page" /></a>
<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number+2}" /><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="pagination.next-page" /></a>
</div>
<table class="accessions"> <table class="accessions">
<thead> <thead>
...@@ -94,6 +100,5 @@ ...@@ -94,6 +100,5 @@
</tbody> </tbody>
</table> </table>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<small><c:out value="${accession.instituteCode}" /></small> <small><c:out value="${accession.instituteCode}" /></small>
</h1> </h1>
<div class="page-header acn"> <div class="main-col-header acn">
<div class="sel ${selection.containsId(accession.id) ? 'picked' : ''}" x-aid="${accession.id}"> <div class="sel ${selection.containsId(accession.id) ? 'picked' : ''}" x-aid="${accession.id}">
<a class="add" href="<c:url value="/sel/add/${accession.id}" />"><spring:message code="selection.add" arguments="${accession.accessionName}" /></a> <a class="remove" href="<c:url value="/sel/remove/${accession.id}" />"><spring:message code="selection.remove" <a class="add" href="<c:url value="/sel/add/${accession.id}" />"><spring:message code="selection.add" arguments="${accession.accessionName}" /></a> <a class="remove" href="<c:url value="/sel/remove/${accession.id}" />"><spring:message code="selection.remove"
arguments="${accession.accessionName}" /></a> arguments="${accession.accessionName}" /></a>
...@@ -49,10 +49,33 @@ ...@@ -49,10 +49,33 @@
</div> </div>
</c:if> </c:if>
<table> <div class="pos-relative">
<div class="pseudo-right-col">
<c:if test="${accessionGeo.latitude ne null}">
<div class="crop-location">
<h3><spring:message code="accession.collecting.site" /></h3>
<div id="map" class="map-container">
<spring:message code="maps.loading-map" />
</div>
<table class="map-data">
<tr>
<td><spring:message code="filter.lat" />:</td>
<td><c:out value="${accessionGeo.latitude}" /></td>
</tr><tr>
<td><spring:message code="filter.lon" />:</td>
<td><c:out value="${accessionGeo.longitude}" /></td>
</tr><tr>
<td><spring:message code="accession.elevation" />:</td>
<td><c:out value="${accessionGeo.elevation}" /></td>
</tr>
</table>
</div>
</c:if>
</div>
<table class="accessions crop-details">
<tbody> <tbody>
<tr> <tr>
<td><spring:message code="accession.holdingInstitute" /></td> <td><spring:message code="accession.holdingInstitute" /></td>
<td><a href="<c:url value="/wiews/${accession.instituteCode.toLowerCase()}" />"> <c:out value="${accession.institute.fullName}" /> <td><a href="<c:url value="/wiews/${accession.instituteCode.toLowerCase()}" />"> <c:out value="${accession.institute.fullName}" />
...@@ -162,7 +185,7 @@ ...@@ -162,7 +185,7 @@
<c:if test="${accessionCollect ne null}"> <c:if test="${accessionCollect ne null}">
<tr> <tr>
<td colspan="2"> <td class="title" colspan="2">
<h4><spring:message code="accession.collecting" /></h4> <h4><spring:message code="accession.collecting" /></h4>
</td> </td>
</tr> </tr>
...@@ -201,7 +224,7 @@ ...@@ -201,7 +224,7 @@
<c:if test="${accessionBreeding ne null}"> <c:if test="${accessionBreeding ne null}">
<tr> <tr>
<td colspan="2"> <td class="title" colspan="2">
<h4><spring:message code="accession.breeding" /></h4> <h4><spring:message code="accession.breeding" /></h4>
</td> </td>
</tr> </tr>
...@@ -218,7 +241,7 @@ ...@@ -218,7 +241,7 @@
<c:if test="${accessionGeo ne null}"> <c:if test="${accessionGeo ne null}">
<tr> <tr>
<td colspan="2"> <td class="title" colspan="2">
<h4><spring:message code="accession.geo" /></h4> <h4><spring:message code="accession.geo" /></h4>
</td> </td>
</tr> </tr>
...@@ -233,6 +256,13 @@ ...@@ -233,6 +256,13 @@
<td><spring:message code="accession.geolocation" /></td> <td><spring:message code="accession.geolocation" /></td>
<td>${accessionGeo.latitude}, ${accessionGeo.longitude}</td> <td>${accessionGeo.latitude}, ${accessionGeo.longitude}</td>
</tr> </tr>
</c:if>
<c:if test="${accessionGeo.elevation ne null}">
<tr>
<td><spring:message code="accession.elevation" /></td>
<td>${accessionGeo.elevation}<span class="uom">m</span></td>
</tr>
</c:if>
<tr> <tr>
<td><spring:message code="accession.geo.datum" /></td> <td><spring:message code="accession.geo.datum" /></td>
<td>${accessionGeo.datum}</td> <td>${accessionGeo.datum}</td>
...@@ -241,33 +271,18 @@ ...@@ -241,33 +271,18 @@
<td><spring:message code="accession.geo.method" /></td> <td><spring:message code="accession.geo.method" /></td>
<td>${accessionGeo.method}</td> <td>${accessionGeo.method}</td>
</tr> </tr>
</c:if>
<c:if test="${accessionGeo.elevation ne null}">
<tr>
<td><spring:message code="accession.elevation" /></td>
<td>${accessionGeo.elevation}<span class="uom">m</span></td>
</tr>
</c:if>
<c:if test="${accessionGeo.uncertainty ne null}"> <c:if test="${accessionGeo.uncertainty ne null}">
<tr> <tr>
<td><spring:message code="accession.geo.uncertainty" /></td> <td><spring:message code="accession.geo.uncertainty" /></td>
<td>${accessionGeo.uncertainty}<span class="uom">m</span></td> <td>${accessionGeo.uncertainty}<span class="uom">m</span></td>
</tr> </tr>
</c:if> </c:if>
<c:if test="${accessionGeo.latitude ne null}">
<tr>
<td colspan="2">
<h4><spring:message code="accession.collecting.site" /></h4>
<div id="map" class="gis-map"><spring:message code="maps.loading-map" /></div>
</td>
</tr>
</c:if>
</c:if> </c:if>
<c:if test="${svalbardData ne null}"> <c:if test="${svalbardData ne null}">
<tr> <tr>
<td colspan="2"> <td class="title" colspan="2">
<h4><spring:message code="accession.svalbard-data" /></h4> <h4><spring:message code="accession.svalbard-data" /></h4>
</td> </td>
</tr> </tr>
...@@ -294,13 +309,14 @@ ...@@ -294,13 +309,14 @@
</tbody> </tbody>
</table> </table>
</div>
<c:if test="${methods.size() gt 0}"> <c:if test="${methods.size() gt 0}">
<h4> <h4>
<spring:message code="accession.methods" /> <spring:message code="accession.methods" />
</h4> </h4>
<table> <table class="accessions crop-details">
<tbody> <tbody>
<c:forEach items="${methods}" var="method" varStatus="status"> <c:forEach items="${methods}" var="method" varStatus="status">
<tr class="targeted" id="method${method.id}"> <tr class="targeted" id="method${method.id}">
......
...@@ -14,11 +14,10 @@ ...@@ -14,11 +14,10 @@
<div class="clearfix filter-block"> <div class="clearfix filter-block">
<div class="pull-left filter-name"><spring:message code="filter.${filter.name}" /></div> <div class="pull-left filter-name"><spring:message code="filter.${filter.name}" /></div>
<div class="clearfix pull-left" id="filter-${filter.name}"> <div class="pull-left" id="filter-${filter.name}">
<div class="filter-values pull-left"></div>
<c:choose> <c:choose>
<c:when test="${filter.type=='NUMERIC'}"> <c:when test="${filter.type=='NUMERIC'}">
<div class="filter-new form-group pull-left">Min: <input class="span1 form-control" type="text" /> Max: <input class="span1 form-control" type="text" /> <button class="btn notimportant">+</button></div> <div class="filter-new form-group pull-left input-group"><span class="input-group-btn"><input class="span1 form-control" type="text" /><input class="span1 form-control" type="text" /><button class="btn notimportant">+</button></span></div>
</c:when> </c:when>
<%-- <c:when test="${filter.type=='BOOLEAN'}"> <%-- <c:when test="${filter.type=='BOOLEAN'}">
<div class="filter-new pull-left"><input type="checkbox" id="check.${filter.name}" /> <label for="check.${filter.name}">Yes</label> <button class="notimportant">+</button></div> <div class="filter-new pull-left"><input type="checkbox" id="check.${filter.name}" /> <label for="check.${filter.name}">Yes</label> <button class="notimportant">+</button></div>
...@@ -27,13 +26,15 @@ ...@@ -27,13 +26,15 @@
<div class="filter-new form-group pull-left input-group"><span class="input-group-btn"><input class="span2 form-control" type="text" /><button class="btn notimportant">+</button></span></div> <div class="filter-new form-group pull-left input-group"><span class="input-group-btn"><input class="span2 form-control" type="text" /><button class="btn notimportant">+</button></span></div>
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
<div class="filter-values pull-left"></div>
</div> </div>
</div> </div>
</c:forEach> </c:forEach>
</div>
<div class="clearfix"> <div class="clearfix">
<a id="filtersHref" href=""><button class="btn">View!</button></a> <a id="filtersHref" href=""><button class="btn btn-green pull-left">View!</button></a>
</div>
</div> </div>
<div id="filtersJson">${jsonObject}</div> <div id="filtersJson">${jsonObject}</div>
...@@ -59,7 +60,7 @@ jQuery(document).ready(function() { ...@@ -59,7 +60,7 @@ jQuery(document).ready(function() {
//debugger; //debugger;
if ($.isPlainObject(i)) { if ($.isPlainObject(i)) {
// ranges & ops // ranges & ops
var x="<div class='filtval complex'><span class='deleteTag close'>&times;</span>"; var x="<div class='filtval complex'>";
if (i["range"]!=null) { if (i["range"]!=null) {
x+="Between " + i["range"][0] + " and " + i["range"][1]; x+="Between " + i["range"][0] + " and " + i["range"][1];
} else if (i["min"]!=null) { } else if (i["min"]!=null) {
...@@ -69,7 +70,7 @@ jQuery(document).ready(function() { ...@@ -69,7 +70,7 @@ jQuery(document).ready(function() {
} }
x+="</div>"; x+="</div>";
} else { } else {
var x="<div class='filtval discrete'><span class='deleteTag close'>&times;</span>" + i + "</div>"; var x="<div class='filtval discrete'>" + i + "</div>";
} }
c.append(x); c.append(x);
}); });
......
...@@ -11,12 +11,17 @@ ...@@ -11,12 +11,17 @@
<spring:message code="metadata.page.title" /> <spring:message code="metadata.page.title" />
</h1> </h1>
<div class="nav-header"> <div class="main-col-header clearfix">
<spring:message code="paged.totalElements" arguments="${pagedData.totalElements}" /> <div class="nav-header pull-left">
<br /> <div class="results"><spring:message code="paged.totalElements" arguments="${pagedData.totalElements}" /></div>
<spring:message code="paged.pageOfPages" arguments="${pagedData.number+1},${pagedData.totalPages}" /> <div class="pagination">
<a class="${pagedData.number eq 0 ? 'disabled' :''}" href="?page=${pagedData.number eq 0 ? 1 : pagedData.number}"><spring:message code="pagination.previous-page" /></a> <a href="?page=${pagedData.number + 2}"><spring:message code="pagination.next-page" /></a> <spring:message code="paged.pageOfPages" arguments="${pagedData.number+1},${pagedData.totalPages}" />
<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number eq 0 ? 1 : pagedData.number}" /><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="pagination.previous-page" /></a>
<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number+2}" /><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="pagination.next-page" /></a>
</div>
</div> </div>
</div>
<ul class="funny-list"> <ul class="funny-list">
<c:forEach items="${pagedData.content}" var="metadata" varStatus="status"> <c:forEach items="${pagedData.content}" var="metadata" varStatus="status">
<li class="clearfix ${status.count % 2 == 0 ? 'even' : 'odd'}"><a class="show pull-left" href="/data/view/${metadata.id}"><c:out value="${metadata.title}" /></a> <li class="clearfix ${status.count % 2 == 0 ? 'even' : 'odd'}"><a class="show pull-left" href="/data/view/${metadata.id}"><c:out value="${metadata.title}" /></a>
......
...@@ -11,17 +11,16 @@ ...@@ -11,17 +11,16 @@
<c:out value="${metadata.title}" /> <c:out value="${metadata.title}" />
</h1> </h1>
<div class="audit-info"> <div class="main-col-header clearfix">
<c:if test="${metadata.lastModifiedBy ne null}"><spring:message code="audit.lastModifiedBy" arguments="${jspHelper.userFullName(metadata.lastModifiedBy)}" /></c:if> <div class="nav-header pull-left">
<fmt:formatDate value="${metadata.lastModifiedDate}" type="both" /> <div class="results"><spring:message code="paged.totalElements" arguments="${pagedData.totalElements}" /></div>
<div class="pagination">
<spring:message code="paged.pageOfPages" arguments="${pagedData.number+1},${pagedData.totalPages}" />
<a class="${pagedData.number eq 0 ? 'disabled' :''}" href="?page=${pagedData.number eq 0 ? 1 : pagedData.number}"><spring:message code="pagination.previous-page" /></a> <a href="?page=${pagedData.number + 2}"><spring:message code="pagination.next-page" /></a>
</div>
</div> </div>
</div>
<c:if test="${faoInstitute ne null}">
<p>
<a class="" href="<c:url value="/wiews/${faoInstitute.code.toLowerCase()}" />"><b><c:out value="${faoInstitute.code}" /></b> <c:out value="${faoInstitute.fullName}" /></a>
</p>
</c:if>
<c:if test="${page eq 1}"> <c:if test="${page eq 1}">
<table> <table>
<thead> <thead>
...@@ -62,19 +61,22 @@ ...@@ -62,19 +61,22 @@
<div><a href="<c:url value="/data/view/${metadata.id}/dwca" />"><spring:message code="metadata.download-dwca" /></a></div> <div><a href="<c:url value="/data/view/${metadata.id}/dwca" />"><spring:message code="metadata.download-dwca" /></a></div>
<h3>Observations</h3>
<c:if test="${faoInstitute ne null}">
<p>
<a class="" href="<c:url value="/wiews/${faoInstitute.code.toLowerCase()}" />"><b><c:out value="${faoInstitute.code}" /></b> <c:out value="${faoInstitute.fullName}" /></a>
</p>
</c:if>
<div class="audit-info">
<c:if test="${metadata.lastModifiedBy ne null}"><spring:message code="audit.lastModifiedBy" arguments="${jspHelper.userFullName(metadata.lastModifiedBy)}" /></c:if>
<fmt:formatDate value="${metadata.lastModifiedDate}" type="both" />
</div>
</c:if> </c:if>
<div class="nav-header">
<spring:message code="paged.totalElements" arguments="${pagedData.totalElements}" />
<br />
<spring:message code="paged.pageOfPages" arguments="${pagedData.number+1},${pagedData.totalPages}" />
<a class="${pagedData.number eq 0 ? 'disabled' :''}" href="?page=${pagedData.number eq 0 ? 1 : pagedData.number}"><spring:message code="pagination.previous-page" /></a> <a href="?page=${pagedData.number + 2}"><spring:message code="pagination.next-page" /></a>
</div>
<div class="table-responsive"> <div class="table-responsive">
<table class="accessions table wide-table"> <table class="accessions wide-table">
<thead> <thead>
<tr> <tr>
<td class="idx-col"></td> <td class="idx-col"></td>
...@@ -89,7 +91,7 @@ ...@@ -89,7 +91,7 @@
<td><spring:message code="accession.holdingCountry" /></td> <td><spring:message code="accession.holdingCountry" /></td>
--%> --%>
<c:forEach items="${methods}" var="method"> <c:forEach items="${methods}" var="method">
<td><c:out value="${method.fieldName}" /> <c:if test="${method.unit ne ''}">[<c:out value="${method.unit}" />]</c:if></td> <td><c:out value="${method.fieldName}" /> <c:if test="${method.unit ne null'}">[<c:out value="${method.unit}" />]</c:if></td>
</c:forEach> </c:forEach>
......
...@@ -19,11 +19,15 @@ ...@@ -19,11 +19,15 @@
<c:if test="${pagedData != null}"> <c:if test="${pagedData != null}">
<div class="nav-header"> <div class="main-col-header clearfix">
<spring:message code="accessions.number" arguments="${pagedData.totalElements}" /> <div class="nav-header pull-left">
<br /> <div class="results"><spring:message code="accessions.number" arguments="${pagedData.totalElements}" /></div>
<spring:message code="paged.pageOfPages" arguments="${pagedData.number+1},${pagedData.totalPages}" /> <div class="pagination">
<a class="${pagedData.number eq 0 ? 'disabled' :''}" href="?page=${pagedData.number eq 0 ? 1 : pagedData.number}"><spring:message code="pagination.previous-page" /></a> <a href="?page=${pagedData.number + 2}"><spring:message code="pagination.next-page" /></a> <spring:message code="paged.pageOfPages" arguments="${pagedData.number+1},${pagedData.totalPages}" />
<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number eq 0 ? 1 : pagedData.number}" /><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="pagination.previous-page" /></a>
<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number+2}" /><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="pagination.next-page" /></a>
</div>
</div>
</div> </div>
<table class="accessions"> <table class="accessions">
......
...@@ -5,6 +5,10 @@ body { ...@@ -5,6 +5,10 @@ body {
color:#4d4c46; color:#4d4c46;
} }
a {
color: #5476B2;
}
/* RTL styles */ /* RTL styles */
html[dir="rtl"] #content .left-col, html[dir="rtl"] #content .left-col,
...@@ -177,9 +181,16 @@ html[dir="rtl"] #header .nav .dropdown-menu .checkbox { ...@@ -177,9 +181,16 @@ html[dir="rtl"] #header .nav .dropdown-menu .checkbox {
} }
#header .nav .dropdown-menu .btn-default { #header .nav .dropdown-menu .btn-default {
background:#e8e8e8;
color:#4d4c46;
margin-bottom:15px; margin-bottom:15px;
} }
#header .nav .dropdown-menu .btn-default:hover {
background:#e8e8e8;
text-decoration:underline;
}
#header .nav .dropdown-menu .or { #header .nav .dropdown-menu .or {
display:block; display:block;
margin:5px 0; margin:5px 0;
...@@ -208,11 +219,20 @@ html[dir="rtl"] #header .nav .dropdown-menu .checkbox { ...@@ -208,11 +219,20 @@ html[dir="rtl"] #header .nav .dropdown-menu .checkbox {
} }
.navbar#nav-main ul li a:hover, .navbar#nav-main ul li a:hover,
.navbar#nav-main ul li a:focus,
.navbar#nav-main ul li.active a { .navbar#nav-main ul li.active a {
background:url('../images/arrow_mainnav.png') no-repeat bottom center; background:url('../images/arrow_mainnav.png') no-repeat bottom center;
text-decoration:none; text-decoration:none;
} }
.navbar#nav-main .badge {
-moz-border-radius:15px;
-webkit-border-radius:15px;
border-radius:15px;
padding:5px 15px;
margin:-2px 0 -2px 5px;
}
/* Content */ /* Content */
/* Left column */ /* Left column */
...@@ -514,13 +534,23 @@ html[dir="rtl"] .tab-pane .all-posts .type-crop .post-inner .post-image img { ...@@ -514,13 +534,23 @@ html[dir="rtl"] .tab-pane .all-posts .type-crop .post-inner .post-image img {
left:15px; left:15px;
} }
.tab-pane .all-posts .post-inner .post-content {
float:left;
width:391px;
}
.tab-pane .all-posts .type-crop .post-inner .post-content {
width:441px;
}
.tab-pane .all-posts .type-list .post-inner .post-content { .tab-pane .all-posts .type-list .post-inner .post-content {
background:url('../images/pic_map_news_full.png') no-repeat center right; background:url('../images/pic_map_news_full.png') no-repeat center right;
width:551px; width:551px;
} }
.tab-pane .all-posts .post-inner .post-content { .tab-pane .all-posts .type-list .post-inner .post-content ol {
padding:10px; margin:10px 0 10px 10px;
padding:0;
} }
html[dir="rtl"] .tab-pane .all-posts .type-list .post-inner .post-content ol { html[dir="rtl"] .tab-pane .all-posts .type-list .post-inner .post-content ol {
...@@ -756,6 +786,570 @@ html[dir="rtl"] #stats .stat-lists ol li img { ...@@ -756,6 +786,570 @@ html[dir="rtl"] #stats .stat-lists ol li img {
padding-left:5px; padding-left:5px;
} }
/* Main column - General styles */
.main-col {
background-color: #fff;
margin: 10px 0 20px;
padding: 10px;
}
.main-col > *:FIRST-CHILD {
margin-top: 0;