[Tynstep-svn] r270 - in trunk/step: step-core/src/main/resources/com/tyndalehouse/step/core/service/impl step-core/src/test/java/com/tyndalehouse/step/core/service/impl step-web/src/main/webapp/css
ChrisBurrell at crosswire.org
ChrisBurrell at crosswire.org
Sat Apr 28 09:34:47 MST 2012
Author: ChrisBurrell
Date: 2012-04-28 09:34:47 -0700 (Sat, 28 Apr 2012)
New Revision: 270
Modified:
trunk/step/step-core/src/main/resources/com/tyndalehouse/step/core/service/impl/default.xsl
trunk/step/step-core/src/test/java/com/tyndalehouse/step/core/service/impl/JSwordServiceImplTest.java
trunk/step/step-web/src/main/webapp/css/passage.css
Log:
changing display to show references requested above the text
Modified: trunk/step/step-core/src/main/resources/com/tyndalehouse/step/core/service/impl/default.xsl
===================================================================
--- trunk/step/step-core/src/main/resources/com/tyndalehouse/step/core/service/impl/default.xsl 2012-04-28 15:18:18 UTC (rev 269)
+++ trunk/step/step-core/src/main/resources/com/tyndalehouse/step/core/service/impl/default.xsl 2012-04-28 16:34:47 UTC (rev 270)
@@ -74,6 +74,9 @@
<!-- Whether to show non-canonical "headings" or not -->
<xsl:param name="Headings" select="'false'"/>
+
+ <!-- This is set if we are interested in a preview only and the x-gen information is of no interest. -->
+ <xsl:param name="Preview" select="'false'"/>
<!-- Whether to show notes or not -->
<xsl:param name="Notes" select="'false'"/>
@@ -660,18 +663,26 @@
</xsl:template>
<!--=======================================================================-->
- <xsl:template match="title">
+
+ <!-- We will always show a x-gen title -->
+
+
+ <xsl:template match="title" name="normalTile">
<!-- Always show canonical titles or if headings is turned on -->
- <xsl:if test="(@canonical = 'true' or $Headings = 'true') and @type != 'x-gen'">
- <h2 class="heading"><xsl:apply-templates/></h2>
+ <xsl:if test="(@canonical = 'true' or $Headings = 'true' or @type = 'x-gen')">
+ <xsl:choose>
+ <xsl:when test="@type = 'x-gen'">
+ <h2 class="xgen"><xsl:apply-templates/></h2>
+ </xsl:when>
+ <xsl:otherwise>
+ <h2 class="heading"><xsl:apply-templates/></h2>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:if>
</xsl:template>
<xsl:template match="title" mode="jesus">
- <!-- Always show canonical titles or if headings is turned on -->
- <xsl:if test="(@canonical = 'true' or $Headings = 'true') and @type != 'x-gen'">
- <h2 class="heading"><xsl:apply-templates/></h2>
- </xsl:if>
+ <xsl:call-template name="normalTile" />
</xsl:template>
<!--=======================================================================-->
Modified: trunk/step/step-core/src/test/java/com/tyndalehouse/step/core/service/impl/JSwordServiceImplTest.java
===================================================================
--- trunk/step/step-core/src/test/java/com/tyndalehouse/step/core/service/impl/JSwordServiceImplTest.java 2012-04-28 15:18:18 UTC (rev 269)
+++ trunk/step/step-core/src/test/java/com/tyndalehouse/step/core/service/impl/JSwordServiceImplTest.java 2012-04-28 16:34:47 UTC (rev 270)
@@ -215,8 +215,8 @@
*/
@Test
public void testPrettyXml() throws BookException, NoSuchKeyException, JDOMException, IOException {
- final String version = "KJV";
- final String ref = "Genesis 46:9-10";
+ final String version = "ESV";
+ final String ref = "John 1:2;John 1:4;John 3:2";
final Book currentBook = Books.installed().getBook(version);
final BookData bookData = new BookData(currentBook, currentBook.getKey(ref));
final Element osisFragment = bookData.getOsisFragment();
Modified: trunk/step/step-web/src/main/webapp/css/passage.css
===================================================================
--- trunk/step/step-web/src/main/webapp/css/passage.css 2012-04-28 15:18:18 UTC (rev 269)
+++ trunk/step/step-web/src/main/webapp/css/passage.css 2012-04-28 16:34:47 UTC (rev 270)
@@ -223,6 +223,14 @@
padding-bottom: 5px;
}
+H2.xgen {
+ font-family: times;
+ color: #669966;
+ font-variant:small-caps;
+ font-style: italic;
+}
+
+
H2.heading, input.heading {
color: #669966;
font-weight: bold;
@@ -301,6 +309,11 @@
margin: 5px;
}
+#previewReference H2.xgen {
+ display: none;
+}
+
+
#previewReference a {
float: right;
}
More information about the Tynstep-svn
mailing list