From fa3027629ea4b74339ab1ddb42f1b02f90d567df Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Mon, 30 Nov 2020 21:56:38 +0100 Subject: [PATCH 001/235] Fix signature styles --- webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl b/webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl index 27e8665d..04ea2e7f 100644 --- a/webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl +++ b/webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl @@ -211,7 +211,7 @@ ${scripts.add('')} ${scripts.add('')} +${scripts.add('')} <#import "individual-qrCodeGenerator.ftl" as qr> <#import "lib-vivo-properties.ftl" as vp> <#--Number of labels present--> diff --git a/webapp/src/main/webapp/themes/iph/js/print.js b/webapp/src/main/webapp/themes/iph/js/print.js new file mode 100644 index 00000000..7c23db47 --- /dev/null +++ b/webapp/src/main/webapp/themes/iph/js/print.js @@ -0,0 +1,13 @@ +function printPageContent() { + var printContent = null; + var winPrint = window.open('','', 'left=0,top=0,width=800,height=900'); + winPrint.document.write("" + document.title + ""); + printContent = document.getElementById("wrapper-content"); + winPrint.document.write(printContent.innerHTML); + winPrint.document.write(""); + winPrint.document.close(); + winPrint.focus(); + setTimeout(function(){ + winPrint.print(); + }, 500); +} From acbd96f852a905c27b1fce5e6fa6d0084382f3a6 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Sun, 24 Jan 2021 21:18:21 +0100 Subject: [PATCH 019/235] Added compilation generator --- .../generators/CompilationGenerator.java | 274 ++++++++++++++++++ .../templates/freemarker/compilationForm.ftl | 91 ++++++ 2 files changed, 365 insertions(+) create mode 100644 api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/CompilationGenerator.java create mode 100644 webapp/src/main/webapp/templates/freemarker/compilationForm.ftl diff --git a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/CompilationGenerator.java b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/CompilationGenerator.java new file mode 100644 index 00000000..02d2e232 --- /dev/null +++ b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/CompilationGenerator.java @@ -0,0 +1,274 @@ +/* $This file is distributed under the terms of the license in LICENSE$ */ + +package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + +import javax.servlet.http.HttpSession; + +import org.apache.jena.rdf.model.Literal; +import org.apache.jena.vocabulary.RDFS; +import org.apache.jena.vocabulary.XSD; + +import edu.cornell.mannlib.vitro.webapp.auth.identifier.IdentifierBundle; +import edu.cornell.mannlib.vitro.webapp.auth.identifier.RequestIdentifiers; +import edu.cornell.mannlib.vitro.webapp.auth.identifier.common.HasAssociatedIndividual; +import edu.cornell.mannlib.vitro.webapp.beans.VClass; +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.controller.admin.ShowAuthController.AssociatedIndividual; +import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; +import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; + +/** + * Generates the edit configuration for a default property form. + * ModelChangePreprocessor creates the rdfs:label statement. + */ +public class CompilationGenerator extends BaseEditConfigurationGenerator implements EditConfigurationGenerator { + + private String associatedProfile; + private int excerptsCounter; + + @Override + public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, HttpSession session) { + + EditConfigurationVTwo config = new EditConfigurationVTwo(); + + associatedProfile = getAssociatedProfile(vreq); + excerptsCounter = parseCounter(vreq); + + config.setTemplate( "compilationForm.ftl" ); + + config.setN3Required( generateN3Required(vreq)); + //Optional because user may have selected either person or individual of another kind + //Person uses first name and last name whereas individual of other class would use label + //middle name is also optional + config.setN3Optional(generateN3Optional()); + + config.addNewResource("newCompilation", vreq.getWebappDaoFactory().getDefaultNamespace()); + config.addNewResource("newCompilationTOC", vreq.getWebappDaoFactory().getDefaultNamespace()); + for (int itemN = 1; itemN <= excerptsCounter; itemN++) { + String tocItem = "tocItem" + itemN; + config.addNewResource(tocItem, vreq.getWebappDaoFactory().getDefaultNamespace()); + String tocLevel = "tocLevel" + itemN; + config.addNewResource(tocLevel, vreq.getWebappDaoFactory().getDefaultNamespace()); + + String tocItemName = tocItem + "Name"; + config.addField(new FieldVTwo(). + setName(tocItemName). + setRangeDatatypeUri(XSD.xstring.getURI()). + setValidators(getCompilationNameValidators(vreq))); + + String tocLevelName = tocLevel + "Name"; + config.addField(new FieldVTwo(). + setName(tocLevelName). + setRangeDatatypeUri(XSD.xstring.getURI()). + setValidators(getCompilationNameValidators(vreq))); + + String excerpt = "excerpt" + itemN; + config.addField(new FieldVTwo(). + setName(excerpt). + setRangeDatatypeUri(XSD.xstring.getURI()). + setValidators(getCompilationNameValidators(vreq))); + + } + config.setUrisOnform(getUrisOnForm()); + config.setLiteralsOnForm( getLiteralsOnForm()); + setUrisAndLiteralsInScope(config); + //No SPARQL queries for existing since this is only used to create new, never for edit + + config.addField(new FieldVTwo(). + setName("newCompilationLabel"). + setRangeDatatypeUri(XSD.xstring.getURI()). + setValidators(getCompilationNameValidators(vreq))); + + + addFormSpecificData(config, vreq); + + config.addValidator(new AntiXssValidation()); + + //This combines the first and last name into the rdfs:label + // currently being done via javascript in the template. May use this again + // when/if updated to ISF ontology. tlw72 +// config.addModelChangePreprocessor(new FoafNameToRdfsLabelPreprocessor()); + + String formUrl = EditConfigurationUtils.getFormUrlWithoutContext(vreq); + config.setFormUrl(formUrl); + + //Note, the spaces are important - they were added by ProcessRdfFormController earlier + //as a means of ensuring the substitution worked correctly - as the regex expects spaces + config.setEntityToReturnTo(" ?newCompilation "); + prepare(vreq, config); + return config; + } + + private List getUrisOnForm() { + List uris = list(); + for (int itemN = 1; itemN <= excerptsCounter; itemN++) { + String excerpt = "excerpt" + itemN; + uris.add(excerpt); + } + return uris; + } + + private List getLiteralsOnForm() { + List literals = list( "newCompilationLabel"); + for (int itemN = 1; itemN <= excerptsCounter; itemN++) { + String tocItemName = "tocItem" + itemN + "Name"; + String tocLevelName = "tocLevel" + itemN + "Name"; + literals.add(tocItemName); + literals.add(tocLevelName); + } + return literals; + } + + private String getAssociatedProfile(VitroRequest vreq) { + String associatedProfile; + IdentifierBundle ids = RequestIdentifiers.getIdBundleForRequest(vreq); + Collection individualURIs = HasAssociatedIndividual.getIndividualUris(ids); + Iterator uriIterator = individualURIs.iterator(); + if (uriIterator.hasNext()) { + associatedProfile = uriIterator.next(); + } else { + associatedProfile = ""; + } + return associatedProfile; + } + + private List generateN3Required(VitroRequest vreq) { + StringBuilder n3Req = new StringBuilder(); + n3Req.append("@prefix ts: .\n"); + n3Req.append("?newCompilation <" + VitroVocabulary.RDF_TYPE + "> <" + getTypeOfNew(vreq) + "> .\n"); + n3Req.append("?newCompilation <" + RDFS.label.getURI() + "> ?newCompilationLabel .\n"); + n3Req.append("?newCompilation ts:hasTOC ?newCompilationTOC .\n"); + n3Req.append("?newCompilationTOC <" + VitroVocabulary.RDF_TYPE + "> ts:TOC .\n"); + n3Req.append("?newCompilationTOC <" + RDFS.label.getURI() + "> ?newCompilationLabel .\n"); + if (!associatedProfile.isEmpty()) { + n3Req.append("< " + associatedProfile + " > ts:compilatorOf ?newCompilation .\n"); + + } + //n3Req.append(); + + for (int itemN = 1; itemN <= excerptsCounter; itemN++) { + String tocItemVar = "?tocItem" + itemN ; + String tocItemNameVar = tocItemVar + "Name" ; + String tocLevelVar = "?tocLevel" + itemN ; + String tocLevelVarName = tocLevelVar + "Name" ; + String excerptVar = "?excerpt" + itemN ; + n3Req.append("?newCompilationTOC ts:hasTOCItem " + tocItemVar + " .\n"); + n3Req.append(tocItemVar + " <" + VitroVocabulary.RDF_TYPE + "> ts:TOCItem .\n"); + n3Req.append(tocItemVar + " <" + RDFS.label.getURI() + "> " + tocItemNameVar + " .\n"); + n3Req.append(tocItemVar + " ts:itemNumber " + itemN + " .\n"); + n3Req.append(tocItemVar + " ts:pointsTo " + tocLevelVar + " .\n"); + n3Req.append(tocLevelVar + " <" + VitroVocabulary.RDF_TYPE + "> ts:TOCLevel .\n"); + n3Req.append(tocLevelVar + " <" + RDFS.label.getURI() + "> " + tocLevelVarName + " .\n"); + n3Req.append(tocLevelVar + " ts:hasText " + excerptVar + ".\n"); + } + return list(n3Req.toString()); + } + private static Integer parseCounter(VitroRequest vreq) { + String text = vreq.getParameter("excerptsCount"); + if (text == null ) { + return 0; + } + try { + return Integer.parseInt(text); + } catch (NumberFormatException e) { + return 0; + } + } + + private List generateN3Optional() { + return getUrisOnForm(); + } + + + //first and last name have validators if is person is true + private List getCompilationNameValidators(VitroRequest vreq) { + List validators = new ArrayList(); + if(isCompilationType(vreq)) { + validators.add("nonempty"); + } + return validators; + } + + + + //Get parameter from HTTP request for type of new individual + private String getTypeOfNew(VitroRequest vreq) { + String typeUri = vreq.getParameter("typeOfNew"); + if( typeUri == null || typeUri.trim().isEmpty() ) + return getCompilationClassURI(); + else + return typeUri; + } + + //Form specific data + public void addFormSpecificData(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { + HashMap formSpecificData = new HashMap(); + formSpecificData.put("typeName", getTypeName(vreq)); + //Put in whether or not person type + if(isCompilationType(vreq)) { + //Doing this b/c unsure how freemarker will handle boolean value from JAVA + formSpecificData.put("isCompilationType", "true"); + } else { + formSpecificData.put("isCompilationType", "false"); + + } + formSpecificData.put("excerptsCounter", excerptsCounter); + + editConfiguration.setFormSpecificData(formSpecificData); + } + + private String getTypeName(VitroRequest vreq) { + String typeOfNew = getTypeOfNew(vreq); + VClass type = vreq.getWebappDaoFactory().getVClassDao().getVClassByURI(typeOfNew); + return type.getName(); + } + + public String getCompilationClassURI() { + return "https://litvinovg.pro/text_structures#compilation"; + } + + public boolean isCompilationType(VitroRequest vreq) { + WebappDaoFactory wdf = vreq.getWebappDaoFactory(); + Boolean isCompilationType = Boolean.FALSE; + String foafPersonType = getCompilationClassURI(); + String typeOfNew = getTypeOfNew(vreq); + List superTypes = wdf.getVClassDao().getAllSuperClassURIs(typeOfNew); + //add the actual type as well so we can add that for the list to be checked + superTypes.add(typeOfNew); + if( superTypes != null ){ + for( String typeUri : superTypes){ + if( foafPersonType.equals(typeUri)) { + isCompilationType = Boolean.TRUE; + break; + } + } + } + return isCompilationType; + } + private void setUrisAndLiteralsInScope(EditConfigurationVTwo editConfiguration) { + HashMap> urisInScope = new HashMap>(); + //note that at this point the subject, predicate, and object var parameters have already been processed + urisInScope.put(editConfiguration.getVarNameForSubject(), + Arrays.asList(new String[]{editConfiguration.getSubjectUri()})); + urisInScope.put(editConfiguration.getVarNameForPredicate(), + Arrays.asList(new String[]{editConfiguration.getPredicateUri()})); + editConfiguration.setUrisInScope(urisInScope); + //Uris in scope include subject, predicate, and object var + + editConfiguration.setLiteralsInScope(new HashMap>()); + } + + private String N3_PREFIX = "@prefix foaf: .\n"; +} diff --git a/webapp/src/main/webapp/templates/freemarker/compilationForm.ftl b/webapp/src/main/webapp/templates/freemarker/compilationForm.ftl new file mode 100644 index 00000000..59c6cd8c --- /dev/null +++ b/webapp/src/main/webapp/templates/freemarker/compilationForm.ftl @@ -0,0 +1,91 @@ +<#-- $This file is distributed under the terms of the license in LICENSE$ --> + +<#-- Template for adding a new individual from the Site Admin page: VIVO version --> + +<#import "lib-vivo-form.ftl" as lvf> + +<#--Retrieve certain edit configuration information--> +<#assign typeName = editConfiguration.pageData.typeName /> +<#assign isCompilationType = editConfiguration.pageData.isCompilationType /> + +<#--Get existing value for specific data literals and uris--> +<#assign newCompilationLabel = lvf.getFormFieldValue(editSubmission, editConfiguration, "newCompilationLabel")/> +<#assign excerptsCounter = editConfiguration.pageData.excerptsCounter/> + + + +<#--If edit submission exists, then retrieve validation errors if they exist--> +<#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content> + <#assign submissionErrors = editSubmission.validationErrors/> + + + +

${i18n().create_new} ${typeName}

+ + +<#if submissionErrors?has_content > + + + +<#assign requiredHint = " *" /> + +
+ +
+ + <#if isCompilationType = "true"> +

+ + +

+ <#if excerptsCounter > 0 > + <#list 1..excerptsCounter as i> +

+ + +

+

+ + +

+

+ + +

+ + + + <#else> +

+ + +

+ + +

+ + + ${i18n().or} ${i18n().cancel_link} +

+ +

* ${i18n().required_fields}

+ +
+
+ +${stylesheets.add('')} +${scripts.add('')} From b6927cb1289b56a3831100972139046166fde377 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Sun, 24 Jan 2021 21:19:50 +0100 Subject: [PATCH 020/235] Added compilation to text structures ontology --- .../rdf/tbox/filegraph/text_structures.owl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl b/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl index 4431e15b..556cb5f2 100644 --- a/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl +++ b/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl @@ -123,6 +123,14 @@ + + + + + + Compilation + edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.CompilationGenerator + @@ -223,6 +231,16 @@ true + + compilatorOf + + + + + + true + From 0a6f45cd02287462a1c4e31640c04930710d755c Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Sun, 24 Jan 2021 21:56:09 +0100 Subject: [PATCH 021/235] Added template to display compilation --- .../everytime/compilationDataGetters.n3 | 144 ++++++++++++++++++ .../rdf/tbox/filegraph/text_structures.owl | 1 + 2 files changed, 145 insertions(+) create mode 100644 home/src/main/resources/rdf/display/everytime/compilationDataGetters.n3 diff --git a/home/src/main/resources/rdf/display/everytime/compilationDataGetters.n3 b/home/src/main/resources/rdf/display/everytime/compilationDataGetters.n3 new file mode 100644 index 00000000..eb0564b6 --- /dev/null +++ b/home/src/main/resources/rdf/display/everytime/compilationDataGetters.n3 @@ -0,0 +1,144 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix vitro: . +@prefix xsd: . +@prefix ts_: . +@prefix display: . + + + display:hasDataGetter display:getCompilationExcerptsContentDataGetter . + + display:hasDataGetter display:getCompilationExcerptPathsDataGetter . + + display:hasDataGetter display:getCompilationWorksDataGetter . + + display:hasDataGetter display:getCompilationBibliographyDataGetter . + + display:hasDataGetter display:getCompilationAuthorsDataGetter . + + display:hasDataGetter display:getCompilationRubricsDataGetter . + +display:getCompilationExcerptsContentDataGetter + a ; + display:saveToVar "excerpts"; + display:query + """ + PREFIX rdfs: + PREFIX ts_: + SELECT ?elenphExcerpt ?htmlLabel ?htmlContent (COUNT (distinct ?excerptWorks) as ?worksCounter) (COUNT (distinct ?excerptBibliography) as ?bibliographyCounter) + WHERE { + ?individualURI ts_:hasTOC ?toc . + ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt . + ?elenphExcerpt ts_:htmlExcerpt ?htmlContent . + ?elenphExcerpt rdfs:label ?htmlLabel . + OPTIONAL{ ?elenphExcerpt ts_:works ?excerptWorks . } + OPTIONAL{ ?elenphExcerpt ts_:bibliography ?excerptBibliography . } + } GROUP BY ?elenphExcerpt ?htmlLabel ?htmlContent ORDER BY ?elenphExcerpt + """ . + +display:getCompilationExcerptPathsDataGetter + a ; + display:saveToVar "paths"; + display:query + """ + PREFIX rdfs: + PREFIX rdf: + PREFIX ts_: + SELECT (GROUP_CONCAT(substr(concat("000",str(?outline)),strlen(str(?outline))); SEPARATOR = ".") AS ?path ) ?tocElement ?elenphExcerpt + WHERE { + ?individualURI ts_:hasTOC ?toc . + ?toc 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 ?tocElement + WHERE { + ?individualURI ts_:hasTOC ?toc . + ?toc (ts_:hasTOCItem/ts_:pointsTo)+ ?tocElement . + ?tocElement rdf:type ts_:TOCLevel . + } + } + } GROUP BY ?tocElement ?elenphExcerpt ORDER BY ?path + """ . + +display:getCompilationBibliographyDataGetter + a ; + display:saveToVar "bibliography"; + display:query + """ + PREFIX rdfs: + PREFIX ts_: + PREFIX rdf: + SELECT DISTINCT ?bibliography ?elenphExcerpt + WHERE { + ?individualURI ts_:hasTOC ?toc . + ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt . + ?elenphExcerpt ts_:bibliography ?bibliography . + } ORDER BY ?bibliography + """ . + +display:getCompilationWorksDataGetter + a ; + display:saveToVar "works"; + display:query + """ + PREFIX rdfs: + PREFIX ts_: + PREFIX rdf: + SELECT DISTINCT ?works ?elenphExcerpt + WHERE { + ?individualURI ts_:hasTOC ?toc . + ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt . + ?elenphExcerpt ts_:works ?works . + } ORDER BY ?works + """ . + +display:getCompilationAuthorsDataGetter + a ; + display:saveToVar "authors"; + display:query + """ + PREFIX rdfs: + PREFIX ts_: + PREFIX rdf: + SELECT DISTINCT ?authorInitials ?authorFamily ?authorGivenName ?orgName ?orgPostalCode ?orgAddress + WHERE { + ?individualURI ts_:hasTOC ?toc . + ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt . + ?elenphExcerpt ts_:hasAuthor ?participant . + ?participant ts_:participantFamily ?authorFamily . + ?participant ts_:participantInitials ?authorInitials . + ?participant ts_:participantGivenName ?authorGivenName . + OPTIONAL { ?participant ts_:affiliatedWith ?organization . + OPTIONAL { ?organization ts_:officialOrganizationName ?orgName } . + OPTIONAL { ?organization ts_:organizationPostalCode ?orgPostalCode } . + OPTIONAL { ?organization ts_:organizationAddress ?orgAddress } . + } + + } ORDER BY ?authorFamily + """ . + +display:getCompilationRubricsDataGetter + a ; + display:saveToVar "rubrics"; + display:query + """ + PREFIX rdfs: + PREFIX ts_: + PREFIX rdf: + PREFIX pr: + SELECT DISTINCT ?rubricID ?rubricName + WHERE { + ?uri ts_:hasTOC ?toc . + ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?artExcerpt . + ?artExcerpt pr:belongsTo ?rubricID . + ?rubricID rdfs:label ?rubricName . + } ORDER BY ?rubricID + """ . + + diff --git a/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl b/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl index 556cb5f2..58c3dcde 100644 --- a/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl +++ b/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl @@ -128,6 +128,7 @@ + elenphAritcle.ftl Compilation edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.CompilationGenerator From 163240e98a18038dffc16c8ac0a98a891702ad2a Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Wed, 27 Jan 2021 16:47:07 +0100 Subject: [PATCH 022/235] Added code to create compilation from search results --- .../src/main/webapp/templates/freemarker/compilationForm.ftl | 4 ++-- .../webapp/templates/freemarker/elenphExcerptShortView.ftl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/src/main/webapp/templates/freemarker/compilationForm.ftl b/webapp/src/main/webapp/templates/freemarker/compilationForm.ftl index 59c6cd8c..366cb0ca 100644 --- a/webapp/src/main/webapp/templates/freemarker/compilationForm.ftl +++ b/webapp/src/main/webapp/templates/freemarker/compilationForm.ftl @@ -1,4 +1,4 @@ -<#-- $This file is distributed under the terms of the license in LICENSE$ --> +1<#-- $This file is distributed under the terms of the license in LICENSE$ --> <#-- Template for adding a new individual from the Site Admin page: VIVO version --> @@ -45,7 +45,7 @@
-
+ <#if isCompilationType = "true">

diff --git a/webapp/src/main/webapp/templates/freemarker/elenphExcerptShortView.ftl b/webapp/src/main/webapp/templates/freemarker/elenphExcerptShortView.ftl index f02ff303..ce2c0616 100644 --- a/webapp/src/main/webapp/templates/freemarker/elenphExcerptShortView.ftl +++ b/webapp/src/main/webapp/templates/freemarker/elenphExcerptShortView.ftl @@ -4,7 +4,7 @@ <#import "lib-vivo-properties.ftl" as p> <#-- <@dumpAll /> --> -

+
О проекте
diff --git a/webapp/src/main/webapp/themes/iph/templates/page.ftl b/webapp/src/main/webapp/themes/iph/templates/page.ftl index 7a7865c3..e0cbaf13 100644 --- a/webapp/src/main/webapp/themes/iph/templates/page.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/page.ftl @@ -11,13 +11,25 @@ <#include "identity.ftl"> <#include "menu.ftl"> - <#if !querytext?? > -
+ +
+ <#if individual?? > +
<#include "customsearchpanel.ftl" >
- <#include "contentWrapper.ftl"> + <#include "contentWrapper.ftl"> + <#if currentServlet != "individual" && currentServlet != "login"> +
+

filteredSearch

+
+ ${i18n().search_form} +
+ <#include "searchSelector.ftl"> +
+ + <#-- VIVO OpenSocial Extension by UCSF --> <#if openSocial??> <#if openSocial.visible> @@ -26,7 +38,7 @@ ${body} - +
<#include "footer.ftl"> From 51fcd68078e9d1348c39ae9156ffe361bcb9ede5 Mon Sep 17 00:00:00 2001 From: Svetlana Rastegina Date: Tue, 23 Feb 2021 22:14:56 +0100 Subject: [PATCH 075/235] Fixed main page styles on various screen resolutions. --- webapp/src/main/webapp/themes/iph/css/iph.css | 128 ++++++++++++------ .../webapp/themes/iph/templates/page-home.ftl | 38 +++--- 2 files changed, 103 insertions(+), 63 deletions(-) diff --git a/webapp/src/main/webapp/themes/iph/css/iph.css b/webapp/src/main/webapp/themes/iph/css/iph.css index c1e7834f..10f68a29 100644 --- a/webapp/src/main/webapp/themes/iph/css/iph.css +++ b/webapp/src/main/webapp/themes/iph/css/iph.css @@ -97,19 +97,21 @@ select, input[type="password"] { border: 0; font-size: 1rem; - font-family: "Roboto Italic"; + font-family: "Roboto"; padding: .5em; + font-style: italic; background: #fff; border: 1px dashed #000000; /*border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;*/ /*margin-bottom: .8em;*/ + outline: none; } select.form-control { padding: 5px 8px 5px 5px; - font-family: "Roboto Regular"; + font-family: "Roboto"; font-style: normal; -webkit-appearance: none; -moz-appearance: none; @@ -213,7 +215,7 @@ input#delete:visited { cursor: pointer; border: 0; margin: 0; - background-color: #398aac; + background-color: #DD9F00; color: #fff; font-size: 1rem; font-weight: normal; @@ -577,11 +579,12 @@ ul#header-nav a.log-out { color: #8B4513; text-align: right; width: 100%; - font-size: 1em; + font-size: 1.1rem; padding-left: 0px; padding-right: 0px; padding-top: 10px; - font-family: "Roboto Regular"; + font-family: "Roboto"; + font-style: normal; } #custom-search { width: 100%; @@ -834,7 +837,7 @@ ul#main-nav { } #main-nav li a { padding-left: 20px; - font-family: "Roboto Regular"; + font-family: "Roboto"; font-style: normal; padding-right: 20px; display: block; @@ -875,12 +878,12 @@ ul#main-nav { } -#Titleproject { +#titleProject { width: 100%; color: #8B4513; font-size: 1.4rem; padding: 0 0px 10px 25px; - font-family: "Roboto Regular"; + font-family: "Roboto"; background-image: url(../images/circle.png); background-repeat: no-repeat; background-position: left center; @@ -889,8 +892,8 @@ ul#main-nav { p.aboutProject { font-size: 0.8em; text-align: justify; - line-height: 1.3; - padding: 15px 10px 10px 10px; + line-height: 1.2; + padding: 15px 0px 10px 10px; border-top: 1px solid #8B4513; margin-right: 5px; text-indent: 35px; @@ -905,13 +908,12 @@ p.aboutProject { #contactDescription { width: 50%; - border-top: 1px solid #8B4513; + border-top: 1px solid #000000; } #registrationDescription { - width: 49%; - margin-left: 1%; - border-top: 1px solid #8B4513; + width: 50%; + border-top: 1px solid #000000; } @@ -1014,8 +1016,8 @@ h3.internal-auth:hover { -webkit-border-radius: 5px; } #login-form input.text-field:focus { - border: 1px solid rgba(57, 138, 172, .5); - background-color: rgba(57, 138, 172, .1); + border: 1px solid #8B4513; + background-color: #ffffff; } #login-form p.submit { width: 100px; @@ -1231,7 +1233,7 @@ input.search-homepage { p.request-account a, ul#header-nav a { color: #fff; - font-family: "Roboto Regular"; + font-family: "Roboto"; } #filter-search-nav a { border-bottom: 1px dotted #4f5656; @@ -1298,7 +1300,7 @@ section#home-stats.home-sections { padding-bottom: 0px; display: block; height: 1.5rem; - font-family: "Roboto Regular"; + font-family: "Roboto"; } @@ -1352,7 +1354,7 @@ section#home-stats.home-sections { height: 28px; vertical-align: middle; border-bottom: 1px dashed #ffffff; - font-family: "Roboto Regular"; + font-family: "Roboto"; } #stats .stats-type { @@ -1360,7 +1362,7 @@ section#home-stats.home-sections { padding-top: 0px; margin-top: 0px; font-size: 1.1em; - font-family: "Roboto Regular"; + font-family: "Roboto"; } #stats .stats-count span { @@ -1490,6 +1492,9 @@ div#adjImgHeight { div#footerWrapper >nav { width: 30%; + font-family: "Roboto"; + font-style: normal; + font-size: 0.8rem; } footer { @@ -1505,9 +1510,11 @@ footer { footer p.copyright { float: left; padding-top: 55px; - padding-left: 30px; + /*padding-left: 30px;*/ width: 30%; color: #ffffff; + font-family: "Roboto"; + font-style: normal; } footer p.copyright small { font-size: 1rem; @@ -1520,7 +1527,7 @@ ul#footer-nav { margin: 0; padding: 0; padding-top: 55px; - padding-right: 20px; + /*padding-right: 20px;*/ color: #ffffff; } ul#footer-nav li { @@ -1837,7 +1844,7 @@ li.individual { margin-right: 0; width: 100%; font-family: "IPH Astra Serif Regular"; - font-size: 1.4rem; + font-size: 1.2rem; } /* -------------------------------------------------> */ @@ -2183,13 +2190,13 @@ form.customForm p { section.accounts input.delete, section.accounts input.delete:visited { background-color: #FFF; - color: #2485AE; - border: 1px solid #96c5da; + color: #8B4513; + border: 1px solid #8B4513; } section.accounts input.delete:hover { color: #fff; - background-color: #88acbb; - border: 1px solid #88acbb; + background-color: #ffffff; + border: 1px solid #8B4513; } input.add-account, input.add-account:visited { @@ -2199,7 +2206,7 @@ input.add-account:visited { } input.add-account:hover { color: #fff; - background-color: #88acbb; + background-color: #ffffff; background: url(../images/addNewAccountOver.png) 0 center no-repeat; } .disabledSubmit { @@ -2329,7 +2336,7 @@ button.collapsible.active:focus { padding-left: 40px; } ul.dropdown li#user-menu a { - font-family: "Roboto Regular"; + font-family: "Roboto"; font-size: 1rem; } ul.dropdown ul.sub_menu { @@ -2494,80 +2501,81 @@ ul.dropdown ul.sub_menu li a:hover { } .login >div#articleWrapper >div#wrapper-content { width: 100%; +} + /* -------------------------------------------------> */ /* FONTS --------------------------------> */ /* -------------------------------------------------> */ @font-face { - font-family: "IPH Serif Regular"; + font-family: "IPH Serif"; font-weight: normal; src: url("../fonts/IPHSerif-Regular.woff2") format("woff2"), url("../fonts/IPHSerif-Regular.ttf") format("truetype"); } @font-face { - font-family: "IPH Serif Italic"; - font-weight: normal; + font-family: "IPH Serif"; + font-style: italic; src: url("../fonts/IPHSerif-Italic.woff2") format("woff2"), url("../fonts/IPHSerif-Italic.ttf") format("truetype"); } @font-face { - font-family: "IPH Serif Bold"; + font-family: "IPH Serif"; font-weight: bold; src: url("../fonts/IPHSerif-Bold.woff2") format("woff2"), url("../fonts/IPHSerif-Bold.ttf") format("truetype"); } - @font-face { - font-family: "IPH Serif Bold Italic"; + font-family: "IPH Serif"; font-style: italic; font-weight: bold; src: url("../fonts/IPHSerif-BoldItalic.woff2") format("woff2"), url("../fonts/IPHSerif-BoldItalic.ttf") format("truetype"); } @font-face { - font-family: "IPH Astra Serif Regular"; + font-family: "IPH Astra Serif"; font-weight: normal; src: url("../fonts/IPHAstraSerif-Regular.woff2") format("woff2"), url("../fonts/IPHAstraSerif-Regular.ttf") format("truetype"); } @font-face { - font-family: "IPH Astra Serif Bold"; + font-family: "IPH Astra Serif"; font-weight: bold; src: url("../fonts/IPHAstraSerif-Bold.woff2") format("woff2"), url("../fonts/IPHAstraSerif-Bold.ttf") format("truetype"); } @font-face { - font-family: "IPH Astra Serif Italic"; + font-family: "IPH Astra Serif"; font-style: italic; src: url("../fonts/IPHAstraSerif-Italic.woff2") format("woff2"), url("../fonts/IPHAstraSerif-Italic.ttf") format("truetype"); } @font-face { - font-family: "IPH Astra Serif Bold Italic"; + font-family: "IPH Astra Serif"; font-style: italic; font-weight: bold; src: url("../fonts/IPHAstraSerif-BoldItalic.woff2") format("woff2"), url("../fonts/IPHAstraSerif-BoldItalic.ttf") format("truetype"); } @font-face { - font-family: "Roboto Regular"; + font-family: "Roboto"; font-weight: normal; src: url("../fonts/Roboto-Regular.woff2") format("woff2"), url("../fonts/Roboto-Regular.ttf") format("truetype"); } @font-face { - font-family: "Roboto Bold"; + font-family: "Roboto"; font-weight: bold; src: url("../fonts/Roboto-Bold.woff2") format("woff2"), url("../fonts/Roboto-Bold.ttf") format("truetype"); } @font-face { - font-family: "Roboto Italic"; - font-weight: italic; + font-family: "Roboto"; + font-style: italic; src: url("../fonts/Roboto-Italic.woff2") format("woff2"), url("../fonts/Roboto-Italic.ttf") format("truetype"); } @font-face { - font-family: "Roboto Italic Bold"; + font-family: "Roboto"; font-style: italic; font-weight: bold; src: url("../fonts/Roboto-BoldItalic.woff2") format("woff2"), @@ -2576,6 +2584,11 @@ ul.dropdown ul.sub_menu li a:hover { /* -------------------------------------------------> */ /* SCREEN RESOLUTION --------------------------------> */ /* -------------------------------------------------> */ +@media screen and (max-width: 1630px) { + #querybuilder-container { + width: 70%; + } +} @media screen and (max-width: 1500px) { #branding { @@ -2593,7 +2606,11 @@ ul.dropdown ul.sub_menu li a:hover { #querybuilder-container { width: 70%; } + #footerWrapper { + width: 90%; + } } + @media screen and (max-width: 1300px) { #branding { width: 100%; @@ -2646,7 +2663,11 @@ ul.dropdown ul.sub_menu li a:hover { #switch-to-extended-searchform { width: 100%; } + footer p.copyright small { + font-size: 0.8rem; + } } + @media screen and (max-width: 900px) { h1.vivo-logo { background-size: 100%; @@ -2702,6 +2723,25 @@ ul.dropdown ul.sub_menu li a:hover { line-height: 1.3em; font-size: 0.92rem; } + p.aboutProject { + padding-right: 10px; + } + #simple-search-container { + width: 80%; + } + #titleProject { + text-align: center; + background-image: none; + } + #registrationDescription >p.TableContents { + padding-left: 10px !important; + } + footer p.copyright { + padding-left: 30px; + } + ul#footer-nav { + padding-right: 30px; + } } @media screen and (max-width: 800px) { diff --git a/webapp/src/main/webapp/themes/iph/templates/page-home.ftl b/webapp/src/main/webapp/themes/iph/templates/page-home.ftl index be83feb1..b533b050 100644 --- a/webapp/src/main/webapp/themes/iph/templates/page-home.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/page-home.ftl @@ -48,35 +48,35 @@
-
О проекте
+
О проекте
-

Электронная Философская Энциклопедия (ЭФЭ) — открытый научно-исследовательский проект Института философии РАН, ставящий своей целью анализ и систематизацию достижений философских наук за последние десятилетия, создание на этой основе обобщающей картины развития философской мысли в мире во всем ее тематическом и содержательном многообразии. В отличие от прежних энциклопедических изданий, ЭФЭ призвана рассмотреть достижения философии прошлого сквозь призму современных дискуссий, отразить новейшие результаты исследований российских учёных и актуальные тенденции гуманитарного знания. Она нацелена на обобщающий взгляд, который не только фиксирует многообразие имен, понятий, терминов, школ и произведений мировой философии, но, прежде всего, выявляет ее сложную, противоречивую и плюралистичную целостность. Одной из ее доминант является преодоление европоцентризма в понимании философии, всечеловеческое расширение духовного горизонта. Создаваемая ведущими специалистами, ЭФЭ должна способствовать повышению философской культуры общества, стать надежным и авторитетным источником информации, составив конкуренцию всевозможным "пиратским" сайтам, бездумно копирующим сведения из неизвестных и непроверенных источников. Как полноценное электронное издание с выходными данными и закрепленными за отдельными статьями DOI, ЭФЭ позволит специалистам представлять результаты своих исследований в виде энциклопедических статей.

+

Электронная Философская Энциклопедия (ЭФЭ) — открытый научно-исследовательский проект Института философии РАН, ставящий своей целью анализ и систематизацию достижений философских наук за последние десятилетия, создание на этой основе обобщающей картины развития философской мысли в мире во всем ее тематическом и содержательном многообразии. В отличие от прежних энциклопедических изданий, ЭФЭ призвана рассмотреть достижения философии прошлого сквозь призму современных дискуссий, отразить новейшие результаты исследований российских учёных и актуальные тенденции гуманитарного знания. Она нацелена на обобщающий взгляд, который не только фиксирует многообразие имен, понятий, терминов, школ и произведений мировой философии, но, прежде всего, выявляет ее сложную, противоречивую и плюралистичную целостность. Одной из ее доминант является преодоление европоцентризма в понимании философии, всечеловеческое расширение духовного горизонта. Создаваемая ведущими специалистами, ЭФЭ должна способствовать повышению философской культуры общества, стать надежным и авторитетным источником информации, составив конкуренцию всевозможным "пиратским" сайтам, бездумно копирующим сведения из неизвестных и непроверенных источников. Как полноценное электронное издание с выходными данными и закрепленными за отдельными статьями DOI, ЭФЭ позволит специалистам представлять результаты своих исследований в виде энциклопедических статей.

-

Редакционно-издательский совет

-

А.А. Гусейнов, В.А. Лекторский, А.В. Смирнов, С.В. Месяц

-

Редколлегия

-

Н.С. Автономова, Р.Г. Апресян, В.В. Бычков, В.Г. Буданов,
В.В. Васильев, П.А. Гаджикурбанова, А.Л. Доброхотов, А.А. Кара-Мурза,
И.Т. Касавин, В.Г. Лысенко, М.А. Маслин, В.В. Миронов,
Н.В. Мотрошилова, В.А. Подорога, Ю.В. Синеокая, М.Т. Степанянц,
В.Г. Федотова, В.К. Шохин, А.В. Черняев

-

Экспертный совет

-

Р.Г. Апресян, В.Г. Буданов, Г.В. Вдовина, И.Д. Джохадзе, Л.Б. Карелова,
В.Г. Лысенко, Н.Б. Маньковская, А.В. Павлов, В.В. Петров,
С.Ю. Рыков, Ю.В. Синеокая, М.А. Солопова, Ю.Е. Федорова,
В.И. Шалак, В.К. Шохин, А.В. Черняев

-

Научный редактор

-

Ю.Н. Попов

-

Научно-техническая редакция

-

М.В. Егорочкин, Г.В. Литвинов, С.Л. Гурко, С.В. Лаврентьева

+

Редакционно-издательский совет

+

А.А. Гусейнов, В.А. Лекторский, А.В. Смирнов, С.В. Месяц

+

Редколлегия

+

Н.С. Автономова, Р.Г. Апресян, В.В. Бычков, В.Г. Буданов,
В.В. Васильев, П.А. Гаджикурбанова, А.Л. Доброхотов, А.А. Кара-Мурза,
И.Т. Касавин, В.Г. Лысенко, М.А. Маслин, В.В. Миронов,
Н.В. Мотрошилова, В.А. Подорога, Ю.В. Синеокая, М.Т. Степанянц,
В.Г. Федотова, В.К. Шохин, А.В. Черняев

+

Экспертный совет

+

Р.Г. Апресян, В.Г. Буданов, Г.В. Вдовина, И.Д. Джохадзе, Л.Б. Карелова,
В.Г. Лысенко, Н.Б. Маньковская, А.В. Павлов, В.В. Петров,
С.Ю. Рыков, Ю.В. Синеокая, М.А. Солопова, Ю.Е. Федорова,
В.И. Шалак, В.К. Шохин, А.В. Черняев

+

Научный редактор

+

Ю.Н. Попов

+

Научно-техническая редакция

+

М.В. Егорочкин, Г.В. Литвинов, С.Л. Гурко, С.В. Лаврентьева

-

ISSN (Online): 2658-7092

-

Учредитель и издатель: Федеральное государственное бюджетное учреждение науки Институт философии Российской Академии наук.

-

Периодичность: 4 раза в год. Выходит с 2018 г.

-

Адрес учредителя и издателя: Российская Федерация, 109240, г. Москва, ул. Гончарная, д. 12, стр. 1.

-

Сайт: www.elenph.org

+

ISSN (Online): 2658-7092

+

Учредитель и издатель: Федеральное государственное бюджетное учреждение науки Институт философии Российской Академии наук.

+

Периодичность: 4 раза в год. Выходит с 2018 г.

+

Адрес учредителя и издателя: Российская Федерация, 109240, г. Москва, ул. Гончарная, д. 12, стр. 1.

+

Сайт: www.elenph.org

-

Энциклопедия зарегистрирована Федеральной службой по надзору в сфере связи, информационных технологий и массовых коммуникаций (Роскомнадзор). Свидетельство о регистрации СМИ: серия ЭЛ № ФС77 -74569 от 14.12.2018.

-

Энциклопедия включена в: базу ROAD (справочник электронных научных ресурсов с полностью открытым доступом к статьям).

+

Энциклопедия зарегистрирована Федеральной службой по надзору в сфере связи, информационных технологий и массовых коммуникаций (Роскомнадзор). Свидетельство о регистрации СМИ: серия ЭЛ № ФС77 -74569 от 14.12.2018.

+

Энциклопедия включена в: базу ROAD (справочник электронных научных ресурсов с полностью открытым доступом к статьям).

From 74545944e44a0e07b21e0f36e2b8e2479b7b7077 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Tue, 23 Feb 2021 22:31:14 +0100 Subject: [PATCH 076/235] Save query and rules at compilation creation --- .../generators/CompilationGenerator.java | 46 +++++++++++----- .../rdf/tbox/filegraph/text_structures.owl | 18 +++++++ .../templates/freemarker/compilationForm.ftl | 53 +++++++++++-------- 3 files changed, 80 insertions(+), 37 deletions(-) diff --git a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/CompilationGenerator.java b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/CompilationGenerator.java index f98d0366..d11c7213 100644 --- a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/CompilationGenerator.java +++ b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/CompilationGenerator.java @@ -53,13 +53,23 @@ public class CompilationGenerator extends BaseEditConfigurationGenerator impleme config.setTemplate( "compilationForm.ftl" ); config.setN3Required( generateN3Required(vreq)); + //Optional because user may have selected either person or individual of another kind //Person uses first name and last name whereas individual of other class would use label //middle name is also optional - config.setN3Optional(generateN3Optional()); + //config.setN3Optional(generateN3Optional()); config.addNewResource("newCompilation", vreq.getWebappDaoFactory().getDefaultNamespace()); config.addNewResource("newCompilationTOC", vreq.getWebappDaoFactory().getDefaultNamespace()); + config.addField(new FieldVTwo(). + setName("rawQueryString"). + setRangeDatatypeUri(XSD.xstring.getURI()). + setValidators(getCompilationNameValidators(vreq))); + config.addField(new FieldVTwo(). + setName("queryBuilderRules"). + setRangeDatatypeUri(XSD.xstring.getURI()). + setValidators(getCompilationNameValidators(vreq))); + for (int itemN = 1; itemN <= excerptsCounter; itemN++) { String tocItem = "tocItem" + itemN; config.addNewResource(tocItem, vreq.getWebappDaoFactory().getDefaultNamespace()); @@ -131,6 +141,8 @@ public class CompilationGenerator extends BaseEditConfigurationGenerator impleme String tocLevelName = "tocLevel" + itemN + "Name"; literals.add(tocItemName); literals.add(tocLevelName); + literals.add("rawQueryString"); + literals.add("queryBuilderRules"); } return literals; } @@ -153,10 +165,13 @@ public class CompilationGenerator extends BaseEditConfigurationGenerator impleme n3Req.append("@prefix ts: .\n"); n3Req.append("?newCompilation <" + VitroVocabulary.RDF_TYPE + "> <" + getTypeOfNew(vreq) + "> .\n"); n3Req.append("?newCompilation " + getModificationTime() + " .\n"); + n3Req.append("?newCompilation ts:rawQueryString ?rawQueryString .\n"); + n3Req.append("?newCompilation ts:queryBuilderRules ?queryBuilderRules .\n"); n3Req.append("?newCompilation <" + RDFS.label.getURI() + "> ?newCompilationLabel .\n"); n3Req.append("?newCompilation ts:hasTOC ?newCompilationTOC .\n"); n3Req.append("?newCompilationTOC <" + VitroVocabulary.RDF_TYPE + "> ts:TOC .\n"); n3Req.append("?newCompilationTOC <" + RDFS.label.getURI() + "> ?newCompilationLabel .\n"); + if (!associatedProfile.isEmpty()) { n3Req.append("<" + associatedProfile + "> ts:compilatorOf ?newCompilation .\n"); @@ -180,6 +195,16 @@ public class CompilationGenerator extends BaseEditConfigurationGenerator impleme } return list(n3Req.toString()); } + + private List generateN3Optional() { + List n3OptList = list(); + StringBuilder n3Opt = new StringBuilder(); + n3Opt.append("@prefix ts: .\n"); + n3Opt.append("?newCompilation ts:rawQueryString ?rawQueryString .\n"); + n3Opt.append("?newCompilation ts:queryBuilderRules ?queryBuilderRules .\n"); + n3OptList.add(n3Opt.toString()); + return n3OptList; + } private String getModificationTime() { SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); @@ -201,21 +226,14 @@ public class CompilationGenerator extends BaseEditConfigurationGenerator impleme } } - private List generateN3Optional() { - return getUrisOnForm(); - } - - //first and last name have validators if is person is true private List getCompilationNameValidators(VitroRequest vreq) { - List validators = new ArrayList(); - if(isCompilationType(vreq)) { - validators.add("nonempty"); - } - return validators; - } - - + List validators = new ArrayList(); + if (isCompilationType(vreq)) { + validators.add("nonempty"); + } + return validators; + } //Get parameter from HTTP request for type of new individual private String getTypeOfNew(VitroRequest vreq) { diff --git a/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl b/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl index 56294bb3..ef5adf7e 100644 --- a/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl +++ b/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl @@ -287,6 +287,24 @@ true + + Query Builder Rules + + + + + + + + + Raw Query String + + + + + + + diff --git a/webapp/src/main/webapp/templates/freemarker/compilationForm.ftl b/webapp/src/main/webapp/templates/freemarker/compilationForm.ftl index 366cb0ca..349fc0ba 100644 --- a/webapp/src/main/webapp/templates/freemarker/compilationForm.ftl +++ b/webapp/src/main/webapp/templates/freemarker/compilationForm.ftl @@ -48,32 +48,39 @@ <#if isCompilationType = "true"> -

- - -

+

+ + +

<#if excerptsCounter > 0 > - <#list 1..excerptsCounter as i> -

- - -

-

- - -

-

- - -

- - + <#list 1..excerptsCounter as i> +

+ + +

+

+ + +

+

+ + +

+ +

+ + +

+

+ + +

<#else> -

- - -

+

+ + +

From baf2353bfc330aeb674453a3cc82c98f964b81ac Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Tue, 23 Feb 2021 22:46:00 +0100 Subject: [PATCH 077/235] Run saved query from compilation page --- .../templates/freemarker/compilation.ftl | 20 ++++++++++++++++++ .../themes/iph/templates/queryBuilder.ftl | 21 ++++++++++++------- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/webapp/src/main/webapp/templates/freemarker/compilation.ftl b/webapp/src/main/webapp/templates/freemarker/compilation.ftl index 0bd10b6d..b5078d91 100644 --- a/webapp/src/main/webapp/templates/freemarker/compilation.ftl +++ b/webapp/src/main/webapp/templates/freemarker/compilation.ftl @@ -96,6 +96,26 @@ ${scripts.add(' - - -<#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('', + '', + '', + '', + '', + '', + '', + '', + '')} + + From 7b9214357225631b3a03ef231ca344e56d4a2406 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Tue, 2 Mar 2021 14:56:17 +0100 Subject: [PATCH 104/235] Refactoring expand scripts --- .../templates/freemarker/elenphAritcle.ftl | 35 +------------------ .../themes/iph/js/collapsible_elements.js | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+), 34 deletions(-) create mode 100644 webapp/src/main/webapp/themes/iph/js/collapsible_elements.js diff --git a/webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl b/webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl index 04ec2dbf..5185b706 100644 --- a/webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl +++ b/webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl @@ -8,6 +8,7 @@ ${scripts.add('')} ${scripts.add('')} ${scripts.add('')} +${scripts.add('')} <#import "individual-qrCodeGenerator.ftl" as qr> <#import "lib-vivo-properties.ftl" as vp> <#--Number of labels present--> @@ -233,22 +234,6 @@ ${scripts.add(' - <#if !editable> ')} ${scripts.add('')} ${scripts.add('')} +${scripts.add('')} <#import "individual-qrCodeGenerator.ftl" as qr> <#import "lib-vivo-properties.ftl" as vp> <#include "text-lib.ftl"> @@ -122,7 +123,7 @@ ${scripts.add(' <#-- <@dumpAll /> --> <#assign selectedTemplate = "individual--foaf-person-2column.ftl" > @@ -281,24 +266,6 @@ for (i = 0; i < coll.length; i++) { - - <#if !editable> ')} +
@@ -109,23 +111,3 @@
- - - - - diff --git a/webapp/src/main/webapp/templates/freemarker/rubrics.ftl b/webapp/src/main/webapp/templates/freemarker/rubrics.ftl index ae08ad5a..38364c94 100644 --- a/webapp/src/main/webapp/templates/freemarker/rubrics.ftl +++ b/webapp/src/main/webapp/templates/freemarker/rubrics.ftl @@ -1,3 +1,5 @@ +${scripts.add('')} + <#list rubrics as rubric> <#if !rubric.parentUri??> <#assign childs = rubric.childs?number> @@ -13,24 +15,6 @@ - - <#macro openButton childs> <#if childs > 0>
+
From 7eea134629cd738286b8c7a68b0a2f4683c259ba Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Tue, 2 Mar 2021 15:40:32 +0100 Subject: [PATCH 108/235] Fix authors sign --- .../main/webapp/templates/freemarker/compilation.ftl | 10 +++++----- .../main/webapp/templates/freemarker/elenphAritcle.ftl | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/webapp/src/main/webapp/templates/freemarker/compilation.ftl b/webapp/src/main/webapp/templates/freemarker/compilation.ftl index 10a6f348..cd1726ca 100644 --- a/webapp/src/main/webapp/templates/freemarker/compilation.ftl +++ b/webapp/src/main/webapp/templates/freemarker/compilation.ftl @@ -231,12 +231,12 @@ ${scripts.add('')} <#import "individual-qrCodeGenerator.ftl" as qr> <#import "lib-vivo-properties.ftl" as vp> +<#include "text-lib.ftl"> + <#--Number of labels present--> <#if !labelCount??> <#assign labelCount = 0 > @@ -94,11 +96,9 @@ ${scripts.add('
From 43ff4e44a8cc3406d22f2a2caa41cb1c1c749ce5 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Thu, 4 Mar 2021 16:01:50 +0100 Subject: [PATCH 123/235] Added table of contents js functions --- webapp/src/main/webapp/themes/iph/js/toc.js | 34 +++++++++++++++++++ .../webapp/themes/iph/templates/text-lib.ftl | 33 +++++++++--------- 2 files changed, 51 insertions(+), 16 deletions(-) create mode 100644 webapp/src/main/webapp/themes/iph/js/toc.js diff --git a/webapp/src/main/webapp/themes/iph/js/toc.js b/webapp/src/main/webapp/themes/iph/js/toc.js new file mode 100644 index 00000000..7f5d4434 --- /dev/null +++ b/webapp/src/main/webapp/themes/iph/js/toc.js @@ -0,0 +1,34 @@ + document.addEventListener('DOMContentLoaded', createTOC(), false); + + function createTOC(){ + var complexDocElement = document.getElementById("complexDocument"); + var tocElement = document.getElementById("tocPlaceHolder"); + + if (complexDocElement === null || tocElement === null){ + console.log("no complex document or no placeholder"); + return; + } + addItemsToTOC(complexDocElement,tocElement) + } + function addItemsToTOC(docPart, tocElement){ + var docPartChilds = docPart.childNodes; + for (var i = 0; i < docPartChilds.length; i++){ + var docPartChild = docPartChilds[i]; + if ( docPartChild.nodeType === Node.ELEMENT_NODE && docPartChild.classList.contains("documentPart")){ + var tocElementChild = createTOCItem(docPartChild, tocElement); + addItemsToTOC(docPartChild,tocElementChild); + } + } + } + function createTOCItem(docPart, tocElement){ + var newTOCElement = document.createElement("div"); + var anchor = docPart.getAttribute('id'); + var docPartButton = docPart.previousElementSibling; + var itemName = docPartButton.textContent; + var link = document.createElement("a"); + link.setAttribute("href","#" + anchor); + link.innerText = itemName; + newTOCElement.appendChild(link); + tocElement.appendChild(newTOCElement); + return newTOCElement; + } \ No newline at end of file diff --git a/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl b/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl index a63819ba..fad4c505 100644 --- a/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl @@ -53,7 +53,7 @@ <#macro arrangeDocumentParts > -
+
<#assign lastLevel = 0 > <#list paths as order> <#-- ${order.path} --> @@ -65,32 +65,33 @@ <#assign bibliographyCounter = excerptProperties.bibliographyCounter > - <@startDocumentPart order.level?number lastLevel/> + <@startDocumentPart order.level?number order.path lastLevel/> <#if excerptText?? && excerptTextName?? && excerptTextName?has_content && excerptText?has_content>
${excerptText} - <@arrangeSources works worksCounter?number order.elenphExcerpt /> - <@arrangeLiterature bibliography bibliographyCounter?number order.elenphExcerpt />
+ <@arrangeSources works worksCounter?number order.path order.elenphExcerpt /> + <@arrangeLiterature bibliography bibliographyCounter?number order.path order.elenphExcerpt /> <#assign lastLevel = order.level?number > <@endDocumentPart lastLevel /> + <@arrangeSources works works?size "anchor-all-sources" /> + <@arrangeLiterature bibliography bibliography?size "anchor-all-literature" />
- <@arrangeSources works works?size /> - <@arrangeLiterature bibliography bibliography?size /> + -<#macro startDocumentPart newLevel lastLevel=0 > +<#macro startDocumentPart newLevel path lastLevel=0 > <#assign depth = newLevel - lastLevel > <#if depth == 0> <@closeDocPart 1 /> - <@openDocPart 1 /> + <@openDocPart 1 path /> <#elseif depth > 0> - <@openDocPart depth /> + <@openDocPart depth path /> <#else > <@closeDocPart -depth+1 /> - <@openDocPart 1 /> + <@openDocPart 1 path /> @@ -107,17 +108,17 @@ -<#macro openDocPart count> +<#macro openDocPart count path > <#list 1..count as x> -
+
-<#macro arrangeSources sources counter filter="none"> +<#macro arrangeSources sources counter identifier filter="none"> <#if sources?? && sources?has_content && counter > 0> -
+
<#list sources as source> <#if filter == "none" || source.excerpt == filter >
@@ -129,10 +130,10 @@ -<#macro arrangeLiterature literature counter filter="none"> +<#macro arrangeLiterature literature counter identifier filter="none"> <#if literature?? && literature?has_content && counter > 0> -
+
<#list literature as literatureItem> <#if filter == "none" || literatureItem.excerpt == filter >
From b49f1694745c95442b15e0bba5fa5679c4e2161d Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Fri, 5 Mar 2021 00:04:59 +0100 Subject: [PATCH 124/235] Open parent document parts when go to part from TOC --- webapp/src/main/webapp/themes/iph/js/toc.js | 25 +++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/webapp/src/main/webapp/themes/iph/js/toc.js b/webapp/src/main/webapp/themes/iph/js/toc.js index 7f5d4434..8200dc0e 100644 --- a/webapp/src/main/webapp/themes/iph/js/toc.js +++ b/webapp/src/main/webapp/themes/iph/js/toc.js @@ -26,9 +26,30 @@ var docPartButton = docPart.previousElementSibling; var itemName = docPartButton.textContent; var link = document.createElement("a"); - link.setAttribute("href","#" + anchor); + link.setAttribute("href", "javascript:goToDocumentPart(\"" + anchor + "\");" ); link.innerText = itemName; newTOCElement.appendChild(link); tocElement.appendChild(newTOCElement); return newTOCElement; - } \ No newline at end of file + } + function goToDocumentPart(targetId){ + if (targetId ===""){ + return; + } + var targetNode = document.getElementById(targetId); + if (targetNode === null){ + console.log("document has no target node to go to") + return; + } + showParents(targetNode); + document.getElementById(targetId).scrollIntoView(); + } + function showParents(targetNode){ + if (targetNode != null && "complexDocument" !== targetNode.id){ + if (targetNode.style.display === "none") { + targetNode.style.display = "block"; + } + showParents(targetNode.parentElement); + } + } + \ No newline at end of file From 9e8ee4143813a2e56a8132fc70adf10170330dfa Mon Sep 17 00:00:00 2001 From: Svetlana Rastegina Date: Thu, 4 Mar 2021 13:47:41 +0100 Subject: [PATCH 125/235] Added print,save,export PDF buttons. --- webapp/src/main/webapp/themes/iph/css/iph.css | 36 +++++++++++++++++- .../themes/iph/images/expand_button.png | Bin 0 -> 665 bytes .../webapp/themes/iph/images/print-icon.png | Bin 0 -> 654 bytes .../webapp/themes/iph/images/save-icon.png | Bin 0 -> 532 bytes .../themes/iph/images/save-pdf-icon.png | Bin 0 -> 1193 bytes .../webapp/themes/iph/images/share-icon.png | Bin 1671 -> 1364 bytes .../themes/iph/templates/elenphAritcle.ftl | 11 +++--- .../main/webapp/themes/iph/templates/page.ftl | 4 +- .../themes/iph/templates/rightPanel.ftl | 9 +++++ 9 files changed, 50 insertions(+), 10 deletions(-) create mode 100644 webapp/src/main/webapp/themes/iph/images/expand_button.png create mode 100644 webapp/src/main/webapp/themes/iph/images/print-icon.png create mode 100644 webapp/src/main/webapp/themes/iph/images/save-icon.png create mode 100644 webapp/src/main/webapp/themes/iph/images/save-pdf-icon.png create mode 100644 webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl diff --git a/webapp/src/main/webapp/themes/iph/css/iph.css b/webapp/src/main/webapp/themes/iph/css/iph.css index e7ed4a5e..6aa66b03 100644 --- a/webapp/src/main/webapp/themes/iph/css/iph.css +++ b/webapp/src/main/webapp/themes/iph/css/iph.css @@ -1984,9 +1984,10 @@ h3.internal-auth { } #titleContainer { font-family: "IPH Astra Serif"; + width: auto!important; } #individual-info h1.fn { - font-size: 1.6rem; + font-size: 1.5rem; color: #595B5B; background-image: url(../images/circle_title.png); background-repeat: no-repeat; @@ -2636,7 +2637,38 @@ button#scrollToTopBtn:hover { background-repeat: no-repeat; background-position: top center; } - +span.iconControlsNotEditable { + position: relative; +} +.expandSwitch { + width: 30%; + font-family: "Roboto"; + font-size: 1rem; + text-align: right; + /*background-color: #000000;*/ + /*background-image: url(../images/expand_button.png); + background-repeat: no-repeat; + background-position: top center;*/ + padding-right: 5px; +} +#individual-info >header { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: flex-start; + width: 100%; + padding-bottom: 5px; +} +#articleTitleWrapper { + width: 70%; + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: flex-start; +} +#print { + all: unset; +} /* -------------------------------------------------> */ /* FONTS --------------------------------> */ /* -------------------------------------------------> */ diff --git a/webapp/src/main/webapp/themes/iph/images/expand_button.png b/webapp/src/main/webapp/themes/iph/images/expand_button.png new file mode 100644 index 0000000000000000000000000000000000000000..b5e1aac0c03d48b023f8d0f10c88f6543e34d43f GIT binary patch literal 665 zcmeAS@N?(olHy`uVBq!ia0y~yU^D@;)j8OJWaE}CazKhL$=lt9;Xep2*t>i(P=vF< zBeIx*fm;}a85w5HkpK#^mw5WRvOi^J;Smy5d)o^vgo zqTujAp8Lzv|KIz+Pj@bVHQ(#{$GQyTBDsMLu( zTrRBOkRYJ3ZDHpu=8fS@ELof)(iw}=){3oiZaAP2piQL%f%R( zt~2fCHwpYa>-u{Zjw>QJOo56_qd^kMjd#sV0*ifK+cGk3Wi11l^!D0H_l5%z3DZw# zX7xqxRd-m>df=|~tQ9vGfmWO@Tj|?yV3NZ(prYv(wQda# z-i>R3)@{p~dW(f)4W|lF(KD%~=Q#y3bSKzca5;NzZP0v%M$^V6Kt<~ef6ZZN?gDj(I6dbO=uk4S2C_AD zi};yXf>_m*m#>(4>bVRf(?pg$U=SDwRo`i4Xq0K3-KduJ?1QCugM&(=Jc1PKHKZroAh6 iww}E&pdb+VfT#Rvk;1n_!fSwuh{4m<&t;ucLK6UUo(B^E literal 0 HcmV?d00001 diff --git a/webapp/src/main/webapp/themes/iph/images/print-icon.png b/webapp/src/main/webapp/themes/iph/images/print-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..e0c8df749424142054d39eb3d647466d079d2faa GIT binary patch literal 654 zcmV;90&)F`P)P000>X1^@s6#OZ}&00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru4c79?$msu9Hl2G`&cTt%P)i(rCgO3*3SM8$F@NR}>@C?+ISgOi{Ol!6hssJH}^ zIJ$U?hkRH__{wP*Yy+J`V&@CJ3624nb>Ia&f-x`y%0WI6Pf#9nWoX^bDNQV+jRZv~ zFpZ@atb%8tDIY)ua888J7V%W17o1UOTu%Ex^E=g_oN&~n<7 zXlL|@5|Pxv5NHQVpxx0Ar4N0}F28u<`^l9j*g<=e1ssQTv5Z!Cd*B$Pfp%vD_*>1< z6w@#CCTIp1pp*D+bU&B{MobaC17j|s&#@{%U8qy(QhZzJN)QubdNBHYe?JC^Iq>r4 zVq}O4wke>_oFcz?Q3AHW6ub$Q1EX~)i_@% literal 0 HcmV?d00001 diff --git a/webapp/src/main/webapp/themes/iph/images/save-icon.png b/webapp/src/main/webapp/themes/iph/images/save-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..917b772b50913c10aaab5e7e7dea4e345eab528e GIT binary patch literal 532 zcmV+v0_**WP)P000>X1^@s6#OZ}&00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliruMSC0ij7m zK~zW$?UlPqLqQORk2kasEflfw0R+J}uu}vp!AdQB2GK?=(rdcBfp{q_#X>s^A-!O$ zosEsyNbvIgdS=-@m(58O3vuAj%$GR%9efgN+XW3f@ z@8Avef_7#+^*g1{jrCKZ6VW0SI47)w2XF{h!7wPZXA(zX4NQV9upl9P-VmvQP0J9! zSRC^{PxYYY^RuJSh@N~x7qRNq$5~cHiC~0|Sv|@}Vuo&zU9 ze@-p12=rxinrpBDbbP000>X1^@s6#OZ}&00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru2R^jAGomfTC@QiN;89BMVv+1Y1gJnJLBTym{~5<9Eltp$*d+RxZ5ByZ60w z&pqEc-#zC%qW@s<(cTT3iFRP>AR&=^K^glF;*?{V92m`AxmTsO#3+(RsJtV@b6E2L zQB{s;$PTjb56615#|O{luT;@lS7eN0ZJjjhusHDUcwrHmaD2^>&ubl9Vt$yg?#-fF+Kw?J_X29AVI@Oomu%cggsZeu= ztI||95Q_4iXcaDB1HT``gQOMp+Q?&M>LNg)0#ZvkEF^s-C6{b`DYU#(5lxL^I5P$eHsrGbk;`);M3BhwQ zWR+BnkBd^TeDVUPn>R@?Gk=$rHstHUZz+m_*9AG+*S1BAJ1}&fyM!e<9mYq9(x#jk z8QjhGJZC@4-&lJ$bBjzTdgYcS{&HiJKEE!A5_uVBI~>z6JDb-m6uEMGI~b2?_F3qM zU&}HSwFF{Z!q7e~^mZ;6UW%2=n(_2eU%Cmkzmc4r#`zK{{gh?1mpHN8BocoyneC)a zH*52x)`@I`(Thr%UHIPX*gTyy+}Sgl`vP}YB<(t?MpBB9v6=!AS5jp51F#e2^ouCj zZ-qLs_XO%|MnvY20MC}3x{4&&42S+?MGFX8jdxK3Rsw`5RU?Tb!ir9UiFq2?^&8$M zMHn`ypxA!Z8t^cPx&#s*0ZR*@_%aIif=(=tzju*J(DU`R_QF;fue`!rlmtI&NoCMI zZxY$>h}CY$beMvZ&fkZ3g*Ib;P)JWjQDUBGc{(;ym9BWxub`y?X2zQB(&ulDg~c~g zTJPv?$vELX1t%F#6Y9q|*6Z52)5hhd508^C-pZ&7V$gFVAp@>_>%R<7=RANv)xIeW z5&e#hJpgzJA5&;LQ;4{gjLsiEy9U5`wyT2N&ILg-n~Fs1ZWx(h8|F{-WLg507c>4U z)_sEzvoKsF=WaN$$RgbwMNXf5F5MjH2B#eFf^(kYrK%uDF4%CWm(Ey{eo%2pbi$z) zQRbE3fX_cAtlCMbSzN8RgHK}bhk++>#RHsGPS3_5lD6f)pJ${z&}Dy37<-` zi4miT1p5jt1{;xf+lZJ(QB2T(#vdfaNWgBXwALsRB=`eCUQK+VWgn&1ecU_aHy7@* zt!rAG?ChL5bI$qB>&`I!&k?B&e+m}lhI*03lr@w}HxDGtLgu&-b0%JI*zcE0G_v42 zMYI6&e=(`=VC>VTX#B_N`Zo>IRabhe5bkawUd_xpk{d&*)6%jww+<%1xWObc@;5Wl zZ!Y)GHw^b~X7LOF3{q+okwl>vXQoPGo{L%AP~|<>e=&8|u{UdwuG;bnf5YVh0I#-{ zr93R9wUUMS*vwj=2qDG*6vlZFQ7)~o@}7=fOr6uRvr5++j|74qANL`GwL}U5sDqiT zxvt~r)r8}%UL*Cv%}o3jqCtt&2(en%+#esEF_N7%#dF+V_qzaCqYWuV2ePKz*l~0` zuJ`$)|3d1U71h2JFzVrce+7iUZK(F15&1&X>FzpzrOV?30I$+#h~RT&SueJKnY^O+ z`xX;-*7!;^?F?!1UdUZWl8P~JBT3>vL3(P+fOCwy#$tH#G^{gHbTF09f2`R$nEb^t;HeC* zhXcKca)Za^jYR4L0exn$=W+0E0XYf%i;_qd1o2rVZb7^Rc?}?lOGb9`*=@rUNe4i$ zig^Iw$3Vh!-k=n})Lk2J2_e5i)lVYwlY-1+tw$1tL5hk!{d%q-Y`Z?gaa%)}!NRuj~N08c1E+L?ci90<9@3KmA6aFxB6e-LLqO40zLIixl4jclAO zGWYZ@50vFwh%7B(bcMbo{cva!@&B5C?$9SIC!+e=SbPlBR9umHJ!47m%8w86`$x%eN z3Ae&f%2L8BT#up#yO5%VIFFH(Tbl>s?-w#UotFdA2fOYjmsuIyiu$ynYfu|?1;xVm zf-8yXe<4Ir3i`5A^0k&|`~$5sn=$1*IXp)4;p)_|hkUvQ4*;kF^LET?0DI6u=Siw< zV}B+;8UfU70JO}MNF1f^Fzz`jeGsX^EzI{RCJXPvaXh#C4J&o3c_?i;va?wWf;fsj r;c~ZP!v!#6lg#G9Sk^hane`tmu+CmT10wtY3jhEBNkvXXu0mjfk^+Z6 delta 1642 zcmV-w29^2L3Wp6LiBL{Q4GJ0x0000DNk~Le0000U0000U2nGNE06Q?QqLCpoe*+RW zE9FY+ga7~r6iGxuR7efgR%>ijMHHTyyLY?0-L|`1L?RD~3JK8yi7kjg?Y0Gznn;Yl ze8t2^j98v61uU;p*0x&;g@7?8kVZg$s0j)fLLao25!$c-??RtVQo15e+BGaN~~0M7I8wCQ$}3?NQ!}k3Fmh>;YWJ>U1dAIA-zMv z|1t2k`6Stv;;bNquAm5aSmJ=@ypAbaVR4(k&nP1q7vr7pSnP0GY}Rd*f3j6EP?c!f zMSvV8gtx+u245x< zH~Ej%w=0eADdyu$VkUskhhsu!E-}&jbEe77O&#Ho0KX^T@`a8x*(_~>twQL^0+VaJ zE*y!jdbcHTM;H{;cr6rsf9gTrCQ*|GMOcW)3C715W4`BR+b*2^ImpKiyd{g+Y<6oo zK-a*wt_RQ${Ytd3>};T4M>KqzI--#UvU0|pW=TcVPl&Wr!tH99oI2gE1VkFfq_PE0 zdrF$K0-&qo!d%l1bOqJrp0<>j&l(zJA>vr(@Y?(u%viuT^zk?2%&X`m^ z$?SYJzHef-Jk)rWzUJfx&ix-^J|b|{qBLsKI@pD4W705UIx7LZYc`=_lDyP;pTkp? zW1Y0aU|IUFrVm5Ba9Z}=oC}Q zTC?kEt7C0L_YKr`50w4F0QPcKiSMt@bq))TcXz2P+?2kl=w-n;zH2ZLq1ixt}Km`y#URMZQbOmwk3l_4y|nP z$J%6w(vYQSgalQ&Q>Ic${s5^f(3zZz|45rDi5x6$2>3Q-+svu5Mf{cZh?>R}Z{o!& ze^0dp54?3!i6)GVF&P9bWUF&hXA+ZXH{33O1K{vp+`%nq)~i@Jz;a_Azrk*Cu5OL^ zf_0^rLgNM%IClXHW>vm@Iwj_Pm_9QAF1SP(7Nv=or<1Gd`WyYq$9un4#;mC@V5DJz zg+Nt)$^^zuJMh%J2ylB$3Bhx5EnX&?Kw4hX <#include "individual-adminPanel.ftl">
+
<#if relatedSubject??>

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

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

@@ -64,20 +65,22 @@ ${scripts.add('')} ${scripts.add('')} ${scripts.add('')} +${scripts.add('')} <#import "individual-qrCodeGenerator.ftl" as qr> <#import "lib-vivo-properties.ftl" as vp> <#include "text-lib.ftl"> @@ -121,8 +122,9 @@ ${scripts.add('')} ${scripts.add('')} ${scripts.add('')} +${scripts.add('')} <#import "individual-qrCodeGenerator.ftl" as qr> <#import "lib-vivo-properties.ftl" as vp> <#include "text-lib.ftl"> diff --git a/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl b/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl index 50406beb..94527392 100644 --- a/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl @@ -5,5 +5,6 @@
<#include "customsearchpanel.ftl" > +
diff --git a/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl b/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl index fad4c505..b29362e1 100644 --- a/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl @@ -184,7 +184,7 @@ <#macro expandSwitch>
-
From f5b8d7d43dcb0b26c9b5470686b93e0313939fd4 Mon Sep 17 00:00:00 2001 From: Svetlana Rastegina Date: Mon, 8 Mar 2021 16:10:40 +0100 Subject: [PATCH 130/235] Modified right menu styles. --- .../webapp/themes/iph/images/arrow-down-small.png | Bin 0 -> 318 bytes .../main/webapp/themes/iph/images/small-dot.png | Bin 0 -> 191 bytes webapp/src/main/webapp/themes/iph/js/toc.js | 6 +++++- .../webapp/themes/iph/templates/rightPanel.ftl | 4 +++- 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 webapp/src/main/webapp/themes/iph/images/arrow-down-small.png create mode 100644 webapp/src/main/webapp/themes/iph/images/small-dot.png diff --git a/webapp/src/main/webapp/themes/iph/images/arrow-down-small.png b/webapp/src/main/webapp/themes/iph/images/arrow-down-small.png new file mode 100644 index 0000000000000000000000000000000000000000..6121c8da3fecfb21057ba3ecaead2fe42c11fa10 GIT binary patch literal 318 zcmeAS@N?(olHy`uVBq!ia0vp@K+M6x1|*f#O3wo+&H|6fVg?3oVGw3ym^DWND9BhG zj@C$VcfIKR93W`{P1kZ^(D;otwy^EA&sFkAQ{!#^FD zGp=W|HAQv{I(yD~7n{as!J@MN(N_-L8-Bm`F>YM->Z8}RO5+XR?lu-wEE5zvefskm z9iGeWEQ?NXRo^eY&Ez0)vmy13a$9Dhfzu+HiM8!5%6_vn44e65mmfC!(6{?Q_x-d)Y+Za>uI({B=J$Rp-6% hov)RPrDfl;EdMU@|G?VmM}g)uc)I$ztaD0e0syt9J5&Gw literal 0 HcmV?d00001 diff --git a/webapp/src/main/webapp/themes/iph/js/toc.js b/webapp/src/main/webapp/themes/iph/js/toc.js index 8200dc0e..d4d746bc 100644 --- a/webapp/src/main/webapp/themes/iph/js/toc.js +++ b/webapp/src/main/webapp/themes/iph/js/toc.js @@ -22,13 +22,17 @@ } function createTOCItem(docPart, tocElement){ var newTOCElement = document.createElement("div"); + var newTOCElementName = document.createElement("div"); var anchor = docPart.getAttribute('id'); var docPartButton = docPart.previousElementSibling; var itemName = docPartButton.textContent; var link = document.createElement("a"); link.setAttribute("href", "javascript:goToDocumentPart(\"" + anchor + "\");" ); link.innerText = itemName; - newTOCElement.appendChild(link); + newTOCElement.appendChild(newTOCElementName); + newTOCElementName.appendChild(link); + newTOCElement.className = "tocElement"; + newTOCElementName.className = "tocElementName"; tocElement.appendChild(newTOCElement); return newTOCElement; } diff --git a/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl b/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl index 94527392..e7aee1b5 100644 --- a/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl @@ -5,6 +5,8 @@
<#include "customsearchpanel.ftl" > -
+
+
Содержание
+
From 6b2b1be952ab3c283898fe00ed94fcbb2cb12d6d Mon Sep 17 00:00:00 2001 From: Svetlana Rastegina Date: Mon, 8 Mar 2021 19:03:12 +0100 Subject: [PATCH 131/235] Added expand button for articles metadata. --- webapp/src/main/webapp/themes/iph/css/iph.css | 48 +++++++++++++++++++ .../themes/iph/templates/elenphAritcle.ftl | 9 ++-- 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/webapp/src/main/webapp/themes/iph/css/iph.css b/webapp/src/main/webapp/themes/iph/css/iph.css index 9e3dca9a..7e749f0e 100644 --- a/webapp/src/main/webapp/themes/iph/css/iph.css +++ b/webapp/src/main/webapp/themes/iph/css/iph.css @@ -2324,6 +2324,7 @@ span.subclassExpandMinus { font-size: 1.2rem; font-weight: bold; padding-bottom: 10px; + margin-top: 10px; } /* -------------------------------------------------> */ /* ARTICLESTYLES --------------------------------> */ @@ -2356,6 +2357,11 @@ button.collapsible { padding-left: 40px !important; font-family: "IPH Astra Serif"; font-size: 1.4rem !important; + cursor: pointer; + padding: 18px; + width: 100%; + text-align: left; + border: none; } button.collapsible:visited { -webkit-appearance: none; @@ -2703,6 +2709,7 @@ button.collapsible.active { } #individual-intro.person #individual-info { width:87%; + margin-bottom: 0px; } #share-contact { width: 11%; @@ -2773,6 +2780,47 @@ span.iconControlsNotEditable { all: unset; } +#tocPlaceHolder { + margin-top: 10px; + border: 1px solid #8B4513; +} +#tocName { + text-align: center; + font-family: "Roboto"; + font-size: 1.2rem; + border-bottom: 1px solid #8B4513; + padding-top: 5px; + padding-bottom: 5px; +} +.tocElementName a { + +} +.tocElement >div.tocElement { + padding-left: 20px; + background-color: #ffffff; +} +.tocElement >div.tocElement >div.tocElementName { + padding-left: 12px; + background-image: none; + margin-left: 0px; +} +#tocPlaceHolder >div { + background-color: #F6F6F6; +} +#tocPlaceHolder a { + font-family: "Roboto"; + font-size: 1rem; +} +.tocElementName { + background-image: url(../images/arrow-down-small.png); + background-repeat: no-repeat; + background-position: left center; + padding-left: 25px; + margin-left: 8px; + padding-top: 5px; + padding-bottom: 5px; +} + /* -------------------------------------------------> */ /* FONTS --------------------------------> */ /* -------------------------------------------------> */ diff --git a/webapp/src/main/webapp/themes/iph/templates/elenphAritcle.ftl b/webapp/src/main/webapp/themes/iph/templates/elenphAritcle.ftl index 875aa1a1..437a8ced 100644 --- a/webapp/src/main/webapp/themes/iph/templates/elenphAritcle.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/elenphAritcle.ftl @@ -109,11 +109,14 @@ ${scripts.add(' <#include "identity.ftl"> <#include "menu.ftl"> From b7d6345338f1d994a68a52e1a2cd94d0d7fa86fa Mon Sep 17 00:00:00 2001 From: Svetlana Rastegina Date: Wed, 10 Mar 2021 12:43:34 +0100 Subject: [PATCH 133/235] Added expand and collapse buttons. --- webapp/src/main/webapp/themes/iph/css/iph.css | 49 +++++++++++++++---- .../themes/iph/images/all-toc-collapse.svg | 6 +++ .../themes/iph/images/all-toc-expand.svg | 6 +++ .../themes/iph/images/arrow-down-small.svg | 3 ++ .../themes/iph/images/arrow-top-small.svg | 3 ++ webapp/src/main/webapp/themes/iph/js/toc.js | 4 +- .../themes/iph/templates/rightPanel.ftl | 10 +++- 7 files changed, 69 insertions(+), 12 deletions(-) create mode 100644 webapp/src/main/webapp/themes/iph/images/all-toc-collapse.svg create mode 100644 webapp/src/main/webapp/themes/iph/images/all-toc-expand.svg create mode 100644 webapp/src/main/webapp/themes/iph/images/arrow-down-small.svg create mode 100644 webapp/src/main/webapp/themes/iph/images/arrow-top-small.svg diff --git a/webapp/src/main/webapp/themes/iph/css/iph.css b/webapp/src/main/webapp/themes/iph/css/iph.css index 7e749f0e..02ccb641 100644 --- a/webapp/src/main/webapp/themes/iph/css/iph.css +++ b/webapp/src/main/webapp/themes/iph/css/iph.css @@ -2789,18 +2789,52 @@ span.iconControlsNotEditable { font-family: "Roboto"; font-size: 1.2rem; border-bottom: 1px solid #8B4513; - padding-top: 5px; - padding-bottom: 5px; + padding-top: 7px; + padding-bottom: 7px; } -.tocElementName a { - +#wrapperTocButtons { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-between; + font-size: 1rem; + font-family: "Roboto"; + padding-top: 10px; + padding-bottom: 10px; + border-bottom: 1px dashed #8B4513; + color: #000000; + background-color: #ffffff!important; +} +#tocExpandAll:hover { + cursor: pointer; + color: #8B4513; +} +#tocCollapseAll:hover { + cursor: pointer; + color: #8B4513; +} +#tocExpandImageAll { + float: left; + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; +} +#tocCollapseImageAll { + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + float: right; +} +.tocElementSwitchImage { + padding-right: 10px; + cursor: pointer; } .tocElement >div.tocElement { padding-left: 20px; background-color: #ffffff; } .tocElement >div.tocElement >div.tocElementName { - padding-left: 12px; + padding-left: 14px; background-image: none; margin-left: 0px; } @@ -2812,10 +2846,7 @@ span.iconControlsNotEditable { font-size: 1rem; } .tocElementName { - background-image: url(../images/arrow-down-small.png); - background-repeat: no-repeat; - background-position: left center; - padding-left: 25px; + padding-left: 5px; margin-left: 8px; padding-top: 5px; padding-bottom: 5px; diff --git a/webapp/src/main/webapp/themes/iph/images/all-toc-collapse.svg b/webapp/src/main/webapp/themes/iph/images/all-toc-collapse.svg new file mode 100644 index 00000000..f2f6f449 --- /dev/null +++ b/webapp/src/main/webapp/themes/iph/images/all-toc-collapse.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/webapp/src/main/webapp/themes/iph/images/all-toc-expand.svg b/webapp/src/main/webapp/themes/iph/images/all-toc-expand.svg new file mode 100644 index 00000000..fd8c4338 --- /dev/null +++ b/webapp/src/main/webapp/themes/iph/images/all-toc-expand.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/webapp/src/main/webapp/themes/iph/images/arrow-down-small.svg b/webapp/src/main/webapp/themes/iph/images/arrow-down-small.svg new file mode 100644 index 00000000..e470467a --- /dev/null +++ b/webapp/src/main/webapp/themes/iph/images/arrow-down-small.svg @@ -0,0 +1,3 @@ + + + diff --git a/webapp/src/main/webapp/themes/iph/images/arrow-top-small.svg b/webapp/src/main/webapp/themes/iph/images/arrow-top-small.svg new file mode 100644 index 00000000..4a9456ed --- /dev/null +++ b/webapp/src/main/webapp/themes/iph/images/arrow-top-small.svg @@ -0,0 +1,3 @@ + + + diff --git a/webapp/src/main/webapp/themes/iph/js/toc.js b/webapp/src/main/webapp/themes/iph/js/toc.js index 6a400d0f..81f02a10 100644 --- a/webapp/src/main/webapp/themes/iph/js/toc.js +++ b/webapp/src/main/webapp/themes/iph/js/toc.js @@ -73,7 +73,7 @@ } $.extend(this, urlsBase); var imgElement = nameContainer.firstElementChild; - imgElement.src = urlsBase + "/themes/iph/images/save.svg"; + imgElement.src = urlsBase + "/themes/iph/images/arrow-top-small.svg"; } @@ -86,7 +86,7 @@ } $.extend(this, urlsBase); var imgElement = nameContainer.firstElementChild; - imgElement.src = urlsBase + "/themes/iph/images/print.svg"; + imgElement.src = urlsBase + "/themes/iph/images/arrow-down-small.svg"; } diff --git a/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl b/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl index e7aee1b5..a6e2ec50 100644 --- a/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl @@ -5,8 +5,16 @@
<#include "customsearchpanel.ftl" > -
+
From 975a778b0473ec00e9243260859dab370c5ea67c Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Wed, 10 Mar 2021 19:58:51 +0100 Subject: [PATCH 134/235] Made rubric list collapsible --- .../themes/iph/js/collapsible_elements.js | 41 +++++++++++++++---- .../themes/iph/templates/compilation.ftl | 7 +--- .../themes/iph/templates/elenphAritcle.ftl | 7 +--- .../webapp/themes/iph/templates/text-lib.ftl | 16 ++++---- 4 files changed, 43 insertions(+), 28 deletions(-) diff --git a/webapp/src/main/webapp/themes/iph/js/collapsible_elements.js b/webapp/src/main/webapp/themes/iph/js/collapsible_elements.js index 13b308a7..98a3aa25 100644 --- a/webapp/src/main/webapp/themes/iph/js/collapsible_elements.js +++ b/webapp/src/main/webapp/themes/iph/js/collapsible_elements.js @@ -5,17 +5,40 @@ function addCollapsibleOnClick() { 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"; - } - }); + var collapsibleLink = coll[i].querySelector('.collapsibleLink'); + if (collapsibleLink === null){ + collapseNextElementOnClick(coll[i]); + } else { + collapseNextOuterElementOnClick(collapsibleLink); + } + } } + +function collapseNextOuterElementOnClick(element){ + element.addEventListener("click", function() { + this.classList.toggle("active"); + var content = this.parentElement.nextElementSibling; + if (content.style.display === "block") { + content.style.display = "none"; + } else { + content.style.display = "block"; + } + }); +} + +function collapseNextElementOnClick(element){ + element.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"; + } + }); +} + function applyExpandSettings() { if (localStorage.getItem('switchExpand') === true || localStorage.getItem('switchExpand') === 'true') { var expandSwitchCB = document.getElementById("expandCB"); diff --git a/webapp/src/main/webapp/themes/iph/templates/compilation.ftl b/webapp/src/main/webapp/themes/iph/templates/compilation.ftl index c5ccdef0..4606b758 100644 --- a/webapp/src/main/webapp/themes/iph/templates/compilation.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/compilation.ftl @@ -122,8 +122,6 @@ ${scripts.add('')} ${scripts.add('')} +${scripts.add('')} <#-- Individual profile page template for foaf:Person individuals --> diff --git a/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl b/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl index a6e2ec50..4dc8a838 100644 --- a/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl @@ -1,6 +1,6 @@
- +
diff --git a/webapp/src/main/webapp/themes/iph/templates/rubric.ftl b/webapp/src/main/webapp/themes/iph/templates/rubric.ftl index 70ce7bd8..a4b5eb3b 100644 --- a/webapp/src/main/webapp/themes/iph/templates/rubric.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/rubric.ftl @@ -2,6 +2,7 @@ <#include "individual-setup.ftl"> ${scripts.add('')} +${scripts.add('')}
diff --git a/webapp/src/main/webapp/themes/iph/templates/rubrics.ftl b/webapp/src/main/webapp/themes/iph/templates/rubrics.ftl index 38364c94..60c48ed7 100644 --- a/webapp/src/main/webapp/themes/iph/templates/rubrics.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/rubrics.ftl @@ -1,4 +1,5 @@ ${scripts.add('')} +${scripts.add('')} <#list rubrics as rubric> <#if !rubric.parentUri??> From 5d884b22fe38ada0fca82b79367d576185af9c0c Mon Sep 17 00:00:00 2001 From: Svetlana Rastegina Date: Thu, 11 Mar 2021 13:15:34 +0100 Subject: [PATCH 137/235] Fixed padding top on article title. --- webapp/src/main/webapp/themes/iph/css/iph.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp/src/main/webapp/themes/iph/css/iph.css b/webapp/src/main/webapp/themes/iph/css/iph.css index 7a561ed6..929ce0ac 100644 --- a/webapp/src/main/webapp/themes/iph/css/iph.css +++ b/webapp/src/main/webapp/themes/iph/css/iph.css @@ -2867,7 +2867,10 @@ span.iconControlsNotEditable { padding-top: 5px; padding-bottom: 5px; } - +.display-title-editable { + font-size: 1.15em!important; + padding-top: 12px; +} /* -------------------------------------------------> */ /* FONTS --------------------------------> */ /* -------------------------------------------------> */ From aaa5b644a654f50a8a0d1bcb217652a2f9c5442a Mon Sep 17 00:00:00 2001 From: Svetlana Rastegina Date: Thu, 11 Mar 2021 14:16:47 +0100 Subject: [PATCH 138/235] Added images for buttons. --- webapp/src/main/webapp/themes/iph/css/iph.css | 22 +++++++++++++------ .../themes/iph/images/arrow-down-big.svg | 3 +++ .../themes/iph/images/arrow-top-big.svg | 3 +++ 3 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 webapp/src/main/webapp/themes/iph/images/arrow-down-big.svg create mode 100644 webapp/src/main/webapp/themes/iph/images/arrow-top-big.svg diff --git a/webapp/src/main/webapp/themes/iph/css/iph.css b/webapp/src/main/webapp/themes/iph/css/iph.css index 929ce0ac..5bb6361a 100644 --- a/webapp/src/main/webapp/themes/iph/css/iph.css +++ b/webapp/src/main/webapp/themes/iph/css/iph.css @@ -2684,12 +2684,6 @@ button.collapsible.active { .parentRubric >li { margin-bottom: 8px; } -#wrapper-content >div.label { - font-family: "IPH Astra Serif"; - font-size: 1.2rem; - margin-bottom: 4px; - color: #8B4513; -} .childRubric { font-family: "IPH Astra Serif"; font-size: 1.2rem; @@ -2724,7 +2718,7 @@ button.collapsible.active { } #individual-intro.person #individual-info { width:87%; - margin-bottom: 0px; + margin-bottom: 10px; } #share-contact { width: 11%; @@ -2871,6 +2865,20 @@ span.iconControlsNotEditable { font-size: 1.15em!important; padding-top: 12px; } +.collapsibleLink { + font-family: "IPH Astra Serif"; + font-size: 1.3rem; + cursor: pointer; +} +.collapsibleLink:hover { + color: #8B4513; +} +.label.collapsible { + padding-top: 10px; + padding-right: 10px; + padding-bottom: 10px; + border-bottom: 1px dashed #9C9C9C; +} /* -------------------------------------------------> */ /* FONTS --------------------------------> */ /* -------------------------------------------------> */ diff --git a/webapp/src/main/webapp/themes/iph/images/arrow-down-big.svg b/webapp/src/main/webapp/themes/iph/images/arrow-down-big.svg new file mode 100644 index 00000000..e470467a --- /dev/null +++ b/webapp/src/main/webapp/themes/iph/images/arrow-down-big.svg @@ -0,0 +1,3 @@ + + + diff --git a/webapp/src/main/webapp/themes/iph/images/arrow-top-big.svg b/webapp/src/main/webapp/themes/iph/images/arrow-top-big.svg new file mode 100644 index 00000000..4a9456ed --- /dev/null +++ b/webapp/src/main/webapp/themes/iph/images/arrow-top-big.svg @@ -0,0 +1,3 @@ + + + From 836fd45f3c9a9360e34f0c65d7cb8c66726c1bf8 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Thu, 11 Mar 2021 14:46:36 +0100 Subject: [PATCH 139/235] Improved collapsible element --- .../src/main/webapp/themes/iph/js/collapsible_elements.js | 7 ++++--- webapp/src/main/webapp/themes/iph/templates/text-lib.ftl | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/webapp/src/main/webapp/themes/iph/js/collapsible_elements.js b/webapp/src/main/webapp/themes/iph/js/collapsible_elements.js index 98a3aa25..f46de148 100644 --- a/webapp/src/main/webapp/themes/iph/js/collapsible_elements.js +++ b/webapp/src/main/webapp/themes/iph/js/collapsible_elements.js @@ -9,15 +9,16 @@ function addCollapsibleOnClick() { if (collapsibleLink === null){ collapseNextElementOnClick(coll[i]); } else { - collapseNextOuterElementOnClick(collapsibleLink); + expandableNextOuterElementOnClick(collapsibleLink); } } } -function collapseNextOuterElementOnClick(element){ +function expandableNextOuterElementOnClick(element){ element.addEventListener("click", function() { - this.classList.toggle("active"); + this.parentElement.classList.toggle("expanded"); + this.parentElement.classList.toggle("collapsed"); var content = this.parentElement.nextElementSibling; if (content.style.display === "block") { content.style.display = "none"; diff --git a/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl b/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl index 102c3adb..89d2f111 100644 --- a/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl @@ -37,14 +37,14 @@ <#macro documentRubrics > <#assign docRubrics = propertyGroups.pullProperty("https://iph.ras.ru/relationships#belongsTo")!> <#if ( docRubrics?? && docRubrics?has_content ) || (rubrics?? && rubrics?has_content)> -
+
<#if docRubrics?? && docRubrics?has_content > <@p.addLink docRubrics editable /> <@p.verboseDisplay docRubrics />
<#if rubrics?? && rubrics?has_content> -
+
<#list rubrics as rubric>
  • ${rubric.rubricName} From 844734824aa5bac94aaf394e4482081c852f3ad3 Mon Sep 17 00:00:00 2001 From: Svetlana Rastegina Date: Thu, 11 Mar 2021 19:30:33 +0100 Subject: [PATCH 140/235] Modified collapse/expande button style and hided right block on result search page. --- webapp/src/main/webapp/themes/iph/css/iph.css | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/webapp/src/main/webapp/themes/iph/css/iph.css b/webapp/src/main/webapp/themes/iph/css/iph.css index 5bb6361a..6b5780ae 100644 --- a/webapp/src/main/webapp/themes/iph/css/iph.css +++ b/webapp/src/main/webapp/themes/iph/css/iph.css @@ -537,11 +537,6 @@ ul#header-nav { /* margin-right: 13px; */ font-size: 1.1rem; } - -.collapsible { - margin-top: 10pxl; -} - ul#header-nav li { float: left; display: block; @@ -2879,6 +2874,26 @@ span.iconControlsNotEditable { padding-bottom: 10px; border-bottom: 1px dashed #9C9C9C; } +.collapsible.collapsed { + background-image: url(../images/arrow-down-big.svg); + background-repeat: no-repeat; + background-position: 1% 50%; + padding: 18px 18px 18px 40px; + cursor: pointer; +} +.collapsible.expanded { + background-image: url(../images/arrow-top-big.svg); + background-repeat: no-repeat; + background-position: 1% 50%; + padding: 18px 18px 18px 40px; + cursor: pointer; +} +.searchTOC { + display: none; +} +span#searchHelp { + display: none; +} /* -------------------------------------------------> */ /* FONTS --------------------------------> */ /* -------------------------------------------------> */ From 7352adc7250d2d1413492e99d547563d7c335e21 Mon Sep 17 00:00:00 2001 From: Svetlana Rastegina Date: Thu, 11 Mar 2021 19:42:11 +0100 Subject: [PATCH 141/235] Fixed page result pagination styles. --- webapp/src/main/webapp/themes/iph/css/iph.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/webapp/src/main/webapp/themes/iph/css/iph.css b/webapp/src/main/webapp/themes/iph/css/iph.css index 6b5780ae..1d0a7c33 100644 --- a/webapp/src/main/webapp/themes/iph/css/iph.css +++ b/webapp/src/main/webapp/themes/iph/css/iph.css @@ -2894,6 +2894,19 @@ span.iconControlsNotEditable { span#searchHelp { display: none; } +.searchpages >span { + font-size: 1.2rem; + font-family: "IPH Astra Serif"; + background-color: #FDF5E6; + padding: 0 0.4em; + border-radius: 3px; + margin-left: 0px; + margin-right: 0px; +} +.searchpages a { + margin-left: 0.3em; + margin-right: 0.3em; +} /* -------------------------------------------------> */ /* FONTS --------------------------------> */ /* -------------------------------------------------> */ From e76bff14305e9d352b2aedbed6aa62a8d7b9997b Mon Sep 17 00:00:00 2001 From: Svetlana Rastegina Date: Thu, 11 Mar 2021 19:51:38 +0100 Subject: [PATCH 142/235] Added page result pagination border. --- webapp/src/main/webapp/themes/iph/css/iph.css | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/webapp/src/main/webapp/themes/iph/css/iph.css b/webapp/src/main/webapp/themes/iph/css/iph.css index 1d0a7c33..add7d717 100644 --- a/webapp/src/main/webapp/themes/iph/css/iph.css +++ b/webapp/src/main/webapp/themes/iph/css/iph.css @@ -2525,11 +2525,14 @@ button.collapsible.metadataRubrics.active { } .excerptSearchResult { margin-top: 15px; + font-family: "IPH Astra Serif"; + font-style: normal; + font-size: 1.4rem; } .excerptSearchResult >a { font-family: IPH Astra Serif; font-style: normal; - font-size: 1.2rem; + font-size: 1.4rem; } .excerptSearchResult >a:hover { color: #8B4513; @@ -2907,6 +2910,13 @@ span#searchHelp { margin-left: 0.3em; margin-right: 0.3em; } +p.snippet { + font-size: 1.1rem; +} +.searchpages { + border-top: 1px solid #dde4e3; + padding-top: 20px; +} /* -------------------------------------------------> */ /* FONTS --------------------------------> */ /* -------------------------------------------------> */ From e31b92fae2145d27cabb455a0bac5b987847c9d2 Mon Sep 17 00:00:00 2001 From: Svetlana Rastegina Date: Thu, 11 Mar 2021 21:32:07 +0100 Subject: [PATCH 143/235] Fixed expand button style and metadata content style. --- webapp/src/main/webapp/themes/iph/css/iph.css | 31 ++++++++++++++++--- .../webapp/themes/iph/templates/text-lib.ftl | 2 +- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/webapp/src/main/webapp/themes/iph/css/iph.css b/webapp/src/main/webapp/themes/iph/css/iph.css index add7d717..b79ef71c 100644 --- a/webapp/src/main/webapp/themes/iph/css/iph.css +++ b/webapp/src/main/webapp/themes/iph/css/iph.css @@ -151,9 +151,12 @@ input.form-control { input.block { margin-bottom: 20px; } -label { +.label { margin-top: .5em; margin-bottom: .5em; + font-size: 1.2rem; + font-family: "IPH Astra Serif"; + color: #000000; } label.inline { display: inline; @@ -2878,18 +2881,25 @@ span.iconControlsNotEditable { border-bottom: 1px dashed #9C9C9C; } .collapsible.collapsed { + padding: 18px 18px 18px 10px; +} +.collapsible.collapsed >div.collapsibleLink { background-image: url(../images/arrow-down-big.svg); background-repeat: no-repeat; - background-position: 1% 50%; - padding: 18px 18px 18px 40px; + background-position: left center; cursor: pointer; + padding-left: 30px; } .collapsible.expanded { + padding: 18px 18px 18px 10px; + border-bottom: 1px solid #dde4e3; +} +.collapsible.expanded >div.collapsibleLink { background-image: url(../images/arrow-top-big.svg); background-repeat: no-repeat; - background-position: 1% 50%; - padding: 18px 18px 18px 40px; + background-position: left center; cursor: pointer; + padding-left: 30px; } .searchTOC { display: none; @@ -2917,6 +2927,17 @@ p.snippet { border-top: 1px solid #dde4e3; padding-top: 20px; } +.expandedContent { + padding-left: 20px; + padding-top: 10px; + margin-bottom: 10px; + padding-bottom: 5px; +} +.expandedContent a { + font-family: "IPH Astra Serif"; + font-size: 1.2rem; + padding-bottom: 2px; +} /* -------------------------------------------------> */ /* FONTS --------------------------------> */ /* -------------------------------------------------> */ diff --git a/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl b/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl index 89d2f111..3c6e2b0b 100644 --- a/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl @@ -44,7 +44,7 @@
  • <#if rubrics?? && rubrics?has_content> -
    + <#include "customsearchpanel.ftl" >