Skip to content
GitLab
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
837a4fb2
Commit
837a4fb2
authored
Sep 26, 2017
by
Maxym Borodenko
Committed by
Matija Obreza
Sep 26, 2017
Browse files
Error editing repository item properties
parent
3a60c816
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/WEB-INF/jsp/admin/repository/edit.jsp
View file @
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>
...
...
src/main/webapp/WEB-INF/jsp/admin/repository/index.jsp
View file @
837a4fb2
...
...
@@ -3,141 +3,139 @@
<%@ include
file=
"/WEB-INF/jsp/init.jsp"
%>
<html>
<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
}
"
/>
</gui:alert>
<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
}
"
/>
</gui:alert>
<div
class=
"row"
>
<div
class=
"col-xs-2"
>
<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"
>
<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>
<c:forEach
items=
"
${
subPaths
}
"
var=
"path"
>
<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>
</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>
</c:otherwise>
</c:choose>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-xs-2"
>
<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"
>
<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>
<c:forEach
items=
"
${
subPaths
}
"
var=
"path"
>
<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>
</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>
</c:otherwise>
</c:choose>
</div>
</div>
<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-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-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"
>
<spring:message
code=
"delete"
/>
</button>
</form>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<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-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-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"
>
<spring:message
code=
"delete"
/>
</button>
</form>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<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=
""
>
<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>
</p>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
<spring:message
code=
"file.upload-file"
/>
</button>
</form>
<input
type=
"hidden"
name=
"repositoryPath"
value=
"${currentPath}"
/>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
'
#repositoryPathNav
'
).
change
(
function
()
{
console
.
log
(
this
.
value
);
document
.
location
.
pathname
=
this
.
value
;
});
<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>
</p>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
<spring:message
code=
"file.upload-file"
/>
</button>
</form>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
'
#repositoryPathNav
'
).
change
(
function
()
{
console
.
log
(
this
.
value
);
document
.
location
.
pathname
=
this
.
value
;
});
$
(
'
.confirm-delete
'
).
click
(
function
(
ev
)
{
if
(
!
window
.
confirm
(
'
<spring:message
code=
"prompt.confirm-delete"
/>
'
))
{
ev
.
stopPropagation
();
return
false
;
}
});
$
(
'
#repository-menu-item
'
).
addClass
(
'
active
'
);
$
(
'
#repository-menu-item
'
).
find
(
"
a
"
).
first
().
addClass
(
'
active
'
);
$
(
'
.humburger-btn
'
).
on
(
'
click
'
,
function
()
{
setTimeout
(
function
()
{
expandGroup
();
},
100
);
$
(
'
.confirm-delete
'
).
click
(
function
(
ev
)
{
if
(
!
window
.
confirm
(
'
<spring:message
code=
"prompt.confirm-delete"
/>
'
))
{
ev
.
stopPropagation
();
return
false
;
}
});
$
(
'
#repository-menu-item
'
).
addClass
(
'
active
'
);
$
(
'
#repository-menu-item
'
).
find
(
"
a
"
).
first
().
addClass
(
'
active
'
);
$
(
'
.humburger-btn
'
).
on
(
'
click
'
,
function
()
{
setTimeout
(
function
()
{
expandGroup
();
},
100
);
});
});
$
(
window
).
resize
(
function
()
{
expandGroup
();
});
});
$
(
window
).
resize
(
function
()
{
expandGroup
();
});
function
expandGroup
()
{
if
(
$
(
"
.humburger-btn
"
).
is
(
"
:visible
"
))
{
$
(
'
#repository-menu-item
'
).
addClass
(
'
open
'
);
}
else
{
$
(
'
#repository-menu-item
'
).
removeClass
(
'
open
'
);
function
expandGroup
()
{
if
(
$
(
"
.humburger-btn
"
).
is
(
"
:visible
"
))
{
$
(
'
#repository-menu-item
'
).
addClass
(
'
open
'
);
}
else
{
$
(
'
#repository-menu-item
'
).
removeClass
(
'
open
'
);
}
}
}
</script>
</content>
</script>
</content>
</body>
</body>
</html>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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