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
6f56750b
Commit
6f56750b
authored
Jul 26, 2018
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Export descriptor list as HTML
- Imported missing templates
parent
263b4a5a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
191 additions
and
0 deletions
+191
-0
src/main/resources/freemarker/descriptorlist/booklet.ftl
src/main/resources/freemarker/descriptorlist/booklet.ftl
+98
-0
src/main/resources/freemarker/html.ftl
src/main/resources/freemarker/html.ftl
+92
-0
src/main/webapp/WEB-INF/sitemesh3.xml
src/main/webapp/WEB-INF/sitemesh3.xml
+1
-0
No files found.
src/main/resources/freemarker/descriptorlist/booklet.ftl
0 → 100644
View file @
6f56750b
<#macro isPublished published what>
<#if published>
<#else>
<div class="alert not-published"><b>Note:</b> This ${what} is not published.</div><#lt>
</#if>
</#macro>
<#assign vocabprinted = { "dummy":true } />
<#macro printVocabulary vocabulary>
<#compress>
**Note:** This descriptor uses the **${vocabulary.title}** controlled vocabulary
<#if vocabulary.publisher??>
published by **${vocabulary.publisher}**
<#else>
maintained by **${vocabulary.owner.name}**
</#if>.
</#compress>
<#if vocabprinted[vocabulary.uuid]??>
<#else>
${vocabulary.description!}<#lt>
<#assign vocabprinted = vocabprinted + { vocabulary.uuid:true } />
</#if>
</#macro>
<#macro printDescriptor descriptor>
# ${descriptor.title} <#if descriptor.uom??>[${descriptor.uom}]</#if><#lt>
<@isPublished published=descriptor.published what="descriptor" />
<#if descriptor.description??>
${descriptor.description}<#lt>
<#else>
> No description.<#lt>
</#if>
<#list descriptor.terms>
<#compress>
|Code|Term|Description|
|---|---|---|
<#items as term>
|**${term.code}**|${term.title}|${term.description!}|
</#items>
</#compress>
</#list>
<#if descriptor.vocabulary??>
<@printVocabulary vocabulary=descriptor.vocabulary />
</#if>
</#macro>
<div class="documenttitle">
${descriptorList.title} <#lt>
<div><small>
${descriptorList.versionTag}<br />
<#if descriptorList.publisher??>
**${descriptorList.publisher}** <#lt>
<#else>
${descriptorList.owner.name} <#lt>
</#if>
</small></div>
</div>
${descriptorList.description!}
<@isPublished published=descriptorList.published what="descriptor list" />
Version: ${descriptorList.versionTag} <#lt>
<#if descriptorList.publisher??>
Published by: **${descriptorList.publisher}** <#lt>
<#else>
Maintained by: ${descriptorList.owner.name} <#lt>
</#if>
Last modified: ${descriptorList.lastModifiedDate?date} <#lt>
Date registered: ${descriptorList.createdDate?date} <#lt>
Record: ${descriptorList.uuid} v${descriptorList.version} <#lt>
<#list descriptorList.descriptors>
<#items as descriptor>
<@printDescriptor descriptor=descriptor />
</#items>
<#else>
> The descriptor list does not declare any descriptors.
</#list>
src/main/resources/freemarker/html.ftl
0 → 100644
View file @
6f56750b
<!DOCTYPE html>
<html>
<head>
<title>
${title}
</title>
<meta
charset=
"UTF-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes"
/>
<meta
name=
"author"
content=
"${author!'Genesys <helpdesk@genesys-pgr.org>'}"
/>
<style>
html
{
font-size
:
10pt
;
font-family
:
Arial
;
}
.disclaimer
{
text-align
:
center
;
color
:
Red
;
font-size
:
1.5rem
;
margin
:
0
0
2rem
0
;
}
.documenttitle
{
text-align
:
center
;
font-size
:
2rem
;
}
.documenttitle
small
{
font-size
:
1rem
;
font-weight
:
bold
;
}
h1
{
font-size
:
1.2rem
;
margin
:
1.4rem
0
0.6rem
;
}
h2
{
font-size
:
1.2rem
;
margin
:
1.2rem
0
0.6rem
;
}
h3
{
font-size
:
1.1rem
;
margin
:
1rem
0
0.5rem
;
}
h4
{
font-size
:
1rem
;
margin
:
0.8rem
0
0.4rem
;
}
pre
{
font-size
:
0.8rem
;
}
body
{
counter-reset
:
h1counter
;
}
footer
{
margin-top
:
2rem
;
text-align
:
center
;
font-size
:
.8rem
;
color
:
#a0a0a0
;
}
blockquote
{
border-left
:
.3rem
solid
gray
;
margin
:
.2rem
;
padding
:
.1rem
1rem
;
}
table
{
}
table
th
,
table
td
{
text-align
:
left
;
font-size
:
0.9rem
;
padding
:
.2rem
.5rem
;
}
h1
:before
{
content
:
counter
(
h1counter
)
".\0000a0\0000a0"
;
counter-increment
:
h1counter
;
counter-reset
:
h2counter
;
}
h2
:before
{
content
:
counter
(
h1counter
)
"."
counter
(
h2counter
)
".\0000a0\0000a0"
;
counter-increment
:
h2counter
;
counter-reset
:
h3counter
;
}
h3
:before
{
content
:
counter
(
h1counter
)
"."
counter
(
h2counter
)
"."
counter
(
h3counter
)
".\0000a0\0000a0"
;
counter-increment
:
h3counter
;
}
div
.alert.not-published
{
color
:
Red
;
margin
:
.3rem
0
;
padding
:
.2rem
0
;
}
</style>
</head>
<body>
<div
class=
"disclaimer"
>
For internal use only. Do not distribute.
</div>
${html}
<footer>
Generated ${.now} from Genesys Catalog data.
</footer>
</body>
</html>
src/main/webapp/WEB-INF/sitemesh3.xml
View file @
6f56750b
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
<mime-type>
text/html
</mime-type>
<mime-type>
text/html
</mime-type>
<mapping
path=
"/html/*"
exclude=
"true"
/>
<mapping
path=
"/html/*"
exclude=
"true"
/>
<mapping
path=
"/api/*"
exclude=
"true"
/>
<mapping
path=
"/swagger-ui.html*"
exclude=
"true"
/>
<mapping
path=
"/swagger-ui.html*"
exclude=
"true"
/>
<mapping
path=
"/swagger-resources*"
exclude=
"true"
/>
<mapping
path=
"/swagger-resources*"
exclude=
"true"
/>
<mapping
path=
"/webjars/*"
exclude=
"true"
/>
<mapping
path=
"/webjars/*"
exclude=
"true"
/>
...
...
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