view.jsp 6.07 KB
Newer Older
1
2
3
4
5
6
7
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ 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" %>

<% pageContext.setAttribute("newLineChar", "\n"); %>

8
<div id="item-detail-container" class="container<c:if test="${fluidLayout==true}">-fluid</c:if>">
9
10
11
	<input type="hidden" id="modelId" value="${datamodel.id}" />
	<input type="hidden" id="itemId" value="${item.id}" />

12
	<div class="row">
Gradl, Tobias's avatar
Gradl, Tobias committed
13
	    <div class="col-12 col-md-7 col-lg-8 col-xl-9">			
14
			<h3 id="item-detail-collection">${collectionName}</h3>
15
16
17
18
19
20
21
22
23
24
25
			<c:if test="${rootParents!=null && fn:length(rootParents)>0}">
				<c:forEach items="${rootParents}" var="hierarchyElement">
					<ul class="item-detail-hierarchy">
						<%@ include file="hierarchyElement.jsp" %>
				</c:forEach>
				<c:forEach items="${rootParents}" var="hierarchyElement">
					</ul>
				</c:forEach>
			</c:if>
			
			
Gradl, Tobias's avatar
Gradl, Tobias committed
26
27
28
29
30
		</div>		
	</div>
	<div class="row">

		<div class="col-12 col-md-7 col-lg-8 col-xl-9">
31
			<h1 id="item-detail-resource">
32
				<c:choose>
Gradl, Tobias's avatar
Gradl, Tobias committed
33
					<c:when test="${titles==null || fn:length(titles)==0}">
34
35
36
37
						<s:message code="~eu.dariah.de.minfba.search.view.result.no_title" />
					</c:when>
					<c:otherwise>
						<c:forEach items="${titles}" var="title">
Gradl, Tobias's avatar
Gradl, Tobias committed
38
39
40
41
42
43
							<form method="POST" action="<s:url value="/search/simple/" />">
								<span>${fn:replace(title.value, newLineChar, " ")}</span> 
								<input type="hidden" name="expression" value="#mlt: ${fn:replace(title.value, newLineChar, ' ')}" /> 
								<button type="submit" class="btn btn-inline" title="~Find similar" onclick='resultItem.findSimilar(this);'><i class="fas fa-search fa-2x"></i></button>
					  		</form>							
						</c:forEach>
44
45
					</c:otherwise>
				</c:choose>
46
47
			</h1>
			
48
49
50
51
52
53
54
55
56
57
58
			<c:if test="${links!=null && fn:length(links)>0}">
				<h2 class="item-detail-heading"><s:message code="~eu.dariah.de.minfba.search.view.item.links" /></h2>
				<ul class="item-detail-linklist">
					<c:forEach items="${links}" var="link">
						<c:set var="linkType" value="" />
						<c:set var="linkUrl" value="N/A" />
						<c:choose>
							<c:when test="${link.childResources!=null}">
								<c:forEach items="${link.childResources}" var="linkProp">
									<c:choose>
										<c:when test="${linkProp.key=='Type'}">
Gradl, Tobias's avatar
Gradl, Tobias committed
59
											<c:set var="linkType" value="${linkProp.value}" />
60
61
										</c:when>
										<c:when test="${linkProp.key=='URL'}">
Gradl, Tobias's avatar
Gradl, Tobias committed
62
											<c:set var="linkUrl" value="${linkProp.value}" />
63
64
65
66
67
										</c:when>
									</c:choose>
								</c:forEach>							
							</c:when>
							<c:otherwise>
Gradl, Tobias's avatar
Gradl, Tobias committed
68
69
								<c:set var="linkUrl" value="${link}" />
								<!-- <a href="${link}" target="_blank">${link}</a> -->
70
71
							</c:otherwise>
						</c:choose>
Gradl, Tobias's avatar
Gradl, Tobias committed
72
73
74
75
						
						<li>
							<a href="${linkUrl}" target="_blank">${fn:length(linkType)==0 ? linkUrl : linkType}</a>	
						</li>
76
77
					</c:forEach>
				</ul>
Gradl, Tobias's avatar
Gradl, Tobias committed
78
			</c:if> 	
79
80
		
		
81
82
83
84
			<h2><s:message code="~eu.dariah.de.minfba.search.view.item.additional_data" /></h2>
			
			<div class="row">
				<div class="col-12">
85
					<button type="button" onclick="resultItem.loadIntegratedData(this);" class="btn btn-primary-var-2"><s:message code="~eu.dariah.de.minfba.search.view.item.integrated_dataset" /> <i class="fas fa-lg fa-chevron-circle-down"></i></button>
86
87
88
89
90
					<div id="item-detail-integrated-container" class="collapse">
						<div id="item-detail-integrated" class="item-dataset-container"></div>
					</div>
				</div>
			</div>
91
			
92
93
			<div class="row mt-2">
				<div class="col-12">
94
					<button type="button" onclick="resultItem.loadOriginalData(this);" class="btn btn-primary-var-2"><s:message code="~eu.dariah.de.minfba.search.view.item.original_dataset" /> <i class="fas fa-lg fa-chevron-circle-down"></i></button>
95
96
97
98
99
					<div id="item-detail-dataset-container" class="collapse">
						<div id="item-detail-dataset" class="item-dataset-container"></div>
					</div>
				</div>
			</div>
100
			
101
			<c:if test="${_auth.level >= 100}">
102
103
			
				<h2 class="mt-3"><s:message code="~eu.dariah.de.minfba.search.view.item.admin_data" /></h2>
104
105
106
				<c:if test="${item.errors!=null && fn:length(item.errors)>0}">
					<div class="row">
						<div class="col-12">
107
							<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>
108
109
110
111
112
113
114
115
							<div id="item-detail-errors-container" class="collapse">
								<div class="item-dataset-container">
									<ul>
										<c:forEach items="${item.errors}" var="error">
											<li>${error}</li>	
										</c:forEach>
									</ul>
								</div>
116
117
118
							</div>
						</div>
					</div>
119
				</c:if>
120
121
122
123
124
125
126
127
128
129
				<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>
130
131
132
133
134
135
136
137
				<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>
						<div id="item-detail-metadata-container" class="collapse">
							<div id="item-detail-metadata" class="item-dataset-container"></div>
						</div>
					</div>
				</div>
138
139
			</c:if>
			
140
		</div>
141
		<div class="col-12 col-md-5 col-lg-4 col-xl-3">
Gradl, Tobias's avatar
Gradl, Tobias committed
142
143
			<%@ include file="incl/images.jsp" %>
		
144
145
			<h2><s:message code="~eu.dariah.de.minfba.metamodel.collection" /></h2>
			<div class="item-collection-image collection-image">
146
				<img src="${collection.imageUrl}">
147
148
149
				<span>${collectionName}</span>
			</div>

150
151
152
		</div>
	</div>
</div>