Commit 8fe95647 authored by Matija Obreza's avatar Matija Obreza

Reflecting refactored method names

parent 2bd37ed2
......@@ -75,7 +75,7 @@ public class FileRepositoryController extends BaseController {
data = this.repositoryService.getFileBytes(repositoryFile.getPath(), repositoryFile.getFilename());
response.setContentType(repositoryFile.getMimeType());
response.setContentType(repositoryFile.getContentType());
response.addHeader("Content-Disposition", String.format("attachment; filename=\"%s\"", repositoryFile.getOriginalFilename()));
} catch (final NumberFormatException e) {
......
......@@ -156,8 +156,9 @@ public class RepositoryController extends BaseController {
updatedFile.setRightsHolder(originalFile.getRightsHolder());
updatedFile.setAccessRights(originalFile.getAccessRights());
updatedFile.setLicense(originalFile.getLicense());
updatedFile.setMimeType(originalFile.getMimeType());
updatedFile.setContentType(originalFile.getContentType());
updatedFile.setExtent(originalFile.getExtent());
updatedFile.setOriginalFilename(originalFile.getOriginalFilename());
updatedFile.setBibliographicCitation(originalFile.getBibliographicCitation());
updatedFile.setCreatedDate(originalFile.getCreatedDate());
updatedFile.setLastModifiedDate(originalFile.getLastModifiedDate());
......
......@@ -214,7 +214,7 @@ public class InstituteGalleriesController extends RestController {
final byte[] data = this.instituteFilesService.getFileBytes(institute, accession, repositoryImage);
response.setContentType(repositoryImage.getMimeType());
response.setContentType(repositoryImage.getContentType());
response.addHeader("Content-Disposition", String.format("attachment; filename=\"%s\"", repositoryImage.getOriginalFilename()));
response.setContentLength(data.length);
......
......@@ -792,6 +792,8 @@ repository.file.rightsHolder=Rights holder
repository.file.accessRights=Access rights
repository.file.license=License name or URL
repository.file.format=Format
repository.file.contentType=Content type
repository.file.extension=File extension
repository.file.extent=Extent
repository.file.bibliographicCitation=Bibliographic citation
repository.file.dateSubmitted=Date of submission
......
......@@ -55,10 +55,15 @@
<label for="license"><spring:message code="repository.file.license" /></label>
<input type="text" id="license" name="license" value="${file.license}" class="form-control">
</div>
<div class="form-group">
<label for="format"><spring:message code="repository.file.originalFilename" /></label>
<input type="text" id="originalFilename" name="originalFilename" value="${file.originalFilename}" class="form-control">
</div>
<div class="form-group">
<label for="format"><spring:message code="repository.file.format" /></label>
<input type="text" id="format" name="mimeType" value="${file.format}" class="form-control">
<label for="format"><spring:message code="repository.file.contentType" /></label>
<input type="text" id="contentType" name="contentType" value="${file.contentType}" class="form-control">
</div>
<div class="form-group">
......
......@@ -4,21 +4,18 @@
<html>
<head>
<title><spring:message code="repository.gallery" /></title>
<title><c:out value="${imageGallery.title}" /></title>
</head>
<body>
<h1>
<c:out value="${imageGallery.title}" />
</h1>
<div class="free-text">
<c:out value="${imageGallery.description}" />
</div>
<a href="<c:url value="/admin/r/g" />" class="btn btn-default"><spring:message code="cancel" /></a>
<a href="<c:url value="/admin/r/files${imageGallery.path}" />" class="btn btn-default"><spring:message code="navigate.back" /></a>
<div class="row">
<div class="row" id="imagegallery-thumbs">
<c:forEach items="${imageGallery.images}" var="image">
<div class="col-xs-6 col-sm-3 col-md-2 col-lg-2">
<div x-src="<c:out value="${image.uuid}${image.extension}" />" class="col-xs-6 col-sm-3 col-md-2 col-lg-2">
<img style="width: 100%; margin-bottom: 15px; margin-top: 15px;" src="<c:url value="/repository/d${image.path}_thumb/${thumbnailFormat}_${image.uuid}.png" />" alt="${image.title}" />
</div>
</c:forEach>
......@@ -32,12 +29,14 @@
$(document).ready(function() {
var imageViewer=$('#imagegallery-image')[0];
var baseHref = '<c:url value="/repository/d${imageGallery.path}" />';
var galleryImages = [<c:forEach items="${imageGallery.images}" var="image" varStatus="i">
'${image.uuid}${image.extension}'<c:if test="${not i.last}">,</c:if></c:forEach>
];
var galleryImages = $('#imagegallery-thumbs div');
if (galleryImages.length > 0) {
imageViewer.src = baseHref + galleryImages[0];
imageViewer.src = baseHref + $(galleryImages[0]).attr('x-src');
}
$('#imagegallery-thumbs div').click(function(ev) {
imageViewer.src = baseHref + $(this).attr('x-src');
});
});
</script> </content>
</body>
......
......@@ -60,7 +60,7 @@
<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.uuid}${file.extension}" />">
href="<c:url value="/repository/d${file.path}${file.uuid}${file.extension}" />">
<c:out value="${file.title}" /> <small>${file.originalFilename}</small>
</a></td>
<td class="col-md-3 hidden-sm hidden-xs"><c:out
......
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