Skip to content

Commit

Permalink
update to version.jsp to show CrossWire curated modules; change of ve…
Browse files Browse the repository at this point in the history
…rsion number to 23.9.3
  • Loading branch information
dmckinnon78 committed Sep 22, 2023
1 parent f9ddbf5 commit 0605076
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 13 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>com.tyndalehouse.step</groupId>
<artifactId>step-mvn</artifactId>
<version>23.9.2</version>
<version>23.9.3</version>
<packaging>pom</packaging>
<name>STEP :: Scripture Tools for Every pastor</name>

Expand Down
2 changes: 1 addition & 1 deletion step-assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>step-mvn</artifactId>
<groupId>com.tyndalehouse.step</groupId>
<version>23.9.2</version>
<version>23.9.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<properties>
Expand Down
2 changes: 1 addition & 1 deletion step-build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.tyndalehouse.step</groupId>
<artifactId>step-mvn</artifactId>
<version>23.9.2</version>
<version>23.9.3</version>
</parent>

<artifactId>step-build</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion step-core-data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.tyndalehouse.step</groupId>
<artifactId>step-mvn</artifactId>
<version>23.9.2</version>
<version>23.9.3</version>
</parent>

<artifactId>step-core-data</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion step-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.tyndalehouse.step</groupId>
<artifactId>step-mvn</artifactId>
<version>23.9.2</version>
<version>23.9.3</version>
</parent>

<groupId>com.tyndalehouse.step</groupId>
Expand Down
3 changes: 2 additions & 1 deletion step-core/src/main/resources/HtmlBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="http://www.crosswire.org/sword/modules/" target="_blank">CrossWire module library</a>.
module_from_sword=This resource is a SWORD module. STEP uses <a href="http://www.crosswire.org/jsword/" target="_blank">CrossWire's JSword software</a> to facilitate the rendering of this resource.
module_from_sword=This resource is a SWORD module using <a href="http://www.crosswire.org/jsword/" target="_blank">CrossWire's JSword software</a>. STEPBible is grateful for their ongoing work and support.
module_curated_by_crosswire=The %1$s module has been obtained from the repository of <a href="https://www.crosswire.org/sword/modules/ModDisp.jsp" target="_blank">CrossWire.org</a>. We are grateful for their work in preparing this and curating it. If you find any errors please report them <a href="https://tracker.crosswire.org/projects/MOD/issues/?filter=allopenissues" target="_blank">here</a>.

#Stats
passage_stats=Analysis
Expand Down
2 changes: 1 addition & 1 deletion step-packages/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.tyndalehouse.step</groupId>
<artifactId>step-mvn</artifactId>
<version>23.9.2</version>
<version>23.9.3</version>
</parent>

<groupId>com.tyndalehouse.step</groupId>
Expand Down
2 changes: 1 addition & 1 deletion step-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>com.tyndalehouse.step</groupId>
<artifactId>step-mvn</artifactId>
<version>23.9.2</version>
<version>23.9.3</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion step-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.tyndalehouse.step</groupId>
<artifactId>step-mvn</artifactId>
<version>23.9.2</version>
<version>23.9.3</version>
</parent>

<groupId>com.tyndalehouse.step</groupId>
Expand Down
2 changes: 1 addition & 1 deletion step-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.tyndalehouse.step</groupId>
<artifactId>step-mvn</artifactId>
<version>23.9.2</version>
<version>23.9.3</version>
</parent>

<groupId>com.tyndalehouse.step</groupId>
Expand Down
2 changes: 1 addition & 1 deletion step-war-precompiled/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>step-mvn</artifactId>
<groupId>com.tyndalehouse.step</groupId>
<version>23.9.2</version>
<version>23.9.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion step-web-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.tyndalehouse.step</groupId>
<artifactId>step-mvn</artifactId>
<version>23.9.2</version>
<version>23.9.3</version>
</parent>

<groupId>com.tyndalehouse.step</groupId>
Expand Down
2 changes: 1 addition & 1 deletion step-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.tyndalehouse.step</groupId>
<artifactId>step-mvn</artifactId>
<version>23.9.2</version>
<version>23.9.3</version>
</parent>

<artifactId>step-web</artifactId>
Expand Down
37 changes: 37 additions & 0 deletions step-web/src/main/webapp/version.jsp
Original file line number Diff line number Diff line change
@@ -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" %>
Expand All @@ -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);
}
%>
<fmt:setBundle basename="HtmlBundle"/>
<% if (!stepRequest.isSuccess()) {
Expand Down Expand Up @@ -54,6 +79,18 @@
<span class="copyright" style="margin: 0px !important;">
<span class="about"><fmt:message key="module_from_sword"/></span>
<p></p>
<%
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);
%>
<span class="about"><%= curated %> </span>
<%
}
%>

<p></p>
</span>

<span class="copyright">
Expand Down

0 comments on commit 0605076

Please sign in to comment.