-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOverdueNoticeLetter.xsl
207 lines (207 loc) · 6.78 KB
/
OverdueNoticeLetter.xsl
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="header.xsl"/>
<xsl:include href="senderReceiver.xsl"/>
<xsl:include href="mailReason.xsl"/>
<xsl:include href="footer.xsl"/>
<xsl:include href="style.xsl"/>
<xsl:include href="recordTitle.xsl"/>
<xsl:template match="/">
<html>
<xsl:if test="notification_data/languages/string">
<xsl:attribute name="lang">
<xsl:value-of select="notification_data/languages/string"/>
</xsl:attribute>
</xsl:if>
<head>
<title>
<xsl:value-of select="notification_data/general_data/letter_name"/>
</title>
<xsl:call-template name="generalStyle"/>
<!-- style.xsl -->
</head>
<body>
<xsl:attribute name="style">
<xsl:call-template name="bodyStyleCss"/>
<!-- style.xsl -->
</xsl:attribute>
<xsl:call-template name="head"/>
<!-- header.xsl -->
<div class="messageArea">
<div class="messageBody">
<!-- AFN CODE -->
<xsl:choose>
<!-- AFN test (is_afn_patron) defined in footer.xsl -->
<xsl:when test="(string-length($is_afn_patron) > 0)">
<!-- handle AFN supported languages (is_preferred_lang_fr) defined in footer.xsl-->
<xsl:choose>
<xsl:when test="(string-length($is_preferred_lang_fr) > 0)">
<!-- AFN VERSION 1.8 -->
<p>
<b>Le(s) document(s) suivant(s) de <xsl:value-of select="notification_data/organization_unit/name"/> est (sont) à rendre aujourd'hui. Veuillez retourner le(s) document(s) à votre bibliothèque, ou pour un renouvellement:</b>
</p>
<ol class="afn_steps_list">
<li>
<!-- use a template from footer.xml with AFN conditional link logic. displays as 1. LINK -->
<xsl:call-template name="AFNVisitLoansLink"/>
</li>
<li>
Cliquez sur <xsl:call-template name="AFNOrgName"/> à la gauche et renouvelez le(s) document(s)
</li>
</ol>
<table cellpadding="5" class="listing">
<xsl:attribute name="style">
<xsl:call-template name="mainTableStyleCss"/>
<!-- style.xsl -->
</xsl:attribute>
<tr>
<!-- AFN OFFICIAL TRANSLATION COMING AFN-TRANSLATE
<th>Title</th>
<th>Author</th>
<th>Due Date</th>
<th>Library</th>
-->
<th>Titre</th>
<th>Auteur</th>
<th>Date de retour</th>
<th>Bibliothèque</th>
</tr>
<xsl:for-each select="notification_data/item_loans/item_loan">
<tr>
<td>
<xsl:value-of select="title"/>
</td>
<td>
<xsl:value-of select="author"/>
</td>
<td>
<xsl:value-of select="due_date"/>
</td>
<td>
<xsl:value-of select="library_name"/>
</td>
</tr>
</xsl:for-each>
</table>
<!-- END OF AFN VERSION 1.8 -->
</xsl:when>
<xsl:otherwise>
<!-- handle AFN default language en -->
<!-- AFN VERSION 1.8 -->
<p>
<b>The following item(s) from <xsl:value-of select="notification_data/organization_unit/name"/> are due today. Please return the item(s) to your library, or, to renew them:</b>
</p>
<ol class="afn_steps_list">
<li>
<!-- use a template from footer.xml with AFN conditional link logic. displays as 1. LINK -->
<xsl:call-template name="AFNVisitLoansLink"/>
</li>
<li>
Click the <xsl:call-template name="AFNOrgName"/> option along the left and renew items
</li>
</ol>
<table cellpadding="5" class="listing">
<xsl:attribute name="style">
<xsl:call-template name="mainTableStyleCss"/>
<!-- style.xsl -->
</xsl:attribute>
<tr>
<th>Title</th>
<th>Author</th>
<th>Due Date</th>
<th>Library</th>
</tr>
<xsl:for-each select="notification_data/item_loans/item_loan">
<tr>
<td>
<xsl:value-of select="title"/>
</td>
<td>
<xsl:value-of select="author"/>
</td>
<td>
<xsl:value-of select="due_date"/>
</td>
<td>
<xsl:value-of select="library_name"/>
</td>
</tr>
</xsl:for-each>
</table>
<!-- END OF AFN VERSION 1.8 -->
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<!-- Carleton letter -->
<xsl:call-template name="toWhomIsConcerned"/>
<!-- mailReason.xsl -->
<table role="presentation" cellspacing="0" cellpadding="5" border="0">
<tr>
<td>
The following library items are due today.
</td>
</tr>
<tr>
<td>
<table cellpadding="5" class="listing">
<xsl:attribute name="style">
<xsl:call-template name="mainTableStyleCss"/>
<!-- style.xsl -->
</xsl:attribute>
<tr>
<th>@@title@@</th>
<th>@@description@@</th>
<th>@@due_date@@</th>
</tr>
<xsl:for-each select="notification_data/item_loans/item_loan">
<tr>
<td>
<xsl:value-of select="title"/>
</td>
<td>
<xsl:value-of select="description"/>
</td>
<td>
<xsl:value-of select="due_date"/>
</td>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
<tr>
<td>
If you still need them, please <xsl:call-template name="accountLogin"/> to renew them, or reach out to us and we'll see what we can do.
</td>
</tr>
<tr>
<td>
<xsl:call-template name="ILLreturnLibrary"/>
</td>
</tr>
<tr>
<td>
@@sincerely@@
</td>
</tr>
<tr>
<td>
@@department@@
<br/>
Carleton University Library
</td>
</tr>
</table>
</xsl:otherwise>
</xsl:choose>
<!-- END OF AFN CODE -->
</div>
</div>
<!-- AFN footer template options from footer.xsl -->
<xsl:call-template name="AFNLastFooter"/>
<xsl:call-template name="AFNAccount"/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>