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 @@ ...@@ -56,8 +56,15 @@
<c:forEach items="${collection.endpoints}" var="ep" varStatus="ep_status2"> <c:forEach items="${collection.endpoints}" var="ep" varStatus="ep_status2">
<c:forEach items="${ep.datasetPojos}" var="ds" varStatus="ds_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 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"> <div class="col-sm-12">
<%@ include file="incl/incl_dataset_detail.jsp" %> <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>
</div> </div>
</c:forEach> </c:forEach>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<%@ taglib prefix="joda" uri="http://www.joda.org/joda/time/tags" %> <%@ taglib prefix="joda" uri="http://www.joda.org/joda/time/tags" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/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:choose>
<c:when test="${crawls!=null && fn:length(crawls)>0}"> <c:when test="${crawls!=null && fn:length(crawls)>0}">
<div class="previous-crawls"> <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 @@ ...@@ -62,110 +62,116 @@
</c:when> </c:when>
</c:choose> </c:choose>
<div id="table-details${ep.id}-${ds.id}" class="table-light-details row"> <h4><s:message code="~eu.dariah.de.minfba.search.model.endpoint" /></h4>
<div class="col-sm-6"> <table class="state-table">
<h4><s:message code="~eu.dariah.de.minfba.search.model.endpoint" /></h4> <tr class="state-row-${ep_status}">
<table class="state-table"> <th class="state-${ep_status}">
<tr class="state-row-${ep_status}"> <i class="fa fa-lg fa-${ep_icon}" aria-hidden="true"></i>
<th class="state-${ep_status}"> </th>
<i class="fa fa-lg fa-${ep_icon}" aria-hidden="true"></i> <td>
</th> <ul class="inner-state-list">
<td> <li>
<ul class="inner-state-list"> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.url" />:</span>
<li> <span class="no-break-out">${ep.url}</span>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.url" />:</span> </li>
<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>
<li> <span class="no-break-out">${ep.method}</span>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.type" />:</span> <c:if test="${ep.method=='OAI-PMH'}">
<span class="no-break-out">${ep.method}</span> <div class="inline-button ${prefix_state}" onclick="editor.clearEndpointSchemaIndex('${ep.id}','${ds.id}');">
<c:if test="${ep.method=='OAI-PMH'}"> <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 class="inline-button ${prefix_state}" onclick="editor.clearEndpointSchemaIndex('${ep.id}','${ds.id}');"> </div>
<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> </c:if>
</div> </li>
</c:if> <li>
</li> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.common.id" />:</span>
<li> <span class="no-break-out">${ep.id}</span>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.common.id" />:</span> </li>
<span class="no-break-out">${ep.id}</span> <c:if test="${ep.method=='OAI-PMH'}">
</li> <li>
<c:if test="${ep.method=='OAI-PMH'}"> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.set" />:</span>
<li> <span class="no-break-out">${ep.set}</span>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.set" />:</span> </li>
<span class="no-break-out">${ep.set}</span> </c:if>
</li> <li>
</c:if> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.common.status" />:</span>
<li> <span class="state-${ep_status}"><s:message code="${ep_state_message}" /></span>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.common.status" />:</span> </li>
<span class="state-${ep_status}"><s:message code="${ep_state_message}" /></span> </ul>
</li> </td>
</ul> </tr>
</td> </table>
</tr>
</table> <h4><s:message code="~eu.dariah.de.minfba.search.model.dataset" /></h4>
<table class="state-table">
<h4><s:message code="~eu.dariah.de.minfba.search.model.dataset" /></h4> <tr class="state-row-${ds_status}">
<table class="state-table"> <th class="state-${ds_status}">
<tr class="state-row-${ds_status}"> <i class="fa fa-lg fa-${ds_icon}" aria-hidden="true"></i>
<th class="state-${ds_status}"> </th>
<i class="fa fa-lg fa-${ds_icon}" aria-hidden="true"></i> <td>
</th> <ul class="inner-state-list">
<td> <li>
<ul class="inner-state-list"> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.model" />:</span>
<li> <span class="no-break-out">${ds.datamodelPojo.name}</span>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.model" />:</span> </li>
<span class="no-break-out">${ds.datamodelPojo.name}</span> <c:if test="${ep.method=='OAI-PMH'}">
</li> <li>
<c:if test="${ep.method=='OAI-PMH'}"> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.model.oaipmh_prefix" />:</span>
<li> <c:choose>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.model.oaipmh_prefix" />:</span> <c:when test="${ds.remoteAlias!=null && fn:length(ds.remoteAlias) > 0}">
<c:choose> <c:set var="prefix" value="${ds.remoteAlias}" />
<c:when test="${ds.remoteAlias!=null && fn:length(ds.remoteAlias) > 0}"> <c:set var="prefix_state" value="state-${ds_status}" />
<c:set var="prefix" value="${ds.remoteAlias}" /> </c:when>
<c:set var="prefix_state" value="state-${ds_status}" /> <c:otherwise>
</c:when> <s:message code="~eu.dariah.de.minfba.common.status.undefined" var="prefix" />
<c:otherwise> <c:set var="prefix_state" value="state-warning" />
<s:message code="~eu.dariah.de.minfba.common.status.undefined" var="prefix" /> </c:otherwise>
<c:set var="prefix_state" value="state-warning" /> </c:choose>
</c:otherwise> <c:if test="${_auth.level >= 100}">
</c:choose> <div class="inline-button ${prefix_state}" onclick="editor.editPrefix('${ep.id}','${ds.id}','${ds.remoteAlias}', '.oaipmh-metadata-prefix');">
<c:if test="${_auth.level >= 100}"> <i class="fa fa-pencil-square-o"></i> <span class="oaipmh-metadata-prefix">${prefix}</span>
<div class="inline-button ${prefix_state}" onclick="editor.editPrefix('${ep.id}','${ds.id}','${ds.remoteAlias}', '.oaipmh-metadata-prefix');"> </div>
<i class="fa fa-pencil-square-o"></i> <span class="oaipmh-metadata-prefix">${prefix}</span>
</div>
</c:if>
</li>
</c:if> </c:if>
<li> </li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.common.id" />:</span> </c:if>
<span class="no-break-out">${ds.id}</span> <li>
</li> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.common.id" />:</span>
<li> <span class="no-break-out">${ds.id}</span>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.endpoint.document_count" />:</span> </li>
<span class="no-break-out"><fmt:formatNumber value="${ds.docs}" /></span> <li>
</li> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.endpoint.document_count" />:</span>
<li> <span class="no-break-out"><fmt:formatNumber value="${ds.docs}" /></span>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.common.status" />:</span> </li>
<span class="crawl-state-container state-${ds_status}"><s:message code="${ds_state_message}" /></span> <li>
</li> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.common.status" />:</span>
</ul> <span class="crawl-state-container state-${ds_status}">
</td> <c:choose>
</tr> <c:when test="${currentCrawl==null}">
</table> <%@ include file="state_crawl.jsp" %>
<h4><s:message code="~eu.dariah.de.minfba.common.link.available_actions" /></h4> </c:when>
<div class="dataset-available-actions"> <c:otherwise>
<div class="action-buttons hide"> <%@ include file="state_crawl.jsp" %>
<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> </c:otherwise>
<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> </c:choose>
<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> </span>
</div> </li>
<div class="no-actions hide"> </ul>
<s:message code="~eu.dariah.de.minfba.search.view.crawl.no_actions" /> </td>
</div> </tr>
</div> </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>
<div class="col-sm-6"> </c:if>
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.crawls" /></h4> \ No newline at end of file
<div class="previous-crawls-container"></div>
</div>
</div>
\ No newline at end of file
Markdown is supported
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