Commit 579cef18 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

Preparing CLARIAH-DE LMS

parent f6d78da3
...@@ -2,30 +2,55 @@ ...@@ -2,30 +2,55 @@
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<c:if test="${fn:length(images)>0}"> <c:if test="${fn:length(images)+fn:length(frames)>0}">
<h2><s:message code="~eu.dariah.de.minfba.search.view.item.preview" /></h2> <h2><s:message code="~eu.dariah.de.minfba.search.view.item.preview" /></h2>
<div id="item-images" class="carousel slide" data-ride="carousel" data-interval="false"> <div id="item-images" class="carousel slide" data-ride="carousel" data-interval="false">
<c:set var="idx" value="0" />
<c:forEach items="${frames}" var="frame" varStatus="status">
<div class="carousel-item${idx==0 ? ' active' : ''}">
<div style="text-align: center;" class="preview-image-label">${idx+1} / ${fn:length(frames)+fn:length(images)}</div>
<!-- <img src="<s:url value="/cachedimages/${collection.id}/${endpointId}/${datamodel.id}?i=${image.value}&type=DISPLAY" />">-->
<a href="${frame.value}" data-vbtype="iframe" data-gall="item-image" class="venobox">
<c:choose>
<c:when test="${fn:length(images)>0}">
<img class="item-image" style="opacity: 0.3" src="<s:url value="/cachedimages/${collection.id}/${endpointId}/${datamodel.id}?i=${images[0].value}&type=DISPLAY" />">
</c:when>
<c:otherwise>
<img class="item-image" src="<s:url value="/theme/img/placeholder-logo.png" />">
</c:otherwise>
</c:choose>
<i style="position: absolute; left: 42%; top: 41%; "class="fa-3x fas fa-play"></i>
</a>
</div>
<c:set var="idx" value="${idx+1}" />
</c:forEach>
<c:forEach items="${images}" var="image" varStatus="status"> <c:forEach items="${images}" var="image" varStatus="status">
<div class="carousel-item${status.index==0 ? ' active' : ''}"> <div class="carousel-item${idx==0 ? ' active' : ''}">
<div style="text-align: center;" class="preview-image-label">${status.index+1} / ${fn:length(images)}</div> <div style="text-align: center;" class="preview-image-label">${idx+1} / ${fn:length(frames)+fn:length(images)}</div>
<!-- <img src="<s:url value="/cachedimages/${collection.id}/${endpointId}/${datamodel.id}?i=${image.value}&type=DISPLAY" />">--> <!-- <img src="<s:url value="/cachedimages/${collection.id}/${endpointId}/${datamodel.id}?i=${image.value}&type=DISPLAY" />">-->
<a href="<s:url value="/cachedimages/${collection.id}/${endpointId}/${datamodel.id}?i=${image.value}&type=DISPLAY" />" data-gall="item-image" class="venobox"> <a href="<s:url value="/cachedimages/${collection.id}/${endpointId}/${datamodel.id}?i=${image.value}&type=DISPLAY" />" data-gall="item-image" class="venobox">
<img class="item-image" src="<s:url value="/cachedimages/${collection.id}/${endpointId}/${datamodel.id}?i=${image.value}&type=DISPLAY" />"> <img class="item-image" src="<s:url value="/cachedimages/${collection.id}/${endpointId}/${datamodel.id}?i=${image.value}&type=DISPLAY" />">
</a> </a>
</div> </div>
<c:set var="idx" value="${idx+1}" />
</c:forEach> </c:forEach>
<!-- Controls --> <!-- Controls -->
<a class="carousel-control-prev${fn:length(images)==1 ? ' hide' : ''}" href="#item-images" role="button" data-slide="prev"> <a class="carousel-control-prev${fn:length(images)+fn:length(frames)==1 ? ' hide' : ''}" href="#item-images" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span> <span class="sr-only">Previous</span>
</a> </a>
<a class="carousel-control-next${fn:length(images)==1 ? ' hide' : ''}" href="#item-images" role="button" data-slide="next"> <a class="carousel-control-next${fn:length(images)+fn:length(frames)==1 ? ' hide' : ''}" href="#item-images" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span> <span class="sr-only">Next</span>
</a> </a>
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</c:forEach> </c:forEach>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<c:set var="linkUrl" value="${link}" /> <c:set var="linkUrl" value="${link.value}" />
<!-- <a href="${link}" target="_blank">${link}</a> --> <!-- <a href="${link}" target="_blank">${link}</a> -->
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
......
Supports Markdown
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