details.jsp 1.47 KB
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1 2 3 4 5 6
<!DOCTYPE html>

<%@include file="/WEB-INF/jsp/init.jsp"%>

<html>
<head>
7
<title><c:out value="${imageGallery.title}" /></title>
Matija Obreza's avatar
Matija Obreza committed
8 9 10 11 12 13 14 15
</head>
<body>
	<div class="free-text">
		<c:out value="${imageGallery.description}" />
	</div>
	<a href="<c:url value="/admin/r/g" />" class="btn btn-default"><spring:message code="cancel" /></a>
	<a href="<c:url value="/admin/r/files${imageGallery.path}" />" class="btn btn-default"><spring:message code="navigate.back" /></a>

16
	<div class="row" id="imagegallery-thumbs">
Matija Obreza's avatar
Matija Obreza committed
17
		<c:forEach items="${imageGallery.images}" var="image">
18
		<div x-src="<c:out value="${image.uuid}${image.extension}" />" class="col-xs-6 col-sm-3 col-md-2 col-lg-2">
Matija Obreza's avatar
Matija Obreza committed
19 20 21 22 23 24 25 26 27 28 29 30 31
			<img style="width: 100%; margin-bottom: 15px; margin-top: 15px;" src="<c:url value="/repository/d${image.path}_thumb/${thumbnailFormat}_${image.uuid}.png" />" alt="${image.title}" />
		</div>
		</c:forEach>
	</div>

	<div class="imagegallery-image-frame">
		<img id="imagegallery-image" />
	</div>

	<content tag="javascript"> <script type="text/javascript">
		$(document).ready(function() {
			var imageViewer=$('#imagegallery-image')[0];
			var baseHref = '<c:url value="/repository/d${imageGallery.path}" />';
32
			var galleryImages = $('#imagegallery-thumbs div');
Matija Obreza's avatar
Matija Obreza committed
33
			if (galleryImages.length > 0) {
34
				imageViewer.src = baseHref + $(galleryImages[0]).attr('x-src');
Matija Obreza's avatar
Matija Obreza committed
35
			}
36 37 38 39

			$('#imagegallery-thumbs div').click(function(ev) {
				imageViewer.src = baseHref + $(this).attr('x-src');
			});
Matija Obreza's avatar
Matija Obreza committed
40 41 42 43
		});
	</script> </content>
</body>
</html>