Commit ce57c3f6 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

1278: Improve image handling esp. when not available

Task-Url: https://pm.winseda.de/issues/1278
parent e29e4bfe
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<c:if test="${fn:length(images)>0}">
<div id="item-images-container" class="col-12 col-md-5 col-lg-4 col-xl-3">
<div id="item-images">
<!-- h3 style="text-align: center;"><s:message code="~eu.dariah.de.minfba.search.view.item.preview" /></h3> -->
<div id="carousel-item-images" class="carousel slide" style="margin: 0 auto;" data-ride="carousel" data-interval="false">
<!-- Wrapper for slides -->
<div class="carousel-inner">
<c:forEach items="${images}" var="image" varStatus="status">
<div class="carousel-item${status.index==0 ? ' active' : ''}">
<!-- <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">
<div class="item-image" style="background-image: url(<s:url value="/cachedimages/${collection.id}/${endpointId}/${datamodel.id}?i=${image.value}&type=DISPLAY" />);"></div>
</a>
<div class="preview-image-label">${status.index+1} / ${fn:length(images)}</div>
</div>
</c:forEach>
</div>
<!-- Controls -->
<a class="carousel-control-prev${fn:length(images)==1 ? ' hide' : ''}" href="#carousel-item-images" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next${fn:length(images)==1 ? ' hide' : ''}" href="#carousel-item-images" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
</c:if>
......@@ -67,45 +67,7 @@
</c:if>
</div>
<c:if test="${fn:length(images)>0}">
<div id="item-images-container" class="col-12 col-md-5 col-lg-4 col-xl-3">
<div id="item-images">
<!-- h3 style="text-align: center;"><s:message code="~eu.dariah.de.minfba.search.view.item.preview" /></h3> -->
<div id="carousel-item-images" class="carousel slide" style="margin: 0 auto;" data-ride="carousel" data-interval="false">
<!-- Indicators -->
<ol class="carousel-indicators${fn:length(images)==1 ? ' hide' : ''}">
<c:forEach items="${images}" var="image" varStatus="status">
<li data-target="#carousel-item-images" data-slide-to="${status.index}"${status.index==0 ? ' class="active"' : ''}></li>
</c:forEach>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<c:forEach items="${images}" var="image" varStatus="status">
<div class="item${status.index==0 ? ' active' : ''}">
<!-- <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">
<div class="item-image" style="background-image: url(<s:url value="/cachedimages/${collection.id}/${endpointId}/${datamodel.id}?i=${image.value}&type=DISPLAY" />);"></div>
</a>
</div>
</c:forEach>
</div>
<!-- Controls -->
<a class="left carousel-control${fn:length(images)==1 ? ' hide' : ''}" href="#carousel-item-images" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control${fn:length(images)==1 ? ' hide' : ''}" href="#carousel-item-images" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
</c:if>
<%@ include file="incl/images.jsp" %>
</div>
<div class="row">
......@@ -140,7 +102,7 @@
<c:if test="${item.errors!=null && fn:length(item.errors)>0}">
<div class="row">
<div class="col-12">
<button type="button" onclick="resultItem.showErrors(this);" class="btn btn-primary-var-2"><s:message code="~eu.dariah.de.minfba.search.view.item.processing_hints" /> <i class="fas fa-lg fa-chevron-circle-down"></i></button>
<button type="button" onclick="resultItem.toggleCollapsed(this);" class="btn btn-primary-var-2"><s:message code="~eu.dariah.de.minfba.search.view.item.processing_hints" /> <i class="fas fa-lg fa-chevron-circle-down"></i></button>
<div id="item-detail-errors-container" class="collapse">
<div class="item-dataset-container">
<ul>
......@@ -153,6 +115,16 @@
</div>
</div>
</c:if>
<div class="row mt-2">
<div class="col-12">
<button type="button" onclick="resultItem.toggleCollapsed(this);" class="btn btn-primary-var-2"><s:message code="~eu.dariah.de.minfba.search.view.item.presentation_metadata" /> <i class="fas fa-lg fa-chevron-circle-down"></i></button>
<div id="item-detail-presentation-container" class="collapse">
<div id="item-detail-presentation" class="item-dataset-container">
${item.presentationHtml}
</div>
</div>
</div>
</div>
<div class="row mt-2">
<div class="col-12">
<button type="button" onclick="resultItem.loadMetadata(this);" class="btn btn-primary-var-2"><s:message code="~eu.dariah.de.minfba.search.view.item.admin_metadata" /> <i class="fas fa-lg fa-chevron-circle-down"></i></button>
......@@ -164,7 +136,7 @@
</c:if>
</div>
<div class="col-12 col-md-5 col-lg-4 col-xl-3 mt-auto mb-3">
<div class="col-12 col-md-5 col-lg-4 col-xl-3">
<h2><s:message code="~eu.dariah.de.minfba.metamodel.collection" /></h2>
<div class="item-collection-image collection-image">
<img src="${collection.imageUrl}">
......
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