S-89 Slips – Highlight when Study Point not assigned

S-89 Assignment Slips – Script Customization

Recently I was asked the following question:

Recently I was asked the following question:
Is it possible to highlight in the editor on the S-89 slip when a part has been assigned without a study point?stefano
This would be easier to implement for the Workbook and Worksheet views because they have a dedicated setting:

<!--?xml version="1.0" encoding="UTF-8"?-->
<!--?xml-stylesheet type="text/xsl" href="Workbook-S-140 - start.xsl"?-->
<meetingworkbook>
<settings>
<languagecode>en</languagecode>
<editormode>1</editormode>
<direction>ltr</direction>
</settings>
<!-- Remaining content removed for clarifity -->
</meetingworkbook>

There is a workaround for the Slips view. The following information is for advanced script users.

The syntax of the S-89 Slips

If you right click the view and select View Source you will the syntax of the XML document. Eg:

<!--?xml version="1.0" encoding="UTF-8"?-->
<!--?xml-stylesheet type="text/xsl" href="AssignmentSlips.xsl"?-->
<assignmentslips version="180900">
<settings>
<languagecode>en</languagecode>
<template style="s-89-eng.css">s-89-eng.jpg</template>
<direction>ltr</direction>
</settings>
<page pagebreakbefore="0">
<studentslip>
<student>Brother Happy</student>
<studypoint></studypoint>
<assignment>1</assignment>
<location>1</location>
<date>05 July 2018</date>
</studentslip>
<studentslip>
<student>Sister Happy</student>
<assistant>Sister Kind</assistant>
<studypoint>39 - Effective Conclusion</studypoint>
<assignment>3</assignment>
<location>1</location>
<date>05 July 2018</date>
</studentslip>
<studentslip>
<student>Brother Patient</student>
<assistant>Brother Merciful</assistant>
<studypoint>27 - Extemporaneous Delivery</studypoint>
<assignment>6</assignment>
<location>1</location>
<date>05 July 2018</date>
</studentslip>
</page>
</assignmentslips>

I have highlighted an example of where a study point has not been assigned: <studypoint></studypoint>.

The Changes

It it assumed that you are already working on a copy of the original script/stylesheet files. Locate this bit of script (should be line 57):

<div class="fieldCounsel">
  <xsl:attribute name="dir">
<xsl:value-of select="//Settings/Direction">
</xsl:value-of></xsl:attribute>
<xsl:value-of select="StudyPoint">
</xsl:value-of></div>

We need to adjust the hilighted line and test if the study point has a value. If it doesn’t then show asterixes and introduce a new class:

<div class="fieldCounsel">
  <xsl:attribute name="dir">
<xsl:value-of select="//Settings/Direction">
</xsl:value-of></xsl:attribute>
<xsl:choose>
<xsl:when test="StudyPoint=''">
<xsl:attribute name="class">highlight fieldCounsel</xsl:attribute>
<xsl:text>**********</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="StudyPoint">
</xsl:value-of></xsl:otherwise>
</xsl:choose></div>

The Styling

The last thing we need to do make some changes to the stylesheet. We add the new class at the bottom of the script:

.highlight {
background-color: #FFFF00;
font-weight: bold;
}

@media print
{
.highlight{
display:none;
}
}

When you use the editor now you will have any unassigned study number highlighted:

Slip

We have used @media print to hide this highlighted text from the print out.

4 Comments

  1. I have made the changes and all work well.

    Thank you!

    1. Author

      I am really pleased you were able to follow my instructions and make the needed changes.

  2. Good Afternoon
    . I`m Carlos Rosa – coordinator
    Arandu, SP – Brazil
    Congregation Arandu

    I need a new version S-89-T form to use with Meeting Schedule Assistent
    Language – Portuguese Brazil

    1. Author

      Hi Carlos

      I got your emails and I will send you the templates as soon as I can.

      Your brother

      Andrew

Comments are closed.