digest_html

NAML documentation   Watch a video
   Usages of this macro
... in emails.naml
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
<override_macro name="digest_html" requires="subscription,node_list" unindent="true">
  <n.set_local_subscription
Macro
Parameters: subscription
.this_subscription
Binary
Namespace: SubscriptionNamespace
Parameters: do
/>
  <h2><t>Digest Email</t></h2>
  <h3><n.local_subscription
Macro
Parameters: do
.node
Binary
Namespace: SubscriptionNamespace
Parameters: do
.subject
Macro
Requires: node
/></h3>
  <div style="color:#666666;font-weight:bold">
    <n.digest_post_count
Macro
Requires: node_list
/>
  </div>
 
  <n.reset_list_index
Binary
Namespace: ListSequence
/>
  <n.loop
Macro
Requires: sequence
Parameters: by, do
.>
    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.local_subscription
Macro
Parameters: do
.user
Binary
Namespace: SubscriptionNamespace
Parameters: do
.can_view
Macro
Requires: user
Parameters: node_attr
.current_node
Binary
Namespace: NodeList
Parameters: do
>
      <then>
        <p>
          <div style="font-size:120%">
            <a href="[n.current_node
Binary
Namespace: NodeList
Parameters: do
.url
Macro
Requires: node
Parameters: template, date, index_record
/]"><n.current_node
Binary
Namespace: NodeList
Parameters: do
.digest_subject
Macro
Requires: node
/></a>
          </div>
          <n.trim
Binary
Namespace: BasicNamespace
Parameters: text
.truncate
Binary
Namespace: NabbleNamespace
Parameters: size, if_truncated, text
. size="200">
            <n.compress
Macro
Parameters: text
.current_node
Binary
Namespace: NodeList
Parameters: do
.message
Binary
Namespace: NodeNamespace
Parameters: do
.as_text
Binary
Namespace: MessageNamespace
/>
          </n.trim.truncate.>
          <div style="color:#666666; font: 11px tahoma,geneva,helvetica,arial,sans-serif;">
            <t>by <t.author><b><n.current_node
Binary
Namespace: NodeList
Parameters: do
.owner
Binary
Namespace: NodeNamespace
Parameters: do
.name
Binary
Namespace: UserNamespace
Parameters: truncate
/></b></t.author></t>
            <t>on <t.date.current_node
Binary
Namespace: NodeList
Parameters: do
.when_created
Binary
Namespace: NodeNamespace
Parameters: do
.custom_format
Binary
Namespace: DateNamespace
Parameters: format
 format="yyyy-MM-dd"/></t>
            <t>in <t.location><i><n.current_node
Binary
Namespace: NodeList
Parameters: do
.get_app_node
Binary
Namespace: NodeNamespace
Parameters: do
.subject
Macro
Requires: node
/></i></t.location></t>
          </div>
        </p>
      </then>
    </n.if.local_subscription.user.can_view.current_node>
  </n.loop.>
 
  <br/>
  <br/>
  <n.unsubscribe_line
Macro
Requires: subscription
Parameters: format
 format="html"/>
 
  <hr noshade="noshade" size="1" color="#cccccc" />
  <div style="color:#666666; font: 11px tahoma,geneva,helvetica,arial,sans-serif;">
    <t>DO NOT REPLY TO THIS EMAIL</t><br/>
    <br/>
    <t>Replies sent to this address are not read or processed.</t>
    <t>If you want to respond to a post, please visit: <t.url.local_subscription
Macro
Parameters: do
.node
Binary
Namespace: SubscriptionNamespace
Parameters: do
.url
Macro
Requires: node
Parameters: template, date, index_record
/></t>
  </div>
</override_macro>
Overrides default macro
... in email.naml
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
<macro name="digest_html" requires="subscription,node_list" unindent="true">
    <n.set_local_subscription.this_subscription/>
    <h2><t>Digest Email</t></h2>
    <h3><n.local_subscription.node.subject/></h3>
    <div style="color:#666666;font-weight:bold">
        <n.digest_post_count/>
    </div>
 
    <n.reset_list_index/>
    <n.loop.>
        <p>
            <div style="font-size:120%">
                <a href="[n.current_node.url/]"><n.current_node.digest_subject/></a>
            </div>
            <n.trim.truncate. size="200">
                <n.compress.current_node.message.as_text/>
            </n.trim.truncate.>
            <div style="color:#666666; font: 11px tahoma,geneva,helvetica,arial,sans-serif;">
                <t>by <t.author><b><n.current_node.owner.name/></b></t.author></t>
                <t>on <t.date.current_node.when_created.custom_format format="yyyy-MM-dd"/></t>
                <t>in <t.location><i><n.current_node.get_app_node.subject/></i></t.location></t>
            </div>
        </p>
    </n.loop.>
 
    <br/>
    <br/>
    <n.unsubscribe_line format="html"/>
 
    <hr noshade="noshade" size="1" color="#cccccc" />
    <div style="color:#666666; font: 11px tahoma,geneva,helvetica,arial,sans-serif;line-height:1.5em">
        <t>DO NOT REPLY TO THIS EMAIL</t><br/>
        <br/>
        <t>Replies sent to this address are not read or processed.</t>
        <t>If you want to respond to a post for which you received this email,
        please go to the website: <t.url.local_subscription.node.url/></t>
        <br/>
        <n.macro_viewer_email_link macro="digest_html"/>
    </div>
</macro>