Templates and SPARQL requests for rubrics, elenph excerpts and articles
This commit is contained in:
parent
6b7092a4d5
commit
63a187fea3
12 changed files with 921 additions and 0 deletions
|
@ -0,0 +1,19 @@
|
||||||
|
@prefix : <http://vitro.mannlib.cornell.edu/ns/vitro/ApplicationSetup#> .
|
||||||
|
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||||
|
|
||||||
|
:vivodocumentModifier_openAccess
|
||||||
|
a <java:edu.cornell.mannlib.vitro.webapp.searchindex.documentBuilding.SelectQueryDocumentModifier> ,
|
||||||
|
<java:edu.cornell.mannlib.vitro.webapp.searchindex.documentBuilding.DocumentModifier> ;
|
||||||
|
rdfs:label "Elenph article excerpts" ;
|
||||||
|
:hasTargetField "ALLTEXT" ;
|
||||||
|
:hasSelectQuery """
|
||||||
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
PREFIX ts_: <https://iph.ras.ru/text_structures#>
|
||||||
|
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||||
|
SELECT DISTINCT ?elenphExcerpt ?property ?value
|
||||||
|
WHERE {
|
||||||
|
?uri rdf:type ts_:elenphArticle .
|
||||||
|
?uri (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
|
||||||
|
?elenphExcerpt ?property ?value .
|
||||||
|
}
|
||||||
|
""" .
|
|
@ -0,0 +1,108 @@
|
||||||
|
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
||||||
|
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||||
|
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||||
|
@prefix vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> .
|
||||||
|
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
||||||
|
@prefix ts_: <https://iph.ras.ru/text_structures#> .
|
||||||
|
@prefix display: <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#> .
|
||||||
|
|
||||||
|
|
||||||
|
<https://iph.ras.ru/text_structures#elenphArticle> display:hasDataGetter display:getArticleExcerptsContentDataGetter .
|
||||||
|
|
||||||
|
<https://iph.ras.ru/text_structures#elenphArticle> display:hasDataGetter display:getArticleExcerptPathsDataGetter .
|
||||||
|
|
||||||
|
<https://iph.ras.ru/text_structures#elenphArticle> display:hasDataGetter display:getArticleWorksDataGetter .
|
||||||
|
|
||||||
|
<https://iph.ras.ru/text_structures#elenphArticle> display:hasDataGetter display:getArticleBibliographyDataGetter .
|
||||||
|
|
||||||
|
<https://iph.ras.ru/text_structures#elenphArticle> display:hasDataGetter display:getArticleAuthorsDataGetter .
|
||||||
|
|
||||||
|
display:getArticleExcerptsContentDataGetter
|
||||||
|
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||||
|
display:saveToVar "excerpts";
|
||||||
|
display:query
|
||||||
|
"""
|
||||||
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
PREFIX ts_: <https://iph.ras.ru/text_structures#>
|
||||||
|
SELECT ?elenphExcerpt ?property ?value
|
||||||
|
WHERE {
|
||||||
|
?individualURI (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
|
||||||
|
?elenphExcerpt ?property ?value .
|
||||||
|
} ORDER BY ?elenphExcerpt
|
||||||
|
""" .
|
||||||
|
|
||||||
|
display:getArticleExcerptPathsDataGetter
|
||||||
|
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||||
|
display:saveToVar "paths";
|
||||||
|
display:query
|
||||||
|
"""
|
||||||
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||||
|
PREFIX ts_: <https://iph.ras.ru/text_structures#>
|
||||||
|
SELECT (GROUP_CONCAT(substr(concat("000",str(?outline)),strlen(str(?outline))); SEPARATOR = ".") AS ?path ) ?tocElement ?elenphExcerpt
|
||||||
|
WHERE {
|
||||||
|
?individualURI ts_:hasTOCItem/(ts_:pointsTo/ts_:hasTOCItem)* ?tmpTOCItem .
|
||||||
|
?tmpTOCItem rdf:type ts_:TOCItem .
|
||||||
|
?tmpTOCItem ts_:pointsTo/(ts_:hasTOCItem/ts_:pointsTo)* ?tocElement .
|
||||||
|
?tmpTOCItem ts_:itemNumber ?outline .
|
||||||
|
OPTIONAL {
|
||||||
|
?tocElement ts_:hasText ?elenphExcerpt .
|
||||||
|
}
|
||||||
|
{
|
||||||
|
SELECT ?elenphArticle ?tocElement
|
||||||
|
WHERE {
|
||||||
|
?individualURI (ts_:hasTOCItem/ts_:pointsTo)+ ?tocElement .
|
||||||
|
?tocElement rdf:type ts_:TOCElement .
|
||||||
|
?individualURI rdf:type ts_:elenphArticle .
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} GROUP BY ?tocElement ?elenphExcerpt ORDER BY ?path
|
||||||
|
""" .
|
||||||
|
|
||||||
|
display:getArticleBibliographyDataGetter
|
||||||
|
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||||
|
display:saveToVar "bibliography";
|
||||||
|
display:query
|
||||||
|
"""
|
||||||
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
PREFIX ts_: <https://iph.ras.ru/text_structures#>
|
||||||
|
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||||
|
SELECT DISTINCT ?bibliography
|
||||||
|
WHERE {
|
||||||
|
?individualURI (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
|
||||||
|
?elenphExcerpt ts_:bibliography ?bibliography .
|
||||||
|
} ORDER BY ?bibliography
|
||||||
|
""" .
|
||||||
|
|
||||||
|
display:getArticleWorksDataGetter
|
||||||
|
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||||
|
display:saveToVar "works";
|
||||||
|
display:query
|
||||||
|
"""
|
||||||
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
PREFIX ts_: <https://iph.ras.ru/text_structures#>
|
||||||
|
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||||
|
SELECT DISTINCT ?works
|
||||||
|
WHERE {
|
||||||
|
?individualURI (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
|
||||||
|
?elenphExcerpt ts_:works ?works .
|
||||||
|
} ORDER BY ?works
|
||||||
|
""" .
|
||||||
|
|
||||||
|
display:getArticleAuthorsDataGetter
|
||||||
|
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||||
|
display:saveToVar "authors";
|
||||||
|
display:query
|
||||||
|
"""
|
||||||
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
PREFIX ts_: <https://iph.ras.ru/text_structures#>
|
||||||
|
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||||
|
SELECT DISTINCT ?author
|
||||||
|
WHERE {
|
||||||
|
?individualURI (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
|
||||||
|
?elenphExcerpt ts_:author ?author .
|
||||||
|
} ORDER BY ?author
|
||||||
|
""" .
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,113 @@
|
||||||
|
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
||||||
|
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||||
|
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||||
|
@prefix vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> .
|
||||||
|
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
||||||
|
@prefix ts_: <https://iph.ras.ru/text_structures#> .
|
||||||
|
@prefix display: <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#> .
|
||||||
|
|
||||||
|
|
||||||
|
<https://iph.ras.ru/relationships#rubric> display:hasDataGetter display:getArticlesWithRubricDataGetter .
|
||||||
|
|
||||||
|
<https://iph.ras.ru/relationships#rubric> display:hasDataGetter display:getArticlesWithChildRubricDataGetter .
|
||||||
|
|
||||||
|
<https://iph.ras.ru/relationships#rubric> display:hasDataGetter display:getChildRubricsDataGetter .
|
||||||
|
|
||||||
|
<https://iph.ras.ru/relationships#rubric> display:hasDataGetter display:getExcerptsWithRubricDataGetter .
|
||||||
|
|
||||||
|
<https://iph.ras.ru/relationships#rubric> display:hasDataGetter display:getExcerptsWithRubricsChildsDataGetter .
|
||||||
|
|
||||||
|
display:getArticlesWithChildRubricDataGetter
|
||||||
|
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||||
|
display:saveToVar "childArticles";
|
||||||
|
display:query
|
||||||
|
"""
|
||||||
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||||
|
PREFIX ts_: <https://iph.ras.ru/text_structures#>
|
||||||
|
PREFIX pr: <https://iph.ras.ru/relationships#>
|
||||||
|
SELECT DISTINCT ?childArticleID ?childArticleName
|
||||||
|
WHERE {
|
||||||
|
?rubric (pr:hasParent)+ ?individualURI .
|
||||||
|
?excerpt pr:belongsTo ?rubric .
|
||||||
|
?excerpt rdf:type ts_:elenphExcerpt .
|
||||||
|
?childArticleID (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?excerpt .
|
||||||
|
?childArticleID rdfs:label ?childArticleName .
|
||||||
|
?childArticleID rdf:type ts_:elenphArticle .
|
||||||
|
} ORDER BY ?childArticleName
|
||||||
|
""" .
|
||||||
|
|
||||||
|
|
||||||
|
display:getArticlesWithRubricDataGetter
|
||||||
|
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||||
|
display:saveToVar "articles";
|
||||||
|
display:query
|
||||||
|
"""
|
||||||
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||||
|
PREFIX ts_: <https://iph.ras.ru/text_structures#>
|
||||||
|
PREFIX pr: <https://iph.ras.ru/relationships#>
|
||||||
|
SELECT DISTINCT ?articleID ?articleName
|
||||||
|
WHERE {
|
||||||
|
?excerpt pr:belongsTo ?individualURI .
|
||||||
|
?excerpt rdf:type ts_:elenphExcerpt .
|
||||||
|
?articleID (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?excerpt .
|
||||||
|
?articleID rdfs:label ?articleName .
|
||||||
|
?articleID rdf:type ts_:elenphArticle .
|
||||||
|
} ORDER BY ?articleName
|
||||||
|
""" .
|
||||||
|
|
||||||
|
display:getChildRubricsDataGetter
|
||||||
|
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||||
|
display:saveToVar "childRubrics";
|
||||||
|
display:query
|
||||||
|
"""
|
||||||
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||||
|
PREFIX ts_: <https://iph.ras.ru/text_structures#>
|
||||||
|
PREFIX pr: <https://iph.ras.ru/relationships#>
|
||||||
|
SELECT DISTINCT ?rubricID ?rubricName
|
||||||
|
WHERE {
|
||||||
|
?rubricID pr:hasParent ?individualURI .
|
||||||
|
?rubricID pr:rubricOrder ?order .
|
||||||
|
?rubricID rdfs:label ?rubricName .
|
||||||
|
?rubricID rdf:type pr:rubric .
|
||||||
|
} ORDER BY ?order
|
||||||
|
""" .
|
||||||
|
|
||||||
|
display:getExcerptsWithRubricsChildsDataGetter
|
||||||
|
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||||
|
display:saveToVar "childExcerpts";
|
||||||
|
display:query
|
||||||
|
"""
|
||||||
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||||
|
PREFIX ts_: <https://iph.ras.ru/text_structures#>
|
||||||
|
PREFIX pr: <https://iph.ras.ru/relationships#>
|
||||||
|
SELECT DISTINCT ?childExcerptID ?childExcerptName
|
||||||
|
WHERE {
|
||||||
|
?tmpChildRubrics (pr:hasParent)+ ?individualURI .
|
||||||
|
?childExcerptID pr:belongsTo ?tmpChildRubrics .
|
||||||
|
?childExcerptID rdfs:label ?childExcerptName .
|
||||||
|
?childExcerptID rdf:type ts_:elenphExcerpt .
|
||||||
|
} ORDER BY ?childExcerptName
|
||||||
|
""" .
|
||||||
|
|
||||||
|
display:getExcerptsWithRubricDataGetter
|
||||||
|
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||||
|
display:saveToVar "excerpts";
|
||||||
|
display:query
|
||||||
|
"""
|
||||||
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||||
|
PREFIX ts_: <https://iph.ras.ru/text_structures#>
|
||||||
|
PREFIX pr: <https://iph.ras.ru/relationships#>
|
||||||
|
SELECT DISTINCT ?excerptID ?excerptName
|
||||||
|
WHERE {
|
||||||
|
?excerptID pr:belongsTo ?individualURI .
|
||||||
|
?excerptID rdfs:label ?excerptName .
|
||||||
|
?excerptID rdf:type ts_:elenphExcerpt .
|
||||||
|
} ORDER BY ?excerptName
|
||||||
|
""" .
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
@prefix vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> .
|
||||||
|
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
||||||
|
@prefix ts_: <https://iph.ras.ru/text_structures#> .
|
||||||
|
|
||||||
|
ts_:elenphArticle vitro:customDisplayViewAnnot "elenphAritcle.ftl"^^xsd:string .
|
|
@ -0,0 +1,5 @@
|
||||||
|
@prefix vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> .
|
||||||
|
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
||||||
|
@prefix ts_: <https://iph.ras.ru/text_structures#> .
|
||||||
|
|
||||||
|
ts_:elenphExcerpt vitro:customDisplayViewAnnot "elenphExcerpt.ftl"^^xsd:string .
|
|
@ -0,0 +1,5 @@
|
||||||
|
@prefix vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> .
|
||||||
|
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
||||||
|
@prefix pr: <https://iph.ras.ru/relationships#> .
|
||||||
|
|
||||||
|
pr:rubric vitro:customDisplayViewAnnot "rubric.ftl"^^xsd:string .
|
158
webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl
Normal file
158
webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl
Normal file
|
@ -0,0 +1,158 @@
|
||||||
|
<#-- $This file is distributed under the terms of the license in LICENSE$ -->
|
||||||
|
|
||||||
|
<#--
|
||||||
|
|
||||||
|
This version of individual--foaf-person.ftl is a "router" template. The original VIVO
|
||||||
|
version of this template now resides in the /themes/wilma/templates directory.
|
||||||
|
|
||||||
|
This version of the template is used when the profile page types feature is enabled.
|
||||||
|
This template serves to "rout" the user to the correct template based (1) the
|
||||||
|
profile page type of the foaf person being displayed or (2) the targeted view that
|
||||||
|
the user wants to see. For example, when a user is routed to a quick view template,
|
||||||
|
the user has the option of displaying the full view. If the user chooses that option,
|
||||||
|
the targetedView variable gets set.
|
||||||
|
|
||||||
|
This template could also be used to load just the "individual--foaf-person-2column.ftl"
|
||||||
|
without enabling profile page types. "individual--foaf-person-2column.ftl" is a slightly
|
||||||
|
different design than the "individual--foaf-person.ftl" template in the themes/wilma
|
||||||
|
directory.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<#include "individual-setup.ftl">
|
||||||
|
|
||||||
|
${scripts.add('<script async type="text/javascript" src="https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js"></script>')}
|
||||||
|
${scripts.add('<script async type="text/javascript" src="//cdn.plu.mx/widget-popup.js"></script>')}
|
||||||
|
|
||||||
|
<h2 itemprop="name" class="vcard foaf-person fn" <#if !editable>style="float:left;text-align:center;width:100%;border-right:1px solid #A6B1B0;"<#else> style="text-align:center;width:100%;"</#if>>
|
||||||
|
<@p.label individual editable labelCount localesCount/>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<#--
|
||||||
|
<#assign issue = propertyGroups.pullProperty("https://iph.ras.ru/text_structures#issue")!>
|
||||||
|
<#if issue.statements?has_content && issue.type == "data">
|
||||||
|
<div class="issue" style="list-style:none;">
|
||||||
|
<div class="label">Выпуск</div>
|
||||||
|
<@p.dataPropertyList issue editable />
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#assign year = propertyGroups.pullProperty("https://iph.ras.ru/text_structures#year")!>
|
||||||
|
<#if year.statements?has_content && year.type == "data">
|
||||||
|
<div class="year" style="list-style:none;">
|
||||||
|
<div class="label">Год</div>
|
||||||
|
<@p.dataPropertyList year editable />
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
-->
|
||||||
|
<div class="articleParts" style="display:block;">
|
||||||
|
<#list paths as order>
|
||||||
|
<div class = "articleExcerpt">
|
||||||
|
<#-- ${order.path} -->
|
||||||
|
<#list excerpts as excerptProperties>
|
||||||
|
|
||||||
|
<#if order.elenphExcerpt?has_content && excerptProperties.elenphExcerpt == order.elenphExcerpt>
|
||||||
|
<#if excerptProperties.property == "https://iph.ras.ru/text_structures#htmlExcerpt">
|
||||||
|
<#assign excerptText = excerptProperties.value >
|
||||||
|
</#if>
|
||||||
|
<#if excerptProperties.property == "http://www.w3.org/2000/01/rdf-schema#label">
|
||||||
|
<#assign excerptTextName = excerptProperties.value >
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
<#if excerptText?? && excerptTextName?? && excerptTextName?has_content && excerptText?has_content>
|
||||||
|
<button type="button" style="border:none;padding: 18px;width: 100%; text-align:left;" class="collapsible">${excerptTextName}</button>
|
||||||
|
<div class="htmlExcerpt" style="list-style:none; display:none;">
|
||||||
|
${excerptText}
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
</div> <#-- articleExcerpt -->
|
||||||
|
|
||||||
|
</#list>
|
||||||
|
</div>
|
||||||
|
<#-- <@dump var="works" /> -->
|
||||||
|
<#if works??>
|
||||||
|
<#assign no_works = true>
|
||||||
|
<#list works as work>
|
||||||
|
<#if no_works>
|
||||||
|
<button type="button" class="collapsible" style="border:none;padding: 18px;width: 100%;text-align:left;">Работы</button>
|
||||||
|
<div class="works" style="display:none;">
|
||||||
|
<#assign no_works = false>
|
||||||
|
</#if>
|
||||||
|
<div class="work" style="list-style:none;">
|
||||||
|
<p> ${work.works} </p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</#list>
|
||||||
|
<#if !no_works>
|
||||||
|
</div> <#-- works class-->
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#if bibliography??>
|
||||||
|
<#assign no_bibliography = true>
|
||||||
|
<#list bibliography as one_bibliography>
|
||||||
|
<#if no_bibliography>
|
||||||
|
<button type="button" class="collapsible" style="border:none;padding: 18px;width: 100%; text-align: left;">Литература</button>
|
||||||
|
<div class="bibliography" style="display:none;">
|
||||||
|
<#assign no_bibliography = false>
|
||||||
|
</#if>
|
||||||
|
<div class="bibliography_entry" style="list-style:none;">
|
||||||
|
<p> ${one_bibliography.bibliography} </p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</#list>
|
||||||
|
<#if !no_bibliography>
|
||||||
|
</div> <#-- bibliography class-->
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#if authors??>
|
||||||
|
<#assign no_authors = true>
|
||||||
|
<#list authors as author>
|
||||||
|
<#if no_authors>
|
||||||
|
<div class="authors" style="display:block;float:right; margin:15px;">
|
||||||
|
<#assign no_authors = false>
|
||||||
|
<#else>
|
||||||
|
", "
|
||||||
|
</#if>
|
||||||
|
${author.author}
|
||||||
|
</#list>
|
||||||
|
</div> <#-- authors class-->
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var coll = document.getElementsByClassName("collapsible");
|
||||||
|
var i;
|
||||||
|
|
||||||
|
for (i = 0; i < coll.length; i++) {
|
||||||
|
coll[i].addEventListener("click", function() {
|
||||||
|
this.classList.toggle("active");
|
||||||
|
var content = this.nextElementSibling;
|
||||||
|
if (content.style.display === "block") {
|
||||||
|
content.style.display = "none";
|
||||||
|
} else {
|
||||||
|
content.style.display = "block";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<#-- <@dumpAll /> -->
|
||||||
|
|
||||||
|
<#assign selectedTemplate = "individual--foaf-person-2column.ftl" >
|
||||||
|
|
||||||
|
<#if profilePageTypesEnabled >
|
||||||
|
<#assign profilePageType = profileType >
|
||||||
|
|
||||||
|
<#-- targetedView takes precedence over the profilePageType. -->
|
||||||
|
|
||||||
|
<#if targetedView?has_content>
|
||||||
|
<#if targetedView != "standardView">
|
||||||
|
<#assign selectedTemplate = "individual--foaf-person-quickview.ftl" >
|
||||||
|
</#if>
|
||||||
|
<#elseif profilePageType == "quickView" >
|
||||||
|
<#assign selectedTemplate = "individual--foaf-person-quickview.ftl" >
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#-- <#include selectedTemplate > -->
|
|
@ -0,0 +1,238 @@
|
||||||
|
<#-- $This file is distributed under the terms of the license in LICENSE$ -->
|
||||||
|
|
||||||
|
<#-- Individual profile page template for foaf:Person individuals -->
|
||||||
|
<!--[if IE 7]>
|
||||||
|
<link rel="stylesheet" href="${urls.base}/css/individual/ie7-standard-view.css" />
|
||||||
|
<![endif]-->
|
||||||
|
<#-- <#include "individual-setup.ftl"> -->
|
||||||
|
<#import "individual-qrCodeGenerator.ftl" as qr>
|
||||||
|
<#import "lib-vivo-properties.ftl" as vp>
|
||||||
|
<#--Number of labels present-->
|
||||||
|
<#if !labelCount??>
|
||||||
|
<#assign labelCount = 0 >
|
||||||
|
</#if>
|
||||||
|
<#--Number of available locales-->
|
||||||
|
<#if !localesCount??>
|
||||||
|
<#assign localesCount = 1>
|
||||||
|
</#if>
|
||||||
|
<#--Number of distinct languages represented, with no language tag counting as a language, across labels-->
|
||||||
|
<#if !languageCount??>
|
||||||
|
<#assign languageCount = 1>
|
||||||
|
</#if>
|
||||||
|
<#assign qrCodeIcon = "qr-code-icon.png">
|
||||||
|
<#assign visRequestingTemplate = "foaf-person-2column">
|
||||||
|
<#--add the VIVO-ORCID interface -->
|
||||||
|
<#include "individual-orcidInterface.ftl">
|
||||||
|
<section id="individual-intro" class="vcard person" role="region"><span itemscope itemtype="http://schema.org/Person">
|
||||||
|
<section id="individual-info" ${infoClass!} role="region" style="width: 100%;">
|
||||||
|
<#include "individual-adminPanel.ftl">
|
||||||
|
<header>
|
||||||
|
<#if relatedSubject??>
|
||||||
|
<h2>${relatedSubject.relatingPredicateDomainPublic} ${i18n().for} ${relatedSubject.name}</h2>
|
||||||
|
<p><a href="${relatedSubject.url}" title="${i18n().return_to(relatedSubject.name)}">← ${i18n().return_to(relatedSubject.name)}</a></p>
|
||||||
|
<#else>
|
||||||
|
<h1 itemprop="name" class="vcard foaf-person fn" <#if !editable>style="float:left;border-right:1px solid #A6B1B0;"</#if>>
|
||||||
|
<#-- Label -->
|
||||||
|
<@p.label individual editable labelCount localesCount/>
|
||||||
|
</h1>
|
||||||
|
<#-- Display preferredTitle if it exists; otherwise mostSpecificTypes -->
|
||||||
|
<#assign title = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Title")!>
|
||||||
|
<#if title?has_content> <#-- true when the property is in the list, even if not populated (when editing) -->
|
||||||
|
<#if (title.statements?size < 1) >
|
||||||
|
<@p.addLinkWithLabel title editable />
|
||||||
|
<#elseif editable>
|
||||||
|
<h2>${title.name?capitalize!}</h2>
|
||||||
|
<@p.verboseDisplay title />
|
||||||
|
</#if>
|
||||||
|
<#list title.statements as statement>
|
||||||
|
<#if !editable >
|
||||||
|
<div id="titleContainer"><span itemprop="jobTitle" class="display-title-not-editable">${statement.preferredTitle}</span></div>
|
||||||
|
<#else>
|
||||||
|
<span itemprop="jobTitle" class="display-title-editable">${statement.preferredTitle}</span>
|
||||||
|
<@p.editingLinks "${title.localName}" "${title.name}" statement editable title.rangeUri />
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</#if>
|
||||||
|
<#-- If preferredTitle is unpopulated, display mostSpecificTypes -->
|
||||||
|
<#if ! (title.statements)?has_content>
|
||||||
|
<@p.mostSpecificTypesPerson individual editable/>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<span id="iconControlsRightSide" class="<#if editable>iconControlsEditable<#else>iconControlsNotEditable</#if>" <#if !user.hasSiteAdminAccess>style="top:5px"</#if>>
|
||||||
|
<#include "individual-iconControls.ftl">
|
||||||
|
</span>
|
||||||
|
<#if editable && profilePageTypesEnabled >
|
||||||
|
<#include "individual-profilePageTypes.ftl">
|
||||||
|
</#if>
|
||||||
|
</header>
|
||||||
|
<!-- Positions -->
|
||||||
|
<#include "individual-positions.ftl">
|
||||||
|
|
||||||
|
<!-- Overview -->
|
||||||
|
<#if !editable>
|
||||||
|
<p></p>
|
||||||
|
</#if>
|
||||||
|
<#include "individual-overview.ftl">
|
||||||
|
|
||||||
|
<!-- Research Areas -->
|
||||||
|
<#include "individual-researchAreas.ftl">
|
||||||
|
|
||||||
|
<!-- Geographic Focus -->
|
||||||
|
<#include "individual-geographicFocus.ftl">
|
||||||
|
|
||||||
|
<#include "individual-openSocial.ftl">
|
||||||
|
</section> <!-- end individual-info -->
|
||||||
|
</span></section> <!-- end individual-intro -->
|
||||||
|
|
||||||
|
<#assign nameForOtherGroup = "${i18n().other}">
|
||||||
|
<#if !editable>
|
||||||
|
<#-- We don't want to see the first name and last name unless we might edit them. -->
|
||||||
|
<#assign skipThis = propertyGroups.pullProperty("http://xmlns.com/foaf/0.1/firstName")!>
|
||||||
|
<#assign skipThis = propertyGroups.pullProperty("http://xmlns.com/foaf/0.1/lastName")!>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#assign author = propertyGroups.pullProperty("https://iph.ras.ru/text_structures#author")!>
|
||||||
|
<#if author.statements?has_content && author.type == "data">
|
||||||
|
<div class="author" style="list-style:none;">
|
||||||
|
<div class="label">Автор</div>
|
||||||
|
<@p.dataPropertyList author editable />
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#assign affiliation = propertyGroups.pullProperty("https://iph.ras.ru/text_structures#affiliation")!>
|
||||||
|
<#if affiliation.statements?has_content && affiliation.type == "data">
|
||||||
|
<div class="affiliation" style="list-style:none;">
|
||||||
|
<div class="label">Аффилиация</div>
|
||||||
|
<@p.dataPropertyList affiliation editable />
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#assign rubrics = propertyGroups.pullProperty("https://iph.ras.ru/relationships#belongsTo")!>
|
||||||
|
<#if rubrics?has_content >
|
||||||
|
<div class="label">Относится к: <@p.addLink rubrics editable /> <@p.verboseDisplay rubrics /> </div>
|
||||||
|
<#if rubrics.statements?has_content >
|
||||||
|
<div class="rubrics" style="list-style:none;">
|
||||||
|
<@p.objectProperty rubrics editable />
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#assign keywords = propertyGroups.pullProperty("https://iph.ras.ru/text_structures#keywords")!>
|
||||||
|
<#if keywords?has_content >
|
||||||
|
<div class="label">Ключевые слова: <@p.addLink keywords editable /> <@p.verboseDisplay keywords /> </div>
|
||||||
|
<#if keywords.statements?has_content && keywords.type == "data">
|
||||||
|
<div class="keywords" style="list-style:none;">
|
||||||
|
<@p.dataPropertyList keywords editable />
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#assign htmlExcerpt = propertyGroups.pullProperty("https://iph.ras.ru/text_structures#htmlExcerpt")!>
|
||||||
|
<#if htmlExcerpt.statements?has_content && htmlExcerpt.type == "data">
|
||||||
|
<div class="htmlExcerpt" style="list-style:none;">
|
||||||
|
<@p.dataPropertyList htmlExcerpt editable />
|
||||||
|
<#-- object property -->
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#assign works = propertyGroups.pullProperty("https://iph.ras.ru/text_structures#works")!>
|
||||||
|
<#if works.statements?has_content && works.type == "data">
|
||||||
|
<br/>
|
||||||
|
<div class="works" style="list-style:none;">
|
||||||
|
<h2 class="label">Работы:</h2>
|
||||||
|
<@p.dataPropertyList works editable />
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#assign biblio= propertyGroups.pullProperty("https://iph.ras.ru/text_structures#bibliography")!>
|
||||||
|
<#if biblio.statements?has_content && biblio.type == "data">
|
||||||
|
<br/>
|
||||||
|
<div class="biblio" style="list-style:none;">
|
||||||
|
<h2 class="label">Литература:</h2>
|
||||||
|
<@p.dataPropertyList biblio editable />
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#-- <#include "individual-property-group-tabs.ftl"> -->
|
||||||
|
|
||||||
|
<#if profilePageTypesEnabled && (targetedView?has_content || user.loggedIn) >
|
||||||
|
<span id="quickViewLink" >
|
||||||
|
<a href="${urls.base}/display/${individual.localName}?destination=quickView" >
|
||||||
|
<img id="quickViewIcon" src="${urls.images}/individual/quickViewIcon.png" alt="${i18n().quick_view_icon}"/>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</#if>
|
||||||
|
<#if !editable>
|
||||||
|
<script>
|
||||||
|
var title = $('div#titleContainer').width();
|
||||||
|
var name = $('h1.vcard').width();
|
||||||
|
var total = parseInt(title,10) + parseInt(name,10);
|
||||||
|
if ( name < 280 && total > 600 ) {
|
||||||
|
var diff = total - 600;
|
||||||
|
$('div#titleContainer').width(title - diff);
|
||||||
|
}
|
||||||
|
else if ( name > 279 && name + title > 600 ) {
|
||||||
|
$('div#titleContainer').width('620');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</#if>
|
||||||
|
<script>
|
||||||
|
var imagesPath = '${urls.images}';
|
||||||
|
</script>
|
||||||
|
<#assign rdfUrl = individual.rdfUrl>
|
||||||
|
|
||||||
|
<#if rdfUrl??>
|
||||||
|
<script>
|
||||||
|
var individualRdfUrl = '${rdfUrl}';
|
||||||
|
</script>
|
||||||
|
</#if>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var individualUri = '${individual.uri!}';
|
||||||
|
var individualPhoto = '${individual.thumbNail!}';
|
||||||
|
var exportQrCodeUrl = '${urls.base}/qrcode?uri=${individual.uri!}';
|
||||||
|
var baseUrl = '${urls.base}';
|
||||||
|
var profileTypeData = {
|
||||||
|
processingUrl: '${urls.base}/edit/primitiveRdfEdit',
|
||||||
|
individualUri: '${individual.uri!}',
|
||||||
|
defaultProfileType: '${profileType!}'
|
||||||
|
};
|
||||||
|
var i18nStrings = {
|
||||||
|
errorProcessingTypeChange: '${i18n().error_processing_type_change}',
|
||||||
|
displayLess: '${i18n().display_less}',
|
||||||
|
displayMoreEllipsis: '${i18n().display_more_ellipsis}',
|
||||||
|
showMoreContent: '${i18n().show_more_content}',
|
||||||
|
verboseTurnOff: '${i18n().verbose_turn_off}',
|
||||||
|
standardviewTooltipOne: '${i18n().standardview_tooltip_one}',
|
||||||
|
standardviewTooltipTwo: '${i18n().standardview_tooltip_two}',
|
||||||
|
researchAreaTooltipOne: '${i18n().research_area_tooltip_one}',
|
||||||
|
researchAreaTooltipTwo: '${i18n().research_area_tooltip_two}'
|
||||||
|
};
|
||||||
|
var i18nStringsUriRdf = {
|
||||||
|
shareProfileUri: '${i18n().share_profile_uri}',
|
||||||
|
viewRDFProfile: '${i18n().view_profile_in_rdf}',
|
||||||
|
closeString: '${i18n().close}'
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/individual/individual.css" />',
|
||||||
|
'<link rel="stylesheet" href="${urls.base}/css/individual/individual-vivo.css" />',
|
||||||
|
'<link rel="stylesheet" href="${urls.base}/css/individual/individual-2column-view.css" />',
|
||||||
|
'<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.12.1.css" />',
|
||||||
|
'<link rel="stylesheet" type="text/css" href="${urls.base}/css/jquery_plugins/qtip/jquery.qtip.min.css" />')}
|
||||||
|
|
||||||
|
${headScripts.add('<script type="text/javascript" src="${urls.base}/js/tiny_mce/tiny_mce.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/qtip/jquery.qtip.min.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/js/json2.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.truncator.js"></script>')}
|
||||||
|
|
||||||
|
${scripts.add('<script async type="text/javascript" src="${urls.base}/js/individual/individualUriRdf.js"></script>',
|
||||||
|
'<script async type="text/javascript" src="${urls.base}/js/individual/individualQtipBubble.js"></script>',
|
||||||
|
'<script async type="text/javascript" src="${urls.base}/js/jquery-ui/js/jquery-ui-1.12.1.min.js"></script>',
|
||||||
|
'<script async type="text/javascript" src="${urls.base}/js/individual/individualUtils.js?vers=1.5.1"></script>',
|
||||||
|
'<script async type="text/javascript" src="${urls.base}/js/individual/moreLessController.js"></script>',
|
||||||
|
'<script async type="text/javascript" src="${urls.base}/js/individual/individualProfilePageType.js"></script>',
|
||||||
|
'<script async type="text/javascript" src="${urls.base}/js/imageUpload/imageUploadUtils.js"></script>',
|
||||||
|
'<script async type="text/javascript" src="https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js"></script>',
|
||||||
|
'<script async type="text/javascript" src="//cdn.plu.mx/widget-popup.js"></script>')}
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
i18n_confirmDelete = "${i18n().confirm_delete}";
|
||||||
|
</script>
|
|
@ -0,0 +1,42 @@
|
||||||
|
<#-- $This file is distributed under the terms of the license in LICENSE$ -->
|
||||||
|
|
||||||
|
<#--
|
||||||
|
|
||||||
|
This version of individual--foaf-person.ftl is a "router" template. The original VIVO
|
||||||
|
version of this template now resides in the /themes/wilma/templates directory.
|
||||||
|
|
||||||
|
This version of the template is used when the profile page types feature is enabled.
|
||||||
|
This template serves to "rout" the user to the correct template based (1) the
|
||||||
|
profile page type of the foaf person being displayed or (2) the targeted view that
|
||||||
|
the user wants to see. For example, when a user is routed to a quick view template,
|
||||||
|
the user has the option of displaying the full view. If the user chooses that option,
|
||||||
|
the targetedView variable gets set.
|
||||||
|
|
||||||
|
This template could also be used to load just the "individual--foaf-person-2column.ftl"
|
||||||
|
without enabling profile page types. "individual--foaf-person-2column.ftl" is a slightly
|
||||||
|
different design than the "individual--foaf-person.ftl" template in the themes/wilma
|
||||||
|
directory.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<#include "individual-setup.ftl">
|
||||||
|
|
||||||
|
${scripts.add('<script async type="text/javascript" src="https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js"></script>')}
|
||||||
|
${scripts.add('<script async type="text/javascript" src="//cdn.plu.mx/widget-popup.js"></script>')}
|
||||||
|
|
||||||
|
<#assign selectedTemplate = "elenphExcerpt-internal.ftl" >
|
||||||
|
|
||||||
|
<#if profilePageTypesEnabled >
|
||||||
|
<#assign profilePageType = profileType >
|
||||||
|
|
||||||
|
<#-- targetedView takes precedence over the profilePageType. -->
|
||||||
|
|
||||||
|
<#if targetedView?has_content>
|
||||||
|
<#if targetedView != "standardView">
|
||||||
|
<#assign selectedTemplate = "individual--foaf-person-quickview.ftl" >
|
||||||
|
</#if>
|
||||||
|
<#elseif profilePageType == "quickView" >
|
||||||
|
<#assign selectedTemplate = "individual--foaf-person-quickview.ftl" >
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#include selectedTemplate >
|
|
@ -0,0 +1,48 @@
|
||||||
|
<#-- $This file is distributed under the terms of the license in LICENSE$ -->
|
||||||
|
<#-- Default individual search view -->
|
||||||
|
|
||||||
|
<#import "lib-vivo-properties.ftl" as p>
|
||||||
|
|
||||||
|
<#-- <@dumpAll /> -->
|
||||||
|
<div class="virtualArticlePart" style="display:none;">
|
||||||
|
<#list excerptInfo as excerptProperties>
|
||||||
|
<#if excerptProperties.property == "https://iph.ras.ru/text_structures#htmlExcerpt">
|
||||||
|
<#assign excerptText = excerptProperties.value >
|
||||||
|
</#if>
|
||||||
|
<#if excerptProperties.property == "http://www.w3.org/2000/01/rdf-schema#label">
|
||||||
|
<#assign excerptTextName = excerptProperties.value >
|
||||||
|
</#if>
|
||||||
|
<#if excerptProperties.property == "https://iph.ras.ru/text_structures#author">
|
||||||
|
<#assign excerptAuthor = excerptProperties.value >
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
<#if excerptText?? && excerptTextName?? && excerptTextName?has_content && excerptText?has_content>
|
||||||
|
<button type="button" style="border:none;padding: 18px;width: 100%; text-align:left;" class="collapsible">${excerptTextName}</button>
|
||||||
|
<div class="htmlExcerpt" style="list-style:none; display:none;">
|
||||||
|
${excerptText}
|
||||||
|
<#if excerptAuthor?? && excerptAuthor?has_content>
|
||||||
|
<div class="authors" style="display:block;float:right; margin:15px;">
|
||||||
|
${excerptAuthor}
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
<#list excerptInfo as excerptProperties>
|
||||||
|
<#if excerptProperties.property == "https://iph.ras.ru/text_structures#works">
|
||||||
|
<div class="virtualArticleWork" style="display:none;">${excerptProperties.value}</div>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
<#list excerptInfo as excerptProperties>
|
||||||
|
<#if excerptProperties.property == "https://iph.ras.ru/text_structures#bibliography">
|
||||||
|
<div class="virtualArticleBibliography" style="display:none;">${excerptProperties.value}</div>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="excerptSearchResult">
|
||||||
|
<a href="${individual.profileUrl}" title="${i18n().individual_name}">${individual.name}</a>
|
||||||
|
<@p.displayTitle individual />
|
||||||
|
<p class="snippet">${individual.snippet}</p>
|
||||||
|
</div>
|
131
webapp/src/main/webapp/templates/freemarker/rubric.ftl
Normal file
131
webapp/src/main/webapp/templates/freemarker/rubric.ftl
Normal file
|
@ -0,0 +1,131 @@
|
||||||
|
<#import "lib-vivo-properties.ftl" as vp>
|
||||||
|
<#include "individual-setup.ftl">
|
||||||
|
|
||||||
|
<section id="individual-intro" class="vcard person" role="region">
|
||||||
|
<span itemscope itemtype="http://schema.org/Person">
|
||||||
|
<section id="individual-info" ${infoClass!} role="region" style="width: 100%;">
|
||||||
|
<#include "individual-adminPanel.ftl">
|
||||||
|
<header>
|
||||||
|
<#if relatedSubject??>
|
||||||
|
<h2>${relatedSubject.relatingPredicateDomainPublic} ${i18n().for} ${relatedSubject.name}</h2>
|
||||||
|
<p><a href="${relatedSubject.url}" title="${i18n().return_to(relatedSubject.name)}">← ${i18n().return_to(relatedSubject.name)}</a></p>
|
||||||
|
<#else>
|
||||||
|
<h1 itemprop="name" class="vcard foaf-person fn" <#if !editable>style="float:left;width:100%;border-right:1px solid #A6B1B0;"</#if>>
|
||||||
|
<@p.label individual editable labelCount localesCount/>
|
||||||
|
</h1>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#if editable && profilePageTypesEnabled >
|
||||||
|
<#include "individual-profilePageTypes.ftl">
|
||||||
|
</#if>
|
||||||
|
</header>
|
||||||
|
</section>
|
||||||
|
</span>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<#assign parent = propertyGroups.pullProperty("https://iph.ras.ru/relationships#hasParent")!>
|
||||||
|
<#if parent?has_content>
|
||||||
|
<div class="label">Родительская рубрика<#if !parent.statements?has_content> <@p.addLink parent editable /></#if> <@p.verboseDisplay parent /></div>
|
||||||
|
<#if parent.statements?has_content >
|
||||||
|
<div style="list-style:none;" class="parentRubric">
|
||||||
|
<@p.objectProperty parent editable />
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#if editable >
|
||||||
|
|
||||||
|
<#assign order = propertyGroups.pullProperty("https://iph.ras.ru/relationships#rubricOrder")!>
|
||||||
|
<#if order?has_content>
|
||||||
|
<div class="label">Порядок рубрики<#if !order.statements?has_content> <@p.addLink order editable /></#if> <@p.verboseDisplay order /></div>
|
||||||
|
<#if order.statements?has_content >
|
||||||
|
<div style="list-style:none;" class="rubricOrder">
|
||||||
|
<@p.dataPropertyList order editable />
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#if childRubrics?has_content>
|
||||||
|
<button type="button" class="collapsible" style="border:none;padding: 18px;width: 100%;text-align:left;">Подрубрики</button>
|
||||||
|
<div style="display:none;">
|
||||||
|
<#list childRubrics as childRubric>
|
||||||
|
<#if childRubric?has_content >
|
||||||
|
<div style="list-style:none;border:none;padding: 18px;width: 100%;text-align:left;" class="childRubric">
|
||||||
|
<a href="${urls.base}/individual?uri=${childRubric.rubricID?url}"">${childRubric.rubricName}</a>
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#if childArticles?has_content>
|
||||||
|
<button type="button" class="collapsible" style="border:none;padding: 18px;width: 100%;text-align:left;">Статьи в подрубриках</button>
|
||||||
|
<div style="display:none;">
|
||||||
|
<#list childArticles as childArticle>
|
||||||
|
<#if childArticle?has_content >
|
||||||
|
<div style="list-style:none;border:none;padding: 18px;width: 100%;text-align:left;" class="childArticle">
|
||||||
|
<a href="${urls.base}/individual?uri=${childArticle.childArticleID?url}"">${childArticle.childArticleName}</a>
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#if childExcerpts?has_content>
|
||||||
|
<button type="button" class="collapsible" style="border:none;padding: 18px;width: 100%;text-align:left;">Отрывки в подрубриках</button>
|
||||||
|
<div style="display:none;">
|
||||||
|
<#list childExcerpts as childExcerpt>
|
||||||
|
<#if childExcerpt?has_content >
|
||||||
|
<div style="list-style:none;border:none;padding: 18px;width: 100%;text-align:left;" class="childExcerpt">
|
||||||
|
<a href="${urls.base}/individual?uri=${childExcerpt.childExcerptID?url}"">${childExcerpt.childExcerptName}</a>
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#if articles?has_content>
|
||||||
|
<button type="button" class="collapsible" style="border:none;padding: 18px;width: 100%;text-align:left;">Статьи в данной рубрике</button>
|
||||||
|
<div class="articles" style="display:none;">
|
||||||
|
<#list articles as article>
|
||||||
|
<#if article?has_content >
|
||||||
|
<div style="list-style:none;border:none;padding: 18px;width: 100%;text-align:left;" class="article">
|
||||||
|
<a href="${urls.base}/individual?uri=${article.articleID?url}"">${article.articleName}</a>
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#if excerpts?has_content>
|
||||||
|
<button type="button" class="collapsible" style="border:none;padding: 18px;width: 100%;text-align:left;">Отрывки в данной рубрике</button>
|
||||||
|
<div style="display:none;" class="excerpts">
|
||||||
|
<#list excerpts as excerpt>
|
||||||
|
<#if excerpt?has_content >
|
||||||
|
<div style="list-style:none;border:none;padding: 18px;width: 100%;text-align:left;" class="excerpt">
|
||||||
|
<a href="${urls.base}/individual?uri=${excerpt.excerptID?url}"">${excerpt.excerptName}</a>
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var coll = document.getElementsByClassName("collapsible");
|
||||||
|
var i;
|
||||||
|
|
||||||
|
for (i = 0; i < coll.length; i++) {
|
||||||
|
coll[i].addEventListener("click", function() {
|
||||||
|
this.classList.toggle("active");
|
||||||
|
var content = this.nextElementSibling;
|
||||||
|
if (content.style.display === "block") {
|
||||||
|
content.style.display = "none";
|
||||||
|
} else {
|
||||||
|
content.style.display = "block";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
49
webapp/src/main/webapp/templates/freemarker/rubrics.ftl
Normal file
49
webapp/src/main/webapp/templates/freemarker/rubrics.ftl
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
<#list rubrics as rubric>
|
||||||
|
<#if !rubric.parentUri??>
|
||||||
|
<#assign childs = rubric.childs?number>
|
||||||
|
<button type="button" style="border:none;padding: 15px;text-align:left; width:100%;" class="collapsible">
|
||||||
|
<#if childs > 0>+</#if><a style="padding-left:15px;" href="individual?uri=${rubric.uri?url}">${rubric.name}</a></button>
|
||||||
|
<div class="rubricContents" style="display:none;">
|
||||||
|
<#if (childs > 0) >
|
||||||
|
<@nestedRubrics allrubrics=rubrics parentUri=rubric.uri deep=10 level=1 />
|
||||||
|
</#if>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var coll = document.getElementsByClassName("collapsible");
|
||||||
|
var i;
|
||||||
|
for (i = 0; i < coll.length; i++) {
|
||||||
|
coll[i].addEventListener("click", function() {
|
||||||
|
this.classList.toggle("active");
|
||||||
|
var content = this.nextElementSibling;
|
||||||
|
if (content.style.display === "block") {
|
||||||
|
content.style.display = "none";
|
||||||
|
} else {
|
||||||
|
content.style.display = "block";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<#macro nestedRubrics allrubrics parentUri deep level>
|
||||||
|
<#assign count = 0>
|
||||||
|
<#list allrubrics as innerRubric>
|
||||||
|
<#if innerRubric.parentUri?? && innerRubric.parentUri == parentUri>
|
||||||
|
<#assign childs = innerRubric.childs?number>
|
||||||
|
<#assign count = count + 1 >
|
||||||
|
<button type="button" style="border:none;padding: 15px 0px 15px ${15+15*level}px;width: 100%; text-align:left;" class="collapsible"><#if childs > 0>+</#if><a style="padding-left:15px;" href="individual?uri=${innerRubric.uri?url}">${innerRubric.name}</a></button>
|
||||||
|
<div class="rubricContents" style="display:none;">
|
||||||
|
<#if (deep > 1) && (childs > 0)>
|
||||||
|
<@nestedRubrics allrubrics=rubrics parentUri=innerRubric.uri deep=deep-1 level=level+1 />
|
||||||
|
</#if>
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
<#if count = childs >
|
||||||
|
<#break>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</#macro>
|
Loading…
Add table
Reference in a new issue