Commit 32f4ce9f authored by Matija Obreza's avatar Matija Obreza
Browse files

Merge branch '163-error-editing-repository-item-properties' into 'master'

Error editing repository item properties

Closes #163

See merge request !81
parents 3a60c816 837a4fb2
......@@ -10,11 +10,15 @@
<div class="row">
<div class="col-md-12">
<a href="<c:url value="/admin/r/files${currentPath}" />" class="btn btn-default"><spring:message code="cancel" /></a>
<h4>Updating metadata for file '<c:out value="${file.originalFilename}" />'</h4><br/>
<h4>Updating metadata for file '<c:out value="${file.originalFilename}" />'</h4>
<br/>
<form action="<c:url value="/admin/r/update" />" method="post">
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
<input type="hidden" name="uuid" value="${file.uuid}">
<input type="hidden" name="uuid" value="${file.uuid}" />
<input type="hidden" name="md5Sum" value="${file.md5Sum}" />
<input type="hidden" name="sha1Sum" value="${file.sha1Sum}" />
<input type="hidden" name="path" value="${file.path}" />
<div class="form-group">
<label for="title"><spring:message code="repository.file.title" /></label>
......
......@@ -3,10 +3,10 @@
<%@ include file="/WEB-INF/jsp/init.jsp" %>
<html>
<head>
<title><spring:message code="menu.admin.repository.files" /></title>
</head>
<body>
<head>
<title><spring:message code="menu.admin.repository.files" /></title>
</head>
<body>
<!-- Any alerts? -->
<gui:alert type="warning" display="${not empty errorMessage}">
<c:out value="${errorMessage}" />
......@@ -14,33 +14,32 @@
<div class="row">
<div class="col-xs-2">
<a href=".."
class="form-control btn btn-primary ${currentPath eq '/' ? 'disabled' :''}">1UP</a>
<a href=".." class="form-control btn btn-primary ${currentPath eq '/' ? 'disabled' :''}">1UP</a>
</div>
<div class="col-xs-6">
<select id="repositoryPathNav" class="form-control"
name="repositoryPath">
<select id="repositoryPathNav" class="form-control" name="repositoryPath">
<option value="<c:url value="/admin/r/files/" />">ROOT</option>
<option selected
value="<c:url value="/admin/r/files${currentPath}" />"><c:out
value="${currentPath}" /></option>
<option selected value="<c:url value="/admin/r/files${currentPath}" />">
<c:out value="${currentPath}" />
</option>
<c:forEach items="${subPaths}" var="path">
<option value="<c:url value="/admin/r/files${path}" />"><c:out
value="${path}" /></option>
<option value="<c:url value="/admin/r/files${path}" />">
<c:out value="${path}" />
</option>
</c:forEach>
</select>
</div>
<div class="col-xs-4">
<c:choose>
<c:when test="${imageGallery ne null}">
<a class="btn btn-default form-control"
href="<c:url value="/admin/r/g${currentPath}" />"><spring:message
code="repository.gallery.navigate" /></a>
<a class="btn btn-default form-control" href="<c:url value="/admin/r/g${currentPath}" />">
<spring:message code="repository.gallery.navigate" />
</a>
</c:when>
<c:otherwise>
<a class="btn btn-default form-control"
href="<c:url value="/admin/r/g/edit"><c:param name="galleryPath" value="${currentPath}" /></c:url>"><spring:message
code="repository.gallery.create-here" /></a>
<a class="btn btn-default form-control" href="<c:url value="/admin/r/g/edit"><c:param name="galleryPath" value="${currentPath}" /></c:url>">
<spring:message code="repository.gallery.create-here" />
</a>
</c:otherwise>
</c:choose>
</div>
......@@ -49,34 +48,37 @@
<table class="table table-striped">
<thead>
<tr>
<th class="col-md-5 col-xs-7"><spring:message
code="repository.file.title" /> <small><spring:message
code="repository.file.originalFilename" /></small></th>
<th class="col-md-3 hidden-sm hidden-xs"><spring:message
code="repository.file.path" /></th>
<th class="col-md-5 col-xs-7">
<spring:message code="repository.file.title" />
<small><spring:message code="repository.file.originalFilename" /></small>
</th>
<th class="col-md-3 hidden-sm hidden-xs">
<spring:message code="repository.file.path" />
</th>
<th class="col-md-4 col-xs-5"></th>
</tr>
</thead>
<tbody>
<c:forEach var="file" items="${fileList}" varStatus="i">
<tr>
<td class="col-md-5 col-xs-7"><a
href="<c:url value="/repository/d${file.path}${file.uuid}${file.extension}" />">
<c:out value="${file.title}" /> <small><c:out value="${file.originalFilename}" /></small>
</a></td>
<td class="col-md-3 hidden-sm hidden-xs"><c:out
value="${file.path}" /></td>
<td class="col-md-5 col-xs-7">
<a href="<c:url value="/repository/d${file.path}${file.uuid}${file.extension}" />">
<c:out value="${file.title}" />
<small><c:out value="${file.originalFilename}" /></small>
</a>
</td>
<td class="col-md-3 hidden-sm hidden-xs">
<c:out value="${file.path}" />
</td>
<td class="col-md-4 col-xs-5 text-right">
<form action="<c:url value="/admin/r/delete" />" method="post">
<a
href="<c:url value="/admin/r/edit"><c:param name="uuid" value="${file.uuid}" /></c:url>"
class="btn btn-default"><spring:message code="edit" /></a> <input
type="hidden" name="${_csrf.parameterName}"
value="${_csrf.token}" /> <input type="hidden" name="uuid"
value="${file.uuid}" /> <input type="hidden"
name="repositoryPath" value="${currentPath}" />
<button type="submit" name="action" value="delete-file"
class="btn btn-default confirm-delete">
<a href="<c:url value="/admin/r/edit"><c:param name="uuid" value="${file.uuid}" /></c:url>"
class="btn btn-default"><spring:message code="edit" />
</a>
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
<input type="hidden" name="uuid" value="${file.uuid}" />
<input type="hidden" name="repositoryPath" value="${currentPath}" />
<button type="submit" name="action" value="delete-file" class="btn btn-default confirm-delete">
<spring:message code="delete" />
</button>
</form>
......@@ -86,18 +88,14 @@
</tbody>
</table>
<form
action="<c:url value="/admin/r/upload"><c:param name="${_csrf.parameterName}" value="${_csrf.token}" /></c:url>"
<form action="<c:url value="/admin/r/upload"><c:param name="${_csrf.parameterName}" value="${_csrf.token}" /></c:url>"
method="post" enctype="multipart/form-data" class="">
<input type="hidden" name="repositoryPath" value="${currentPath}" />
<div class="form-group">
<input type="file" name="file" />
<p class="help-block">
Pick a file to upload to current path <b><c:out
value="${currentPath}" /></b>
Pick a file to upload to current path <b><c:out value="${currentPath}" /></b>
</p>
</div>
<button type="submit" class="btn btn-primary">
......@@ -139,5 +137,5 @@
}
</script> </content>
</body>
</body>
</html>
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