details.jsp 1.45 KB
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
<!DOCTYPE html>

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

<html>
<head>
<title><spring:message code="repository.gallery" /></title>
</head>
<body>
	<h1>
		<c:out value="${imageGallery.title}" />
	</h1>
	<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>

	<div class="row">
		<c:forEach items="${imageGallery.images}" var="image">
		<div class="col-xs-6 col-sm-3 col-md-2 col-lg-2">
			<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}" />';
			var galleryImages = [<c:forEach items="${imageGallery.images}" var="image" varStatus="i">
				'${image.uuid}${image.extension}'<c:if test="${not i.last}">,</c:if></c:forEach>
			];
			if (galleryImages.length > 0) {
				imageViewer.src = baseHref + galleryImages[0];
			}
		});
	</script> </content>
</body>
</html>