From 0605076a8462ce33b999cbe0992b1b8546e32b2f Mon Sep 17 00:00:00 2001 From: dmckinnon78 Date: Fri, 22 Sep 2023 13:14:58 -0600 Subject: [PATCH] update to version.jsp to show CrossWire curated modules; change of version number to 23.9.3 --- pom.xml | 2 +- step-assembly/pom.xml | 2 +- step-build/pom.xml | 2 +- step-core-data/pom.xml | 2 +- step-core/pom.xml | 2 +- .../src/main/resources/HtmlBundle.properties | 3 +- step-packages/pom.xml | 2 +- step-server/pom.xml | 2 +- step-test/pom.xml | 2 +- step-tools/pom.xml | 2 +- step-war-precompiled/pom.xml | 2 +- step-web-test/pom.xml | 2 +- step-web/pom.xml | 2 +- step-web/src/main/webapp/version.jsp | 37 +++++++++++++++++++ 14 files changed, 51 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index d4b32cd0c3..c9a3e430af 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ com.tyndalehouse.step step-mvn - 23.9.2 + 23.9.3 pom STEP :: Scripture Tools for Every pastor diff --git a/step-assembly/pom.xml b/step-assembly/pom.xml index c9cb155467..498861205c 100644 --- a/step-assembly/pom.xml +++ b/step-assembly/pom.xml @@ -5,7 +5,7 @@ step-mvn com.tyndalehouse.step - 23.9.2 + 23.9.3 4.0.0 diff --git a/step-build/pom.xml b/step-build/pom.xml index c92e34fbc5..b51d9c2dcd 100644 --- a/step-build/pom.xml +++ b/step-build/pom.xml @@ -4,7 +4,7 @@ com.tyndalehouse.step step-mvn - 23.9.2 + 23.9.3 step-build diff --git a/step-core-data/pom.xml b/step-core-data/pom.xml index 688a928bb1..e189f67e29 100644 --- a/step-core-data/pom.xml +++ b/step-core-data/pom.xml @@ -7,7 +7,7 @@ com.tyndalehouse.step step-mvn - 23.9.2 + 23.9.3 step-core-data diff --git a/step-core/pom.xml b/step-core/pom.xml index 3bf6166933..93b60f4662 100644 --- a/step-core/pom.xml +++ b/step-core/pom.xml @@ -4,7 +4,7 @@ com.tyndalehouse.step step-mvn - 23.9.2 + 23.9.3 com.tyndalehouse.step diff --git a/step-core/src/main/resources/HtmlBundle.properties b/step-core/src/main/resources/HtmlBundle.properties index db35d08fca..45cdf24195 100644 --- a/step-core/src/main/resources/HtmlBundle.properties +++ b/step-core/src/main/resources/HtmlBundle.properties @@ -280,7 +280,8 @@ install_resources_from_directory=Install Bibles from selected directory. step_is_shutting_down=STEP has now shut down. you_can_close_browser=Feel free to close your browser. modules_from_crosswire=Most hosted resources come from the CrossWire module library. -module_from_sword=This resource is a SWORD module. STEP uses CrossWire's JSword software to facilitate the rendering of this resource. +module_from_sword=This resource is a SWORD module using CrossWire's JSword software. STEPBible is grateful for their ongoing work and support. +module_curated_by_crosswire=The %1$s module has been obtained from the repository of CrossWire.org. We are grateful for their work in preparing this and curating it. If you find any errors please report them here. #Stats passage_stats=Analysis diff --git a/step-packages/pom.xml b/step-packages/pom.xml index 5e6a6c16cd..9ff9f69a4f 100644 --- a/step-packages/pom.xml +++ b/step-packages/pom.xml @@ -5,7 +5,7 @@ com.tyndalehouse.step step-mvn - 23.9.2 + 23.9.3 com.tyndalehouse.step diff --git a/step-server/pom.xml b/step-server/pom.xml index d3ed93beb3..17f3104560 100644 --- a/step-server/pom.xml +++ b/step-server/pom.xml @@ -2,7 +2,7 @@ com.tyndalehouse.step step-mvn - 23.9.2 + 23.9.3 4.0.0 diff --git a/step-test/pom.xml b/step-test/pom.xml index c17d8c289b..17528df8ef 100644 --- a/step-test/pom.xml +++ b/step-test/pom.xml @@ -6,7 +6,7 @@ com.tyndalehouse.step step-mvn - 23.9.2 + 23.9.3 com.tyndalehouse.step diff --git a/step-tools/pom.xml b/step-tools/pom.xml index ab8a7783c9..c07c61eac2 100644 --- a/step-tools/pom.xml +++ b/step-tools/pom.xml @@ -4,7 +4,7 @@ com.tyndalehouse.step step-mvn - 23.9.2 + 23.9.3 com.tyndalehouse.step diff --git a/step-war-precompiled/pom.xml b/step-war-precompiled/pom.xml index fc9115571e..db47c8e6f8 100644 --- a/step-war-precompiled/pom.xml +++ b/step-war-precompiled/pom.xml @@ -5,7 +5,7 @@ step-mvn com.tyndalehouse.step - 23.9.2 + 23.9.3 4.0.0 diff --git a/step-web-test/pom.xml b/step-web-test/pom.xml index 24e66a50bd..609e9e8702 100644 --- a/step-web-test/pom.xml +++ b/step-web-test/pom.xml @@ -5,7 +5,7 @@ com.tyndalehouse.step step-mvn - 23.9.2 + 23.9.3 com.tyndalehouse.step diff --git a/step-web/pom.xml b/step-web/pom.xml index 5a7e85faea..2ad59dde33 100644 --- a/step-web/pom.xml +++ b/step-web/pom.xml @@ -4,7 +4,7 @@ com.tyndalehouse.step step-mvn - 23.9.2 + 23.9.3 step-web diff --git a/step-web/src/main/webapp/version.jsp b/step-web/src/main/webapp/version.jsp index 7d0e48fd55..32f3035383 100644 --- a/step-web/src/main/webapp/version.jsp +++ b/step-web/src/main/webapp/version.jsp @@ -1,3 +1,5 @@ +<%@page import="java.io.FileReader"%> +<%@page import="java.io.BufferedReader"%> <%@page import="com.google.inject.Injector" %> <%@page import="com.tyndalehouse.step.core.models.ClientSession" %> <%@ page import="com.tyndalehouse.step.core.service.helpers.VersionResolver" %> @@ -7,12 +9,35 @@ <%@ page import="java.util.Locale" %> <%@ page import="java.util.ResourceBundle" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%! + Boolean isCrossWireModule; +%> <% Injector injector = (Injector) pageContext.getServletContext().getAttribute(Injector.class.getName()); VersionResolver resolver = injector.getInstance(VersionResolver.class); Locale locale = injector.getInstance(ClientSession.class).getLocale(); Config.set(session, Config.FMT_LOCALE, locale); VersionStepRequest stepRequest = new VersionStepRequest(injector, request); + + isCrossWireModule = new Boolean(false); + + try { + String pathOfCrossWireLookup = "/var/www/crosswire_mods_on_step.txt"; + String searchString = "[" + stepRequest.getBook().getInitials().trim() + "]"; + BufferedReader reader = new BufferedReader(new FileReader(pathOfCrossWireLookup)); + String line; + while ((line = reader.readLine()) != null) { + if (line.indexOf(searchString) == 0) { + isCrossWireModule = new Boolean(true); + break; + } + } + reader.close(); + } + catch (Exception e) { + isCrossWireModule = new Boolean(false); + } + %> <% if (!stepRequest.isSuccess()) { @@ -54,6 +79,18 @@

+ <% + if ( isCrossWireModule ) { + String inits = stepRequest.getBook().getInitials().trim(); + ResourceBundle r = ResourceBundle.getBundle("HtmlBundle", locale); + String curated = String.format(r.getString("module_curated_by_crosswire"), inits); + %> + <%= curated %> + <% + } + %> + +