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
b434dfe4
Commit
b434dfe4
authored
Aug 10, 2015
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
<local:content-header tag with HTML metadata
parent
4adc9fc4
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
78 additions
and
49 deletions
+78
-49
src/main/webapp/WEB-INF/decorator/entry.jsp
src/main/webapp/WEB-INF/decorator/entry.jsp
+20
-20
src/main/webapp/WEB-INF/decorator/main.jsp
src/main/webapp/WEB-INF/decorator/main.jsp
+21
-21
src/main/webapp/WEB-INF/jsp/accession/details.jsp
src/main/webapp/WEB-INF/jsp/accession/details.jsp
+1
-0
src/main/webapp/WEB-INF/jsp/content/article.jsp
src/main/webapp/WEB-INF/jsp/content/article.jsp
+2
-2
src/main/webapp/WEB-INF/jsp/country/details.jsp
src/main/webapp/WEB-INF/jsp/country/details.jsp
+2
-0
src/main/webapp/WEB-INF/jsp/organization/details.jsp
src/main/webapp/WEB-INF/jsp/organization/details.jsp
+1
-2
src/main/webapp/WEB-INF/jsp/wiews/details.jsp
src/main/webapp/WEB-INF/jsp/wiews/details.jsp
+6
-4
src/main/webapp/WEB-INF/tags/content-headers.tag
src/main/webapp/WEB-INF/tags/content-headers.tag
+25
-0
No files found.
src/main/webapp/WEB-INF/decorator/entry.jsp
View file @
b434dfe4
...
...
@@ -4,16 +4,16 @@
<html
lang=
"${pageContext.response.locale.language}"
dir=
"${pageContext.response.locale.language=='fa' || pageContext.response.locale.language=='ar' ? 'rtl' : 'ltr'}"
>
<head>
<meta
charset=
"utf-8"
/
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0
"
/>
<meta
name=
"description"
content=
"Genesys, global database on plant genetic resources, accession database, order seeds, request for genebank material
"
/>
<meta
name=
"author"
content=
"Global Crop Diversity Trust
"
/>
<!-- CSRF protection-->
<meta
name=
"_csrf"
content=
"${_csrf.token}"
/>
<!-- default header name is X-CSRF-TOKEN -->
<meta
name=
"_csrf_header"
content=
"${_csrf.headerName}"
/>
<title><sitemesh:write
property=
"title"
/></title
>
<meta
charset=
"utf-8
"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge
"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0
"
/>
<!-- CSRF protection-->
<meta
name=
"_csrf"
content=
"${_csrf.token}"
/>
<!-- default header name is X-CSRF-TOKEN -->
<meta
name=
"_csrf_header"
content=
"${_csrf.headerName}"
/>
<!-- Links -->
<link
rel=
"shortcut icon"
href=
"
<c:url
value=
"/html/images/genesys.png"
/>
"
/>
...
...
@@ -33,18 +33,18 @@
<link
rel=
"alternate"
hreflang=
"zh"
href=
"
<c:url
value=
"/zh${pageContext.request.getAttribute('org.genesys2.server.servlet.filter.LocaleURLFilter.INTERNALURL')}"
/>
"
/>
<title><sitemesh:write
property=
"title"
/></title>
<!-- Custom styles for this template -->
<%@include
file=
"css.jsp"
%>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<!-- Custom styles for this template -->
<%@include
file=
"css.jsp"
%>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<sitemesh:write
property=
"head"
/>
<meta
name=
"description"
content=
"Genesys, global database on plant genetic resources, accession database, order seeds, request for genebank material"
/>
<meta
name=
"author"
content=
"Global Crop Diversity Trust"
/>
</head>
<body>
...
...
src/main/webapp/WEB-INF/decorator/main.jsp
View file @
b434dfe4
...
...
@@ -5,21 +5,22 @@
<html
lang=
"${pageContext.response.locale.language}"
dir=
"${pageContext.response.locale.language=='fa' || pageContext.response.locale.language=='ar' ? 'rtl' : 'ltr'}"
xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:schema=
"http://schema.org/"
xmlns:dc=
"http://purl.org/dc/elements/1.1/"
xmlns:dc=
"http://purl.org/dc/elements/1.1/"
xmlns:dwc=
"http://rs.tdwg.org/dwc/terms/"
xmlns:germplasm=
"http://purl.org/germplasm/germplasmTerm#"
xmlns:germplasmType=
"http://purl.org/germplasm/germplasmType#"
>
<head
>
<meta
charset=
"utf-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<meta
name=
"author"
content=
"Global Crop Diversity Trust"
/>
<!-- CSRF protection-->
<meta
name=
"_csrf"
content=
"${_csrf.token}"
/>
<!-- default header name is X-CSRF-TOKEN -->
<meta
name=
"_csrf_header"
content=
"${_csrf.headerName}"
/>
<head>
<title><sitemesh:write
property=
"title"
/></title>
<meta
charset=
"utf-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<meta
name=
"language"
content=
"${pageContext.response.locale.language}"
/>
<!-- CSRF protection-->
<meta
name=
"_csrf"
content=
"${_csrf.token}"
/>
<!-- default header name is X-CSRF-TOKEN -->
<meta
name=
"_csrf_header"
content=
"${_csrf.headerName}"
/>
<!-- Links -->
<link
rel=
"shortcut icon"
href=
"
<c:url
value=
"/html/images/genesys.png"
/>
"
/>
...
...
@@ -38,18 +39,17 @@
<link
rel=
"alternate"
hreflang=
"ru"
href=
"
<c:url
value=
"/ru${pageContext.request.getAttribute('org.genesys2.server.servlet.filter.LocaleURLFilter.INTERNALURL')}"
/>
"
/>
<link
rel=
"alternate"
hreflang=
"zh"
href=
"
<c:url
value=
"/zh${pageContext.request.getAttribute('org.genesys2.server.servlet.filter.LocaleURLFilter.INTERNALURL')}"
/>
"
/>
<title><sitemesh:write
property=
"title"
/></title>
<!-- Custom styles for this template -->
<%@include
file=
"css.jsp"
%>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<!-- Custom styles for this template -->
<%@include
file=
"css.jsp"
%>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<sitemesh:write
property=
"head"
/>
<meta
name=
"author"
content=
"Global Crop Diversity Trust"
/>
</head>
<body>
...
...
src/main/webapp/WEB-INF/jsp/accession/details.jsp
View file @
b434dfe4
...
...
@@ -7,6 +7,7 @@
<title><spring:message
code=
"accession.page.profile.title"
arguments=
"
${
accession
.
accessionName
}
"
argumentSeparator=
"|"
/></title>
<local:content
-headers description="${jspHelper.htmlToText(blurp.summary, 150)}" title="${accession.accessionName} | ${accession.instituteCode}" keywords="${accession.accessionName}"
/>
</head>
<body
typeof=
"germplasm:GermplasmAccession"
>
<h1>
...
...
src/main/webapp/WEB-INF/jsp/content/article.jsp
View file @
b434dfe4
...
...
@@ -4,8 +4,8 @@
<html>
<head>
<title>
${title}
</title>
<meta
name=
"description"
content=
"
<c:out
value=
"
${
jspHelper
.
htmlToText
(
article
.
summary
)
}
"
/>
"
/>
<title>
${title}
</title>
<local:content
-headers description="${jspHelper.htmlToText(article.summary, 150)}" title="${title}
"
/>
</head>
<body>
<content
tag=
"header"
>
...
...
src/main/webapp/WEB-INF/jsp/country/details.jsp
View file @
b434dfe4
...
...
@@ -5,6 +5,8 @@
<html>
<head>
<title><spring:message
code=
"country.page.profile.title"
arguments=
"
${
country
.
getName
(
pageContext
.
response
.
locale
)
}
"
argumentSeparator=
"|"
/></title>
<local:content
-headers description="${jspHelper.htmlToText(blurp.summary, 150)}" title="${country.getName(pageContext.response.locale)}"
/>
</head>
<body>
<h1>
...
...
src/main/webapp/WEB-INF/jsp/organization/details.jsp
View file @
b434dfe4
...
...
@@ -6,8 +6,7 @@
<head>
<title><spring:message
code=
"organization.page.profile.title"
arguments=
"
${
organization
.
slug
}
"
argumentSeparator=
"|"
/></title>
<meta
name=
"description"
content=
"
<c:out
value=
"
${
jspHelper
.
htmlToText
(
blurp
.
summary
)
}
"
/>
"
/>
<meta
name=
"keywords"
content=
"${organization.slug}, ${organization.title}"
/>
<local:content
-headers description="${jspHelper.htmlToText(blurp.summary, 150)}" title="${organization.title}" keywords="${organization.slug}, ${organization.title}"
/>
</head>
<body>
<h1>
...
...
src/main/webapp/WEB-INF/jsp/wiews/details.jsp
View file @
b434dfe4
...
...
@@ -6,10 +6,12 @@
<head>
<title><c:out
value=
"
${
faoInstitute
.
fullName
}
"
/><c:if
test=
"
${
faoInstitute
.
acronym
!=
''
}
"
>
| ${faoInstitute.acronym}
</c:if>
|
<c:out
value=
"
${
faoInstitute
.
code
}
"
/></title>
<meta
name=
"description"
content=
"
<spring:message
code=
"faoInstitute.meta-description"
arguments=
"
${
faoInstitute
.
fullName
}
|${faoInstitute.acronym}"
argumentSeparator=
"|"
/>
<c:out
value=
"
${
jspHelper
.
htmlToText
(
blurp
.
summary
)
}
"
/>
"
/>
<meta
name=
"keywords"
content=
"${faoInstitute.acronym}, ${faoInstitute.fullName}, ${faoInstitute.code}"
/>
<local:content
-headers description="${jspHelper.htmlToText(blurp.summary, 150)}" title="${faoInstitute.fullName}" keywords="${faoInstitute.acronym}, ${faoInstitute.fullName}, ${faoInstitute.code}"
/>
<meta
name=
"description"
content=
"
<spring:message
code=
"faoInstitute.meta-description"
arguments=
"
${
faoInstitute
.
fullName
}
|${faoInstitute.acronym}"
argumentSeparator=
"|"
/>
<c:out
value=
"
${
jspHelper
.
htmlToText
(
blurp
.
summary
)
}
"
/>
"
/>
</head>
<body
typeof=
"schema:Organization"
>
<h1>
...
...
src/main/webapp/WEB-INF/tags/content-headers.tag
0 → 100644
View file @
b434dfe4
<%@ tag description="HTML headers" pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ attribute name="title" required="false" type="java.lang.String" description="title" %>
<%@ attribute name="description" required="false" type="java.lang.String" description="description" %>
<%@ attribute name="keywords" required="false" type="java.lang.String" description="keywords" %>
<%@ attribute name="imageUrl" required="false" type="java.lang.String" description="URL to an image" %>
<%-- Twitter --%>
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@GenesysPGR" />
<meta name="twitter:title" content="<c:out value="${title}" />" />
<c:if test="${description ne null}">
<meta name="description" content="<c:out value="${description}" />" />
<meta name="twitter:description" content="<c:out value="${description}" />" />
</c:if>
<c:if test="${keywords ne null}">
<meta name="keywords" content="<c:out value="${keywords}" />" />
</c:if>
<c:if test="${imageUrl ne null}">
<meta name="twitter:image" content="<c:out value="${imageUrl}" />" />
</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