Commit 0dc0b39f authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

1324: Adapt admin dialogs to view but not change alias

Task-Url: https://pm.winseda.de/issues/1324
parent a9ac31ab
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<s:url value="${actionPath}" var="saveUrl" />
<form method="POST" action="${saveUrl}">
<div class="form-header">
<h2 id="form-header-title"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.model.set_oaipmh_prefix" /></h2>
<input type="hidden" id="datasourceId" name="datasourceId" value="${datasourceId}" />
<input type="hidden" id="endpointId" name="endpointId" value="${endpointId}" />
<input type="hidden" id="schemaId" name="schemaId" value="${schemaId}" />
</div>
<div class="form-content">
<div class="form-group row">
<label class="col-form-label col-5" for="oai_prefix"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.model.oaipmh_prefix" /></label>
<div class="col-7">
<input type="text" class="form-control" name="oaiPrefix" id="oaiPrefix" value="${prefix}" />
</div>
</div>
</div>
<div class="form-footer">
<button class="btn btn-default cancel form-btn-cancel" type="reset"><s:message code="~eu.dariah.de.minfba.common.actions.cancel" /></button>
<button class="btn btn-primary start form-btn-submit" type="submit"><s:message code="~eu.dariah.de.minfba.common.actions.save" /></button>
</div>
</form>
......@@ -114,27 +114,20 @@
<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>
<span class="oaipmh-metadata-prefix">${prefix}</span>&nbsp;
<c:if test="${_auth.level >= 100}">
<button class="btn btn-inline ${prefix_state}" onclick="editor.editPrefix('${ep.id}','${ds.id}','${ds.remoteAlias}', '.oaipmh-metadata-prefix');">
<i class="far fa-edit"></i>
</button>
</c:if>
</li>
</c:if>
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.model.${ep.method=='OAI-PMH' ? 'oaipmh_prefix' : 'alias'}" />:</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>
<span>${prefix}</span>&nbsp;
</li>
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.common.id" />:</span>
<span class="no-break-out">${ds.id}</span>
......
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