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

1153: Fix reloading issues in collections edit view

Task-Url: https://pm.winseda.de/issues/1153
parent 69c11367
......@@ -56,8 +56,15 @@
<c:forEach items="${collection.endpoints}" var="ep" varStatus="ep_status2">
<c:forEach items="${ep.datasetPojos}" var="ds" varStatus="ds_status2">
<div role="tabpanel" class="tab-pane<c:if test="${ep_status2.index==0 && ds_status2.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 class="col-sm-12">
<div id="table-details${ep.id}-${ds.id}" class="table-light-details row">
<div class="col-sm-6 dataset-state-container">
<%@ include file="incl/state_dataset.jsp" %>
</div>
<div class="col-sm-6 previous-crawls-container">
<%@ include file="incl/crawls.jsp" %>
</div>
</div>
</div>
</div>
</c:forEach>
......
......@@ -3,6 +3,7 @@
<%@ taglib prefix="joda" uri="http://www.joda.org/joda/time/tags" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.crawls" /></h4>
<c:choose>
<c:when test="${crawls!=null && fn:length(crawls)>0}">
<div class="previous-crawls">
......
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<s:url value="${actionPath}" var="saveUrl" />
<sf:form method="POST" action="${saveUrl}" modelAttribute="collection" class="form-horizontal" >
<div class="form-header">
<h3 id="form-header-title">~ Edit local collection</h3>
<sf:hidden path="id" />
</div>
<div class="form-content">
<div class="control-group">
<label class="control-label" for="collection_name">~ Name:</label>
<div class="controls">
<sf:input path="collectionName" class="form-control" id="collection_name" />
<sf:errors path="collectionName" cssClass="error" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="collection_description">~Description:</label>
<div class="controls">
<sf:textarea path="description" class="form-control" rows="4" id="collection_description" />
</div>
</div>
</div>
<div class="form-footer control-group">
<div class="controls">
<button class="btn cancel form-btn-cancel" type="reset"><i class="icon-ban-circle icon-black"></i><span> <s:message code="~de.dariah.genericsearch.view.common.cancel" /></span></button>
<button class="btn btn-primary start form-btn-submit" type="submit"><i class="icon-upload icon-white"></i><span> <s:message code="~de.dariah.genericsearch.view.common.save" /></span></button>
</div>
</div>
</sf:form>
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<s:url value="${actionPath}" var="saveUrl" />
<sf:form method="POST" action="${saveUrl}" modelAttribute="endpoint" class="form-horizontal" >
<div class="form-header">
<h3 id="form-header-title">~ Edit local endpoint</h3>
<sf:hidden path="id" />
<sf:hidden path="collectionId" />
</div>
<div class="form-content">
<div class="control-group">
<label class="control-label" for="endpointPojo_url">~ URL:</label>
<div class="controls">
<sf:input path="url" class="form-control" id="endpointPojo_url" />
<sf:errors path="url" cssClass="error" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="endpointPojo_subset">~ Subset (optional):</label>
<div class="controls">
<sf:input path="subset" class="form-control" id="endpointPojo_subset" />
<sf:errors path="subset" cssClass="error" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="collection_description">~Access method:</label>
<div class="controls">
<sf:select class="form-control" path="accessMethod">
<sf:options />
</sf:select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="collection_schemata">~Access method:</label>
<div class="controls">
<sf:select class="form-control" path="schemaPojos" items="${schemata}" itemValue="id" />
</div>
</div>
</div>
<div class="form-footer control-group">
<div class="controls">
<button class="btn cancel form-btn-cancel" type="reset"><i class="icon-ban-circle icon-black"></i><span> <s:message code="~de.dariah.genericsearch.view.common.cancel" /></span></button>
<button class="btn btn-primary start form-btn-submit" type="submit"><i class="icon-upload icon-white"></i><span> <s:message code="~de.dariah.genericsearch.view.common.save" /></span></button>
</div>
</div>
</sf:form>
......@@ -62,110 +62,116 @@
</c:when>
</c:choose>
<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.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'}">
<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.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>
<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'}">
<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.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>
<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" />
</div>
</div>
</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}">
<c:choose>
<c:when test="${currentCrawl==null}">
<%@ include file="state_crawl.jsp" %>
</c:when>
<c:otherwise>
<%@ include file="state_crawl.jsp" %>
</c:otherwise>
</c:choose>
</span>
</li>
</ul>
</td>
</tr>
</table>
<c:if test="${_auth.level >= 100}">
<h4><s:message code="~eu.dariah.de.minfba.common.link.available_actions" /></h4>
<div>
<c:choose>
<c:when test="${currentCrawl!=null}">
<button class="btn-cancel-crawl btn btn-link" 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>
</c:when>
<c:otherwise>
<c:if test="${!ep.error && !ep.unaccessible && !ds.errorLock && ds.datamodelPojo.available}">
<button class="btn-crawl-online btn btn-link" 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>
</c:if>
<button class="btn-clear-index btn btn-link" 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>
</c:otherwise>
</c:choose>
</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
</c:if>
\ No newline at end of file
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