From 6fea9b520f54734d30b812092b791b656b26b7c2 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Tue, 2 Mar 2021 14:14:48 +0100 Subject: [PATCH] Cleaning up elenph excerpt template --- .../freemarker/elenphExcerpt-internal.ftl | 265 ---------------- .../templates/freemarker/elenphExcerpt.ftl | 297 +++++++++++++++--- 2 files changed, 262 insertions(+), 300 deletions(-) delete mode 100644 webapp/src/main/webapp/templates/freemarker/elenphExcerpt-internal.ftl diff --git a/webapp/src/main/webapp/templates/freemarker/elenphExcerpt-internal.ftl b/webapp/src/main/webapp/templates/freemarker/elenphExcerpt-internal.ftl deleted file mode 100644 index 5c5100bd..00000000 --- a/webapp/src/main/webapp/templates/freemarker/elenphExcerpt-internal.ftl +++ /dev/null @@ -1,265 +0,0 @@ -<#-- $This file is distributed under the terms of the license in LICENSE$ --> - -<#-- Individual profile page template for foaf:Person individuals --> - -<#-- <#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 > - -<#--Number of available locales--> -<#if !localesCount??> - <#assign localesCount = 1> - -<#--Number of distinct languages represented, with no language tag counting as a language, across labels--> -<#if !languageCount??> - <#assign languageCount = 1> - -<#assign qrCodeIcon = "qr-code-icon.png"> -<#assign visRequestingTemplate = "foaf-person-2column"> -<#--add the VIVO-ORCID interface --> -<#include "individual-orcidInterface.ftl"> -
-
- <#include "individual-adminPanel.ftl"> -
- <#if relatedSubject??> -

${relatedSubject.relatingPredicateDomainPublic} ${i18n().for} ${relatedSubject.name}

-

← ${i18n().return_to(relatedSubject.name)}

- <#else> -

style="float:left;border-right:1px solid #A6B1B0;"> - <#-- Label --> - <@p.label individual editable labelCount localesCount/> -

- <#-- 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> -

${title.name?capitalize!}

- <@p.verboseDisplay title /> - - <#list title.statements as statement> - <#if !editable > -
${statement.preferredTitle}
- <#else> - ${statement.preferredTitle} - <@p.editingLinks "${title.localName}" "${title.name}" statement editable title.rangeUri /> - - - - <#-- If preferredTitle is unpopulated, display mostSpecificTypes --> - <#if ! (title.statements)?has_content> - <@p.mostSpecificTypesPerson individual editable/> - - - style="top:5px"> - <#include "individual-iconControls.ftl"> - - <#if editable && profilePageTypesEnabled > - <#include "individual-profilePageTypes.ftl"> - -
- - <#include "individual-positions.ftl"> - - - <#if !editable> -

- - <#include "individual-overview.ftl"> - - - <#include "individual-researchAreas.ftl"> - - - <#include "individual-geographicFocus.ftl"> - - <#include "individual-openSocial.ftl"> -
-
- -<#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 !editable> -<#if authors??> - <#list authors as author> -
- <#if author.authorFamily??>${author.authorFamily} <#if author.authorGivenName??>${author.authorGivenName} - <#if author.orgName??> -
${author.orgName} - - <#if author.orgAddress??> -
- Адрес организации: <#if author.orgPostalCode??>${author.orgPostalCode}, ${author.orgAddress}  - - -
- - -<#else> - <#assign pubAuthors = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#hasAuthor")!> - <#if pubAuthors?has_content> -
Авторы: <@p.addLink pubAuthors editable /> <@p.verboseDisplay pubAuthors />
- <#if pubAuthors.statements?has_content > -
- <@p.objectProperty pubAuthors editable /> -
- - - - <#if articles?has_content> -
В составе статей:
-
- <#list articles as article> - <#if article?has_content > -
- ${article.articleName} -
- - -
- - - <#assign rubrics = propertyGroups.pullProperty("https://iph.ras.ru/relationships#belongsTo")!> - <#if rubrics?has_content> -
Относится к: <@p.addLink rubrics editable /> <@p.verboseDisplay rubrics />
- <#if rubrics.statements?has_content > -
- <@p.objectProperty rubrics editable /> -
- - - <#assign keywords = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#keywords")!> - <#if keywords?has_content > -
Ключевые слова: <@p.addLink keywords editable /> <@p.verboseDisplay keywords />
- <#if keywords.statements?has_content && keywords.type == "data"> -
- <@p.dataPropertyList keywords editable /> -
- - - <#assign htmlExcerpt = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#htmlExcerpt")!> - <#if htmlExcerpt?has_content > - <#if htmlExcerpt.statements?has_content && htmlExcerpt.type == "data"> -
- <@p.dataPropertyList htmlExcerpt editable /> - <#-- object property --> -
- <#else> -
Текст отрывка: <@p.addLink htmlExcerpt editable /> <@p.verboseDisplay htmlExcerpt />
- - - - <#assign works = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#works")!> - <#if works.statements?has_content || editable > -
-
-

Источники: <@p.addLink works editable /> <@p.verboseDisplay works />

- <@p.dataPropertyList works editable /> -
- - - <#assign biblio= propertyGroups.pullProperty("https://litvinovg.pro/text_structures#bibliography")!> - <#if biblio.statements?has_content || editable > -
-
-

Литература: <@p.addLink biblio editable /> <@p.verboseDisplay biblio />

- <@p.dataPropertyList biblio editable /> -
- - -<#-- <#include "individual-property-group-tabs.ftl"> --> - -<#if profilePageTypesEnabled && (targetedView?has_content || user.loggedIn) > - - - ${i18n().quick_view_icon} - - - -<#if !editable> - - - -<#assign rdfUrl = individual.rdfUrl> - -<#if rdfUrl??> - - - - -${stylesheets.add('', - '', - '', - '', - '')} - -${headScripts.add('', - '', - '', - '')} - -${scripts.add('', - '', - '', - '', - '', - '', - '', - '', - '')} - - diff --git a/webapp/src/main/webapp/templates/freemarker/elenphExcerpt.ftl b/webapp/src/main/webapp/templates/freemarker/elenphExcerpt.ftl index 893cbea3..75e92069 100644 --- a/webapp/src/main/webapp/templates/freemarker/elenphExcerpt.ftl +++ b/webapp/src/main/webapp/templates/freemarker/elenphExcerpt.ftl @@ -1,42 +1,269 @@ -<#-- $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('')} ${scripts.add('')} -<#assign selectedTemplate = "elenphExcerpt-internal.ftl" > +<#-- Individual profile page template for foaf:Person individuals --> -<#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" > - - <#elseif profilePageType == "quickView" > - <#assign selectedTemplate = "individual--foaf-person-quickview.ftl" > - + +<#-- <#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 > -<#include selectedTemplate > +<#--Number of available locales--> +<#if !localesCount??> + <#assign localesCount = 1> + +<#--Number of distinct languages represented, with no language tag counting as a language, across labels--> +<#if !languageCount??> + <#assign languageCount = 1> + +<#assign qrCodeIcon = "qr-code-icon.png"> +<#assign visRequestingTemplate = "foaf-person-2column"> +<#--add the VIVO-ORCID interface --> +<#include "individual-orcidInterface.ftl"> +
+
+ <#include "individual-adminPanel.ftl"> +
+ <#if relatedSubject??> +

${relatedSubject.relatingPredicateDomainPublic} ${i18n().for} ${relatedSubject.name}

+

← ${i18n().return_to(relatedSubject.name)}

+ <#else> +

style="float:left;border-right:1px solid #A6B1B0;"> + <#-- Label --> + <@p.label individual editable labelCount localesCount/> +

+ <#-- 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> +

${title.name?capitalize!}

+ <@p.verboseDisplay title /> + + <#list title.statements as statement> + <#if !editable > +
${statement.preferredTitle}
+ <#else> + ${statement.preferredTitle} + <@p.editingLinks "${title.localName}" "${title.name}" statement editable title.rangeUri /> + + + + <#-- If preferredTitle is unpopulated, display mostSpecificTypes --> + <#if ! (title.statements)?has_content> + <@p.mostSpecificTypesPerson individual editable/> + + + style="top:5px"> + <#include "individual-iconControls.ftl"> + + <#if editable && profilePageTypesEnabled > + <#include "individual-profilePageTypes.ftl"> + +
+ + <#include "individual-positions.ftl"> + + + <#if !editable> +

+ + <#include "individual-overview.ftl"> + + + <#include "individual-researchAreas.ftl"> + + + <#include "individual-geographicFocus.ftl"> + + <#include "individual-openSocial.ftl"> +
+
+ +<#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 !editable> +<#if authors??> + <#list authors as author> +
+ <#if author.authorFamily??>${author.authorFamily} <#if author.authorGivenName??>${author.authorGivenName} + <#if author.orgName??> +
${author.orgName} + + <#if author.orgAddress??> +
+ Адрес организации: <#if author.orgPostalCode??>${author.orgPostalCode}, ${author.orgAddress}  + + +
+ + +<#else> + <#assign pubAuthors = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#hasAuthor")!> + <#if pubAuthors?has_content> +
Авторы: <@p.addLink pubAuthors editable /> <@p.verboseDisplay pubAuthors />
+ <#if pubAuthors.statements?has_content > +
+ <@p.objectProperty pubAuthors editable /> +
+ + + + <#if articles?has_content> +
В составе статей:
+
+ <#list articles as article> + <#if article?has_content > +
+ ${article.articleName} +
+ + +
+ + + <#assign rubrics = propertyGroups.pullProperty("https://iph.ras.ru/relationships#belongsTo")!> + <#if rubrics?has_content> +
Относится к: <@p.addLink rubrics editable /> <@p.verboseDisplay rubrics />
+ <#if rubrics.statements?has_content > +
+ <@p.objectProperty rubrics editable /> +
+ + + <#assign keywords = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#keywords")!> + <#if keywords?has_content > +
Ключевые слова: <@p.addLink keywords editable /> <@p.verboseDisplay keywords />
+ <#if keywords.statements?has_content && keywords.type == "data"> +
+ <@p.dataPropertyList keywords editable /> +
+ + + <#assign htmlExcerpt = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#htmlExcerpt")!> + <#if htmlExcerpt?has_content > + <#if htmlExcerpt.statements?has_content && htmlExcerpt.type == "data"> +
+ <@p.dataPropertyList htmlExcerpt editable /> + <#-- object property --> +
+ <#else> +
Текст отрывка: <@p.addLink htmlExcerpt editable /> <@p.verboseDisplay htmlExcerpt />
+ + + + <#assign works = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#works")!> + <#if works.statements?has_content || editable > +
+
+

Источники: <@p.addLink works editable /> <@p.verboseDisplay works />

+ <@p.dataPropertyList works editable /> +
+ + + <#assign biblio= propertyGroups.pullProperty("https://litvinovg.pro/text_structures#bibliography")!> + <#if biblio.statements?has_content || editable > +
+
+

Литература: <@p.addLink biblio editable /> <@p.verboseDisplay biblio />

+ <@p.dataPropertyList biblio editable /> +
+ + +<#-- <#include "individual-property-group-tabs.ftl"> --> + +<#if profilePageTypesEnabled && (targetedView?has_content || user.loggedIn) > + + + ${i18n().quick_view_icon} + + + +<#if !editable> + + + +<#assign rdfUrl = individual.rdfUrl> + +<#if rdfUrl??> + + + + +${stylesheets.add('', + '', + '', + '', + '')} + +${headScripts.add('', + '', + '', + '')} + +${scripts.add('', + '', + '', + '', + '', + '', + '', + '', + '')} + +