edit.jsp 6.31 KB
Newer Older
1
2
3
4
5
6
7
8
<%@ 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" %>
<%@ taglib prefix="joda" uri="http://www.joda.org/joda/time/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<ul class="breadcrumb">
9
10
	<li class="active"><s:message code="~eu.dariah.de.minfba.common.titles.administration" /></li>
	<li><a href="<s:url value="collections" />"><s:message code="~eu.dariah.de.minfba.search.view.titles.collection_management" /></a></li>
11
12
13
14
15
16
17
18
19
20
21
	<li class="active">${collectionName}</li>
</ul>


<div id="main-content">
	<div class="row">
		<div class="col-lg-12">
			<h2>
				${collectionName} 
				<small>
					<c:if test="${_auth==null || _auth.auth==false}">
22
						<span class="glyphicon glyphicon-lock" data-toggle="tooltip" data-placement="left" title="<s:message code="~eu.dariah.de.minfba.common.notification.limited_access" />"></span>
23
24
25
26
27
28
29
30
					</c:if>
					
				</small>
			</h2>
			
			<table class="details-table">
				<tbody>
					<tr>
31
						<th><s:message code="~eu.dariah.de.minfba.metamodel.common.id" /></th>
32
33
34
						<td>${collection.id}</td>
					</tr>
					<tr>
35
36
						<th><s:message code="~eu.dariah.de.minfba.metamodel.common.source" /></th>
						<td><a title="<s:message code="~eu.dariah.de.minfba.search.actions.collections.show_in_cr" />" href="#" target='_blank'>${collection.linkUrl} <i class="fa fa-external-link"></i></a></td>
37
38
39
40
41
42
					</tr>
				</tbody>
			</table>
			
			<div id="endpoint-table-container" class="row">
				<div class="table-light-container col-sm-5">
43
					<h4><s:message code="~eu.dariah.de.minfba.metamodel.collections" /></h4>
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
					<table id="endpoint-table" class="table-light">
						<tbody>
							<c:forEach items="${datasources}" var="ds" varStatus="status">
								<tr data-detail-target="${ds.combinedId}"<c:if test="${status.index==0}"> class="active"</c:if>>
									<td class="state-column state-${ds.stringState}">
										<div class="cell-heading">OK</div>
										<div class="cell-payload">3m old</div>
									</td>
									<td class="content-column">
										<div class="cell-heading no-break-out">${ds.schemaName}</div>
										<div class="cell-payload no-break-out">${ds.url}</div>
									</td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
				</div>
				<div class="table-light-details-container col-sm-7">				
					
					<c:forEach items="${datasources}" var="ds" varStatus="status">

						<div id="table-details${ds.combinedId}" class="table-light-details<c:if test="${status.index!=0}"> hide</c:if>">
66
							<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.endpoint_schema_details" /></h4>
67
68
							<table class="details-table">
								<tbody>
69
									<tr><th><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.url" /></th>
70
71
72
73
74
75
76
										<td>
											<span class="no-break-out">${ds.url}</span>
											<c:if test="${ds.method=='OAI-PMH'}">
												<a href="${ds.url}?verb=Identify" target="_blank" class="btn btn-link"><i class="fa fa-refresh"></i>Check identify</a>
											</c:if>
										</td>
									</tr>
77
78
									<tr><th><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.type" /></th><td>${ds.method}</td></tr>
									<tr><th><s:message code="~eu.dariah.de.minfba.metamodel.schema" /></th><td class="no-break-out">${ds.schemaName}</td></tr>
79
									<c:if test="${ds.method=='OAI-PMH'}">
80
										<tr><th><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.set" /></th><td class="no-break-out">${ds.set}</td></tr>
81
										<c:if test="${ds.schemaState!='UNAVAILABLE'}">
82
											<tr><th><s:message code="~eu.dariah.de.minfba.search.metamodel_view.schema.oaipmh_prefix" /></th>
83
84
85
86
87
88
89
												<td class="no-break-out">
													<span class="oaipmh-metadata-prefix">${ds.metadataPrefix!=null && fn:length(ds.metadataPrefix) > 0 ? ds.metadataPrefix : "?"}</span> 
													<button onclick="editor.editPrefix('${ds.endpointId}','${ds.schemaId}','${ds.metadataPrefix}', '.oaipmh-metadata-prefix');" class="btn btn-link"><i class="fa fa-pencil-square-o"></i>Set prefix</button>
												</td>
											</tr>
										</c:if>
									</c:if>
90
									<tr><th><s:message code="~eu.dariah.de.minfba.search.metamodel_view.endpoint.document_count" /></th>
91
92
										<td>
											${s.docs} 
93
											<c:if test="${s.docs > 0}"><button onclick="editor.clearEndpointSchemaIndex('${ds.endpointId}','${ds.schemaId}');" class="btn btn-link"><i class="fa fa-trash"></i><s:message code="~eu.dariah.de.minfba.common.actions.clear" /></button><br /></c:if>
94
95
										</td>
									</tr>
96
									<tr><th><s:message code="~eu.dariah.de.minfba.common.status" /></th>										
97
										<td class="crawl-state-container">
98
											<s:message code="~eu.dariah.de.minfba.common.status.loading"/>...
99
100
101
102
103
										</td>
									</tr>
								</tbody>
							</table>

104
							<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.online_data" /></h4>
105
106
107
108
109
							<c:choose>
								<c:when test="${ds.actionable}">
									<table class="details-table">
										<tbody>
											<tr>
110
												<th><s:message code="~eu.dariah.de.minfba.common.link.actions"/></th>
111
												<td>
112
113
													<button onclick="editor.crawlOnline('${ds.endpointId}','${ds.schemaId}');" class="btn btn-link"><i class="fa fa-refresh"></i><s:message code="~eu.dariah.de.minfba.search.view.crawl.crawl_online" /></button><br />
													<button onclick="editor.createEmptyCrawl('${ds.endpointId}','${ds.schemaId}');" class="btn btn-link"><i class="fa fa-asterisk"></i><s:message code="~eu.dariah.de.minfba.search.view.crawl.create_empty" /></button>
114
115
116
117
118
119
												</td>
											</tr>
										</tbody>
									</table>
								</c:when>
								<c:otherwise>
120
									<s:message code="~eu.dariah.de.minfba.search.view.crawl.no_actions" />
121
122
123
124
								</c:otherwise>
							</c:choose>
							
							
125
							<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.existing_crawls" /></h4>
126
127
128
129
130
131
132
133
134
135
136
137
138
							<div class="previous-crawls-container">
							
							</div>						
						</div>

					</c:forEach>
				</div>
			</div>
			
			
		</div>
	</div>
</div>