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:

1
2
3
4
5
6
7
8
9
10
<?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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?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):

57
58
59
60
61
62
<div class="fieldCounsel">
  <xsl:attribute name="dir">
    <xsl:value-of select="//Settings/Direction"/>
  </xsl:attribute>
  <xsl:value-of select="StudyPoint"/>
</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:

52
53
54
55
56
57
58
59
60
61
62
63
64
65
<div class="fieldCounsel">
  <xsl:attribute name="dir">
    <xsl:value-of select="//Settings/Direction"/>
  </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: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:

79
80
81
82
83
84
85
86
87
88
89
.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.

[Total: 2    Average: 5/5]

4 thoughts on “S-89 Slips – Highlight when Study Point not assigned

  1. 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

Comments are closed.