Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Genesys Backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Backend
Commits
34283223
Commit
34283223
authored
Jan 10, 2014
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include GA trackers
parent
b0c79e71
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
10 deletions
+30
-10
src/main/java/org/genesys2/server/servlet/controller/DatasetController.java
...genesys2/server/servlet/controller/DatasetController.java
+8
-0
src/main/webapp/WEB-INF/jsp/accession/details.jsp
src/main/webapp/WEB-INF/jsp/accession/details.jsp
+1
-4
src/main/webapp/WEB-INF/jsp/metadata/view.jsp
src/main/webapp/WEB-INF/jsp/metadata/view.jsp
+11
-0
src/main/webapp/WEB-INF/jsp/wiews/details.jsp
src/main/webapp/WEB-INF/jsp/wiews/details.jsp
+5
-6
src/main/webapp/WEB-INF/jsp/wiews/ga.jsp
src/main/webapp/WEB-INF/jsp/wiews/ga.jsp
+5
-0
No files found.
src/main/java/org/genesys2/server/servlet/controller/DatasetController.java
View file @
34283223
...
...
@@ -23,8 +23,10 @@ import javax.servlet.http.HttpServletResponse;
import
org.genesys2.server.model.genesys.Accession
;
import
org.genesys2.server.model.genesys.Metadata
;
import
org.genesys2.server.model.impl.FaoInstitute
;
import
org.genesys2.server.service.DatasetService
;
import
org.genesys2.server.service.GenesysService
;
import
org.genesys2.server.service.InstituteService
;
import
org.genesys2.spring.ResourceNotFoundException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Scope
;
...
...
@@ -58,6 +60,9 @@ public class DatasetController extends BaseController {
@Autowired
private
Validator
validator
;
@Autowired
private
InstituteService
instituteService
;
@RequestMapping
(
"/"
)
public
String
index
(
ModelMap
model
,
@RequestParam
(
value
=
"page"
,
required
=
false
,
defaultValue
=
"1"
)
int
page
)
{
model
.
addAttribute
(
"pagedData"
,
genesysService
.
listMetadata
(
new
PageRequest
(
page
-
1
,
50
)));
...
...
@@ -75,6 +80,9 @@ public class DatasetController extends BaseController {
model
.
addAttribute
(
"metadata"
,
metadata
);
model
.
addAttribute
(
"methods"
,
genesysService
.
listMethods
(
metadata
));
FaoInstitute
faoInstitute
=
instituteService
.
getInstitute
(
metadata
.
getInstituteCode
());
model
.
addAttribute
(
"faoInstitute"
,
faoInstitute
);
Page
<
Accession
>
accessions
=
genesysService
.
listMetadataAccessions
(
metadata
.
getId
(),
new
PageRequest
(
page
-
1
,
50
));
model
.
addAttribute
(
"pagedData"
,
accessions
);
...
...
src/main/webapp/WEB-INF/jsp/accession/details.jsp
View file @
34283223
...
...
@@ -274,10 +274,7 @@
});
</c:if>
<%-- // institute GA --%>
<c:if
test=
"
${
faoInstitute
.
settings
[
'googleAnalytics.tracker'
]
ne
null
}
"
>
_pageTrackers
=
[
"
${faoInstitute.settings['googleAnalytics.tracker'].value}
"
];
</c:if>
<%@include
file=
"/WEB-INF/jsp/wiews/ga.jsp"
%>
_pageDim
=
{
institute
:
'
${accession.instituteCode}
'
,
genus
:
'
${accession.taxonomy.genus}
'
};
</script>
</body>
...
...
src/main/webapp/WEB-INF/jsp/metadata/view.jsp
View file @
34283223
...
...
@@ -16,6 +16,12 @@
<fmt:formatDate
value=
"
${
metadata
.
lastModifiedDate
}
"
type=
"both"
/>
</div>
<c:if
test=
"
${
faoInstitute
ne
null
}
"
>
<p>
<a
class=
""
href=
"
<c:url
value=
"/wiews/${faoInstitute.code.toLowerCase()}"
/>
"
><b><c:out
value=
"
${
faoInstitute
.
code
}
"
/></b>
<c:out
value=
"
${
faoInstitute
.
fullName
}
"
/></a>
</p>
</c:if>
<c:if
test=
"
${
page
eq
1
}
"
>
<table>
<thead>
...
...
@@ -36,6 +42,7 @@
</c:forEach>
</tbody>
</table>
<p>
<c:out
value=
"
${
metadata
.
description
}
"
/>
</p>
...
...
@@ -115,5 +122,9 @@
</tbody>
</table>
</div>
<script
type=
"text/javascript"
>
<%@include
file=
"/WEB-INF/jsp/wiews/ga.jsp"
%>
</script>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/wiews/details.jsp
View file @
34283223
...
...
@@ -126,20 +126,19 @@
</div>
<c:if
test=
"
${
faoInstitute
.
latitude
ne
null
}
"
>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
<c:if
test=
"
${
faoInstitute
.
latitude
ne
null
}
"
>
var
map
=
GoogleMaps
.
map
(
"
${pageContext.response.locale.language}
"
,
$
(
"
#map
"
),
{
maxZoom
:
6
,
/* WIEWS does not provide enough detail */
center
:
new
GoogleMaps
.
LatLng
(
$
{
faoInstitute
.
latitude
},
$
{
faoInstitute
.
longitude
}),
markerTitle
:
"
<spring:escapeBody
javaScriptEscape=
"true"
>
${faoInstitute.fullName}
</spring:escapeBody>
"
});
</c:if>
});
<%-- // institute GA --%
>
<c:if
test=
"
${
faoInstitute
.
settings
[
'googleAnalytics.tracker'
]
ne
null
}
"
>
_pageTrackers
=
[
"
${faoInstitute.settings['googleAnalytics.tracker'].value}
"
];
<
/c:if
>
</script
>
</c:if
>
<script
type=
"text/javascript"
>
<
%@include
file=
"/WEB-INF/jsp/wiews/ga.jsp"
%
>
_pageDim
=
{
institute
:
'
${faoInstitute.code}
'
};
</script>
</body>
...
...
src/main/webapp/WEB-INF/jsp/wiews/ga.jsp
0 → 100644
View file @
34283223
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<c:if
test=
"
${
faoInstitute
.
settings
[
'googleAnalytics.tracker'
]
ne
null
}
"
>
_pageTrackers=["${faoInstitute.settings['googleAnalytics.tracker'].value}"];
</c:if>
Write
Preview
Markdown
is supported
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