Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dariah
search-commons-views
Commits
ce57c3f6
Commit
ce57c3f6
authored
May 22, 2019
by
Gradl, Tobias
Browse files
1278: Improve image handling esp. when not available
Task-Url:
https://pm.winseda.de/issues/1278
parent
e29e4bfe
Changes
2
Show whitespace changes
Inline
Side-by-side
item/incl/images.jsp
0 → 100644
View file @
ce57c3f6
<%@ 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>
item/view.jsp
View file @
ce57c3f6
...
...
@@ -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}"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment