Commit 7d7ae43e authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

1121: Reorganize Collection-Edit View unter Tabs

Task-Url: https://pm.winseda.de/issues/1121
parent bb36289e
......@@ -22,6 +22,7 @@
</small>
</h2>
<h3><s:message code="~eu.dariah.de.minfba.metamodel.collection" /></h3>
<table class="default-table">
<tbody>
<tr>
......@@ -35,31 +36,34 @@
</tbody>
</table>
<div id="endpoint-table-container" class="row">
<div class="col-sm-6">
<h4><s:message code="~eu.dariah.de.minfba.search.view.labels.data_sources" /></h4>
<table id="endpoint-table" class="state-table state-table-selectable state-table-navigatable">
<tbody>
<c:set var="i" value="0" />
<c:forEach items="${collection.endpoints}" var="ep">
<c:forEach items="${ep.datasetPojos}" var="ds">
<%@ include file="incl/incl_dataset_table_row.jsp" %>
</c:forEach>
</c:forEach>
</tbody>
</table>
</div>
<div id="detailsContainer" class="col-sm-6">
<c:set var="index" value="0" />
<c:forEach items="${collection.endpoints}" var="ep">
<c:forEach items="${ep.datasetPojos}" var="ds">
<%@ include file="incl/incl_dataset_detail.jsp" %>
<div id="endpoint-table-container">
<h3><s:message code="~eu.dariah.de.minfba.search.view.dataset.available_datasets" /></h3>
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<c:forEach items="${collection.endpoints}" var="ep" varStatus="ep_status">
<c:forEach items="${ep.datasetPojos}" var="ds" varStatus="ds_status">
<li id="#tab_${ep.id}-${ds.id}" role="presentation"<c:if test="${ep_status.index==0 && ds_status.index==0}">class="active"</c:if>>
<a href="#${ep.id}-${ds.id}" aria-controls="${ep.id}-${ds.id}" data-endpoint="${ep.id}" data-dataset="${ds.id}" role="tab" data-toggle="tab">${ds.datamodelPojo.name}</a>
</li>
</c:forEach>
</c:forEach>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<c:forEach items="${collection.endpoints}" var="ep" varStatus="ep_status">
<c:forEach items="${ep.datasetPojos}" var="ds" varStatus="ds_status">
<div role="tabpanel" class="tab-pane<c:if test="${ep_status.index==0 && ds_status.index==0}"> active</c:if>" id="${ep.id}-${ds.id}">
<div id="detailsContainer" class="col-sm-12">
<%@ include file="incl/incl_dataset_detail.jsp" %>
</div>
</div>
</c:forEach>
</c:forEach>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -57,115 +57,110 @@
</c:when>
</c:choose>
<div id="table-details${ep.id}-${ds.id}" class="table-light-details<c:if test="${index!=0}"> hide</c:if>">
<h4><s:message code="~eu.dariah.de.minfba.search.model.endpoint" /></h4>
<table class="state-table">
<tr class="state-row-${ep_status}">
<th class="state-${ep_status}">
<i class="fa fa-lg fa-${ep_icon}" aria-hidden="true"></i>
</th>
<td>
<ul class="inner-state-list">
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.url" />:</span>
<span class="no-break-out">${ep.url}</span>
</li>
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.type" />:</span>
<span class="no-break-out">${ep.method}</span>
<c:if test="${ep.method=='OAI-PMH'}">
<div class="inline-button ${prefix_state}" onclick="editor.clearEndpointSchemaIndex('${ep.id}','${ds.id}');">
<a href="${ep.url}?verb=Identify" target="_blank"><i class="fa fa-globe"></i> <s:message code="~eu.dariah.de.minfba.search.metamodel_view.model.check_availability" /></a>
</div>
</c:if>
</li>
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.common.id" />:</span>
<span class="no-break-out">${ep.id}</span>
</li>
<c:if test="${ep.method=='OAI-PMH'}">
<div id="table-details${ep.id}-${ds.id}" class="table-light-details row">
<div class="col-sm-6">
<h4><s:message code="~eu.dariah.de.minfba.search.model.endpoint" /></h4>
<table class="state-table">
<tr class="state-row-${ep_status}">
<th class="state-${ep_status}">
<i class="fa fa-lg fa-${ep_icon}" aria-hidden="true"></i>
</th>
<td>
<ul class="inner-state-list">
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.set" />:</span>
<span class="no-break-out">${ep.set}</span>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.url" />:</span>
<span class="no-break-out">${ep.url}</span>
</li>
</c:if>
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.common.status" />:</span>
<span class="state-${ep_status}"><s:message code="${ep_state_message}" /></span>
</li>
</ul>
</td>
</tr>
</table>
<h4><s:message code="~eu.dariah.de.minfba.search.model.dataset" /></h4>
<table class="state-table">
<tr class="state-row-${ds_status}">
<th class="state-${ds_status}">
<i class="fa fa-lg fa-${ds_icon}" aria-hidden="true"></i>
</th>
<td>
<ul class="inner-state-list">
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.model" />:</span>
<span class="no-break-out">${ds.datamodelPojo.name}</span>
</li>
<c:if test="${ep.method=='OAI-PMH'}">
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.model.oaipmh_prefix" />:</span>
<c:choose>
<c:when test="${ds.remoteAlias!=null && fn:length(ds.remoteAlias) > 0}">
<c:set var="prefix" value="${ds.remoteAlias}" />
<c:set var="prefix_state" value="state-${ds_status}" />
</c:when>
<c:otherwise>
<s:message code="~eu.dariah.de.minfba.common.status.undefined" var="prefix" />
<c:set var="prefix_state" value="state-warning" />
</c:otherwise>
</c:choose>
<c:if test="${_auth.level >= 100}">
<div class="inline-button ${prefix_state}" onclick="editor.editPrefix('${ep.id}','${ds.id}','${ds.remoteAlias}', '.oaipmh-metadata-prefix');">
<i class="fa fa-pencil-square-o"></i> <span class="oaipmh-metadata-prefix">${prefix}</span>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.type" />:</span>
<span class="no-break-out">${ep.method}</span>
<c:if test="${ep.method=='OAI-PMH'}">
<div class="inline-button ${prefix_state}" onclick="editor.clearEndpointSchemaIndex('${ep.id}','${ds.id}');">
<a href="${ep.url}?verb=Identify" target="_blank"><i class="fa fa-globe"></i> <s:message code="~eu.dariah.de.minfba.search.metamodel_view.model.check_availability" /></a>
</div>
</c:if>
</li>
</c:if>
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.common.id" />:</span>
<span class="no-break-out">${ds.id}</span>
</li>
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.endpoint.document_count" />:</span>
<span class="no-break-out"><fmt:formatNumber value="${ds.docs}" /></span>
<c:if test="${ds.docs > 0 && _auth.level >= 100}">
<div class="inline-button ${prefix_state}" onclick="editor.clearEndpointSchemaIndex('${ep.id}','${ds.id}');">
<i class="fa fa-trash"></i> <s:message code="~eu.dariah.de.minfba.common.actions.clear" />
</div>
<br /></c:if>
</li>
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.common.status" />:</span>
<span class="crawl-state-container state-${ds_status}"><s:message code="${ds_state_message}" /></span>
</li>
</ul>
</td>
</tr>
</table>
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.common.id" />:</span>
<span class="no-break-out">${ep.id}</span>
</li>
<c:if test="${ep.method=='OAI-PMH'}">
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.set" />:</span>
<span class="no-break-out">${ep.set}</span>
</li>
</c:if>
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.common.status" />:</span>
<span class="state-${ep_status}"><s:message code="${ep_state_message}" /></span>
</li>
</ul>
</td>
</tr>
</table>
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.crawls" /></h4>
<c:if test="${_auth.level >= 100}">
<c:choose>
<c:when test="${ds_status!='info'}">
<button onclick="editor.crawlOnline('${ep.id}','${ds.id}');" class="btn btn-default"><i class="fa fa-refresh"></i><s:message code="~eu.dariah.de.minfba.search.view.crawl.crawl_online" /></button><br />
</c:when>
<c:otherwise>
<h4><s:message code="~eu.dariah.de.minfba.search.model.dataset" /></h4>
<table class="state-table">
<tr class="state-row-${ds_status}">
<th class="state-${ds_status}">
<i class="fa fa-lg fa-${ds_icon}" aria-hidden="true"></i>
</th>
<td>
<ul class="inner-state-list">
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.model" />:</span>
<span class="no-break-out">${ds.datamodelPojo.name}</span>
</li>
<c:if test="${ep.method=='OAI-PMH'}">
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.model.oaipmh_prefix" />:</span>
<c:choose>
<c:when test="${ds.remoteAlias!=null && fn:length(ds.remoteAlias) > 0}">
<c:set var="prefix" value="${ds.remoteAlias}" />
<c:set var="prefix_state" value="state-${ds_status}" />
</c:when>
<c:otherwise>
<s:message code="~eu.dariah.de.minfba.common.status.undefined" var="prefix" />
<c:set var="prefix_state" value="state-warning" />
</c:otherwise>
</c:choose>
<c:if test="${_auth.level >= 100}">
<div class="inline-button ${prefix_state}" onclick="editor.editPrefix('${ep.id}','${ds.id}','${ds.remoteAlias}', '.oaipmh-metadata-prefix');">
<i class="fa fa-pencil-square-o"></i> <span class="oaipmh-metadata-prefix">${prefix}</span>
</div>
</c:if>
</li>
</c:if>
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.common.id" />:</span>
<span class="no-break-out">${ds.id}</span>
</li>
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.endpoint.document_count" />:</span>
<span class="no-break-out"><fmt:formatNumber value="${ds.docs}" /></span>
</li>
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.common.status" />:</span>
<span class="crawl-state-container state-${ds_status}"><s:message code="${ds_state_message}" /></span>
</li>
</ul>
</td>
</tr>
</table>
<h4><s:message code="~eu.dariah.de.minfba.common.link.available_actions" /></h4>
<div class="dataset-available-actions">
<div class="action-buttons hide">
<button class="btn-crawl-online btn btn-link hide" onclick="editor.crawlOnline('${ep.id}','${ds.id}');"><i class="fa fa-refresh"></i><s:message code="~eu.dariah.de.minfba.search.view.crawl.crawl_online" /></button>
<button class="btn-cancel-crawl btn btn-link hide" data-crawl-id="" onclick="editor.cancelCrawl(this);"><i class="fa fa-ban fa-color-danger"></i> <s:message code="~eu.dariah.de.minfba.search.actions.crawls.cancel" /></button>
<button class="btn-clear-index btn btn-link hide" onclick="editor.clearEndpointSchemaIndex('${ep.id}','${ds.id}');"><i class="fa fa-trash "></i> <s:message code="~eu.dariah.de.minfba.search.actions.dataset.clear" /></button>
</div>
<div class="no-actions hide">
<s:message code="~eu.dariah.de.minfba.search.view.crawl.no_actions" />
</c:otherwise>
</c:choose>
</c:if>
<div class="previous-crawls-container">
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.crawls" /></h4>
<div class="previous-crawls-container"></div>
</div>
</div>
\ No newline at end of file
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="status" value="ok" />
<c:set var="icon" value="check" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.ok" />
<c:choose>
<c:when test="${ep.error}">
<c:set var="status" value="error" />
<c:set var="icon" value="exclamation" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.endpoint.error" />
</c:when>
<c:when test="${ds.errorLock}">
<c:set var="status" value="error" />
<c:set var="icon" value="exclamation" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.dataset.error" />
</c:when>
<c:when test="${ep.unaccessible}">
<c:set var="status" value="warning" />
<c:set var="icon" value="exclamation" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.endpoint.unaccessible" />
</c:when>
<c:when test="${!ds.datamodelPojo.available}">
<c:set var="status" value="warning" />
<c:set var="icon" value="exclamation" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.datamodel.unavailable" />
</c:when>
<c:when test="${ds.warning}">
<c:set var="status" value="warning" />
<c:set var="icon" value="exclamation" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.dataset.warning" />
</c:when>
<c:when test="${ep.unprocessed}">
<c:set var="status" value="info" />
<c:set var="icon" value="clock-o" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.endpoint.unprocessed" />
</c:when>
<c:when test="${ds.processing}">
<c:set var="status" value="info" />
<c:set var="icon" value="refresh" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.dataset.busy" />
</c:when>
<c:when test="${ds.waiting}">
<c:set var="status" value="info" />
<c:set var="icon" value="clock-o" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.dataset.waiting" />
</c:when>
</c:choose>
<tr data-detail-target="${ep.id}-${ds.id}" class="state-row-${status}<c:if test="${i==selectedIndex}"> active</c:if>">
<th class="state-${status}">
<i class="fa fa-lg fa-${icon}" aria-hidden="true"></i><br />
<fmt:formatNumber value="${ds.docs}" /><br />
<s:message code="~eu.dariah.de.minfba.search.model.dataset.documents" />
</th>
<td>
<ul class="inner-state-list">
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.url" />:</span>
<span class="no-break-out">${ep.url}</span>
</li>
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.model" />:</span>
<span class="no-break-out">${ds.datamodelPojo.name}</span>
</li>
</ul>
</td>
<th class="state-${status}"></th>
</tr>
<c:set var="i" value="${i+1}" />
\ No newline at end of file
......@@ -7,7 +7,6 @@
<c:choose>
<c:when test="${crawlState.state=='ACTIVE'}">
<strong><s:message code="~eu.dariah.de.minfba.search.crawling.pipeline.in_progress" /></strong>
<button type="button" onclick="editor.cancelCrawl('${crawlId}', this);" class="btn btn-link pull-right"><i class="fa fa-ban fa-color-danger"></i> <s:message code="~eu.dariah.de.minfba.search.actions.crawls.cancel" /></button>
<ul class="inner-state-list" style="margin-top: 8px;">
<c:forEach begin="0" end="${crawlState.pipelineLength-1}" var="i">
<li>
......
......@@ -58,4 +58,18 @@ div.panel.panel-search-result > .panel-heading,
.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus {
background-color: ${customSearch.darkThemeColor};
}
\ No newline at end of file
}
.nav-tabs {
border-bottom-color: ${customSearch.darkThemeColor};
}
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
border-color: ${customSearch.darkThemeColor};
border-bottom-color: transparent;
}
.tab-pane {
border-color: ${customSearch.darkThemeColor};
}
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