Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
8fe95647
Commit
8fe95647
authored
May 02, 2016
by
Matija Obreza
Browse files
Reflecting refactored method names
parent
2bd37ed2
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/genesys2/server/servlet/controller/FileRepositoryController.java
View file @
8fe95647
...
...
@@ -75,7 +75,7 @@ public class FileRepositoryController extends BaseController {
data
=
this
.
repositoryService
.
getFileBytes
(
repositoryFile
.
getPath
(),
repositoryFile
.
getFilename
());
response
.
setContentType
(
repositoryFile
.
get
Mime
Type
());
response
.
setContentType
(
repositoryFile
.
get
Content
Type
());
response
.
addHeader
(
"Content-Disposition"
,
String
.
format
(
"attachment; filename=\"%s\""
,
repositoryFile
.
getOriginalFilename
()));
}
catch
(
final
NumberFormatException
e
)
{
...
...
src/main/java/org/genesys2/server/servlet/controller/admin/RepositoryController.java
View file @
8fe95647
...
...
@@ -156,8 +156,9 @@ public class RepositoryController extends BaseController {
updatedFile
.
setRightsHolder
(
originalFile
.
getRightsHolder
());
updatedFile
.
setAccessRights
(
originalFile
.
getAccessRights
());
updatedFile
.
setLicense
(
originalFile
.
getLicense
());
updatedFile
.
set
Mime
Type
(
originalFile
.
get
Mime
Type
());
updatedFile
.
set
Content
Type
(
originalFile
.
get
Content
Type
());
updatedFile
.
setExtent
(
originalFile
.
getExtent
());
updatedFile
.
setOriginalFilename
(
originalFile
.
getOriginalFilename
());
updatedFile
.
setBibliographicCitation
(
originalFile
.
getBibliographicCitation
());
updatedFile
.
setCreatedDate
(
originalFile
.
getCreatedDate
());
updatedFile
.
setLastModifiedDate
(
originalFile
.
getLastModifiedDate
());
...
...
src/main/java/org/genesys2/server/servlet/controller/rest/InstituteGalleriesController.java
View file @
8fe95647
...
...
@@ -214,7 +214,7 @@ public class InstituteGalleriesController extends RestController {
final
byte
[]
data
=
this
.
instituteFilesService
.
getFileBytes
(
institute
,
accession
,
repositoryImage
);
response
.
setContentType
(
repositoryImage
.
get
Mime
Type
());
response
.
setContentType
(
repositoryImage
.
get
Content
Type
());
response
.
addHeader
(
"Content-Disposition"
,
String
.
format
(
"attachment; filename=\"%s\""
,
repositoryImage
.
getOriginalFilename
()));
response
.
setContentLength
(
data
.
length
);
...
...
src/main/resources/content/language.properties
View file @
8fe95647
...
...
@@ -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
...
...
src/main/webapp/WEB-INF/jsp/admin/repository/edit.jsp
View file @
8fe95647
...
...
@@ -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=
"
mime
Type"
value=
"${file.
format
}"
class=
"form-control"
>
<label
for=
"format"
><spring:message
code=
"repository.file.
contentType
"
/></label>
<input
type=
"text"
id=
"
contentType
"
name=
"
content
Type"
value=
"${file.
contentType
}"
class=
"form-control"
>
</div>
<div
class=
"form-group"
>
...
...
src/main/webapp/WEB-INF/jsp/admin/repository/gallery/details.jsp
View file @
8fe95647
...
...
@@ -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>
...
...
src/main/webapp/WEB-INF/jsp/admin/repository/index.jsp
View file @
8fe95647
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment