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

Look-n-Feel update

parent 3ca2c119
......@@ -11,14 +11,26 @@
<spring:message code="accession.page.data.title" />
</h1>
<c:if test="${jsonFilter ne null}">
<div class="clearfix filterinfo filter-block">
<div class="main-col-header clearfix">
<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" />
<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 test="${filters ne null}">
<div class="applied-filters">
<c:forEach items="${filters.keySet()}" var="by">
<c:set value="${filters[by].getClass().simpleName}" var="clazz" />
<div>
......@@ -47,15 +59,9 @@
</div>
<c:remove var="clazz" />
</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>
<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">
<thead>
......@@ -94,6 +100,5 @@
</tbody>
</table>
</body>
</html>
\ No newline at end of file
......@@ -12,7 +12,7 @@
<small><c:out value="${accession.instituteCode}" /></small>
</h1>
<div class="page-header acn">
<div class="main-col-header acn">
<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"
arguments="${accession.accessionName}" /></a>
......@@ -49,10 +49,33 @@
</div>
</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>
<tr>
<td><spring:message code="accession.holdingInstitute" /></td>
<td><a href="<c:url value="/wiews/${accession.instituteCode.toLowerCase()}" />"> <c:out value="${accession.institute.fullName}" />
......@@ -162,7 +185,7 @@
<c:if test="${accessionCollect ne null}">
<tr>
<td colspan="2">
<td class="title" colspan="2">
<h4><spring:message code="accession.collecting" /></h4>
</td>
</tr>
......@@ -201,7 +224,7 @@
<c:if test="${accessionBreeding ne null}">
<tr>
<td colspan="2">
<td class="title" colspan="2">
<h4><spring:message code="accession.breeding" /></h4>
</td>
</tr>
......@@ -218,7 +241,7 @@
<c:if test="${accessionGeo ne null}">
<tr>
<td colspan="2">
<td class="title" colspan="2">
<h4><spring:message code="accession.geo" /></h4>
</td>
</tr>
......@@ -233,6 +256,13 @@
<td><spring:message code="accession.geolocation" /></td>
<td>${accessionGeo.latitude}, ${accessionGeo.longitude}</td>
</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>
<td><spring:message code="accession.geo.datum" /></td>
<td>${accessionGeo.datum}</td>
......@@ -241,33 +271,18 @@
<td><spring:message code="accession.geo.method" /></td>
<td>${accessionGeo.method}</td>
</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}">
<tr>
<td><spring:message code="accession.geo.uncertainty" /></td>
<td>${accessionGeo.uncertainty}<span class="uom">m</span></td>
</tr>
</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 test="${svalbardData ne null}">
<tr>
<td colspan="2">
<td class="title" colspan="2">
<h4><spring:message code="accession.svalbard-data" /></h4>
</td>
</tr>
......@@ -294,13 +309,14 @@
</tbody>
</table>
</div>
<c:if test="${methods.size() gt 0}">
<h4>
<spring:message code="accession.methods" />
</h4>
<table>
<table class="accessions crop-details">
<tbody>
<c:forEach items="${methods}" var="method" varStatus="status">
<tr class="targeted" id="method${method.id}">
......
......@@ -14,11 +14,10 @@
<div class="clearfix filter-block">
<div class="pull-left filter-name"><spring:message code="filter.${filter.name}" /></div>
<div class="clearfix pull-left" id="filter-${filter.name}">
<div class="filter-values pull-left"></div>
<div class="pull-left" id="filter-${filter.name}">
<c:choose>
<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 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>
......@@ -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>
</c:otherwise>
</c:choose>
<div class="filter-values pull-left"></div>
</div>
</div>
</c:forEach>
</div>
<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 id="filtersJson">${jsonObject}</div>
......@@ -59,7 +60,7 @@ jQuery(document).ready(function() {
//debugger;
if ($.isPlainObject(i)) {
// ranges & ops
var x="<div class='filtval complex'><span class='deleteTag close'>&times;</span>";
var x="<div class='filtval complex'>";
if (i["range"]!=null) {
x+="Between " + i["range"][0] + " and " + i["range"][1];
} else if (i["min"]!=null) {
......@@ -69,7 +70,7 @@ jQuery(document).ready(function() {
}
x+="</div>";
} 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);
});
......
......@@ -11,12 +11,17 @@
<spring:message code="metadata.page.title" />
</h1>
<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 class="main-col-header clearfix">
<div class="nav-header pull-left">
<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 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>
<ul class="funny-list">
<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>
......
......@@ -11,17 +11,16 @@
<c:out value="${metadata.title}" />
</h1>
<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 class="main-col-header clearfix">
<div class="nav-header pull-left">
<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>
<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>
<c:if test="${page eq 1}">
<table>
<thead>
......@@ -62,19 +61,22 @@
<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>
<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">
<table class="accessions table wide-table">
<table class="accessions wide-table">
<thead>
<tr>
<td class="idx-col"></td>
......@@ -89,7 +91,7 @@
<td><spring:message code="accession.holdingCountry" /></td>
--%>
<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>
......
......@@ -19,11 +19,15 @@
<c:if test="${pagedData != null}">
<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 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 class="main-col-header clearfix">
<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>
<table class="accessions">
......
This diff is collapsed.
/* ========================================================================
* Bootstrap: carousel.js v3.0.3
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================================== */
+function ($) { "use strict";
// CAROUSEL CLASS DEFINITION
// =========================
var Carousel = function (element, options) {
this.$element = $(element)
this.$indicators = this.$element.find('.carousel-indicators')
this.options = options
this.paused =
this.sliding =
this.interval =
this.$active =
this.$items = null
this.options.pause == 'hover' && this.$element
.on('mouseenter', $.proxy(this.pause, this))
.on('mouseleave', $.proxy(this.cycle, this))
}
Carousel.DEFAULTS = {
interval: 5000
, pause: 'hover'
, wrap: true
}
Carousel.prototype.cycle = function (e) {
e || (this.paused = false)
this.interval && clearInterval(this.interval)
this.options.interval
&& !this.paused
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
return this
}
Carousel.prototype.getActiveIndex = function () {
this.$active = this.$element.find('.item.active')
this.$items = this.$active.parent().children()
return this.$items.index(this.$active)
}
Carousel.prototype.to = function (pos) {
var that = this
var activeIndex = this.getActiveIndex()
if (pos > (this.$items.length - 1) || pos < 0) return
if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) })
if (activeIndex == pos) return this.pause().cycle()
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
}
Carousel.prototype.pause = function (e) {
e || (this.paused = true)
if (this.$element.find('.next, .prev').length && $.support.transition.end) {
this.$element.trigger($.support.transition.end)
this.cycle(true)
}
this.interval = clearInterval(this.interval)
return this
}
Carousel.prototype.next = function () {
if (this.sliding) return
return this.slide('next')
}
Carousel.prototype.prev = function () {
if (this.sliding) return
return this.slide('prev')
}
Carousel.prototype.slide = function (type, next) {
var $active = this.$element.find('.item.active')
var $next = next || $active[type]()
var isCycling = this.interval
var direction = type == 'next' ? 'left' : 'right'
var fallback = type == 'next' ? 'first' : 'last'
var that = this
if (!$next.length) {
if (!this.options.wrap) return
$next = this.$element.find('.item')[fallback]()
}
this.sliding = true
isCycling && this.pause()
var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
if ($next.hasClass('active')) return
if (this.$indicators.length) {
this.$indicators.find('.active').removeClass('active')
this.$element.one('slid.bs.carousel', function () {
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
$nextIndicator && $nextIndicator.addClass('active')
})
}
if ($.support.transition && this.$element.hasClass('slide')) {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$next.addClass(type)
$next[0].offsetWidth // force reflow
$active.addClass(direction)
$next.addClass(direction)
$active
.one($.support.transition.end, function () {
$next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' '))
that.sliding = false
setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
})
.emulateTransitionEnd(600)
} else {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$active.removeClass('active')
$next.addClass('active')
this.sliding = false
this.$element.trigger('slid.bs.carousel')
}
isCycling && this.cycle()
return this
}
// CAROUSEL PLUGIN DEFINITION
// ==========================
var old = $.fn.carousel
$.fn.carousel = function (option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.carousel')
var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
var action = typeof option == 'string' ? option : options.slide
if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
if (typeof option == 'number') data.to(option)
else if (action) data[action]()
else if (options.interval) data.pause().cycle()
})
}
$.fn.carousel.Constructor = Carousel
// CAROUSEL NO CONFLICT
// ====================
$.fn.carousel.noConflict = function () {
$.fn.carousel = old
return this
}
// CAROUSEL DATA-API
// =================
$(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
var $this = $(this), href
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
var options = $.extend({}, $target.data(), $this.data())
var slideIndex = $this.attr('data-slide-to')
if (slideIndex) options.interval = false
$target.carousel(options)
if (slideIndex = $this.attr('data-slide-to')) {
$target.data('bs.carousel').to(slideIndex)
}
e.preventDefault()
})
$(window).on('load', function () {
$('[data-ride="carousel"]').each(function () {
var $carousel = $(this)
$carousel.carousel($carousel.data())
})
})
}(jQuery);
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